-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Snyk configuration file to exclude vendor directory with a prefix #1329
Update Snyk configuration file to exclude vendor directory with a prefix #1329
Conversation
Signed-off-by: Krzysztof Wilczyński <kwilczynski@redhat.com>
@kwilczynski: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -5,4 +5,5 @@ | |||
exclude: | |||
global: | |||
- 'vendor/**' |
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.
Do we need both?
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.
We followed up offline. I think this is fine as is.
/lgtm
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, kwilczynski The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind other
/assign kwilczynski
What this PR does / why we need it:
Some security scanners, such as the csmock, wrap the Snyk scanner and often hand paths directly to it that are fully qualified. This seems to make Snyk not apply the exclude configuration correctly, since the
vendor
directory can have a prefix (of some other top-level directory), for example:"file_name": "cri-tools-3c91ebf539bd2035d60813386f5b1f023937423f/vendor/k8s.io/apimachinery/pkg/util/managedfields/pod.yaml"
The above would result in Snyk not respecting directory exclusion and scanning the content of the
vendor
directory, which is undesirable.Thus, we add a wildcard to accept any prefix in front of the
vendor
directory, should any be provided.Related to:
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?