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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Does Snyk code test command support --exclude flag for excluding directories?💡 Result:
The snyk code test command does not support the --exclude flag for excluding directories [1][2][3]. While the --exclude flag is available for other commands like snyk test (used for Open Source scanning) to ignore directories and files [4][5], it is not a recognized option for Snyk Code (SAST) scanning [1][2]. To exclude directories or files from a Snyk Code scan, you must use one of the following methods: 1. Use the snyk ignore --file-path=<directory_or_file> command: Running this command will automatically create or update a.snyk file in your repository to exclude the specified path from future snyk code test scans [6][3]. 2. Manually configure a.snyk file: You can manually create or edit a.snyk file in your repository to include the directories or files you wish to exclude from the scanning process [2][3].
Citations:
🏁 Script executed:
Repository: openshift/release
Length of output: 306
🏁 Script executed:
Repository: openshift/release
Length of output: 50374
🏁 Script executed:
Repository: openshift/release
Length of output: 2580
🏁 Script executed:
Repository: openshift/release
Length of output: 296
🏁 Script executed:
Repository: openshift/release
Length of output: 27192
Snyk severity-threshold change suppresses non-vendored findings (vendor removal doesn’t limit it)
SNYK_PRE_EXECUTION_HOOK_CMD: rm -rf vendorruns before the code scan, butSNYK_CODE_ADDITIONAL_ARGS: --severity-threshold=highis injected into the samesnyk code testinvocation, so medium/low findings in the remaining (non-vendor) code are also suppressed.snyk code testdoesn’t support--exclude; if the goal is to ignore vendored paths, usesnyk ignore/ a.snykpolicy (and wire it in, e.g. via--policy-path=.snyk) instead of raising the global severity threshold.🤖 Prompt for AI Agents