-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add CVE scan #224
Comments
Hello! Thanks for reporting and proposing this idea! Would you be willing to start working on it and proposing a PR? (I can, as a maintainer, but new contribution and help is always a good thing :) ). Running the scan on each
The amount of cases of reported vulnerabilities is always noisy on such project: it feels like we should use it as an indicator rather than a "blocker".
However starting by scanning and then acting on the current one is a good idea. |
It doesn't require anything. As far as I've seen it scans the files for specific files in a CVE database. That means that if I rename a known jar to something else it wont' match it. Also, the action is just a wrapper of https://github.com/aquasecurity/trivy which can be run as a plain CLI locally.
Then, it discards using it as part of the main build, but a failure will definetly happen. So if we want to reduce noise the only option is just ran as a weekly to scan latest version on dockerhub.
The thing then is "can we trust the test?". For instance, 2 things to do are upgrading java to at least 11 and |
At it again, to go baby steps and avoid breaking things I like the idea of having a weekly scheduled job running on the latest release from dockerhub. If it helps to jump-start security fixing we can move to main build when we feel confortable.
wdyt? Seems there are already a few things to fix. |
The new 'CVE scan' pipeline scans the latest published image for high & critical vulnerabilities. closes asciidoctor#224
Hello @abelsromero , many thanks for this huge work! I'm reopening the issue to keep track of the next steps: the security scan runs daily as expected and is now documented, all thanks to the heavy lifting work you did. However the scan tells me daily that "there are CVEs" which means: security issues detected. Please note that th work you did on #240 showed a great impact: no more CVEs detected on Alpine. We have to iterate on the remaining list and decide if there are false positive (e.g. not exploitable or not highly enough), or if they are fixable (and fix them). As for today, there are:
|
Side note: I've been shown https://github.com/anchore/grype, an alternative to trivy or azure scan. I don't say we should reconsider the choice, but it has a feature that is really useful: you can remove the CVEs from the scan that does not have a fix (yet?) available. The rationale is that these CVEs alerts must provide an actionable, or there are false positive indeed. If there are no actionable (e.g. not CRITICAL and no fix), then better to ignore them. Do you know if there is such a feature in trivy? |
The problem still remains that current pipeline just scans a publicly released version. It's been a good starting point and provided feedback but maybe not the best approach.
1 & 2 are complementary and necessary, 3 is lower priority to me. I could start migrating to Grype so at least we can ignore some CVEs and reduce noise but I would definetly not ignore one unless some research is done, at least it would be nice to have an issue with some explanation or a README.
The feature is there, but not exposed in the github-action. Grype scan action seems to offers that already adding a config file to the repo https://github.com/anchore/scan-action#additional-configuration. |
May be precipitate, but I just run grype locally and my first impression in not very positive. As you can see in the output is not classified by OS, Java, Ruby, etc. which means we need to dig deeper (the full json report helps though) but the real point is it's reporting what I consider false values, many of the CVEs related to pdf-reader relate to "Foxit PDF Reader". Wdyt? I still think I can work with trivy gh action to add the CVE filtering.
|
As discussed in Zulip, we could add azure/container-scan to obtain a report on CVEs included in the image.
Ideally, we want it to run on every build after
make build
which is simple when running in the same job since we are scaning the locally generatedasciidoctor:latest
image. However the issue is that if we find a HIGH CVE (which happens now*) the build will break and maybe that's not desirable.If we don't want that, we can:
build
.* The issue are jars pulled by
epubcheck-ruby:4.2.4.0
and indirect ruby dependencies. Upgrading to epubcheck-ruby latest v4.2.6.0 fixes the jar issues but I don't know the impact of that. For Ruby we may need to go deeper...The text was updated successfully, but these errors were encountered: