From 9efb6c365c1917bcc33f8c87146d7f76b7aeec24 Mon Sep 17 00:00:00 2001 From: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Date: Thu, 21 May 2026 14:16:02 +0200 Subject: [PATCH] ci: add dependency-review workflow (#22464) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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> * Update comment. --------- Co-authored-by: Agent <279763771+playpen-agent@users.noreply.github.com> --- .github/workflows/qa-dependency-review.yml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/qa-dependency-review.yml diff --git a/.github/workflows/qa-dependency-review.yml b/.github/workflows/qa-dependency-review.yml new file mode 100644 index 0000000000..c02653bd08 --- /dev/null +++ b/.github/workflows/qa-dependency-review.yml @@ -0,0 +1,32 @@ +--- +name: QA - Dependency review + +# Blocks PRs that introduce a dependency with a known vulnerability above +# the configured severity threshold. Covers every ecosystem GitHub's +# Advisory Database supports — for this repo that's npm, Go modules, +# Python (pip/uv), Cargo, and GitHub Actions. + +on: + pull_request: + branches: [main] + +permissions: + contents: read + pull-requests: write + +jobs: + dependency-review: + name: dependency-review + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 + - uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 + with: + # Block PRs that introduce a *new* dependency with a known + # high/critical vuln. We don't fail on existing vulns — those are + # surfaced separately via Dependabot. + fail-on-severity: high + # Surface a summary comment on the PR itself, in addition to the + # check status, so reviewers can see the diff at a glance. + comment-summary-in-pr: on-failure