-
Notifications
You must be signed in to change notification settings - Fork 1
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
✨(ci) add security scan #429
Conversation
a1b4499
to
72d612c
Compare
52db560
to
fd9a1ec
Compare
09662b3
to
ce884b3
Compare
ce884b3
to
07db7cd
Compare
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.
I notice that the build jobs frequently fail with the following error message (reformatted for clarity):
2024-10-30T10:48:12Z FATAL Fatal error
image scan error:
scan error:
scan failed:
failed analysis:
analyze error:
pipeline error:
failed to analyze layer (sha256:e4e85ef47ed5564337c653adcb6f9f3760ead021d1cd0691a29a1ac57fd6f5b0):
post analysis error: Unable to initialize the Java DB:
Java DB update failed: DB download error: oci download error:
failed to fetch the layer:
GET https://ghcr.io/v2/aquasecurity/trivy-java-db/blobs/sha256:a18f04a942e33d9ffd8cf1ab4d35a09f88936e0729cdd4171dea0aa15a0e457c:
TOOMANYREQUESTS: retry-after: 80.883µs, allowed: 44000/minute
This is troublesome, we've been trying to reduce noise/instability in the build…
This is a known Trivy issue aquasecurity/trivy#7538
I don't think the issue this can be fixed within this PR, it will require changing the trivy action.
@@ -1,4 +1,5 @@ | |||
name: Docker Hub Workflow | |||
run-name: Docker Hub Workflow |
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.
Any particular reason to use run-name
over name
? (I don't think this is a blocker for merging the PR but if there is a practical reason it might be useful to document it…)
See #500 for a version of this PR without the fixes applied, showing the Trivy report with CVEs. |
After discussion with @mjeammet a good solution would be to make this an optional check in CI. Will look into that. |
Add a security scan for CVE with trivy
Use alpine version for production image instead of debian in order tohave less CVEs.
Use alpine version for production image instead of debian in order to have less CVEs.
07db7cd
to
0ab465c
Compare
Separate security scan from build-and-push, so we can make it optional in CI
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.
Extracted the scan from build-and-push so an occasional failure for non-security reasons will not block from merging or require re-running jobs.
Add a security scan for CVE with trivy