ci: exclude vendored static JS libs from CodeQL analysis

es-module-shims.js (vendored verbatim from npm) tripped 3 CodeQL
findings (js/incomplete-sanitization, js/bad-code-sanitization x2) --
real escaping-order bugs in the library's own source, verified by hand,
but not reachable in how this project uses it (no dynamic import()
built from untrusted input, no CSP nonce ever set). Reported upstream
separately.

The javascript-typescript CodeQL matrix entry had no path exclusions at
all, unlike the existing Go config's paths-ignore for vendor/generated
code, so preact.module.js and htm.module.js were exposed to the same
risk even though neither had tripped a finding yet. Add a JS-specific
config excluding pkg/service/soundtouchweb/static/lib/** -- we don't
control or modify these files, so findings there aren't actionable
from this repo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Tobias Gesellchen
2026-08-29 17:09:36 +02:00
co-authored by Claude Sonnet 5
parent de30aa8d7f
commit 734b921ac1
2 changed files with 20 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
# CodeQL configuration
# https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning
name: "JavaScript/TypeScript Security Analysis"
disable-default-queries: false
queries:
- uses: security-extended
- uses: security-and-quality
# Paths to exclude from analysis
paths-ignore:
- "**/node_modules/**"
# Vendored third-party libraries (preact, htm, es-module-shims), copied
# verbatim from npm by scripts/update-static-deps.sh. We don't modify or
# control their internals, so findings here aren't actionable from this
# repo -- report upstream instead.
- "pkg/service/soundtouchweb/static/lib/**"
+1 -1
View File
@@ -44,7 +44,7 @@ jobs:
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ${{ matrix.language == 'go' && './.github/codeql-config.yml' || '' }}
config-file: ${{ matrix.language == 'go' && './.github/codeql-config.yml' || matrix.language == 'javascript-typescript' && './.github/codeql-config-js.yml' || '' }}
- name: Build Go (required for manual build-mode)
if: matrix.language == 'go'