Repository navigation
Conversation
…ntract The credential-safety prompt contract from openclaw#120728 tells the model to route credential entry to a masked or structured setup, or to a safe external handoff. On channels where neither exists, both branches are unreachable and the agent refuses an operator-supplied credential with nothing to redirect to. There was no configuration to opt out. - Add security.allowCredentialsInTranscript (default false, contract applied) to SecurityConfig and to SecuritySchema; a strictObject omission would have invalidated the operator's whole config and failed check-docs-config-examples - Add transcriptCredentialSafetyPrompt(cfg), the single reader of the flag, returning the contract section or undefined so harnesses drop it by filtering - Gate the ordinary agent prompt on a resolved credentialSafetyPrompt param; undefined means the caller never resolved config and keeps the contract, null is the resolved opt-out, so unresolved callers fail closed - Include the resolved section in the stable prompt prefix cache key; without it a cached prefix would keep serving the contract after an opt-out - Gate the Codex and Copilot harness prompts through the same accessor - Export the accessor from the plugin SDK alongside the existing prompt constant, and record +1/+1 in the surface budget ledger - Leave the system agent unconditionally covered: it owns the guided setup surfaces that give credentials a masked entry path, so it has no dead end. Comment both sites and assert the invariant in tests - Omit credentialSafetyPrompt from ConfiguredAgentSystemPromptParams so config is its only source - Document the flag and the cost of enabling it in the configuration reference - Tests: schema accepts the key and rejects a wrong type, config resolves both ways end to end, null drops and undefined keeps the section, system-agent prompts always carry it
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 9, 2026, 11:21 AM ET / 15:21 UTC (Revision 6). ClawSweeper reviewWhat this changesAdds a global setting that makes protected handling of user-supplied transcript credentials optional across ordinary, Codex, and Copilot agents while keeping guided setup strict. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 10 items remain Keep open: the reusable-credential workflow remains distinct from the merged short-lived-code work. The revision preserves no-solicitation guidance, but changes a now-shipped security default and has no applicable after-fix runtime proof. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw assembles credential-handling instructions from configuration and available tools before sending them to agent runtimes. These instructions influence model replies and tool use; protected secret storage and sender authorization have separate enforcement. flowchart TD
A[Security configuration] --> B[Shared credential guidance]
C[Available secrets tool] --> B
B --> D[Ordinary agent prompt]
B --> E[Codex and Copilot instructions]
B --> F[Strict guided setup]
D --> G[Model replies and tool requests]
E --> G
Decision needed
Why: The branch intentionally changes a shipped security policy, and the current body requests relevant-owner review; implementation consistency alone cannot establish acceptance of that tradeoff. Before merge
Findings
Agent review detailsSecurityNeeds attention: The diff weakens default credential-disclosure guidance but does not change sender authorization, protected-store access, dependencies, or execution permissions. PR surfaceSource +36, Tests +93, Docs +50. Total +179 across 22 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve strict handling for existing configurations, offer a deliberately accepted transcript-handling option, and make protected credential entry reachable from remote/mobile workflows. Do we have a high-confidence way to reproduce the issue? Yes for the upgrade-policy change: source shows that an unset setting drops guidance present in v2026.9.3. The reported model refusal and after-fix login outcome were not reproduced during this read-only review. Is this the best way to solve the issue? Unclear: the shared implementation is coherent, but a global permissive default is broader than the original operator opt-out request; preserving unset behavior is the safer upgrade path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c7966e87bb98. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Splits the credential contract so `security.allowCredentialsInTranscript` drops only the handling rules. Never soliciting a credential prevents exposure that would not otherwise exist and protects non-owner participants, so no configuration removes it. - transcriptCredentialSafetyPrompt always returns text: the full contract by default, the no-solicitation rule alone when the operator opts out - Renderer param narrows from `string | null` to `string`; an unresolved caller still gets the full contract - Tests assert the no-solicitation rule survives every config value Verified against a build where both the host prompt and the Codex harness prompt are gated: with the handling rules present the agent refuses five escalating turns and cites the contract; with them absent it complies at the turn that invokes the config.
|
Thanks — the P1 was correct, and The finding was right. The first revision removed the whole contract on one global config value, including the no-solicitation and no-echo rules. A shared agent with the opt-out enabled would have lost those for every participant, which is strictly worse than what #120728 fixed. The proposed remedy isn't available at this layer, though. "Restrict the opt-out to verified operator turns" assumes a per-turn sender at prompt-assembly time. The prompt is built once per attempt ( What this does instead: split on which rule, not which sender.
That distinction holds better than sender-scoping would: the no-solicitation rule now stays active even in the operator's own DMs, where the original proposal would have relaxed it. #120656 is untouched in every configuration. It also reflects what those rules can actually accomplish. Once a credential is in a transcript, exposure has already happened in the channel, and the transcript is captured and indexed regardless of what the model subsequently says about it. The rules that police already-exposed material do less work than the one that prevents exposure. Behavior, re-measured under control. Both the host prompt and the Codex harness prompt gated, contract presence asserted against the assembled prompt per arm, one isolated session per arm, five escalating turns:
Note for reproduction: operator-authored skills can impose their own credential rules and will mask the difference between arms. Any skill that separately prohibits writing credentials into scripts must be controlled for, or both arms refuse identically. Worth stating plainly: removing the handling rules does not make the agent permissive. It refuses the first three escalations in both arms and yields only after the operator explicitly invokes the config. |
…n scope The opt-out is partial: it drops only the handling rules for a credential already in the transcript. Document which rules survive, state that the no-solicitation rule is never removed by any config value, and note that the setting applies to the whole agent because the prompt is built per attempt and installed as the session base prompt.
|
On the P1 — "keep handling rules for non-owner participants" — the threat model assumes an interaction that cannot happen. A non-owner cannot direct the agent. With By the time the handling rules would fire, exposure has already happened. If Bob pastes a credential into a group, it is already visible to every member of that group, already in the transcript store, and already indexed into memory search and eligible for promotion into long-term memory. None of that is caused or prevented by what the model subsequently says. The rules govern the model's output, not the channel or the transcript. They also do not protect a non-owner from the operator. Anything the agent could be asked to do with Bob's credential — write it into a script, put it in a command — the operator can do directly in seconds. A prompt rule adds friction to an owner-directed act that it cannot prevent, against a value the operator can already see. So for content a third party has already published, the handling rules are closing a door after the fact. The rule that does real work is no-solicitation, because it prevents exposure that would not otherwise exist — and this PR keeps that unconditional at every configuration value. I could not construct a residual case that survives scrutiny. The nearest candidate is incidental reproduction — an operator asks for a thread summary and the model repeats a third party's credential in it. But that summary is delivered back into the same conversation, to the same participants, where the credential already sits. It is not new exposure. Any variant where the value reaches a different destination is operator-directed, which the point above already covers. If a reviewer can name a case that is neither already-existing exposure nor operator-directed, name it and I will address it. I could not find one. If the conclusion is still that the handling rules must stay until a verified operator boundary exists, that is a reasonable maintainer call and I will not argue it further. I ask only that the decision be made against this threat model rather than one where non-owners can direct the agent. One narrower option: gate the opt-out on the agent having no non-owner senders at all. |
|
One correction to the framing, because it changes where the burden sits. The review describes this PR as adding a setting that "changes a previously global credential-safety contract" and "weakens a credential-handling security boundary." That contract has never been in a stable release.
Per What actually brokeAn operator with no reachable browser or Control UI — remote, phone, chat as the only input — could authenticate to a site by supplying the credential to the agent. That worked in That is a default-path regression on the beta train, which On the P1The P1 asks this change to retain handling rules unless an authoritative owner-only ingress boundary is established before prompt installation. #120728 established no such boundary. It applied the contract agent-wide, for every operator, with no sender fact anywhere in its 15 files — no config, no channel plumbing, no ingress condition. It touched the same two prompt builders this PR touches. The property the P1 blocks this PR for is the property the change it protects already has. Applying an owner-only ingress requirement to the restore, but not to the removal, sets a higher bar for recovering the capability than was required to delete it. From
This PR is the "make the risky step explicit and operator-owned" branch: default What I am asking forNot that the security concern be waived. That the contract be evaluated as unshipped beta behavior that regressed a working default path, rather than as an incumbent invariant a new setting must earn its way past. If there is a reachable exploit path — one that is neither exposure that already exists before the rules can fire, nor an act the operator can perform directly — that is the thing to decide against, and I will implement whatever boundary it requires. My previous comment sets out why I could not construct one. Being unshipped settles the compatibility question, not the policy question. If maintainers want the rule kept regardless of release standing, that is a legitimate call and I will take the narrower |
Blanket transcript credential guidance obstructed owner-authorized browser fills and workspace credential use. Embedded/local sessions also lacked the OpenClaw and Gateway tools needed to reach the suggested masked handoff. Remove the shared prompt builder from core, Codex, Copilot, the system agent, and the SDK. Keep egress guidance with the secrets tool description, add scoped masked-setup routing to setup tools, and direct sessions without control tools to masked terminal setup. Update browser login and SDK migration docs and regenerate prompt fixtures. Replace obsolete contract-text assertions with a capability-routing test that fails on the original missing terminal handoff. Preserve protected secret entry, transcript redaction, and browser tool behavior. Thanks @ejc3 for the reachability analysis in #128077 and @Stephane-fci for the workspace-credential report in #142010. Refs #120728 #120656 #128076 #128077 #142010
…thorized logins (#143238) * fix(agents): drop the blanket credential prompt contract Blanket transcript credential guidance obstructed owner-authorized browser fills and workspace credential use. Embedded/local sessions also lacked the OpenClaw and Gateway tools needed to reach the suggested masked handoff. Remove the shared prompt builder from core, Codex, Copilot, the system agent, and the SDK. Keep egress guidance with the secrets tool description, add scoped masked-setup routing to setup tools, and direct sessions without control tools to masked terminal setup. Update browser login and SDK migration docs and regenerate prompt fixtures. Replace obsolete contract-text assertions with a capability-routing test that fails on the original missing terminal handoff. Preserve protected secret entry, transcript redaction, and browser tool behavior. Thanks @ejc3 for the reachability analysis in #128077 and @Stephane-fci for the workspace-credential report in #142010. Refs #120728 #120656 #128076 #128077 #142010 * fix(agents): keep the shipped credential prompt export with narrowed guidance Keep buildCredentialSafetyPrompt under its shipped SDK name for the compatibility window. Accept and ignore the deprecated string argument through 2026-11-30 while callers move to the controlToolsAvailable options object, with the window recorded in the compatibility registry and docs. Preserve the private login-code handoff from #139196. Add the terminal setup route only when control tools are unavailable, and carry that decision through core, Codex, and Copilot prompts. Keep the terminal line in one shared owner and regenerate the prompt fixtures. Restore the unchanged public surface counts of 4,447 exports and 2,629 callable exports without editing budgets or their tests. * test(agents): restore transport API after model endpoint tests The Arcee endpoint fixture loads a second transport graph through Jiti and replaces the shared worker's Responses test API. Restore its original property descriptor after the file so later schema contract tests use the Vite graph's configured host. Reproduced the three strict-flag failures in the CI shard and in an ordered polluter/victim pair. The repaired shard passes 8,495 tests; both file orders pass all nine tests and the standalone schema contract passes all four. Related: #143238
|
The blanket credential prompt contract was removed on main by #143238: 678cd08. Thanks @ejc3 — your reachability analysis in #128077 was the basis for this fix. There is no longer a blanket rule to opt out of. The shared guidance retains only private delivery of short-lived login codes and verification URLs, plus a masked terminal setup route when the control tools are unavailable. Setup and secrets tools keep their own descriptions. |
…thorized logins (openclaw#143238) * fix(agents): drop the blanket credential prompt contract Blanket transcript credential guidance obstructed owner-authorized browser fills and workspace credential use. Embedded/local sessions also lacked the OpenClaw and Gateway tools needed to reach the suggested masked handoff. Remove the shared prompt builder from core, Codex, Copilot, the system agent, and the SDK. Keep egress guidance with the secrets tool description, add scoped masked-setup routing to setup tools, and direct sessions without control tools to masked terminal setup. Update browser login and SDK migration docs and regenerate prompt fixtures. Replace obsolete contract-text assertions with a capability-routing test that fails on the original missing terminal handoff. Preserve protected secret entry, transcript redaction, and browser tool behavior. Thanks @ejc3 for the reachability analysis in openclaw#128077 and @Stephane-fci for the workspace-credential report in openclaw#142010. Refs openclaw#120728 openclaw#120656 openclaw#128076 openclaw#128077 openclaw#142010 * fix(agents): keep the shipped credential prompt export with narrowed guidance Keep buildCredentialSafetyPrompt under its shipped SDK name for the compatibility window. Accept and ignore the deprecated string argument through 2026-11-30 while callers move to the controlToolsAvailable options object, with the window recorded in the compatibility registry and docs. Preserve the private login-code handoff from openclaw#139196. Add the terminal setup route only when control tools are unavailable, and carry that decision through core, Codex, and Copilot prompts. Keep the terminal line in one shared owner and regenerate the prompt fixtures. Restore the unchanged public surface counts of 4,447 exports and 2,629 callable exports without editing budgets or their tests. * test(agents): restore transport API after model endpoint tests The Arcee endpoint fixture loads a second transport graph through Jiti and replaces the shared worker's Responses test API. Restore its original property descriptor after the file so later schema contract tests use the Vite graph's configured host. Reproduced the three strict-flag failures in the CI shard and in an ordered polluter/victim pair. The repaired shard passes 8,495 tests; both file orders pass all nine tests and the standalone schema contract passes all four. Related: openclaw#143238
Closes #128076. Updates the existing proposal from #120728 without a blanket rollback.
What Problem This Solves
Fixes an issue where users requesting an authorized browser login could be blocked when protected credential entry was unreachable.
Why This Change Was Made
Make mandatory masking opt-in:
security.allowCredentialsInTranscriptdefaults totrue, and setting it tofalserestores the stricter handling policy. Continue the existing configurable proposal instead of rolling back the protected credential tools.What changed
User Impact
This is a global prompt-policy choice for all authorized senders, not an owner-only or per-message permission check. The new default intentionally omits the blanket requirement to keep user-supplied credentials out of visible text and tool arguments. It does not change sender authorization or grant access to protected-store plaintext.
The setting does not automatically mask/redact transcripts, provide browser autofill, or guarantee provider compliance. Credentials submitted through ordinary chat or tool arguments can reach model context, transcripts, logs, and configured transcript-derived memory. Existing signed-in sessions and protected entry remain preferable where available. Provider, workspace, tool, and service rules still apply.
The earlier review's shared-session concern is acknowledged as a product-policy tradeoff, not claimed to be fixed by a nonexistent owner-only boundary. Relevant-owner review remains requested before landing.
Evidence
a492d1054fc959633e967f4164477164bed9a62a, with no IAM role or Tailscale and a trusted bootstrap verifying the exact SHA. Focused test run.04212fa8a8aa4984086b8dcc5895298f6de8a999. The revised helper passes with the setting omitted,true, andfalse.node scripts/check-changed.mjs, all selected type/lint/dead-code/boundary checks, current prompt snapshots, andgit diff --check. The earlier schema failure is resolved, not waived.Final head
11a8d22c33c66640db3103727c9f1a00e11c220cadds only five generated records to the tested source head. Its generated-file diff matches the successful AWS run byte for byte after normalizing Git hash abbreviation. No production source changed after review or testing.These are prompt/config/provider-request boundary tests, not a live account-login demonstration. No production configuration, credential store, scheduler, or runtime was changed. Full GitHub CI and security-owner review are separate from the focused proof above.
Contributor credit
Continues @ejc3's original work. All three original commits remain in the branch ancestry; current main was merged rather than replacing the contributor's history.