@@ -161,6 +161,12 @@ Policy config lives under `plugins.entries.policy.config`.
161161Set ` plugins.entries.policy.config.enabled ` to ` false ` to disable policy checks
162162for a workspace while leaving the plugin installed.
163163
164+ ` expectedHash ` and ` expectedAttestationHash ` are enforcement inputs only when
165+ OpenClaw config is controlled by a trusted operator, gateway, or supervisor. If
166+ the governed workspace can edit its own OpenClaw config, those values are
167+ advisory audit locks: they can still detect drift, but they do not by
168+ themselves create a boundary against that workspace.
169+
164170Tool metadata requirements are authored in ` policy.jsonc ` with
165171` tools.requireMetadata ` , for example ` ["risk", "sensitivity", "owner"] ` .
166172
@@ -251,15 +257,18 @@ these form the audit tuple for this policy check.
251257
252258If a later gateway or supervisor uses policy to block, approve, or annotate a
253259runtime action, it should record the attestation hash from the last clean policy
254- check. ` checkedAt ` stays in JSON output for audit logs, but is not part of the
255- stable attestation hash.
260+ check in a config source the governed workspace cannot silently rewrite.
261+ ` checkedAt ` stays in JSON output for audit logs, but is not part of the stable
262+ attestation hash.
256263
257264Use this lifecycle when accepting policy state:
258265
2592661 . Author or review ` policy.jsonc ` .
2602672 . Run ` openclaw policy check --json ` .
261- 3 . If the result is clean, record ` attestation.policy.hash ` as ` expectedHash ` .
262- 4 . Record ` attestation.attestationHash ` as ` expectedAttestationHash ` .
268+ 3 . If the result is clean, record ` attestation.policy.hash ` as ` expectedHash `
269+ in trusted OpenClaw config.
270+ 4 . Record ` attestation.attestationHash ` as ` expectedAttestationHash ` in trusted
271+ OpenClaw config.
2632725 . Re-run ` openclaw doctor --lint ` in CI or release gates.
264273
265274` policy diff ` compares two saved ` policy check --json ` outputs to explain what
@@ -272,9 +281,11 @@ approval requests: policy path/hash, configured expected hash when present, the
272281accepted attestation hash when present, the current policy evidence hash, and
273282the target tool reference. Gateway approval request, list, and resolve events
274283preserve that metadata so supervisors can audit the decision against the policy
275- and workspace state that produced it. If the current attestation no longer
276- matches ` expectedAttestationHash ` , the runtime gate fails closed before asking
277- for approval and reports both the current and expected attestation hashes.
284+ and workspace state that produced it. If trusted config supplies
285+ ` expectedAttestationHash ` and the current attestation no longer matches it, the
286+ runtime gate fails closed before asking for approval and reports both the
287+ current and expected attestation hashes. If the governed workspace owns the
288+ config value, treat this as drift detection rather than a security boundary.
278289
279290If policy rules change intentionally, update both accepted hashes from a clean
280291check. If workspace settings change intentionally but policy stays the same,
@@ -445,8 +456,8 @@ The runtime gate:
445456
446457- blocks tool calls if the enabled policy artifact is missing or does not match
447458 ` expectedHash ` ;
448- - blocks tool calls if ` expectedAttestationHash ` is configured and the current
449- policy evidence no longer matches the accepted clean policy check;
459+ - blocks tool calls if trusted config supplies ` expectedAttestationHash ` and the
460+ current policy evidence no longer matches the accepted clean policy check;
450461- blocks governed tool calls whose required metadata is missing or invalid;
451462- asks for approval for governed tools marked ` risk:critical ` or
452463 ` IRREVERSIBLE_EXTERNAL ` ;
0 commit comments