Skip to content

fix(ci): add ignore-vulns input to pip-audit reusable workflow#139

Closed
JacobPEvans wants to merge 6 commits intomainfrom
fix/pip-audit-ignore-vulns
Closed

fix(ci): add ignore-vulns input to pip-audit reusable workflow#139
JacobPEvans wants to merge 6 commits intomainfrom
fix/pip-audit-ignore-vulns

Conversation

@JacobPEvans
Copy link
Copy Markdown
Owner

@JacobPEvans JacobPEvans commented Mar 26, 2026

Summary

  • Adds optional ignore-vulns input to _python-security.yml reusable workflow, allowing callers to pass vulnerability IDs to suppress known false positives (e.g., CVE-2026-4539)
  • Adds optional config input to _osv-scan.yml for passing an osv-scanner.toml config file
  • Replaces the hardcoded --ignore-vuln GHSA-5239-wwwm-4pmq with dynamic caller-provided input
  • Uses bash arrays for argument construction to prevent shell injection (addresses Copilot review feedback)

Changes

  • _python-security.yml: New ignore-vulns input builds a bash array of --ignore-vuln flags; uses --no-emit-project for clean requirements export
  • _osv-scan.yml: New config input passes --config to osv-scanner when provided
  • .cspell.json: Adds vulns to spell-check dictionary

Test plan

  • Existing callers without ignore-vulns continue to work (default empty string, array expands to nothing)
  • Pre-commit hooks pass (YAML validation, cspell, trailing whitespace)
  • CodeQL analysis passes with no open alerts
  • Verify nix-ai CI gate can pass ignore-vulns: 'GHSA-5239-wwwm-4pmq' and pip-audit succeeds

Allows callers to pass vulnerability IDs to ignore when no fix is
available upstream (e.g. CVE-2026-4539 in pygments 2.19.2).

(claude)
Copilot AI review requested due to automatic review settings March 26, 2026 14:57
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional input to the org-wide reusable Python dependency security scan workflow so callers can ignore specific pip-audit vulnerability IDs (e.g., a CVE without an upstream fix).

Changes:

  • Introduces ignore-vulns as an optional workflow_call input with a default empty string.
  • Builds --ignore-vuln arguments from the input and appends them to the pip-audit invocation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

JacobPEvans added a commit to JacobPEvans/nix-ai that referenced this pull request Mar 26, 2026
Add .osv-scanner.toml to acknowledge GHSA-5239-wwwm-4pmq (pygments
ReDoS in AdlLexer) which has no upstream fix. Pass ignore-vulns to
pip-audit reusable workflow for the same CVE.

Depends on: JacobPEvans/.github#139

(claude)
JacobPEvans added a commit to JacobPEvans/nix-ai that referenced this pull request Mar 26, 2026
Reference _python-security.yml from fix/pip-audit-ignore-vulns branch
which accepts the ignore-vulns input. Revert to @main after
JacobPEvans/.github#139 merges.

(claude)
Allows callers to pass a path to osv-scanner.toml via --config flag,
which applies ignore rules globally to all scanned lockfiles.

(claude)
Add --no-editable to uv export to prevent pip-audit from failing on
editable package references that cannot be hash-verified.

(claude)
Strip bare '.' and '-e' lines from uv export output to prevent
pip-audit from failing on local directory references that cannot
be hash-verified.

(claude)
Replaces string concatenation with a bash array for building --ignore-vuln
arguments, preventing potential command injection via shell metacharacters.
Removes the SC2086 shellcheck suppression that was masking the issue.
Adds 'vulns' to cspell dictionary.

(claude)
…vulns

# Conflicts:
#	.cspell.json
#	.github/workflows/_python-security.yml
@JacobPEvans
Copy link
Copy Markdown
Owner Author

Superseded by #143 — centralizing OSV ignores via osv-scanner.toml instead of per-caller workflow inputs. The central config approach avoids DRY violations when multiple repos need the same ignores.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants