Skip to content

Add CVE scan #224

Open
Open
@abelsromero

Description

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 generated asciidoctor: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:

  1. Have another job that runs make and scans on PRs. I assume the docker buildx engine should produce equivalent images. In case the scan jobs fails we can still proceed with release steps in build.
  2. Same as 1, but manual job to avoid noise. I personally don't like this, I'd rather have an annoying reminder of CVEs that not.

* 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...

Ruby (gemspec)
==============
Total: 2 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 2, CRITICAL: 0)

+----------+------------------+----------+-------------------+---------------+---------------------------------------+
| LIBRARY  | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION |                 TITLE                 |
+----------+------------------+----------+-------------------+---------------+---------------------------------------+
| json     | CVE-2020-10663   | HIGH     | 1.8.6             | 2.3.0         | rubygem-json: Unsafe object           |
|          |                  |          |                   |               | creation vulnerability in JSON        |
|          |                  |          |                   |               | -->avd.aquasec.com/nvd/cve-2020-10663 |
+----------+------------------+          +-------------------+---------------+---------------------------------------+
| nokogiri | CVE-2021-41098   |          | 1.11.7            | 1.12.5        | rubygem-nokogiri: XEE on JRuby        |
|          |                  |          |                   |               | -->avd.aquasec.com/nvd/cve-2021-41098 |
+----------+------------------+----------+-------------------+---------------+---------------------------------------+

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions