-
Notifications
You must be signed in to change notification settings - Fork 22
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
Start to scan all distroless images with Trivy #6
Conversation
apko-snapshot/action.yaml
Outdated
format: 'table' | ||
exit-code: ${{ inputs.trivy-exit-code }} | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN' |
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.
@kaniini I YOLO'd all of them here, but we can tune this based on what we reasonable expect to be fixed quickly in the feeds.
Actually, if I drop the
I believe this is where @knqyf263 work will help? 🤞 |
I think the way I want this to evolve is as follows:
|
Ok, I added 1/2 here, and TODOs for the other bits. |
44ab871
to
5add2fe
Compare
It looks like uploading CodeQL results need |
Hmm, even with that is fails 🤔 |
I'll back out the codeql stuff for now... |
Only update :latest on a clean scan after all of the signatures and (eventually) attestations have been published. Signed-off-by: Matt Moore <[email protected]>
5add2fe
to
3002e4a
Compare
Yes, we're trying to capture Alpine version from |
Signed-off-by: Matt Moore <[email protected]>
caed1b4
to
91bc182
Compare
Alright, I have a basic form of this that will start publishing vulnerability attestations as well, I'm going to pull that in here as a second commit. |
@knqyf263 interesting, so @kaniini added support for emitting @kaniini should we change things to emit Thank you both for the quick fixes here 🙏 |
As I talked with @kaniini, I believe Otherwise, we can not know which stream should be used since v3.16 doesn't exist yet in secdb. |
@knqyf263 Ok, I think the latest |
Here are some of the relevant files:
I defer to you two on the best course forward here, I just wanted to call out the (potential) inconsistency early, so we could sort it out if it were a problem. |
We can't detect it now😄 As @mattmoor pointed out, we are inconsistent now.
Currently
Or, you can put |
After thinking about it for a while, I realized that it is better to use the version of the repository for vulnerability detection, regardless of the OS version. This is because packages are installed according to the repository settings and the secdb stream should be determined from where a package is installed. Please correct me if I'm wrong. It might be problematic if user installs some packages from 3.14 and others from 3.15, for example. But I didn't find repository info in |
No, |
In the long term, the idea is that scanners would consume
Mixing Alpine versions results in an unsupported configuration. I think Trivy should warn about this. |
Just FYI, v0.26.0 is out and Also, once @kaniini writes a reference about |
@knqyf263 when do you think this will land in the trivy action? |
It would be in a few days if we don't see any issue. |
ok cool, I will circle back next week. I want to make sure this is WAI once that lands. |
Seems to work, thanks! |
@mattmoor can we disable trivy ? i'm using private repo and it's unable to fetch the image. |
With 0.3.1 Trivy is able to recognize that we're an Alpine image:
This change will make it so that all of the distroless releases will scan the image (you can control whether this is fatal with
trivy-exit-code: '0'
.Signed-off-by: Matt Moore [email protected]