Repository navigation
test(core): add false positive fixtures for technical strings - #171
Conversation
396 lines of UUIDs, hashes, timestamps and version strings in the places they show up (logs, configs, git output, HTTP headers). 87 are flagged today and run as it.fails, so the suite stays green and a fix shows up as a test to take off the list.
|
@BilliamBaSH is attempting to deploy a commit to the Sam Pettiford's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Reviewed — good fixture design, and I'd like to merge this. What works: each line carries its own technical values, so a detection that overlaps one is a real signal rather than a string match. Keeping the 87 currently flagged lines as Two refinements before merge:
Worth adding that count to #75 so it is tracked as a number that goes down. No changeset needed for tests only — correct call. |
Signed-off-by: BilliamBaSH <[email protected]>
|
Thanks for the review, both are done. The 87 now sit in one "known false positives (baseline)" block, and a test pins the count at 87. I'll add the 87 to #75 too. |
Summary
Adds the technical false-positive fixtures from #75: UUIDs, hashes, timestamps and version strings that hold no PII, kept as reusable regression fixtures so future pattern changes can be tested against them.
Refs #75; the multilingual set comes next as its own PR.
Changes
tests/fixtures/technical-strings.ts: 396 made-up lines, 33 shapes with 12 each, every value inside the kind of line it shows up in (logs, configs, git output, HTTP headers). Each line lists its technical values.tests/technical-false-positives.test.ts: a detection that overlaps one of a line's technical values fails that line.it.fails, so CI stays green and a later fix shows up as a test to take off the list. Happy to switch toit.skipor a plain list if you'd prefer.What gets flagged today, on the technical value itself:
exp/iatepoch seconds as PHONE_UK (12 of 12)[email protected]as DATE (12 of 12)10.6.135.xas IPV4, DATE and PHONE_UK (12 of 12)10.0.19045.5668as PHONE_UK and XBOX_GAMERTAG (12 of 12)1.88.1238.79945as DATE and ZIP_CODE_US (12 of 12)I didn't count NAME hits on the words around a value ("Fix typo in README"), since that's a different problem from this one.
Testing
npm testnpm run lintbun run lint9 of 9,bun run typecheck9 of 9, build 8 of 8,bun run test8 of 8. Core went from 653 passing to 963 passing plus 87 expected failures, 0 failing.Checklist