fix(security): unify secret-redaction and SSRF policy ownership (#121335)

* fix(security): unify secret-redaction and SSRF policy ownership

Memory-host errors now redact through the canonical redactor (payment/card/CVV
coverage included) via the existing core facade instead of a stale local
pattern table; ACP error redaction is wired through a single barrel so the
injected canonical redactor no longer depends on module load order, and the
acp-core fallback table shrinks to the minimal standalone set (structured
auth-header patterns proven load-bearing stay). The memory-host SsrFPolicy
structural copy is deleted in favor of the canonical src/infra/net/ssrf.ts
type re-exported through the network facade.

* fix(build): keep memory-core doctor closure execa-free

Import the canonical redactor directly from src/logging/redact.js instead of
the openclaw-runtime-io facade (which reaches execa through the full runtime
graph), and regenerate the plugin SDK API baseline for the intentional
canonical-SsrFPolicy surface change.

* fix(security): merge operator redact patterns with defaults in injected redactors

ClawSweeper found that ACP injected the general redactor, where nonempty logging.redactPatterns replace the built-in provider-token patterns. Use the tool-payload redactor for ACP and memory-host error formatting so operator patterns extend defaults and redaction remains forced for these security boundaries.
This commit is contained in:
Peter Steinberger
2026-08-09 22:40:58 -07:00
committed by GitHub
parent b44f394308
commit eb9cac065f
25 changed files with 202 additions and 173 deletions
@@ -21,7 +21,6 @@ paths:
- src/plugin-sdk/ssrf-policy.ts
- src/web-fetch
- src/web/provider-runtime-shared.ts
- packages/memory-host-sdk/src/host/ssrf-policy.ts
- packages/net-policy/src
paths-ignore: