Repository navigation
fix: make the guest-text regexes linear and stop logging a token prefix - #2
Merged
Merged
Conversation
Clears the CodeQL alerts that were open on main before the restructure and reappeared on its moved paths. - normalize.ts EMAIL_RE: cap the local part at 64 chars (RFC 5321). A lookbehind anchor was tried first and rejected: fuzzing showed it stopped masking the second of two back-to-back addresses. - synthesis.ts price gate: the digit branch starts at the beginning of a digit/separator run, at its first digit. Same verdict, linear. - synthesis.ts room-type check, counts.ts bare-number read: no two adjacent \s* around an optional token. - quotationTool.ts split-day parser: the count starts where the digit run starts. - whatsapp-check.mjs printed the first 6 characters of the live access token; it now prints a 10-hex SHA-256 fingerprint. - Test-page script extractors match </script > and are case-insensitive. Checked by differential fuzzing (150k random strings through the real old and new functions: 0 differences in the fact gate, the log mask and count corroboration) and by regexSafety tests in ai/ and quotation/ that pin both the hostile input (100k chars, < 500 ms) and the matches guests produce. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
aidev1-technext
changed the base branch from
chore/restructure-layout
to
main
September 30, 2026 08:00
aidev1-technext
added a commit
that referenced
this pull request
Oct 1, 2026
…on notes, index the folders - docs/demo -> docs/archive/demo-2026-09; phase1/phase2 implementation notes and the extractor-duplication note (solved by mirroring ai/, with a pointer to port-to-team-repo.md) -> docs/archive/notes. - The archify example traces (example-trace-*) are not this project's; removed. - anthony-decisions: no 'Anthropic by default' policy any more (flexible model, Q-021), PR #5 replaces #2/#4, 'the team estimator' for the customer's tool. - docs/README indexes adr, guides, specs, notes, diagrams, site and archive; todo-before-demo marks rounds 1 and 2. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
What changed
This fixes the 10 CodeQL alerts that were already open on
mainand reappeared on #1 because the files moved. It also stops a script from printing part of a live WhatsApp token.ai/src/application/normalize.ts(log mask)ai/src/application/synthesis.ts(price gate, room-type gate)\s*:?\s*becomes\s*(?::\s*)?ai/src/domain/counts.ts\s*next to each other aroundjust/onlyquotation/src/application/quotationTool.ts(split-day dives)(?<!\d)before the countbff/test/renderedPages.test.ts,studioScript.test.ts</script >, case-insensitivebff/scripts/whatsapp-check.mjsWhy it is a separate PR
These regexes are the log mask and the fact gate on messages sent to guests. A change here can change guest-facing behaviour, so it is kept apart from the structural move in #1. This PR is based on #1 and retargets to
mainonce #1 merges.How it was tested
npm run verify: boundaries ok, typecheck ok, 951 tests pass. NewregexSafetytests inai/andquotation/check both halves: a 100k-character hostile input finishes in under 500 ms, and the matches guests actually produce are unchanged (prices written three ways, back-to-back emails,room type: standard,just 4, split-day dives).verifyGuestFacingText,maskForLoggingandcorroborateCount.EMAIL_REstopped masking the second of two addresses written back to back, so it was replaced by the 64-character cap. The only behaviour difference left: a local part longer than 64 characters, which a real address cannot have, is masked from its last 64 characters./took 4.5 s;9followed by 30k0took 1.2 s in the price gate. Both now take near 0 ms.Not fixable in code
Analyze (python)fails because the repo's CodeQL default setup still scans Python, and there is no Python code left in the repo (the only.pyfiles were under.agents/, now untracked). Remove Python under Settings → Code security → CodeQL default setup.🤖 Generated with Claude Code