Add dependency review workflow for PR vulnerability comments#7749
Add dependency review workflow for PR vulnerability comments#7749
Conversation
Adds a GitHub Actions workflow that runs dependency-review-action on PRs that modify lockfiles or dependency manifests. Posts a comment summarizing any newly introduced vulnerabilities. Informational only — does not block merging except on critical severity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…orkflow This commit intentionally introduces a known-vulnerable dependency to test the dependency review workflow. Revert this commit after confirming the workflow posts a PR comment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Vulnerabilitiesclients/sample-app/package-lock.json
uv.lock
Only included vulnerabilities with severity high or higher. Scanned Files
|
|||||||||||||||||||||||||||||||||||
Greptile SummaryThis PR adds a new GitHub Actions workflow (
Confidence Score: 4/5
Important Files Changed
Reviews (2): Last reviewed commit: "Switch back to comment-summary-in-pr: al..." | Re-trigger Greptile |
There was a problem hiding this comment.
Dependency Review Workflow — Code Review
Good addition overall. The workflow is well-structured: actions are pinned to commit SHAs, permissions are minimal and correct (contents: read + pull-requests: write), and scoping the trigger to lockfile/manifest paths avoids unnecessary CI runs.
Critical (must fix before merge)
- Revert the test axios commit —
axios@1.7.0with known HIGH vulnerabilities is still present inclients/sample-app/package.jsonandpackage-lock.json. The PR description calls this out explicitly. This must be dropped before merging.
Suggestions
-
fail-on-severity: high+continue-on-error: trueis contradictory — the combination means HIGH severity vulnerabilities are detected but never actually block anything. This is apparently intentional, but it should be documented with a comment in the YAML so future maintainers don't removecontinue-on-error: truewithout understanding the consequence, or alternatively so they can revisit whether enforcement is the right call. -
comment-summary-in-pr: alwaysadds noise on clean PRs — switching toon-failurewould limit PR comments to runs that actually found something, keeping the PR thread cleaner on routine dependency bumps. -
pr: 0in the changelog — needs to be updated to7749.
Nice to Have
- The path globs for Python files (
uv.lock,pyproject.toml) match root-only. Using**/uv.lockand**/pyproject.tomlwould be more future-proof. - It's worth verifying end-to-end that
uv.lockchanges actually surface in the dependency review comment — GitHub's Dependency Review API support for uv's lockfile format may be incomplete.
…arnings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mber Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… races with the workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nt continue-on-error intent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit intentionally introduces a known-vulnerable Python dependency (CVE-2024-23342, Minerva timing attack) to test whether GitHub's dependency graph picks up uv.lock changes. Expected result: no Python vulns in the PR comment, confirming the uv.lock limitation. Revert before merge. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Here's what the PR comment was like when I included two test vulnerable npm and pypi deps: |
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Vulnerabilitiesclients/sample-app/package-lock.json
uv.lock
Only included vulnerabilities with severity high or higher. Scanned Files
|
|||||||||||||||||||||||||||||||||||
…w coverage" This reverts commit 222975e.
…review workflow" This reverts commit 195cc0b.
…ly documented Revert test commits for ecdsa and axios. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
on-failure leaves stale vulnerability comments when vulns are fixed. always ensures a clean push overwrites the previous warning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Clean, well-structured addition. Both actions are pinned to commit SHAs, permissions are minimal and correct, the trigger scope is narrow (only runs when lockfiles/manifests actually change), and the inline comments explain the non-obvious configuration choices clearly.
No critical issues. Three minor findings inline:
- Redundant path entry —
clients/package-lock.jsonis covered byclients/**/package-lock.json(GH Actions**matches zero path segments too). retry-on-snapshot-warnings: false— given uv.lock isn't officially supported, silently skipping on snapshot warnings could mask gaps in Python coverage;truewould make failures visible.license-check: false— worth revisiting in a follow-up to add an allow/deny license list.
One note on the PR description: it states the workflow is "silent on clean PRs", but comment-summary-in-pr: always will post a comment on every run regardless of findings. The inline comment in the workflow (# Always post so that a clean push overwrites any previous warning) explains the actual intent correctly — the PR description is just slightly inaccurate on this point.
Unticketed
Description Of Changes
Adds a new GitHub Actions workflow (
dep_review.yml) that runs dependency-review-action on PRs that modify dependency files (uv.lock,pyproject.toml,clients/package-lock.json,clients/**/package.json).When a PR introduces a dependency with a known vulnerability, the action posts a summary comment directly on the PR conversation thread. GitHub already surfaces vulnerability counts in
git pushoutput, but these are easy to miss in the terminal. This puts the information where developers are already looking — in the PR conversation — with specific details on which packages are affected and what versions fix them.Note on public visibility: Since this is a public repo, vulnerability details will be visible in PR comments. However, the lockfiles themselves are already public — anyone can run a scanner against them to identify the same information. We are not disclosing anything that isn't already trivially discoverable.
Current behavior:
continue-on-error: trueso it never actually blocks merging)Why this approach:
dependency-review-actionis a first-party GitHub action that uses GitHub's dependency graph diff APITesting:
Test commits were added during development to verify the workflow (vulnerable
axios@1.7.0for Node andecdsa==0.18.0for Python). Both were successfully detected and have been reverted.Code Changes
.github/workflows/dep_review.yml— new workflow with dependency-review-actionchangelog/7749-add-dependency-review-action.yaml— changelog entrySteps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works🤖 Generated with Claude Code