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

Integrated trivy for security scanning in CI #15

Merged

Conversation

ricardogsilva
Copy link

@ricardogsilva ricardogsilva commented Feb 14, 2024

This PR adds security scanning with trivy to the dagger CI pipeline and sets up github actions for running it daily.

The proposed implementation uses the trivy rootfs command to scan the built docker container from inside of it. This scans OS packages and project dependencies altogether.

The current PR proposes running the security scanning on a daily schedule, detached from the usual commit or PR cycle. Later we can also implement scanning with trivy's trivy fs command, which would only scan the project dir (which means it does not look for vulnerabilities in the OS installed packages) and use that for every push/pr - I am leaving this change for a later PR as I would need to change the name of the requirements file from project-requirements.txt to the more standard requirements.txt (which seems to be what trivy expects to find) and that change will have implications in more files, which I would prefer to not touch for now

@ricardogsilva ricardogsilva marked this pull request as ready for review February 14, 2024 20:08
@ricardogsilva
Copy link
Author

There seems to be a way to connect this with the github security scanning feature:

https://aquasecurity.github.io/trivy/v0.38/docs/vulnerability/examples/report/#sarif

I plan to check how this works later, possibly in a subsequent PR

@francbartoli francbartoli merged commit 219cf3c into geobeyond:main Feb 15, 2024
1 check 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.

Add vulnerability scanning
2 participants