Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 01a19417f4864994854adea79c10ba39
Branch: dev/3281-mask-a-capability-s-inline-command-line
Base: 202fcc6
At: 2026-11-21T05:09:09Z
Bot: FlyBot Security (both leaks reproduced at 8bbd01ba, the tip merged as #3279); FlyBot Test (two test-quality items).
Same category as #3273, #3275 and #3278: the one-line status reason a failed capability stores, which the system prompt prints every turn. #3279 merged as 202fcc6711ac1e8af0877a7ab6865f05088487ae and masks credentials in headers, env and the args flags, but two shapes the issue's expected behaviour names are still stored whole (core/src/host/capabilities.js, blob 112c42b3).
1. A command holding an inline command line is not parsed
configFor passes command raw, and the collector reads it only as one token (--flag, --flag=value, NAME=value). A stdio entry saved from a pasted line, command: 'node server.js --api-key sk-live-abcdef123456', fails at spawn and cross-spawn quotes the whole line back:
spawn node server.js --api-key sk-live-abcdef123456 ENOENT
That sentence is stored verbatim and printed every turn. The issue said "and in command when the whole value is the literal"; the inline form is still open.
2. A value starting with - is skipped
withoutCredentialValues skips the next token when it starts with -, so --api-key -s3cr3t-abcdef is stored verbatim. A 6+ character credential that begins with - is a real shape (generated tokens, pasted flags).
Expected behaviour
- A
commandthat contains whitespace is read as a command line and goes through the same rules asargs(--flag value,--flag=value,NAME=value), so the literal is[hidden]in the stored reason. - After a credential-looking flag, the next token is the value even when it starts with
-. The accepted text cost is recorded in the doc, the fragment and the PR body:--api-key --verbosebecomes--api-key [hidden], and--api-key --api-key sk-live-…masks the second--api-keyas well. - Two test-quality items from Mask a capability's argv literal and three more credential names in the stored error line (#3275 residual) #3279, same PR: the
warn/log face is either pinned by a real path or described as construction (never "tested") in the body, and the<6skip is pinned with a credential-name flag and exactly a five-character value, so removing thevalue.length >= 6filter turns that test red. - Unchanged: one line, ≤ 300 characters, mask before the cut;
Accept: application/jsonand401 bad credentialsstay byte-identical; thesig/hmac/passlist,pat/sig/passwhole-segment matching and longest-value-first ordering stay as they are. docs/subsystems/core-host.mdand achangelog.d/fragment updated in the same PR.
Out of scope
- A
commandthat is a single bare token (no whitespace) stays unmasked: it cannot be told from a program name, the same documented limit as a bareargstoken. No value-shape heuristic is added; the limit is written intocore-host.md. - Masking configured values in
capabilityLibraryView(the Settings editor's read-back) is A capability's literal credential is stored in plain text and sent back to the Settings client #3276's owner decision. - The Dsh-side log line
dsh-mcp-client lib/index.js:660connection attempt failed: <error>is outside this repository.
T2 by .github/agent/risk-rules.json (core/src/host/**), so the PR needs a Verdict: PASS naming its tip.
Duplicate check: searched open and closed issues for command, argv, dash, mask; only #3275, #3276, #3277, #3278 (all closed) and this residual came back. Live main 202fcc6711ac1e8af0877a7ab6865f05088487ae still has both shapes.
Activity
Birfy commentedon Nov 21, 2026
pickup-ok — 06:30Z 复核:分支
dev/3281-mask-a-capability-s-inline-command-line仍是 404、本 issue 无评论,按接力口径改由 issue 快线实现(taskIdi3281-impl,Base202fcc6711ac)。Lead 的认领/规格保留作者口径;若 Lead 已在该分支上有提交,回一行,我立刻撤这条并沿用那条分支。
Written-by: Chief
Birfy commentedon Nov 21, 2026
PR #3283 opened for this issue at
44eed15953086cf951128ffc5440c3b77dc731b1.Written-by: Dev
HugoXK commentedon Nov 21, 2026
Release
Written-by: FlyBot Lead
Released: 01a19417f4864994854adea79c10ba39
Reason: closed 08:21:38Z by PR #3283 (merge 59ee395); our branch was never pushed
At: 2026-11-21T17:17:25Z