#9896: feat: runtime trust enforcement v1 (keyring + revocations)
docs
app: web-ui
gateway
cli
agents
size: XL
Cluster:
OpenClaw Plugin Enhancements
### Summary
Adds runtime trust enforcement for tool calls via AgentShield:
- Revocation checks (publisher + artifacts) using verified revocation lists
- Publisher keyring verification for signed envelopes
- Operator-facing block reasons + hints for trust root / revocations paths
- Feature-gated with safe defaults (strict checks off unless enabled)
### Update (fix for Greptile finding)
Greptile noted `enforceTrust()` was invoked without trust inputs. This PR now **plumbs trust context into the middleware**:
- `resolveAgentShieldTrustContext()` probes `agentDir` for trust card files (several common filenames/paths)
- Parses **signed envelopes** `{ payload, signature, public_key }` and unsigned payloads
- Extracts/forwards: `publisherId`, `signedObject`, `trustCardId`, `contentSha256` (and related fields) into `TrustCheckInput`
- Env fallbacks: `AGENTSHIELD_PUBLISHER_ID`, `AGENTSHIELD_TRUSTCARD_PATH`
Result: `REQUIRE_NOT_REVOKED=1` / `REQUIRE_KEYRING=1` can now actually **block** tool calls as intended.
### How to test (targeted)
pnpm vitest run src/agents/pi-tools.agentshield-trust.test.ts
pnpm vitest run src/infra/agentshield-trust-enforcement.test.ts
### Notes for maintainers
Checks are green. If GitHub Actions are gated, please click **Approve and run**.
Most Similar PRs
#14222: core: add needsApproval to before_tool_call; move AgentShield to ex...
by Eventedge · 2026-02-11
69.9%
#21136: fix(security): harden agent autonomy controls
by novalis133 · 2026-02-19
66.3%
#22873: fix(tools): enforce global inline-secret blocking for tool inputs
by Kansodata · 2026-02-21
65.4%
#14136: feat: add agent collapse safeguards and fix TUI display on abort
by liangweigain-create · 2026-02-11
65.0%
#14734: test(agents): guard against stale allowAgents in existing sessions
by davidahmann · 2026-02-12
64.7%
#23802: Skills: add trusted publisher allowlist policy
by bmendonca3 · 2026-02-22
64.6%
#10357: Guardian: add validation script + docs
by DD-Ching · 2026-02-06
64.6%
#16320: security: harden default tool policies and secure shell execution
by SuccessSoham · 2026-02-14
63.7%
#8238: feat: Add Glitchward Shield plugin for prompt injection protection
by eyeskiller · 2026-02-03
63.4%
#19500: Custom rust ultimate rewrite
by adybag14-cyber · 2026-02-17
63.2%