-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[feat][ci] Add Trivy container scan Github workflow #22063
[feat][ci] Add Trivy container scan Github workflow #22063
Conversation
This commit introduces a Github Actions workflow that runs a Trivy container scan on the following Docker containers: - apachepulsar/pulsar:3.2.0 - apachepulsar/pulsar-all:3.2.0 The workflow runs daily @ 0800 UTC and if it finds any vulnerabilities of HIGH or CRITICAL severity it sends an email including the report to the Pulsar DEV mailing list as well as upload the report to the workflow run in Github.
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.
Thanks for starting this!
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.
Please remove the "Email Trivy container scan report" step so that we can merge this. We can add emailing later if we find out a way to do that.
- removed email - removed choice of report format
- removed upload report step
This commit introduces a Github Actions workflow that runs a Trivy container scan on the following Docker containers:
The workflow runs daily @ 0800 UTC and if it finds any vulnerabilities of HIGH or CRITICAL severity it sends an email including the report to the Pulsar DEV mailing list as well as upload the report to the workflow run in Github.
Motivation
Our dependencies are currently scanned via the OWASP dependency checker but we have nothing checking on the vulnerability of our published Docker containers.
Modifications
As described in the summary, this adds a scheduled workflow that uses Trivy to run a scan against our published Docker containers.
Verifying this change
As always, Github Actions workflow are a pain to test. I have tested this one in isolation in prototype repository and it works well. We will not be able to verify it until it gets merged into mainline branch.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: onobc#4
I tested this thoroughly in a personal repo before submitting this PR. Here is what the output looks like:
Github Actions UI
Generated email
Attached email report
Note
This is the report in
table
format, we could instead usejson