Fix false positive for mutable action version tags #382
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.
Problem
Poutine reports false positives when workflows use mutable version tags like
@v4instead of specific versions like@v4.1.7.When Poutine encounters
@v4, it expands it tov4.0.0and incorrectly flags it as vulnerable.Example False Positive
The
v4tag actually points to the latest and secure version as mentioned in GHSA-cxww-7g56-2vh6. But Poutine treats it asv4.0.0.Solution
Added
non_vulnerable_exact_versionsfield as suggested in #245 by @fproulx-boostsecurity.This field allows excluding specific mutable tags from vulnerability matching, while still catching actual vulnerable versions.
Changes Made
1. Data Structure Enhancement (
osv.rego)Added
non_vulnerable_exact_versionsfield to advisory entries:2. Matching Logic Update (
known_vulnerability_in_build_component.rego)Modified
step_advisory()to:"v4") before trimming3. Applied to GHSA-cxww-7g56-2vh6
Added
"v4"to the exclusion list foractions/download-artifactvulnerability.Benefits
Fixes #245
References