Skip to content

ci: add Dependency Review Action to block vulnerable dependency changes - #2038

Closed
jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1987-dependency-review
Closed

jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-1987-dependency-review

Conversation

@jbetala7

Copy link
Copy Markdown
Contributor

Problem

gstack ships dependency-bearing manifests (package.json, bun.lock) but has no pull-request dependency-review gate. A PR can currently add or bump an npm/Bun dependency without any CI check that blocks newly introduced known vulnerabilities.

Confirmed on origin/main (c7ae632): the workflows present are actionlint, ci-image, evals, evals-periodic, make-pdf-gate, pr-title-sync, skill-docs, version-gate, windows-free-tests, windows-setup-e2e — none of them does dependency review, and git grep -E 'dependency-review|osv-scanner|scorecard|codeql|attestation|Dependabot' over .github / package.json / bun.lock returns nothing.

Fix

Add .github/workflows/dependency-review.yml using GitHub's official actions/dependency-review-action. On every pull request it diffs the dependency graph (base...head) and fails the check when a change introduces a dependency with a high or critical advisory. The action only runs in pull_request context (it needs a base/head diff), so the trigger is scoped to pull_request.

  • fail-on-severity: high is a conservative first threshold (blocks high/critical, ignores low/moderate noise). Documented inline and trivial to tighten to moderate/low.
  • permissions: contents: read only — fork-safe, no comment-summary, no write scope needed.
  • Matches existing house style: runs-on: ubicloud-standard-8, version-tagged actions (actions/checkout@v4).

Testing

  • Validated with actionlint 1.7.12 — the same linter run by .github/workflows/actionlint.yml (rhysd/actionlint): no issues.
  • This workflow is self-demonstrating: it runs on this very PR.

Scope

One new file. No VERSION/CHANGELOG bump required (version-gate only triggers on VERSION/CHANGELOG.md/package.json changes).

Fixes #1987

🤖 Generated with Claude Code

gstack ships dependency-bearing manifests (package.json, bun.lock) but has
no pull-request gate that blocks newly introduced known-vulnerable
dependencies. A PR can currently add or bump an npm/Bun dependency with no
CI check against advisories.

Add a Dependency Review workflow using GitHub's official
actions/dependency-review-action, which diffs the dependency graph
(base...head) on each pull request and fails when a change introduces a
dependency with a high or critical advisory. The threshold is documented
inline and easy to tighten to moderate/low.

Matches existing workflow house style (ubicloud-standard-8 runner, version-
tagged actions, minimal contents:read permissions). Validated with
actionlint 1.7.12 (the same linter run by .github/workflows/actionlint.yml):
no issues.

Fixes garrytan#1987

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@trunk-io

trunk-io Bot commented Jun 18, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

time-attack pushed a commit to time-attack/gstack that referenced this pull request Jul 13, 2026
… this repo

The workflow (from community PR garrytan#2038) requires GitHub's Dependency Graph,
which needs an admin toggle we don't have access to. Without it the check
errors on every PR instead of gating anything. Local 'bun audit' plus the
diff@9 advisory bump cover the actual dependency risk for this fork.

Co-Authored-By: Claude Fable 5 <[email protected]>
@capy-ai

capy-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, @jbetala7. This is now covered on main: .github/workflows/dependency-review.yml (plus osv-scanner) now runs on PRs (shipped in v1.65.0.0, #2577). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output.

@capy-ai capy-ai Bot closed this Oct 3, 2026
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.

Add Dependency Review Action to block vulnerable dependency changes

1 participant