Skip to content

Commit 275f0e3

Browse files
ci: add dependency-review workflow
Adds a `QA - Dependency review` workflow that runs `actions/dependency-review-action` on every PR targeting `main`. This blocks PRs that introduce a *new* dependency (direct or transitive) with a known high or critical vulnerability in GitHub's Advisory Database. It complements rather than duplicates Dependabot: Dependabot surfaces vulns in already-merged dependencies; dependency-review catches them at the moment they would be introduced. It also catches the much narrower case that motivated this PR — a maintainer-account-hijack publishing a malicious version to npm — only indirectly: GitHub will not have an advisory entry until the package has been flagged. The real value here is keeping the much larger class of "newly introduced dep happens to carry a known CVE" out of the tree. Configured with: - fail-on-severity: high (block on high/critical only) - comment-summary-in-pr: on-failure (surface diff context to reviewers when a block fires) Pinned to v5.0.0 (a1d282b36b6f3519aa1f3fc636f609c47dddb294). Co-authored-by: Agent <279763771+playpen-agent@users.noreply.github.com>
1 parent bc3c12a commit 275f0e3

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: QA - Dependency review
3+
4+
# Blocks PRs that introduce a dependency with a known vulnerability above
5+
# the configured severity threshold. Covers every ecosystem GitHub's
6+
# Advisory Database supports — for this repo that's npm, Go modules,
7+
# Python (pip/uv), and GitHub Actions.
8+
9+
on:
10+
pull_request:
11+
branches: [main]
12+
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
17+
jobs:
18+
dependency-review:
19+
name: dependency-review
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 5
22+
steps:
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
24+
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
25+
with:
26+
# Block PRs that introduce a *new* dependency with a known
27+
# high/critical vuln. We don't fail on existing vulns — those are
28+
# surfaced separately via Dependabot.
29+
fail-on-severity: high
30+
# Surface a summary comment on the PR itself, in addition to the
31+
# check status, so reviewers can see the diff at a glance.
32+
comment-summary-in-pr: on-failure

0 commit comments

Comments
 (0)