sec (2/9): reject inline env values in user-defined scanners - #26
Conversation
bc6be59 to
8bcfe87
Compare
Require portable shell variable identifiers for scanner env declarations, reject inline values without echoing their contents, and cover identifier boundaries.
336225f to
302c0ad
Compare
|
Codex review: needs changes before merge. Reviewed July 25, 2026, 7:22 AM ET / 11:22 UTC. ClawSweeper reviewWhat this changesThe PR adds profile-resolution validation that rejects inline values and malformed names in user-defined scanner Merge readiness⛔ Blocked by patch quality or review findings - 6 items remain Keep open. The validation path is narrowly useful, but it can still echo a secret when an invalid Priority: P1 Review scores
Verification
How this fits togetherProfile configuration creates user-defined scanner adapters before ClawScan executes them. The declared environment-variable names are then passed to the sandbox and represented in scan artifacts only as presence state, so resolver diagnostics must not expose configured secret material. flowchart LR
A[Profile YAML] --> B[Profile resolver]
B --> C[Scanner env validation]
C --> D[Scanner registry]
D --> E[Sandboxed scanner run]
E --> F[Secret-safe run artifact]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The patch improves the credential boundary overall, but its malformed-input diagnostic can still disclose raw secret material. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the bare-name requirement, but make every invalid-entry diagnostic value-free: report a safe identifier only for a validated pre- Do we have a high-confidence way to reproduce the issue? Yes, by source inspection. Configure a custom scanner with an invalid Is this the best way to solve the issue? No. Rejecting inline values is the right boundary, but returning the complete malformed entry when no delimiter is present leaves an unredacted secret path; a generic or position-based diagnostic is safer. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1ade9ae9be17. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What changes
A user-defined scanner's
env:list must contain bare variable names(
API_TOKEN), never inlineNAME=valuepairs. An entry with an=is rejectedat config-resolution time, and — critically — the rejected value is never
echoed in the error.
Why it matters
env:exists so a scanner can be handed a secret that ClawScan reads from theprocess environment and records only by presence (
present/missing). If anauthor writes
API_TOKEN=sk-live-...inline, the secret would live in theconfig file and could surface in logs/errors. Requiring bare names keeps secret
values out of config entirely, matching the repo rule "record env presence,
never values."
Before / after (runnable)
env.yml:NAME=valueaccepted; secret value carried in configThe reject message names
API_TOKENbut does not containsk-live-secret.A bare
env: [API_TOKEN]is still accepted.Verify