Skip to content

[spark-compete] [severity:2] fix(llm): Claude CLI stderr not redacted — raw subprocess output surfaced to caller - #818

Open
TALLSOME24 wants to merge 1 commit into
vibeforge1111:mainfrom
TALLSOME24:fix/llm-claude-stderr-redact-main
Open

[spark-compete] [severity:2] fix(llm): Claude CLI stderr not redacted — raw subprocess output surfaced to caller#818
TALLSOME24 wants to merge 1 commit into
vibeforge1111:mainfrom
TALLSOME24:fix/llm-claude-stderr-redact-main

Conversation

@TALLSOME24

@TALLSOME24 TALLSOME24 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

{
"schema": "spark-compete-hotfix-v1",
"event": "spark-compete-first-event",
"submission_mode": "public_repo_pr",
"submission_target_url": "#818",
"team": {"name": "The Spark Plug", "members": ["TALLSOME24","Mrsankalove","Klausabdul"], "llm_device_holder": "TALLSOME24", "device_holder_github": "https://github.com/TALLSOME24", "github_accounts": ["TALLSOME24","Mrsankalove","Klausabdul"]},
"target_repo": {"id": "vibeforge1111/spark-telegram-bot", "source": "https://github.com/vibeforge1111/spark-telegram-bot", "owner_surface": "telegram-bot"},
"issue": {"type": "security_concern", "severity": "medium", "title": "llm.ts Claude CLI error throws raw stderr at line 507 — redactText() missing", "actual_behavior": "At src/llm.ts line 507 throw includes raw result.stderr with no redactText(). Sensitive Claude CLI output exposed.", "expected_behavior": "Claude CLI errors must be wrapped in redactText().", "repro_steps": ["Trigger the affected code path with sensitive content in stderr.", "Observe the error message contains raw output."], "affected_workflow": "claudeChat() in llm.ts"},
"evidence": {"safe_links_only": true, "before_after_proof": "Before: throw new Error(result.stderr). After: throw new Error(redactText(result.stderr)).", "links": ["https://github.com//pull/818"], "forbidden": ["pdf","zip","exe","unknown downloads","shortened links","archives","binaries","tokens","browser cookies","wallet material","raw logs","raw conversations","raw memory","raw patches","private repo maps","private scoring details"]},
"proposed_fix": {"approach": "Applied redactText() wrapper to stderr value before inclusion in thrown error.", "files_expected": ["src/llm.ts","tests/test_llm_claude_redact.test.ts"], "tests_or_smoke": "5 tests: API key redacted, path redacted, stdout fallback redacted, static fallback preserved, short message passes."},
"pr": {"branch": "fix/llm-claude-stderr-redact-main", "title_prefix": "[spark-compete]", "author_github": "TALLSOME24", "body_must_include": ["packet","team","pr_author","repo","actual_behavior","expected_behavior","repro_steps","before_after_proof","tests_or_smoke","duplicate_notes","risk_notes","review_claim"], "url": "https://github.com/vibeforge1111/spark-telegram-bot/pull/818"},
"review_claim": {"impact_claim": "medium", "evidence_types": ["failing_test","passing_test","smoke_test","redacted_conversation_excerpt"], "duplicate_notes": "PR 817 fixes Codex throw at line 490. This fixes Claude throw at line 507.", "risk_notes": "Only error wrapping changes.", "review_state_requested": "pr_review"}
}

… — raw subprocess output surfaced to caller
NoRegretz pushed a commit to NoRegretz/spark-telegram-bot that referenced this pull request Jul 1, 2026
…ure in error paths

Cross-cutting information-disclosure hardening across the gateway, chip loop,
and LLM CLI bridges. Raw subprocess stderr/stdout could surface secrets,
tokens, and internal filesystem paths to callers; ownership errors leaked the
host name and PID of the holding instance.

- gatewayOwnership: ownership-conflict error no longer discloses hostname/PID,
  only an opaque ownerId (vibeforge1111#820)
- chipLoop: run exec stderr passed through redactText() before inclusion in the
  returned error (vibeforge1111#819)
- llm: Claude and Codex CLI failure errors run stderr/stdout through
  redactText() (vibeforge1111#818, vibeforge1111#817)
- builderBridge: stderr in empty-stdout diagnostics errors is already redacted
  in HEAD; add a regression test to lock the behavior (vibeforge1111#816)

Adds focused vitest regression tests for each surface.

Co-authored-by: TALLSOME24 <TALLSOME24@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant