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

feat: run trivy as image instead of downloading manually #4

Merged

Conversation

mastacheata
Copy link
Collaborator

Reduce complexity by using the official docker image as the CI job image instead of downloading by hand

Reduce complexity by using the official docker image as the CI job image instead of downloading by hand
@mariusburfey
Copy link

I like it! Easier is better.

My only remark is about the version: What do you think about putting the version into a variable, so it gets more visible? Or using latest as it has been before?

@CleoArcher
Copy link
Contributor

Some flags can be replaced by using the TRIVY_ prefix for the variable.

https://aquasecurity.github.io/trivy/v0.22.0/getting-started/cli/config/

Example:

TRIVY_SEVERITY = "MEDIUM,HIGH,CRITICAL" would replace --severity $SEVERITY

* Move severity to Environment variable
* Add a few more comments
* Always use the latest version of trivy
Copy link
Contributor

@CleoArcher CleoArcher left a comment

Choose a reason for hiding this comment

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

remove docker service since trivy is taking care of login to registry and with trivy as base image we don't need docker anymore

Remove all references to docker
Remove last docker reference in variable
Alias old SEVERITY variable to TRIVY_SEVERITY for backwards compatibility
@mastacheata mastacheata merged commit 0c51c36 into ambient-innovation:main Dec 11, 2023
@mastacheata mastacheata deleted the mastacheata-trivy-image branch December 11, 2023 16:10
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.

3 participants