Integrated trivy for security scanning in CI #15
Merged
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.
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 fromproject-requirements.txt
to the more standardrequirements.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