Skip to content

Add dependency review workflow#121

Merged
gtbuchanan merged 3 commits into
mainfrom
worktree-feature+dependency-review-action
May 29, 2026
Merged

Add dependency review workflow#121
gtbuchanan merged 3 commits into
mainfrom
worktree-feature+dependency-review-action

Conversation

@gtbuchanan
Copy link
Copy Markdown
Owner

@gtbuchanan gtbuchanan commented May 29, 2026

Summary

Adds dependency-review.yml — a reusable workflow with two PR-time gates against newly-changed dependencies.

  • review job — runs actions/dependency-review-action, fails on advisories at moderate or higher and on non-permissive licenses per .github/dependency-review-config.yml. Ships the config as a shared license allowlist (0BSD, Apache-2.0, BlueOak-1.0.0, BSD-2/3-Clause, CC0-1.0, ISC, MIT, Unlicense); consumer wrappers inherit it automatically via the config-file input's remote-ref default.
  • version-check job — fails if any newly-added dep isn't at its latest version. Resolves the change set via GitHub's dependency-graph compare API; looks up latest versions via deps.dev (npm, pip, maven, nuget, rubygems, go, cargo) and GitHub Releases (Actions). Handles @v66.*.* wildcard ranges that dep-graph emits for major/minor tags. SHA-pinned Actions are accepted as intentional immutable pinning.

Both jobs require GitHub's Dependency Graph enabled (Settings → Code security and analysis). Coverage is limited to ecosystems the dep graph indexes — npm + GitHub Actions for JS/TS projects. mise tools and .pre-commit-config.yaml hooks aren't covered; Renovate's managers handle those independently.

Not wired into branch protection. Status checks show distinct red ✗ on failure; consumers opt into "required" per repo.

Known limitation: "Unknown License" warnings on GitHub Actions

The dep-review action's summary will list GitHub Actions deps as ⚠️ Unknown License because the dep graph doesn't expose license metadata for Action repos. These are informational only — they don't fail the check. The noise only appears in PR comments when the check is already failing for another reason (comment-summary-in-pr: on-failure). Source code review confirmed there's no config flag to globally accept null licenses; suppression would require an explicit allow-dependencies-licenses allowlist of every Action by PURL (no wildcards supported). Accepting the noise.

Test plan

  • Dependency Review job runs and passes (no vulnerable deps, no disallowed licenses)
  • Version Check job runs and passes — dep-graph reported 2 added entries (actions/checkout, actions/dependency-review-action) from the new manifest; both validated against GitHub Releases as latest
  • Both jobs surfaced as separate status checks
  • Changeset check passes (no package source files modified, so changesets status exits 0 without a changeset file)
  • Manual stale-dep verification — temporary commit added lodash@4.17.20 (latest 4.18.1 per deps.dev) and was reverted after confirming Version Check failed with ::error title=Stale dependency::npm:lodash pinned to 4.17.20, latest is 4.18.1 and exit code 1

🤖 Generated with Claude Code

@gtbuchanan gtbuchanan force-pushed the worktree-feature+dependency-review-action branch from acb1c61 to 829d156 Compare May 29, 2026 15:58
Scans PR dependency changes via actions/dependency-review-action,
failing on moderate+ advisories and non-permissive licenses. Ships
.github/dependency-review-config.yml as the shared license allowlist;
consumer workflows inherit it via the config-file input default.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gtbuchanan gtbuchanan force-pushed the worktree-feature+dependency-review-action branch from 829d156 to ec8411d Compare May 29, 2026 16:46
gtbuchanan and others added 2 commits May 29, 2026 11:58
Adds a version-check job to dependency-review.yml that diffs newly-
added deps via GitHub's dependency-graph compare API (ecosystem-
agnostic) and looks up the latest registry version via deps.dev.
Fails the check on any stale add. Not wired into branch protection;
consumers opt into "required" status per repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The version-check job was added without docs; README and AGENTS.md
described only the dep-review action. Also calls out the GitHub
Dependency Graph requirement and notes the coverage gap (mise tools
and pre-commit hooks aren't indexed there — Renovate covers them).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gtbuchanan gtbuchanan force-pushed the worktree-feature+dependency-review-action branch 2 times, most recently from 7027f5a to 5ff5abd Compare May 29, 2026 18:20
Repository owner deleted a comment from github-actions Bot May 29, 2026
@gtbuchanan gtbuchanan marked this pull request as ready for review May 29, 2026 18:28
@gtbuchanan gtbuchanan merged commit cd26aac into main May 29, 2026
20 checks passed
@gtbuchanan gtbuchanan deleted the worktree-feature+dependency-review-action branch May 29, 2026 18:31
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.

1 participant