Skip to content

ci: report vulnerabilities and fail on HIGH,CRITICAL - #152

Merged
niemeyer merged 2 commits into
canonical:mainfrom
cjdcordeiro:sec-analysis
Oct 14, 2024
Merged

niemeyer merged 2 commits into
canonical:mainfrom
cjdcordeiro:sec-analysis

Conversation

@cjdcordeiro

Copy link
Copy Markdown
Collaborator
  • Have you signed the CLA?

Problem

The current GH workflow runs the Trivy scan but doesn't react to its findings, exiting successfully even if there are vulnerabilities.

In this PR

This PR adds an additional Trivy execution that raises an error on HIGH and CRITICAL vulnerabilities. It also uploads the vulnerability report to the CI run and the GitHub Security dashboard (example)

@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@cjdcordeiro

Copy link
Copy Markdown
Collaborator Author

@letFunny @rebornplusplus can we update the yaml module?

@cjdcordeiro
cjdcordeiro requested review from letFunny and removed request for niemeyer August 7, 2024 12:00
@cjdcordeiro cjdcordeiro added the Simple Nice for a quick look on a minute or two label Aug 8, 2024
@cjdcordeiro

Copy link
Copy Markdown
Collaborator Author

needs #153 for CI to pass

@rebornplusplus

Copy link
Copy Markdown

@letFunny @rebornplusplus can we update the yaml module?

Should be alright, yeah. Following should do it:

go get gopkg.in/yaml.v3
go mod tidy

If you want to take this chance and update everything:

go get -u
go mod tidy

@rebornplusplus

Copy link
Copy Markdown

Oh, I see you raised #153 already!

@niemeyer niemeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't tell if this is actually doing what it should, but the theory sounds good.

@niemeyer
niemeyer merged commit 3880d2b into canonical:main Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Simple Nice for a quick look on a minute or two

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants