Skip to content

test: suppress the scanner's findings against its own fixtures - #77

Merged
ralyodio merged 1 commit into
masterfrom
test-fixture-suppressions
Aug 8, 2026
Merged

test: suppress the scanner's findings against its own fixtures#77
ralyodio merged 1 commit into
masterfrom
test-fixture-suppressions

Conversation

@ralyodio

@ralyodio ralyodio commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #76, which merged before this landed.

The self-scan reports 15 high-severity alerts against the test cases #76 added. A rule test necessarily contains the vulnerable shape it asserts on, and the scanner cannot tell that el.innerHTML = ... inside a string argument is a fixture rather than code.

Suppressed with the tool's own threatcrush-disable-next-line directives — which is what they are for, and dogfooding them is worth something on its own. One directive per rule rather than a blanket disable, so a different rule starting to fire on one of these lines still surfaces.

Only the region added by #76 is touched; the file's pre-existing findings are left exactly as they were.

  • findings against this file: 19 → 9, none of the 9 in the new region
  • 62 scan tests pass

No behaviour change and nothing shipped: the test file is not in the package's files list, so @profullstack/threatcrush@0.4.0 on npm is unaffected either way.

🤖 Generated with Claude Code

The self-scan failed the PR with 15 new high-severity alerts, every one of them
pointing at a test case added in the previous commit. A rule test necessarily
contains the vulnerable shape it asserts on, and the scanner cannot tell that
`el.innerHTML = ...` inside a string argument is a fixture rather than code.

Suppressed with the tool's own `threatcrush-disable-next-line` directives —
which is what they exist for, and dogfooding them is worth something on its
own. One directive per rule rather than a blanket disable, so a *different*
rule starting to fire on one of these lines still surfaces.

Only the newly added region is touched; the file's pre-existing findings are
left exactly as they were.

62 scan tests still pass; findings against this file drop 19 -> 9, and none of
the 9 are in the new region.
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

144 finding(s)

HIGH/CRITICAL: 12 | MEDIUM: 96 | LOW: 36

Severity Rule Location
HIGH sql-template-interpolation apps/cli/src/scan/__tests__/code-rules.test.ts:30
HIGH secret-aws-access-key apps/cli/src/scan/secret-rules.ts:192
HIGH js-shell-exec-interpolation modules/code-scanner/src/__tests__/sast.test.ts:31
HIGH js-shell-exec-interpolation modules/code-scanner/src/__tests__/sast.test.ts:102
HIGH js-shell-exec-interpolation modules/code-scanner/src/__tests__/sast.test.ts:108
HIGH secret-aws-access-key modules/code-scanner/src/secrets/rules.ts:74
HIGH secret-aws-access-key prd/0003-detect-hardcoded-secrets-before-they-are-committed-or-served.md:126
HIGH js-unsafe-yaml-load apps/cli/src/scan/__tests__/code-rules.test.ts:182
HIGH manifest-typosquat apps/mobile/package.json:43
HIGH secret-generic-credential modules/spend-guard/config/example.conf.toml:13
HIGH secret-generic-credential modules/spend-guard/README.md:84
HIGH secret-generic-credential PRD.md:268
MEDIUM js-shell-exec-interpolation apps/cli/src/commands/init.ts:70
MEDIUM js-shell-exec-interpolation apps/cli/src/commands/init.ts:79
MEDIUM sql-template-interpolation apps/cli/src/commands/properties.ts:226
MEDIUM js-shell-exec-interpolation apps/cli/src/commands/service.ts:88
MEDIUM js-shell-exec-interpolation apps/cli/src/commands/service.ts:111
MEDIUM sql-template-interpolation apps/cli/src/core/state.ts:121
MEDIUM sql-template-interpolation apps/cli/src/core/state.ts:125
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:31
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:33
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:34
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:35
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:36
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:43
MEDIUM sql-template-interpolation apps/cli/src/daemon/firewall/adapters.ts:49
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:49
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:56
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:63
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:82
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:84
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:85
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:93
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:98
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:105
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:112
MEDIUM sql-template-interpolation apps/cli/src/index.ts:105
MEDIUM sql-template-interpolation apps/cli/src/index.ts:110
MEDIUM sql-template-interpolation apps/cli/src/index.ts:120
MEDIUM js-shell-exec-interpolation apps/cli/src/index.ts:411
MEDIUM sql-string-concatenation apps/cli/src/scan/__tests__/code-rules.test.ts:20
MEDIUM sql-template-interpolation apps/cli/src/scan/__tests__/code-rules.test.ts:34
MEDIUM sql-string-concatenation apps/cli/src/scan/__tests__/code-rules.test.ts:39
MEDIUM sql-string-concatenation apps/cli/src/scan/__tests__/code-rules.test.ts:48
MEDIUM sql-string-concatenation apps/cli/src/scan/__tests__/code-rules.test.ts:52
MEDIUM js-shell-exec-interpolation apps/cli/src/scan/__tests__/code-rules.test.ts:64
MEDIUM js-unsafe-yaml-load apps/cli/src/scan/__tests__/code-rules.test.ts:178
MEDIUM sql-template-interpolation apps/extension/scripts/build.js:320
MEDIUM sql-template-interpolation apps/extension/scripts/build.js:326
MEDIUM js-unescaped-html-sink apps/web/src/app/about/page.tsx:180

…and 94 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit f4a631d into master Aug 8, 2026
10 checks passed
@ralyodio
ralyodio deleted the test-fixture-suppressions branch August 8, 2026 02:54
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