You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Includes product update to be announced in the next stable release notes
What does this PR do?
Relaxes the flag validation for snyk test and snyk monitor so that the command can be routed to the new flow (e.g reachability) even when an unknown flag is being passed.
Where should the reviewer start?
How should this be manually tested?
Running snyk test --reachability --foo-bar should return the vulnerability information enriched with reachability signals.
What's the product update that needs to be communicated to CLI users?
N/A
Risk assessment (Low | Medium | High)?
Low. This only impacts customers which use the new testing flow, and the impact should be positive.
cliv2/cmd/cliv2/behavior/legacy/validation.go
The addition of --json and --sarif to incompatibleFlagRules (lines 48-49) prevents users from specifying both flags simultaneously. While this is likely intended for clarity, it represents a breaking change for users who may have included both in automated scripts where one flag was previously ignored or took precedence.
cliv2/cmd/cliv2/behavior/legacy/validation.go
Enabling cmd.FParseErrWhitelist.UnknownFlags = true in SetupTestMonitorCommand means that typos in standard flags (e.g., --jsson instead of --json) will no longer be caught by the Cobra parser for the test and monitor commands. These will instead be passed to the legacy CLI or ignored, potentially causing unexpected behavior if the user assumes a flag is active when it is not.
📚 Repository Context Analyzed
This review considered 9 relevant code sections from 8 files (average relevance: 0.79)
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
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.
Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
Relaxes the flag validation for
snyk testandsnyk monitorso that the command can be routed to the new flow (e.g reachability) even when an unknown flag is being passed.Where should the reviewer start?
How should this be manually tested?
Running
snyk test --reachability --foo-barshould return the vulnerability information enriched with reachability signals.What's the product update that needs to be communicated to CLI users?
N/A
Risk assessment (Low | Medium | High)?
Low. This only impacts customers which use the new testing flow, and the impact should be positive.