Repository navigation
Add Dependency Review Action to block vulnerable dependency changes #1987
Copy link
Copy link
Closed
Description
Summary
GStack has dependency-bearing manifests (package.json, bun.lock) but no pull-request dependency review gate. A PR can currently add or bump an npm/Bun dependency without a CI check that blocks newly introduced known vulnerabilities.
GitHub's current dependency review action is designed for this exact PR-time guard: it compares dependency changes in the pull request and can fail the workflow when vulnerable dependencies are introduced.
Repo-local evidence
origin/mainhas workflow files under.github/workflows/:actionlint.yml,ci-image.yml,evals.yml,evals-periodic.yml,make-pdf-gate.yml,pr-title-sync.yml,skill-docs.yml,version-gate.yml,windows-free-tests.yml,windows-setup-e2e.yml.git grep -n -E 'dependency-review|osv-scanner|scorecard|ossf/scorecard|semgrep|codeql-action|github/codeql|attest-build-provenance|attestation|Dependabot' origin/main -- .github package.json bun.lockreturned no matches.origin/main:package.jsonincludes runtime dependencies (@huggingface/transformers,@ngrok/ngrok,diff,marked,playwright,puppeteer-core,socks) and dev dependencies (@anthropic-ai/claude-agent-sdk,@anthropic-ai/sdk,xterm,xterm-addon-fit).bun.lockis tracked onorigin/main, so dependency changes have a concrete lockfile surface for PR review.- The repo already has a live dependency-security example: diff@7.0.0 has DoS advisory in parsePatch/applyPatch (GHSA-73rr-hh4g-fpgx) #1588 tracks
diff@7.0.0/ GHSA-73rr-hh4g-fpgx, with v1.60.2.0 fix(deps): bump diff to ^9.0.0 to clear GHSA-73rr-hh4g-fpgx (#1588) #1599 opened as the bump. That kind of issue should be caught at dependency-change time, not only after a separate security review.
Expected impact
- Blocks PRs that introduce known vulnerable dependencies before they merge.
- Gives contributors immediate feedback in the PR instead of relying on later manual review or ad hoc issue filing.
- Complements CI hardening: provider API keys exposed on pull_request (evals.yml) + third-party actions pinned to mutable tags #1948: that issue covers secret exposure and mutable action tags; this one covers project dependency vulnerability gating.
Suggested fix
Add a focused workflow, for example .github/workflows/dependency-review.yml:
- Trigger on
pull_requestwhenpackage.json,bun.lock, or the workflow itself changes. - Use least-privilege
permissions: contents: read. - Run
actions/dependency-review-actionwith a pinned full commit SHA, not a mutable tag, to stay aligned with CI hardening: provider API keys exposed on pull_request (evals.yml) + third-party actions pinned to mutable tags #1948. - Start with
fail-on-severity: moderateandfail-on-scopes: runtime, development, then tune if this is too noisy.
Duplicate check performed
- Inspected 200 open issues with
gh issue list --repo garrytan/gstack --state open --limit 200 --json number,title,body,url,updatedAt,labels. - Inspected 200 open PRs with
gh pr list --repo garrytan/gstack --state open --limit 200 --json number,title,body,url,updatedAt,headRefName,isDraft,labels. - Searched open issues/PRs for:
dependency review,OSV,OpenSSF,Scorecard,Semgrep,workflow permissions,least privilege,GITHUB_TOKEN permissions, andcontents: read. - No open issue or PR covers adding a dependency review gate. Adjacent items found:
- CI hardening: provider API keys exposed on pull_request (evals.yml) + third-party actions pinned to mutable tags #1948 covers provider API key exposure and mutable action tags.
- diff@7.0.0 has DoS advisory in parsePatch/applyPatch (GHSA-73rr-hh4g-fpgx) #1588 / v1.60.2.0 fix(deps): bump diff to ^9.0.0 to clear GHSA-73rr-hh4g-fpgx (#1588) #1599 cover one specific vulnerable dependency bump.
- fix(ci): add workflow-level permissions for PR comments #663 covers PR-comment workflow permissions for
evals.yml, not dependency vulnerability gating.
Commands/files inspected
gh issue list --repo garrytan/gstack --state open --limit 200 --json number,title,body,url,updatedAt,labelsgh pr list --repo garrytan/gstack --state open --limit 200 --json number,title,body,url,updatedAt,headRefName,isDraft,labelsgh api --method GET search/issues -f q='<targeted query>'git fetch origin maingit ls-tree -r --name-only origin/main .githubgit grep -n -E 'dependency-review|osv-scanner|scorecard|ossf/scorecard|semgrep|codeql-action|github/codeql|attest-build-provenance|attestation|Dependabot' origin/main -- .github package.json bun.lockgit show origin/main:package.jsongit ls-tree -r --name-only origin/main | egrep '(^|/)(bun.lockb|bun.lock|package-lock.json|pnpm-lock.yaml|yarn.lock)$'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
jbetala7 commentedon Jun 18, 2026
Opened #2038 — adds
.github/workflows/dependency-review.ymlusingactions/dependency-review-action(fail-on-severity: high,contents: readonly, ubicloud-standard-8). Validated with actionlint 1.7.12, no issues. The workflow runs on its own PR as a self-demonstration.ci: add Dependency Review Action to block vulnerable dependency changes
capy-ai commentedon Oct 2, 2026
Verified on main (v1.91.13.0):
.github/workflows/dependency-review.ymlruns GitHub's Dependency Review Action on pull requests, so dependency changes with known vulnerabilities are blocked. Added in v1.65.0.0 (#2577). Thanks! Reply here if it misses a case and we'll reopen.