From 3ebc454b615802b3f111a24424870f78ee194995 Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Tue, 21 Jan 2025 21:01:04 +0200 Subject: [PATCH] ci: Scan the latest image for CVEs Update the Debian snapshot date to the current one, so that we always scan the latest image for CVEs. Refs #1057 --- .github/workflows/scan.yml | 10 +++++++--- .grype.yaml | 38 +++++++++++++++++++++++++++++++++----- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index c4bd6a3..e08dcef 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -21,13 +21,17 @@ jobs: sudo apt install pipx pipx install poetry pipx inject poetry poetry-plugin-export + poetry install --only package + - name: Bump date of Debian snapshot archive + run: | + date=$(date "+%Y%m%d") + sed -i "s/DEBIAN_ARCHIVE_DATE=[0-9]\+/DEBIAN_ARCHIVE_DATE=${date}/" Dockerfile.env + make Dockerfile - name: Build container image run: python3 ./install/common/build-image.py --runtime docker --no-save - name: Get image tag id: tag - run: | - tag=$(docker images dangerzone.rocks/dangerzone --format '{{ .Tag }}') - echo "tag=$tag" >> $GITHUB_OUTPUT + run: echo "tag=$(cat share/image-id.txt)" >> $GITHUB_OUTPUT # NOTE: Scan first without failing, else we won't be able to read the scan # report. - name: Scan container image (no fail) diff --git a/.grype.yaml b/.grype.yaml index 457f6ec..40200e9 100644 --- a/.grype.yaml +++ b/.grype.yaml @@ -2,10 +2,38 @@ # latest release of Dangerzone, and offer our analysis. ignore: - # CVE-2024-11053 + # CVE-2023-45853 # ============== # - # NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2024-11053 - # Verdict: Dangerzone is not affected because libcurl is an HTTP client, and - # the Dangerzone container does not make any network calls. - - vulnerability: CVE-2024-11053 + # Debian tracker: https://security-tracker.debian.org/tracker/CVE-2023-45853 + # Verdict: Dangerzone is not affected because the zlib library in Debian is + # built in a way that is not vulnerable. + - vulnerability: CVE-2023-45853 + # CVE-2024-38428 + # ============== + # + # Debian tracker: https://security-tracker.debian.org/tracker/CVE-2024-38428 + # Verdict: Dangerzone is not affected because it doesn't use wget in the + # container image (which also has no network connectivity). + - vulnerability: CVE-2024-38428 + # CVE-2024-57823 + # ============== + # + # Debian tracker: https://security-tracker.debian.org/tracker/CVE-2024-57823 + # Verdict: Dangerzone is not affected. First things first, LibreOffice is + # using this library for parsing RDF metadata in a document [1], and has + # issued a fix for the vendored raptor2 package they have for other distros + # [2]. + # + # On the other hand, the Debian security team has stated that this is a minor + # issue [3], and there's no fix from the developers yet. It seems that the + # Debian package is not affected somehow by this CVE, probably due to the way + # it's packaged. + # + # [1] https://wiki.documentfoundation.org/Documentation/DevGuide/Office_Development#RDF_metadata + # [2] https://cgit.freedesktop.org/libreoffice/core/commit/?id=2b50dc0e4482ac0ad27d69147b4175e05af4fba4 + # [2] From https://security-tracker.debian.org/tracker/CVE-2024-57823: + # + # [bookworm] - raptor2 (Minor issue, revisit when fixed upstream) + # + - vulnerability: CVE-2024-57823