Skip to content

chore(security): pin remaining vulnerable transitive deps#31

Merged
Musiker15 merged 3 commits into
mainfrom
chore/security-pin-transitive-deps
Jul 26, 2026
Merged

chore(security): pin remaining vulnerable transitive deps#31
Musiker15 merged 3 commits into
mainfrom
chore/security-pin-transitive-deps

Conversation

@Musiker15

@Musiker15 Musiker15 commented Jul 26, 2026

Copy link
Copy Markdown
Member

Behebt die letzten offenen Dependabot-Alerts, für die Dependabot keinen eigenen PR erstellen konnte, weil es rein transitive Abhängigkeiten ohne passenden Direkt-Bump sind. Umgesetzt über yarn resolutions.

Paket vorher nachher kommt über Alert
qs 6.14.2 6.15.3 express #10
uuid 8.3.2 11.1.1 sockjs #9
ws 7.5.10 7.5.13 webpack-bundle-analyzer #16
ws 8.20.0 8.21.1 webpack-dev-server #17, #11
brace-expansion 1.1.13 5.0.8 minimatch #30, #37

Für ws sind zwei getrennte Resolutions nötig, weil zwei Major-Linien parallel im Baum sind. Die glob-Form (**/parent/child) ist bei Yarn 1 Pflicht, die kurze Form parent/child greift nur bei Top-Level-Dependencies.

brace-expansion, der Sonderfall

GHSA-mh99-v99m-4gvg (high, DoS durch unbegrenzte Expansion) ist ausschließlich in 5.0.8 behoben, für die 1.x-Linie gibt es keinen Patch. Der direkte Weg scheitert daran, dass der CommonJS-Build von brace-expansion 5 ein Objekt exportiert statt einer Funktion, minimatch@3 aber require('brace-expansion')(pattern) macht. Und minimatch@3 hängt noch an serve-handler und docusaurus-lunr-search.

Gelöst über die andere Richtung: minimatch 10 hängt selbst bereits an brace-expansion ^5.0.5. Ein kleiner Shim unter patches/minimatch-compat stellt minimatch 10 unter der callable minimatch@3 API bereit und wird per resolutions eingehängt. Damit ist minimatch@3 raus, brace-expansion löst regulär auf das echte, gepatchte 5.0.8 auf, und es wird nichts vor dem Scanner versteckt.

Beide Consumer rufen minimatch ausschließlich als Funktion auf, keine Nutzung von .Minimatch, .filter und Co. Der Shim reicht diese Properties trotzdem durch, damit er die Form des ersetzten Moduls behält.

Alle betroffenen Pakete sind Build- bzw. Dev-Zeit-Abhängigkeiten, nichts davon landet im generierten Static Site Output.

Getestet

  • yarn typecheck läuft durch
  • yarn build läuft durch, lunr-Indexierung unverändert bei 37 Dokumenten
  • A/B-Vergleich Shim gegen echtes minimatch 3.1.5 über neun Glob-, Globstar- und Brace-Patterns, identische Ergebnisse
  • serve-handler-Smoketest gegen den gebauten Output, inklusive Header-Glob-Matching das tatsächlich über minimatch läuft
  • sockjs-Smoketest gegen uuid 11, da das ein Major-Sprung ist

Behebt die Dependabot-Alerts, für die es keinen eigenen PR gab, über
yarn resolutions:

- brace-expansion 1.1.13 -> 1.1.16 (via minimatch)
- qs 6.14.2 -> 6.15.3 (via express)
- uuid 8.3.2 -> 11.1.1 (via sockjs)
- ws 7.5.10 -> 7.5.13 (via webpack-bundle-analyzer)
- ws 8.20.0 -> 8.21.1 (via webpack-dev-server)

Geprüft mit yarn typecheck, yarn build und einem sockjs-Smoketest.

Geänderte Dateien:
- package.json
- yarn.lock
@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 3 package(s) with unknown licenses.
See the Details below.

License Issues

patches/minimatch-compat/package.json

PackageVersionLicenseIssue Type
minimatch-modernnpm:minimatch@^10.2.5NullUnknown License

yarn.lock

PackageVersionLicenseIssue Type
minimatch3.1.6NullUnknown License
minimatch-modern10.2.5NullUnknown License
Denied Licenses: GPL-2.0, GPL-3.0

OpenSSF Scorecard

