|
| 1 | +name: "Hyperframes CodeQL config" |
| 2 | + |
| 3 | +# Use GitHub's default security-extended suite — it's a strict superset of the |
| 4 | +# default suite (more queries, slightly higher false-positive rate). Pair it with |
| 5 | +# the query-filters below so the extra queries don't drown the dashboard. |
| 6 | +queries: |
| 7 | + - uses: security-extended |
| 8 | + |
| 9 | +# Per-rule path filters. The intent is to silence rules that have known false |
| 10 | +# positives on specific file shapes (generated test artifacts, CDN-script test |
| 11 | +# fixtures, functional-cleanup regex) WITHOUT excluding those paths from all |
| 12 | +# analysis — a malicious contributor adding e.g. a command-injection sink into |
| 13 | +# a "test fixture" would still get caught. |
| 14 | +# |
| 15 | +# To audit what changed: look at PR diffs touching this file. Reviewers should |
| 16 | +# treat it like CODEOWNERS — adding a new path exclusion is a policy change. |
| 17 | +query-filters: |
| 18 | + # Generated test artifacts (golden baselines written by the producer test |
| 19 | + # harness). Every compiled.html re-rasterizes the regex-stripped composition; |
| 20 | + # the same alerts fire on every fixture and on every re-render. |
| 21 | + - exclude: |
| 22 | + id: js/incomplete-sanitization |
| 23 | + paths: |
| 24 | + - "packages/producer/tests/**/output/compiled.html" |
| 25 | + - "packages/producer/tests/**/failures/*.html" |
| 26 | + |
| 27 | + # Test fixtures and skill test corpora intentionally load CDN scripts without |
| 28 | + # SRI — pinning hashes there would fight the test's purpose (we want the test |
| 29 | + # to use whatever the registry hands back, the same way a composition would). |
| 30 | + - exclude: |
| 31 | + id: js/functionality-from-untrusted-source |
| 32 | + paths: |
| 33 | + - "packages/producer/tests/**" |
| 34 | + - "skills/**/test-corpus/**" |
| 35 | + - "skills/**/assets/test-corpus/**" |
| 36 | + |
| 37 | + # The hand-rolled HTML cleanup regex in our build-time tooling looks like a |
| 38 | + # sanitizer to CodeQL but isn't one — it strips framework bootstraps from |
| 39 | + # captured pages before they're fed back into our own renderer (Puppeteer, |
| 40 | + # not a user-facing DOM). Same for the text normalizer in the whisper path |
| 41 | + # (caption text → SRT/VTT, no DOM emission). Scope these exclusions to the |
| 42 | + # exact files that contain functional regex, not to whole directories, so |
| 43 | + # any new code in cli/, core/, or producer/ that LOOKS like a sanitizer |
| 44 | + # still trips the rules. |
| 45 | + - exclude: |
| 46 | + id: js/bad-tag-filter |
| 47 | + paths: |
| 48 | + - "packages/cli/src/capture/index.ts" |
| 49 | + - "packages/cli/src/whisper/normalize.ts" |
| 50 | + - "packages/core/src/lint/utils.ts" |
| 51 | + - "packages/producer/src/services/htmlCompiler.ts" |
| 52 | + - exclude: |
| 53 | + id: js/incomplete-multi-character-sanitization |
| 54 | + paths: |
| 55 | + - "packages/cli/src/capture/index.ts" |
| 56 | + - "packages/cli/src/whisper/normalize.ts" |
0 commit comments