test: suppress the scanner's findings against its own fixtures - #77
Merged
Conversation
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.
ThreatCrush Security Scan144 finding(s) HIGH/CRITICAL: 12 | MEDIUM: 96 | LOW: 36
…and 94 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-linedirectives — 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.
No behaviour change and nothing shipped: the test file is not in the package's
fileslist, so@profullstack/threatcrush@0.4.0on npm is unaffected either way.🤖 Generated with Claude Code