From 83290a0f1adf7324ca4de94f051a1c3d70f84886 Mon Sep 17 00:00:00 2001 From: Paul Nothaft <53005142+the-luap@users.noreply.github.com> Date: Wed, 19 Aug 2026 13:56:10 +0200 Subject: [PATCH] chore(security): ignore unfixed CVEs in Trivy, override deepmerge-ts (#1085) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stable twin of #1083, scoped to what exists on this branch. docker-build.yml — set ignore-unfixed on both Trivy steps. Stable has the backend and frontend legs only (no aio, no ml), so two steps here against four on main. Base-image CVEs with no released fix are not actionable: the Dockerfiles already run `apt-get upgrade -y` behind a CACHEBUST, so a fix lands in the next build automatically. Reporting them buries anything someone can actually act on. backend — deepmerge-ts <8.0.0 has a stack-exhaustion advisory (CVE-2026-40345, high) reached via mailparser -> html-to-text, which pins ^7.1.5 so npm cannot get there alone. Stable carries the same mailparser ^3.9.9 and the same 3-high exposure as main. Not reachable in our code: html-to-text only feeds deepmerge-ts its options object, never parsed email content. npm audit on this branch goes 3 high -> 0. The ml/Dockerfile half of #1083 has no counterpart here — the face sidecar does not exist on stable, so there is nothing to drift. Verified on stable itself rather than assuming main's results carry: npm audit 3 high -> 0, html-to-text exercised end-to-end through simpleParser, and jest at 1577 passed. The 5 failing suites (20 tests) fail identically on clean origin/stable with these changes stashed. Co-authored-by: Paul Nothaft --- .github/workflows/docker-build.yml | 16 ++++++++++++++++ backend/package-lock.json | 20 +++++++++++++++----- backend/package.json | 3 ++- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 21bbe0aa..77558227 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -203,6 +203,14 @@ jobs: format: 'sarif' output: 'trivy-backend-${{ env.PLATFORM_PAIR }}.sarif' severity: 'CRITICAL,HIGH' + # Base-image CVEs with no released fix are not actionable: the + # Dockerfiles already run `apt-get upgrade -y` behind a CACHEBUST, + # so a fix lands in the next build automatically. Reporting them + # buries the findings someone can actually do something about. + # Dropping them is also the precondition for ever setting + # exit-code: 1, which build-backend's comment flags as a + # deliberate follow-up. + ignore-unfixed: true timeout: '10m' - name: Upload Trivy scan results to GitHub Security tab @@ -425,6 +433,14 @@ jobs: format: 'sarif' output: 'trivy-frontend-${{ env.PLATFORM_PAIR }}.sarif' severity: 'CRITICAL,HIGH' + # Base-image CVEs with no released fix are not actionable: the + # Dockerfiles already run `apt-get upgrade -y` behind a CACHEBUST, + # so a fix lands in the next build automatically. Reporting them + # buries the findings someone can actually do something about. + # Dropping them is also the precondition for ever setting + # exit-code: 1, which build-backend's comment flags as a + # deliberate follow-up. + ignore-unfixed: true timeout: '10m' - name: Upload Trivy scan results to GitHub Security tab diff --git a/backend/package-lock.json b/backend/package-lock.json index 17e118ee..b89c51ef 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -1,12 +1,12 @@ { "name": "picpeak-backend", - "version": "3.45.14", + "version": "3.46.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "picpeak-backend", - "version": "3.45.14", + "version": "3.46.0", "dependencies": { "@aws-sdk/client-s3": "^3.850.0", "@aws-sdk/lib-storage": "^3.850.0", @@ -5315,9 +5315,19 @@ } }, "node_modules/deepmerge-ts": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz", - "integrity": "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-8.0.1.tgz", + "integrity": "sha512-szCXE7YLCvLKR9bFPJcvsezOShdalctSvrgN/LM/QGUEPZQajwjmsMObZ6/DuANT5lxzM/wtO8Feubwdkz8myA==", + "funding": [ + { + "type": "ko-fi", + "url": "https://ko-fi.com/rebeccastevens" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/deepmerge-ts" + } + ], "license": "BSD-3-Clause", "engines": { "node": ">=16.0.0" diff --git a/backend/package.json b/backend/package.json index 2ee7c39e..270a4de3 100644 --- a/backend/package.json +++ b/backend/package.json @@ -93,6 +93,7 @@ "@tootallnate/once": ">=3.0.1", "ip-address": ">=10.3.1", "uuid": "^11.1.1", - "nodemailer": "^9.0.1" + "nodemailer": "^9.0.1", + "deepmerge-ts": ">=8.0.1" } }