Skip to content

Detect versions reported as both affected and fixed - #2499

Open
Prachi194agrawal wants to merge 1 commit into
aboutcode-org:mainfrom
Prachi194agrawal:fix/2324-detect-affected-fixed-conflicts
Open

Prachi194agrawal wants to merge 1 commit into
aboutcode-org:mainfrom
Prachi194agrawal:fix/2324-detect-affected-fixed-conflicts

Conversation

@Prachi194agrawal

Copy link
Copy Markdown

Fixes #2324

An advisory can report the same package version as both affected and fixed. For example, the npm advisory for express-restify-mongoose lists version 3.0.0 in both categories.

This PR adds a step to the advisory ToDo pipeline to detect these conflicts within an individual advisory, including across impacts for the same package. It creates a curation ToDo containing the conflicting versions and leaves their status for a human curator to decide.

The change also avoids duplicate version entries in curation details and supports displaying package types without a registered version range scheme.

Testing

Added a fixture based on the reported npm advisory and tests for conflicting and distinct versions, conflicts across impacts, repeated runs, excluded and non-latest advisories, and curation details.

pytest -q \
  vulnerabilities/tests/pipelines/v2_improvers/test_compute_advisory_todo_v2.py

Result: 22 passed, 47 warnings.
Screenshot from 2026-11-13 23-18-57

Signed-off-by: Prachi Agrawal <prachi194agrawal@gmail.com>

This branch has not been deployed

No deployments
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.

Add step in ToDo computation pipeline to detect inconsistent affected and fixed versions in an advisory

1 participant