Repository navigation
Add Discord link to README - #22
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 of 4 tasks
sonichi
added a commit
that referenced
this pull request
Apr 20, 2026
-23) (#488) 9 open CodeQL path-injection alerts across 3 sites in src/agent-api.py. All three had strong existing sanitization (regex whitelist + is_relative_to confinement), but CodeQL doesn't recognize is_relative_to as a taint sanitizer. Apply the Path.name pattern matching PR #487's dashboard.py fix: 1. _safe_path(base_dir, filename) — the task/result lookup helper (alerts #16-19). Rebuild filename via Path(name + ".txt").name. 2. /media/{rel} handler (alerts #7, #20-21). Multi-segment; split on "/" and rebuild each component via Path(p).name, then joinpath. 3. Inline task-file build for "answer-{qid}-{ts}.txt" (alerts #22-23). Apply Path(...).name to the full basename. Path.name is functionally a no-op after the regex whitelist (no separators possible), but it's a CodeQL-recognized path-injection sanitizer that breaks the taint flow CodeQL tracks through f-string path construction. Same pattern Mini validated on #487. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
liususan091219
pushed a commit
to liususan091219/sutando-fork
that referenced
this pull request
May 28, 2026
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
liususan091219
pushed a commit
to liususan091219/sutando-fork
that referenced
this pull request
May 28, 2026
…chi#7, sonichi#16-23) (sonichi#488) 9 open CodeQL path-injection alerts across 3 sites in src/agent-api.py. All three had strong existing sanitization (regex whitelist + is_relative_to confinement), but CodeQL doesn't recognize is_relative_to as a taint sanitizer. Apply the Path.name pattern matching PR sonichi#487's dashboard.py fix: 1. _safe_path(base_dir, filename) — the task/result lookup helper (alerts sonichi#16-19). Rebuild filename via Path(name + ".txt").name. 2. /media/{rel} handler (alerts sonichi#7, sonichi#20-21). Multi-segment; split on "/" and rebuild each component via Path(p).name, then joinpath. 3. Inline task-file build for "answer-{qid}-{ts}.txt" (alerts sonichi#22-23). Apply Path(...).name to the full basename. Path.name is functionally a no-op after the regex whitelist (no separators possible), but it's a CodeQL-recognized path-injection sanitizer that breaks the taint flow CodeQL tracks through f-string path construction. Same pattern Mini validated on sonichi#487. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
john-the-dev
added a commit
to john-the-dev/sutando
that referenced
this pull request
Aug 25, 2026
`_VERSION_TOKEN` accepted `\d+`, an UNBOUNDED run, so any digits-only tail read as a version and reached the wire verbatim. Reproduced on the review head, which is where these three came from: claude-15551234567 -> claude-15551234567 (phone-like) gemini-4111111111111111 -> gemini-4111111111111111 (card-like) gpt-123456789012345678901234567890 -> gpt-1234567890... Those are user-controlled aliases via $SUTANDO_CORE_MODEL / $ANTHROPIC_MODEL, so this was unbounded-cardinality PII-shaped data on every event and every $set. Bounded instead of allowlisted: a version group is <=4 digits, or a date stamp (20YYMMDD), plus at most one trailing letter. That admits every real id I could find — 4o, 2.5, 4.1, 70b, 20241022, 20250929, 2.5-pro, o3-mini — and collapses the rest to the family, which is what the review asked for. Blast radius measured old-vs-new across 14 ids: exactly 4 changed, all in the intended direction (the three above plus `gpt-12345678`, 8 digits but not a date). Every real model id is byte-identical. `deepseek-r1` collapses to `deepseek` in BOTH — pre-existing, since `r1` is letter-led and was never version-shaped; not introduced here. Tests: 2 payload-level cases (31 checks total). sonichi#21 asserts the raw identifier appears nowhere in the SERIALISED payload, not merely that _coarse_model returns a family — that catches leakage through $set or any future field. sonichi#22 is its control: real ids must survive intact, or a guard that collapsed everything would pass sonichi#21 and prove nothing. Mutation-verified both ways: reverting to `\d+` fails sonichi#21 naming the exact value; dropping the date-stamp branch fails sonichi#22. Tree restored after each. NOT addressed here — the review's second half is an owner decision, not code: src/telemetry.py:312-314 enables upload whenever a key exists unless the user opts out, with no first-run disclosure. That opt-in/notice policy needs the authorized owner and is deliberately left untouched.
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.
Adds Sutando Discord invite to Contributing section.