fix: honor cdxgen excluded project types#1
Open
BharatDeva wants to merge 1 commit into
Open
Conversation
Signed-off-by: BharatDeva <278575558+BharatDeva@users.noreply.github.com>
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.
Fixes owasp-dep-scan#450
Data Context
--cdxgen-args "--exclude-type ..."was reaching cdxgen, but dep-scan selected every detected project type before invoking cdxgen. That meant an excluded type such asyaml-manifestcould still be scheduled as a separate scan, which is the behavior reported in the issue.Logic Adjustment
This change parses both supported cdxgen forms:
--exclude-type value--exclude-type=valueThe parsed project types are then used to filter dep-scan's detected
project_types_listbefore the scan loop schedules cdxgen invocations.Validation
I ran the focused tests and style checks locally on Windows:
Downstream Impact
No dependency, schema, or report format changes. The only behavior change is that project types explicitly excluded through cdxgen args are no longer scheduled as separate dep-scan project scans.