ci: add dependency review on pull requests#85
Merged
Conversation
Add a dependency-review workflow (actions/dependency-review-action, SHA-pinned v5.0.0) that runs on every PR to main and fails it if a dependency change introduces a known-vulnerable package. It is the PR-time complement to Dependabot, which only reacts after a vulnerable dependency has landed on main. Least privilege (contents: read, no PR comment). fail-on-severity is moderate; because the action only inspects the PR's own dependency changes, it gates the moment a problem would be introduced rather than blocking on unrelated CVEs published against existing dependencies (those stay warnings via the NuGet audit in Directory.Build.props).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a PR-time dependency gate:
actions/dependency-review-actiondiffs the base vs head dependency graph and fails the PR if a change introduces a known-vulnerable package. It complements Dependabot, which only reacts after a vulnerable dependency is already onmain.Type of change
Changes
.github/workflows/dependency-review.yml(new): runs on every PR tomain;contents: readonly (no PR comment — the failed check is the signal); action SHA-pinned to v5.0.0.fail-on-severity: moderate. Because it inspects only the PR's own dependency changes, it gates the moment a problem would be introduced rather than blocking on unrelated CVEs published against existing dependencies (those stay warnings via the NuGet audit inDirectory.Build.props).Testing
dotnet build FirstClassErrors.slndotnet test FirstClassErrors.slnFirstClassErrors.Analyzers.UnitTests)Not applicable: CI-only change, no code touched. The workflow validates itself on this PR (it triggers on
pull_request); YAML parses and the action is SHA-pinned per repo convention.Documentation
🤖 Generated with Claude Code
https://claude.ai/code/session_01AbXi2ZEaUFeFWodNxdY6Zk
Generated by Claude Code