Repository navigation
feat: block only on vulnerabilities in runtime dependencies - #2
Merged
Merged
Conversation
A finding now blocks only when the package is a runtime dependency: one that a project of the lock needs, through its dependencies and extras and the extras they ask for. Packages that only dependency groups need (dev, test, docs, ...) don't ship with the project: their findings are reported in the job summary, marked "development", without failing. A lock without a project counts every package as a runtime dependency. Assisted-by: Pi:claude-opus-5-5
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.
🤖 AI text below 🤖
Findings now block a merge only when they are in a runtime dependency. Findings in packages that only the dependency groups need (dev, test, docs, …) are still listed in the job summary, marked "development", but don't fail the check.
Changes
scripts/dependency_scan.py:runtime_packageswalks the lock from its projects (editable or virtual packages) and their extras, through the dependencies and the extras each one asks for, but not the dependency groups. With several versions of a package locked, it follows the version each dependency names. A lock without a project counts every package as a runtime dependency, so nothing is skipped by mistake.README.md: what counts as a runtime dependency, and that tools listed in[project] dependenciescount: move them to a dependency group.Validation
[project] dependencies.