fix(checkup): stop clear-text logging of orchestrator return in example (#1576)#1577
fix(checkup): stop clear-text logging of orchestrator return in example (#1576)#1577DianaTao wants to merge 2 commits into
Conversation
…xample (#1576) `context/agentic_checkup_orchestrator_example.py` printed the full `run_agentic_checkup_orchestrator` return — `print(f"Message: {message}")`, `print(f"Model Used: {model}")`, etc. `message` can echo scrubbed-but-verbose command/LLM output, so CodeQL's "clear-text logging of sensitive information" query flags it. The example is regenerated by `pdd example` / checkup auto-heal, so the finding kept reappearing on PRs (auto-committed onto #1575). - Prompt (`agentic_checkup_orchestrator_python.prompt`): add instruction 8 — usage examples / caller logging MUST NOT print the raw return tuple (especially `message`/`model`) in clear text; show a non-sensitive summary derived from `success`. Keeps future regenerations clean. - Example: `success, *_rest = run_agentic_checkup_orchestrator(...)` then print a status string; no return field is logged in clear text. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Detailed bug analysis & fixThe bug
success, message, cost, model = run_agentic_checkup_orchestrator(...)
print(f"Success: {success}")
print(f"Message: {message}") # <-- flagged
print(f"Total Cost: ${cost:.4f}")
print(f"Model Used: {model}") # <-- flaggedCodeQL's Why it kept coming backThis file is generated — Root causeThe generating prompt has extensive The fix (durable, two parts)
Verification
Relationship to #1575#1575 is the separate Step 7 gate fix (honor |
Fixes #1576.
Problem
context/agentic_checkup_orchestrator_example.pyprinted the fullrun_agentic_checkup_orchestratorreturn tuple in clear text (print(f"Message: {message}"),print(f"Model Used: {model}"), …).messagecan echo scrubbed-but-verbose command / LLM output, so CodeQL's "Clear-text logging of sensitive information" flags it. The example is regenerated bypdd example/ checkup auto-heal, so the finding kept reappearing on PRs — it was auto-committed onto #1575 bychore: auto-heal prompt/example drift, surfacing 4 CodeQL alerts there.Fix (durable)
pdd/prompts/agentic_checkup_orchestrator_python.prompt) — added instruction 8: usage examples / caller logging MUST NOT print the raw return (especiallymessage/model) in clear text; demonstrate the outcome with a non-sensitive summary derived fromsuccess. This makes futurepdd exampleregenerations stay clean instead of re-introducing the finding.success, *_rest = run_agentic_checkup_orchestrator(...)thenprint("Checkup orchestrator finished:", "success" if success else "did not pass"). No return field is logged in clear text.Verification
python -m py_compileon the example passes.grepconfirms noprint(f"...{message|model|cost}...")remains in the example.🤖 Generated with Claude Code