PackageVersionScoreDetails
npm/minimatch-modern npm:minimatch@^10.2.5 UnknownUnknown
npm/balanced-match 4.0.4 🟢 5.8
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review🟢 3Found 4/13 approved changesets -- score normalized to 3
Security-Policy🟢 10security policy file detected
Maintained🟢 1012 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 9license file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/brace-expansion 5.0.8 🟢 7.3
Details
CheckScoreReason
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 4Found 7/16 approved changesets -- score normalized to 4
Maintained🟢 1018 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies🟢 10all dependencies are pinned
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 9license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/minimatch 3.1.6 UnknownUnknown
npm/minimatch-modern 10.2.5 UnknownUnknown
npm/uuid 11.1.1 🟢 4.5
Details
CheckScoreReason
Security-Policy⚠️ 0security policy file detected
Maintained🟢 1014 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 3Found 8/26 approved changesets -- score normalized to 3
Dangerous-Workflow⚠️ 0dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies🟢 6dependency not pinned by hash detected -- score normalized to 6
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
SAST🟢 7SAST tool is not run on all commits -- score normalized to 7
Packaging🟢 10packaging workflow detected
npm/ws 7.5.13 🟢 5.5
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ 0Found 0/29 approved changesets -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Security-Policy🟢 10security policy file detected
Maintained🟢 1017 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/ws 8.21.1 🟢 5.5
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ 0Found 0/29 approved changesets -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Security-Policy🟢 10security policy file detected
Maintained🟢 1017 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • patches/minimatch-compat/package.json
  • yarn.lock

GHSA-mh99-v99m-4gvg ist nur in brace-expansion 5.0.8 behoben, für die
1.x-Linie gibt es keinen Fix. Ein direkter Bump auf 5.x geht nicht, weil
der CommonJS-Build dort ein Objekt statt einer Funktion exportiert und
minimatch@3 (via serve-handler und docusaurus-lunr-search) genau diese
callable API braucht.

Deshalb ein kleiner lokaler Compat-Shim: brace-expansion wird per
resolutions auf patches/brace-expansion-compat gemappt, der intern
@isaacs/brace-expansion 5.0.1 nutzt (gleicher Fix, GHSA-7h2j-956f-4vf2
dort ab 5.0.1 behoben) und ihn unter der alten callable Signatur
weiterreicht. Damit ist brace-expansion 1.x komplett aus dem Baum raus
und das Expansion-Limit von 100000 greift.

Geprüft mit yarn typecheck, yarn build inklusive lunr-Indexierung und
einem serve-handler-Smoketest gegen den gebauten Output.

Geänderte Dateien:
- package.json
- yarn.lock
- patches/brace-expansion-compat/package.json (neu)
- patches/brace-expansion-compat/index.js (neu)
Der vorherige Ansatz hat brace-expansion selbst ersetzt. Das funktioniert
zwar technisch, der Dependency-Review-Scan sieht das Paket aber weiterhin
als brace-expansion 1.x und schlägt an. Die Version künstlich über 5.0.7
zu heben wäre nur Kosmetik gegenüber dem Scanner.

Stattdessen jetzt an der richtigen Stelle angesetzt: minimatch wird per
resolutions auf einen Shim gemappt, der minimatch 10 unter der callable
minimatch@3 API bereitstellt. minimatch 10 hängt selbst schon an
brace-expansion ^5.0.5, damit löst brace-expansion regulär auf 5.0.8 auf
und die verwundbare 1.x-Linie ist komplett aus dem Baum. Nichts wird
maskiert, das Paket ist echt gepatcht.

Beide Consumer (serve-handler, docusaurus-lunr-search) rufen minimatch
ausschließlich als Funktion auf. Ein A/B-Vergleich gegen echtes
minimatch 3.1.5 über neun Glob-, Globstar- und Brace-Patterns liefert
identische Ergebnisse.

Geprüft mit yarn typecheck, yarn build inklusive lunr-Indexierung
(unverändert 37 Dokumente) und einem serve-handler-Smoketest, bei dem
das Header-Glob-Matching über minimatch tatsächlich greift.

Geänderte Dateien:
- package.json
- yarn.lock
- patches/minimatch-compat/package.json (neu)
- patches/minimatch-compat/index.js (neu)
- patches/brace-expansion-compat/ (entfernt)
@Musiker15
Musiker15 merged commit 820eb23 into main Jul 26, 2026
4 checks passed
@Musiker15
Musiker15 deleted the chore/security-pin-transitive-deps branch July 26, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant