Repository navigation
fix: merge duplicate pip-audit advisories and shorten their descriptions - #96
Merged
Merged
Conversation
pip-audit can list one advisory twice, and its descriptions keep GHSA markdown headings inline once newlines are flattened.
Contributor
✅ All test workflows behaved as expected13 passed, 0 failed
|
Also merge alias chains in ID order so the result does not depend on the hash seed.
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.
The pip-audit table in the PR comment (seen on EOPF-Explorer/data-model#322) listed certifi
PYSEC-2026-4320twice, because pip-audit itself returns it once per fix version, and showed each description as the first 120 characters of the raw advisory, so GHSA### Summaryheadings appeared inline and text was cut mid-word. Advisories that share an ID or alias are now merged into one row (and one annotation) listing every fix version, the footer still gives pip-audit's raw count when duplicates were merged, and the description is the advisory's first sentence with markdown headings dropped, cut at a word if it is over 120 characters.How this was made
Claude Code wrote the change and its tests after @lhoupert flagged the duplicate rows and unreadable descriptions in the data-model#322 comment and asked to keep the total count. The four new tests fail on
mainand pass with the change;pytest(183 tests), mypy and pre-commit pass, and feeding pip-audit's real output for the data-model#322 pins through the report gives 24 rows instead of 25 with one-sentence descriptions. A ponytail over-engineering pass trimmed two spots before commit. An independent Claude Code review agent then found that a heading followed by a single newline still hid the summary (about 1 in 10 real PyPI advisories) and that alias-chain merges depended on hash order; both are fixed in b35d3fe with tests that fail without the fix, and replaying 298 real PyPI advisory descriptions changes 25 rows, all to the advisory's summary sentence. The reviewer's abbreviation ("e.g.") and fix-version ordering points were left as is: no real advisory hit the first, and a sentence split on capital letters made Django advisories worse. CI, including the integration tests, passes.— Claude Code, on behalf of @lhoupert