Skip to content
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

IT-3921: Rebuild container when Trivy code scan fails #7

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

brucehoff
Copy link
Contributor

@brucehoff brucehoff commented Oct 31, 2024

This repo' runs a daily scan of the built container image using Trivy and reports its findings to on the repo's Security tab. When findings appear they can almost always be addressed simply by rebuilding the image, which picks up updates to the dependencies. In this way rebuilding the Docker image is analogous to patching a linux server.

This PR adds logic to the daily scan to automatically trigger a rebuild of the image when the scan fails, by incrementing the semvar tag. If the rebuild is successful an updated image will be pushed to ghcr.io. If the rebuild fails to address the findings then no new image will be pushed, and instead the IT team will see the findings in the Security tab, and investigate, following our current process.

@brucehoff brucehoff requested a review from a team October 31, 2024 15:37
Copy link
Member

@ConsoleCatzirl ConsoleCatzirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, I really like this approach

@brucehoff brucehoff merged commit 030adbc into Sage-Bionetworks-IT:main Oct 31, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants