Repository navigation
test(tax-packs): move ReDoS-fixture pattern out of analyzed TS source - #407
Merged
Merged
Conversation
Contributor
Greptile SummaryThis PR moves the deliberately catastrophic registration-number pattern from inline TypeScript into a JSON fixture while preserving the existing check-25 rejection assertion.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains in the reviewed changes.
|
| Filename | Overview |
|---|---|
| tests/tax-pack-management.test.ts | Replaces the inline catastrophic pattern with a JSON fixture loaded using an established mechanism while preserving the rejection test. |
| tests/fixtures/catastrophic-registration-format.json | Adds fixture data with the expected pattern-and-description shape for the check-25 negative test. |
Reviews (3): Last reviewed commit: "test(tax-packs): load the check-25 rejec..." | Re-trigger Greptile
itsbkm
force-pushed
the
fix/tax-pack-registration-number-format
branch
from
August 19, 2026 21:22
ed2b598 to
56ccc0c
Compare
…nline Two attempts at an inline codeql[] suppression comment (js/polynomial-redos, then the correct js/redos) did not stop CodeQL's default-setup PR gate from flagging the deliberately-catastrophic (A+)+ pattern as a new high-severity alert. Move the pattern into a JSON fixture instead, matching how this file already loads its other pack fixtures (synthetic-dual-rate-pack.json etc.) — it's data, not a regex literal in analyzed TypeScript source, so it's no longer something the scanner has a literal to flag in the first place. Co-Authored-By: Claude Sonnet 5 <[email protected]>
itsbkm
force-pushed
the
fix/tax-pack-registration-number-format
branch
from
August 19, 2026 21:45
56ccc0c to
06c70cb
Compare
This was referenced Aug 20, 2026
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.
Summary
Follow-up to #405 (merged via admin override while the CodeQL default-setup PR gate was still red on this one file).
(A+)+catastrophic-backtracking shape as fixture data to provevalidationChecklistrejects it. CodeQL's PR-time gate correctly recognizes the shape as dangerous and flags it as a new high-severity alert, even though it's negative-test fixture data never compiled or run against untrusted input outside that one reject-path assertion.codeql[...]suppression comments (wrong rule id, then the corrected one) did not stop the gate from flagging it.tests/fixtures/catastrophic-registration-format.json, loaded the same way this file already loads its other pack fixtures — it's data, not a regex literal in analyzed TypeScript source, so there's nothing left for the scanner to flag.Confirmed separately that
maincurrently has zero open CodeQL alerts — the persisted alert list uses a stricter "remote threat model" filter than the PR-time gate, and a test-only fixture never qualified. This is pure cleanup so future PRs touching this file don't hit the same false positive.Test plan
npx tsc --noEmitnpm run lintnpx ts-node --transpile-only -P tests/tsconfig.json tests/tax-pack-management.test.ts(159/159 passing)🤖 Generated with Claude Code