fix: --skip-unresolved flag and no files being uploaded#6586
Open
paulrosca-snyk wants to merge 3 commits intomainfrom
Open
fix: --skip-unresolved flag and no files being uploaded#6586paulrosca-snyk wants to merge 3 commits intomainfrom
paulrosca-snyk wants to merge 3 commits intomainfrom
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
5bd91b0 to
b95d6a3
Compare
b95d6a3 to
e5240d3
Compare
cliv2/go.mod
Outdated
| github.com/snyk/cli-extension-iac-rules v0.0.0-20260206080712-9cbb5f95465d | ||
| github.com/snyk/cli-extension-mcp-scan v0.0.0-20260205184045-13a21a9b38c4 | ||
| github.com/snyk/cli-extension-os-flows v0.0.0-20260217135510-c516a8ddef18 | ||
| github.com/snyk/cli-extension-os-flows v0.0.0-20260225153202-9c7a0e16ceb3 |
Contributor
There was a problem hiding this comment.
I left a comment on the last change. Extensions should be application agnostic and therefore not assume anything like stderr ... we might need to fix this in the CLI so that errors can be still rendered via the UI even with --json
Contributor
There was a problem hiding this comment.
That makes sense! How do you recommend we do this? Does GAF provide an interface for this that we could use where CLI can infer whether to use stderr or something?
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.
Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
--skip-unresolved
Fixes the behaviour of the
--skip-unresolvedflag insnyk test/snyk monitor.In the current implementation the flag is registered as a string, which breaks the use case of plainly passing
--skip-unresolvedand instead requires the user to pass--skip-unresolved=true.With this change, the flag will be registered as boolean, which will fix the aforementioned issue.
--reachability code upload
If during the code upload phase of
snyk test --reachability/snyk monitor --reachabilityno files end up being uploaded (e.g they were skipped due to: issues opening them, being .gitignored/.snyk ignored, not supported by the code engine) we will now render a warning, tostdoutfor the human readable output or tostderrfor--json/--sarif.Where should the reviewer start?
How should this be manually tested?
--skip-unresolved
Running
snyk test --reachability --skip-unresolved --severity-threshold=highshould only return issues with severityhigh.In the previous version of the CLI, the
--severity-thresholdflag was ignored due to the parsing bug in the--skip-unresolvedflag.--reachability code upload
Running
snyk test --reachabilityin a directory with a broken symlink should render a warning but run the test and return vulnerabilities successfully.What's the product update that needs to be communicated to CLI users?
Users enlisted in the CLI Test w/ Reachability EA will now:
--skip-unresolvedflag