Repository navigation
fix(ci): reject escaped quoted keys in deny.toml exceptions - #1600
Merged
smart-ssh-coordinator[bot] merged 2 commits intoNov 25, 2026
Merged
smart-ssh-coordinator[bot] merged 2 commits into
smart-ssh-coordinator[bot] merged 2 commits into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
7 tasks
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
7 tasks
There was a problem hiding this comment.
Review
Verdict: approved
Review level: normal
Blocking
None.
Non-blocking
scripts/generate-third-party-notices.mjs:189(already on develop, not introduced here): comment stripping usesl.replace(/#.*$/, ""), which also cuts at a#inside a string. Solicenses = { allow = ["#"], exceptions = [{ crate = "x", allow = ["GPL-2.0"] }] }(and the same line with"exceptions") still makesparseExceptionsreturn[]with no message. I confirmed this against both develop and this branch. It is outside the escaped-key scope of #1599, so it is listed under Follow-ups.
Verified
- counter-proof: I reverted
scripts/generate-third-party-notices.mjstoorigin/developand rannpx vitest run src/licenseCompatCheck.test.ts: 8 failed / 44 passed. The 4 escaped forms failed in both the throw test and the spawn test. After restoring the fix: 52 passed (executed). The backslash-value test passes on both versions. That is expected, because it guards against over-rejection. - edge cases (executed, direct
parseExceptionsprobes):[licenses."exceptions"]header → throws;[[ licenses . "exceptions" ]]→ throws; escaped quote in key"ex\"c" =→ throws;\U00000065→ throws; literal-string value'a\\b'→ accepted; multi-line basic string value with\tafter the block → accepted;reason = "a\\b. c"inside the block → rejected by the existing entry parser (fail closed, unchanged behaviour). - callers checked:
parseExceptions(2 call sites: the notices generatorgenerate-third-party-notices.mjs:773andcheck-license-compat.mjs) → ok. The new check runs before the existingkeyReloop and adds rejections only. The existing rejections are unchanged (read). - repo
deny.tomlstill parses to the sqlcipher-src entry (testreturns the sqlcipher-src entry of the repo deny.toml, executed). - tests run locally:
npx vitest run src/licenseCompatCheck.test.ts→ 52 passed;npm run lint→ exit 0 (executed). - CI: all checks green (
gh pr checks 1600). - files read: 2/2 logic files (full diff).
- UI: not a UI change.
- data: not touched.
Timing analysis
- 1 test file analysed: no timing dependency found. Splitting the spawn loop into
it.eachwith its own 30 s timeout per case gives each spawn more headroom than the old shared budget.
Spec
- visible behaviour changed: none for users (build tooling; the license gate only adds a fail-closed rejection)
- spec searched (
rg -il 'license|lizenz|deny.toml|exceptions' docs/specs/), spec covering it: 0090 A12 (allowed licenses, singlesqlcipher-srcexception). A12 already implies that an exception list the gate cannot read must not pass silently. - verdict: not needed. This is a fix within already-specified gate behaviour, and no changelog fragment is needed for CI-only tooling.
Security checks
- Not a product security path (
review-levelreportsnormal). Fail-closed direction checked: the change adds a rejection and loosens nothing. ThekeyReloop and theexceptions = [block parsing are unchanged. Bypass attempts with header spacing,\Uescapes, escaped quotes and inline tables are all rejected. The only silent path found is the pre-existing#-inside-string case above. - Threat model: "no change – build tooling only" is accurate.
Manual checks pending
None.
Follow-ups
- Comment stripping in
parseExceptionscuts at#inside strings, so an exceptions entry after a string containing#on the same line is silently ignored. Fix: strip comments only outside strings, or reject such lines. (No existing issue.)
smart-ssh-coordinator
Bot
deleted the
issue-1599-reject-escaped-quoted-keys-in-deny-toml
branch
November 25, 2026 19:06
7 tasks
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.
Closes #1599
Summary
parseExceptionsnow rejects any basic-string quoted key containing a backslash escape in key position (before=/., or in a table header), naming the form "quoted key with escape sequence". Value strings with backslashes and commented-out forms stay accepted.Acceptance Criteria
licenseCompatCheck.test.ts: "rejects %s, also with comment and CRLF", 4 new escaped cases)Tests
Against the old parser 8 new tests fail; with the fix all 52 pass.
Assumptions
Reject-only (recommended option), no escape decoding.
Spec: none (build tooling; Spec 0090 A12 unchanged)
Threat model: no change – build tooling only.
Follow-ups
None.
🤖 Generated with Claude Code