Skip to content

fix(secrets): prevent capture and sentinel credential retention#102420

Merged
steipete merged 2 commits into
mainfrom
codex/fix-secret-sentinel-followups
Jul 9, 2026
Merged

fix(secrets): prevent capture and sentinel credential retention#102420
steipete merged 2 commits into
mainfrom
codex/fix-secret-sentinel-followups

Conversation

@steipete

@steipete steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Follow-up to #102009 / #102008. The first SecretRef egress implementation kept every resolved plaintext credential in unbounded process-lifetime sentinel maps, while debug proxy capture could persist registered credentials when they appeared outside sensitive headers (URLs, payloads, errors, metadata, and content types).

Closes #102388.

Why This Change Was Made

  • Replace the plaintext sentinel registries with authenticated, process-local AES-256-GCM sealed sentinels while preserving stable value-and-label identity.
  • Keep egress swapping format-independent through the shared sentinel detector.
  • Redact registered raw, URL-encoded, and JSON-escaped secret forms before capture persistence.
  • Fail closed for opaque binary capture payloads once a registered secret exists.
  • Cover HTTP, WebSocket, tamper, serialization, binary, and Response-like capture paths.

User Impact

SecretRef-backed provider credentials still resolve only at the final egress boundary, but long-running processes no longer accumulate plaintext sentinel history. Debug capture no longer writes registered credentials when they occur in captured URLs, bodies, errors, metadata, or content-type fields.

Evidence

  • Blacksmith Testbox tbx_01kx2ekbaa1za8trkptk1skd4q: 235 focused tests passed across proxy capture, logging redaction, sentinels, and provider egress.
  • Scoped check:changed passed core/core-tests typechecks, lint, import-cycle checks, and architecture guards.
  • Live Google Gemini egress proof returned HTTP 200 with the exact expected assistant marker; two capture events were persisted, and an exact-byte scan of every file in the isolated state directory found zero credential occurrences: https://crabbox.openclaw.ai/portal/runs/run_6d45df494e7c
  • Fresh autoreview: no accepted/actionable findings.

@steipete
steipete requested a review from a team as a code owner July 9, 2026 04:38
@steipete steipete self-assigned this Jul 9, 2026
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Jul 9, 2026
@clawsweeper

clawsweeper Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head a9e9c8b2f6177452b8e4d91015d836e6bce59313, but the PR head is now 05a57eeeea5ab4309d07524cd2ce7bbe2c5ac041. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready at 05a57eeeea5ab4309d07524cd2ce7bbe2c5ac041.

Evidence:

Known proof gaps: none.

@steipete
steipete merged commit d6ec1c6 into main Jul 9, 2026
100 checks passed
@steipete
steipete deleted the codex/fix-secret-sentinel-followups branch July 9, 2026 04:50
@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 9, 2026
…claw#102420)

* fix(secrets): harden sentinel capture lifecycle

* chore: leave release notes to release automation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug capture leaks registered secrets and sentinels retain credential history

1 participant