Skip to content

Scan the dependencies for vulnerabilities with Trivy - #1808

Open
classiqdor wants to merge 2 commits into
mainfrom
trivy_scan
Open

classiqdor wants to merge 2 commits into
mainfrom
trivy_scan

Conversation

@classiqdor

Copy link
Copy Markdown
Contributor

Adds Security-dependencies.yml: scans every dependency (direct and transitive) for known vulnerabilities with Trivy.

  • The requirements files are unpinned, which Trivy can't resolve, so pip install --dry-run --report pins them first (metadata only, ~20s), and Trivy scans the pinned list
  • One scan per classiq variant (classiq, [chemistry], [qml], [qsp], all extras), since the notebooks !pip install the extras, and they pin some packages to other versions (e.g. [chemistry] pins openfermion==1.7.1)
  • Fails on HIGH/CRITICAL vulnerabilities that have a fixed version
  • Runs weekly (Saturday 05:00 UTC), on PRs that change requirements*.txt or this workflow, and on demand
  • Trivy runs from its Docker image, pinned to 0.76.2, rather than through aquasecurity/trivy-action, whose tags were hijacked in March 2026 (GHSA-69fq-xp46-6x23). The vulnerability database is downloaded fresh on every run, so the pin doesn't freeze it

Local run: all 5 scans pass. At any severity, the only finding is requests==2.32.5 (CVE-2026-25645, MEDIUM), via classiq[chemistry] → openfermion==1.7.1 → requests~=2.32.2.

🤖 Generated with Claude Code

The requirements files are unpinned, so pip resolves them first (`--dry-run`,
metadata only), and Trivy scans the pinned list. Runs weekly, on PRs that change
the requirements, and on demand; one scan per classiq extra.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant