-
Notifications
You must be signed in to change notification settings - Fork 20
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
Security scan opens issues for releases without vulnerabilities #532
Comments
Nice find! In the end, this issue creation is purely a tactic used internally to notify engineers of work that needs to be tackled, and doesn't have an impact on what is published in our user-facing docs, correct? If that is the case, since we know why this is occurring, I would be ok just leaving it as is, and basically err on the side of over-creating issues, even if there is nothing to be done. |
The process for generating the Gloo Gateway docs page with CVE reporting is a bit convoluted and not well documented, but effectively isolated from the opening of issues To summarize:
This summary should probably be in a README of some sort in the Gateway OSS repo, but leaving it here for the moment As far as whether to actually act on this issue, I would still be in favor, as it's confusing to have Security Alert issues when there are no vulnerabilities with potentially serious ramifications Before doing so, we should check in with Platform to make sure that resolving this bug would not break any of their workflows and, if it would, we should collaborate on a solution that works for both teams |
Overview
Security alert issues, such as solo-io/gloo#10039, are being opened for releases that do not have any vulnerabilities according to the scans
This causes confusion, as the opening of Security Alert issues implies that vulnerabilities are present and need to be addressed, and simply closing them is not a sustainable workaround since a new issue will be reopened the next time the scan runs
Cause
This appears to be due to a change from #525 whereby we now always populate
vulnerabilityMd
, adding a message that explicitly states that no vulnerabilities were found for each image for which no vulnerabilities were foundThis breaks an assumption made here in
GithubIssueWriter.Write()
that if there are no vulnerabilities, the argument passed asvulnerabilityMarkdown
will be emptyFurther Investigation
We (Gateway team) should check in with Platform team to learn about their Trivy Issue usage and whether/why they're OK with Github issues always being opened
Solution
SecurityScanRepo.RunMarkdownScan()
currently always callsGithubIssueWriter.Write()
and relies on that function to determine whether an issue should be written, however since the original code was written, the issue-writing became one implementation of anIssueWriter
interface rather than a stand-alone functionThe
LocalIssueWriter
implementation ofWrite()
does not attempt to determine whether an issue should be written, and the description ofWrite()
in the interface definition does not allude to this being part of the function's responsibilityTherefore we should determine whether an issue should be written prior to calling
Write()
(ie withinSecurityScanRep.RunMarkdownScan()
) and remove code fromGithubIssueWriter.Write()
that attempts to determine whether an issue should be writtenThe text was updated successfully, but these errors were encountered: