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.
Ticket(s), Design Docs, other Relevant Artifacts:
Description
This PR performs a security audit using an open source tool called Trivy. A repository scan is run every commit and a scan of the repository and latest image for the main/master branch is run nightly.
For the the nightly build, if there are issues reported, a slack message is generated to the monitoring-sdk slack channel. The message looks like this:
The Slack user display name will be changed to "CircleCI Build Bot".
Examples of the reports in HTML can be seen here in the artifacts tab: https://app.circleci.com/pipelines/github/sightmachine/sightmachine-sdk/417/workflows/d826285e-3a79-49a8-be1d-76e0aa65f7e8/jobs/1089
A number of legacy integrations were upgraded as part of maintaining tech-debt in the build system:
The tuning of the trivy report can be handled in a separate ticket.
Testing
This was manually tested via the CircleCI build process. A log of the test are cached in CircleCI under the branch.
To test yourself, replay an existing build or clone the branch and push.
To test the cve-image-scan job, attach it to the commit build.
Documentation
A markdown readme about configuring Trivy for developers / QA has been added.