-
Notifications
You must be signed in to change notification settings - Fork 62
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: Support Trivy status filtering #844
Feat: Support Trivy status filtering #844
Conversation
Signed-off-by: Fabian Gonzalez <fabiangonz98@gmail.com>
Signed-off-by: Fabian Gonzalez <fabiangonz98@gmail.com>
Signed-off-by: Fabian Gonzalez <fabiangonz98@gmail.com>
Signed-off-by: Fabian Gonzalez <fabiangonz98@gmail.com>
Signed-off-by: Fabian Gonzalez <fabiangonz98@gmail.com>
7896ebf
to
27aea68
Compare
@inFocus7 Thank you for the contribution! :) |
Signed-off-by: Fabian Gonzalez <fabiangonz98@gmail.com>
Looks like helm pull secret test was failing due to PodTemplate not found error which we fixed recently. Tests pass after rebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after rebase
@ashnamehrotra Thanks! It looks like some checks failed, not sure if they were flakes though |
@inFocus7 I think they may be flakes. I cannot re-run the failed tests, would you be able to do that again so we can check? |
@inFocus7 I can't seem to re-run tests either, checking if closing and re-opening resolves this |
@sozercan @ashnamehrotra Thanks all! So looks like they were flakes, theres just two failing checks now.
|
🥳 |
Signed-off-by: Fabian Gonzalez <fabiangonz98@gmail.com> Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com> Signed-off-by: ashnamehrotra <ashnamehrotra@gmail.com>
What this PR does / why we need it:
Adds ability to filter by image vulnerability status through a new field
ignoredStatuses
incomponents.scanner.config
.https://aquasecurity.github.io/trivy/v0.44/docs/configuration/filtering/#by-status
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #821
Special notes for your reviewer:
Still needs to be (manually) end-to-end tested. Have only "verified" it works based on logic and the small test for the config, but have not done any manual verification.
Manual Verification Steps
Install Eraser with updated scanner
kind create cluster
make docker-build-trivy-scanner TRIVY_SCANNER_IMG=eraser-trivy-scanner:dev
kind load docker-image eraser-trivy-scanner:dev
helm upgrade --install eraser charts/eraser --values override.yaml
(seen below)Test Eraser with vulnerable image
docker pull docker.io/library/alpine:3.7.3
(pulling vulnerable image)docker exec -ti kind-control-plane bash
crictl images
(in the bash)kind load docker-image alpine:3.7.3
helm upgrade --install eraser charts/eraser --values override.yaml
to see it taking effect.fixed
is an ignored status, the image does not get deleted. When we don't ignore it, it gets deleted (as expected). That alpine image only has a singleCRITICAL
-fixed
vuln.override.yaml