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

Scan images using Trivy #685

Merged
merged 19 commits into from
Oct 8, 2024
Merged

Scan images using Trivy #685

merged 19 commits into from
Oct 8, 2024

Conversation

P4sca1
Copy link
Collaborator

@P4sca1 P4sca1 commented Oct 8, 2024

This PR sets up container image scanning using Trivy from Aquasecurity.

  • Images will be scanned in the CI workflow.
  • Scanning is performed in the containerbuild job after pushing the image to the registry.
  • Scan results are available in the workflow log (the comment from github-advanced-security originated from a test to store SARIF outputs in the GitHub security tab and can be ignored).
  • When an unfixed critical CVE is found, the pipeline exits with status code 1. Images are already pushed to the registry at this point and can be pulled for further debugging.
  • fail-fast was disabled, so that if one containerbuild job from the matrix fails, the other jobs are still executed.

This PR also changes the Python base image version back from 3.12.3 to 3.12. It was pinned to version 3.12.3, because 3.12.4 did not work. The most recent 3.12 version should work again.

Sample workflow log: https://github.com/fkie-cad/Logprep/actions/runs/11236005155/job/31235173514?pr=685

I recommend squashing all commits when merging, because the history is quite messy due to experimenting with the pipeline.

@github-advanced-security
Copy link

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.

@P4sca1 P4sca1 marked this pull request as ready for review October 8, 2024 12:55
@P4sca1 P4sca1 requested review from ekneg54 and removed request for ekneg54 October 8, 2024 12:55
@P4sca1 P4sca1 marked this pull request as draft October 8, 2024 13:00
@P4sca1 P4sca1 marked this pull request as ready for review October 8, 2024 13:04
@P4sca1 P4sca1 requested a review from ekneg54 October 8, 2024 13:04
@ekneg54 ekneg54 merged commit 53d702f into main Oct 8, 2024
13 checks passed
@ekneg54 ekneg54 deleted the trivy-scan branch October 8, 2024 20:11
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