Repository navigation
fix(ci): string-aware comment stripping for deny.toml exceptions - #1602
Merged
smart-ssh-coordinator[bot] merged 1 commit intoNov 25, 2026
Merged
smart-ssh-coordinator[bot] merged 1 commit into
smart-ssh-coordinator[bot] merged 1 commit into
Conversation
…not hide exceptions (#1601) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
7 tasks
7 tasks
There was a problem hiding this comment.
Review
Verdict: approved
Review level: normal
Blocking
None.
Non-blocking
apps/smart-ssh-community/frontend/src/licenseCompatCheck.test.ts:185: the"a\"#"assertion uses a baretoThrow(). It throws for the right reason today ("inline table"), buttoThrow(/inline table/)would pin that reason down. Style only.scripts/generate-third-party-notices.mjs:274: the comment "Anything left over (besides comments, commas, whitespace)" no longer matches the code, because comments are no longer removed there. Wording only.
Verified
- files read: 2/2 logic files (full diff, plus the whole
parseExceptionsandhasEscapedQuotedKey) (read) - AC1 one-line
"#"example → rejected with "inline table", LF and CRLF:licenseCompatCheck.test.ts:"does not let a '#' inside a string hide an exceptions form (#1601)"(executed) - AC2
#inside a basic string ("#","a\"#") and inside a literal string ('#'): same test (executed) - AC3 real trailing comment after a string is still stripped, and a commented-out form is not active:
"still strips real trailing comments after strings (#1601)"plus the existing commented-out tests (executed) - AC4 CRLF: CRLF case in the first test, plus an ad-hoc CRLF block with a trailing comment containing
"→[x](executed) - AC5 the repo
deny.tomlstill parses tosqlcipher-src: existing test, passing (executed) - counter-proof: I restored
scripts/generate-third-party-notices.mjsfromorigin/develop, rannpx vitest run src/licenseCompatCheck.test.ts -t 1601, and the first test went red (1 failed). I then put the PR's version back and both tests were green. The second test passes on both versions; it guards behaviour that must stay unchanged, so that is expected. In an ad-hoc script against the old parser, each of the'#'and"a\"#"inputs returned[]on its own, so each assertion has a point (executed) - edge cases (ad-hoc script, old vs new parser, executed):
#in a crate name / allow entry: now parsed correctly, before it was a false "no closing ]" error → ok- leftover
"#junk"in the block: rejected → ok, fail closed - commented-out block:
[]→ ok - apostrophe inside a comment:
[]→ ok - an unterminated or multi-line string keeps the rest of the line, so more text gets checked and the result can only become stricter → ok
"""content mentioningexceptions = [: now rejected → ok, fail closed and not realistic fordeny.toml
- removing the second
#strip on the block rest (line ~251): after string-aware stripping, a#that is still there sits inside a string or follows an unterminated quote, so the change can only reject more input. Nothing gets looser (read + executed edge cases) - callers checked:
parseExceptions(2 call sites:generate-third-party-notices.mjs:798,check-license-compat.mjs:34) → ok, same return contract (read) - tests run locally:
npx vitest run src/licenseCompatCheck.test.ts→ 54 passed;npm run lint→ exit 0 (executed) - CI: all checks green (
gh pr checks 1602) - UI: not a UI change
- data: not touched
Timing analysis
- 1 test file analysed: no timing dependency found. The
raw()helper usesmkdtempSync, so each call gets its own unique temp path and parallel tests cannot clash.
Spec
- visible behaviour changed: none (build tooling only, nothing user-facing)
- spec searched (
rg -il 'deny.toml|sqlcipher-src|exceptions|Ausnahme' docs/specs/); spec covering it: 0090 A12 (the singlesqlcipher-srcexception), unchanged - verdict: not needed. The PR fixes a parser that let input through which A12 does not allow. No changelog fragment needed, because nothing changes for users.
Security checks
- No product security path is touched;
review-levelreports normal. The change goes in the fail-closed direction the issue asks for: no existing rejection is weakened (all 52 earlier tests still pass) and no new input is silently accepted. The PR body carriesThreat model: no change. - Public boundary: title, body and commit message are in English, with no internals.
- Earlier review requests in this area (#1591 single-line form, #1596 trailing whitespace/CRLF after headers): these are untouched and still covered by the existing tests.
Follow-ups
None.
smart-ssh-coordinator
Bot
deleted the
issue-1601-fail-closed-on-deny-toml-lines-where-a
branch
November 25, 2026 19:41
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 #1601
Summary
parseExceptionsnow strips a#comment only outside basic ("…", with escapes) and literal ('…') strings. The redundant second comment strip on the block remainder is removed (comments are already gone, so a remaining#sits in a string and now fails closed).Acceptance Criteria
"#"in allow: met (rejected as inline table) — licenseCompatCheck.test.ts:"does not let a '#' inside a string hide an exceptions form (Fail closed on deny.toml lines where a '#' inside a string hides exceptions #1601)"#in basic/literal string: met — same testTests
vitest licenseCompatCheck.test.ts 54 passed; counter-proof by reverting the stripper.
Spec: none (build tooling). Threat model: no change – build script only.
Follow-ups
None.
🤖 Generated with Claude Code