惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
博客园 - 【当耐特】
博客园_首页
The GitHub Blog
The GitHub Blog
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
有赞技术团队
有赞技术团队
博客园 - 三生石上(FineUI控件)
D
Docker
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
小众软件
小众软件
I
InfoQ
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
Policy: add secret and auth conformance checks (#81974) ·...
giodl73-repo · 2026-05-23 · via Recent Commits to openclaw:main

@@ -18,12 +18,14 @@ report drift through `doctor --lint`. The final conformance signal is a clean

1818

instead of creating a separate health gate.

19192020

Policy currently manages configured channels, MCP servers, model providers,

21-

network SSRF posture, and governed tool declarations. For example, IT or a

22-

workspace operator can record that Telegram is not an approved channel

23-

provider, restrict MCP servers and model refs to approved entries, require

24-

private-network fetch/browser access to remain disabled, require governed tools

25-

to carry risk and sensitivity metadata, then use `doctor --lint` as the shared

26-

conformance gate.

21+

network SSRF posture, OpenClaw config secret provider/auth profile posture,

22+

and governed tool declarations. For example, IT or a workspace operator can

23+

record that Telegram is not an approved channel provider, restrict MCP servers

24+

and model refs to approved entries, require private-network fetch/browser

25+

access to remain disabled, require OpenClaw config SecretRefs to use managed

26+

providers, require config auth profiles to carry provider/mode metadata,

27+

require governed tools to carry risk and sensitivity metadata, then use

28+

`doctor --lint` as the shared conformance gate.

27292830

Use policy when a workspace needs a durable statement such as "these channels

2931

must not be enabled" or "governed tools must declare approval metadata" and a

@@ -44,8 +46,9 @@ arbitrary plugins. The plugin remains enabled if `policy.jsonc` is missing, so

4446

doctor can report the missing artifact.

45474648

Policy is authored, not generated from the user's current settings. A minimal

47-

policy for channels, MCP servers, model providers, network posture, and tool

48-

metadata looks like this:

49+

policy for channels, MCP servers, model providers, network posture,

50+

OpenClaw config secret provider/auth profile posture, and tool metadata looks

51+

like this:

49525053

```jsonc

5154

{

@@ -75,6 +78,17 @@ metadata looks like this:

7578

"allow": false,

7679

},

7780

},

81+

"secrets": {

82+

"requireManagedProviders": true,

83+

"denySources": ["exec"],

84+

"allowInsecureProviders": false,

85+

},

86+

"auth": {

87+

"profiles": {

88+

"requireMetadata": ["provider", "mode"],

89+

"allowModes": ["api_key", "token"],

90+

},

91+

},

7892

"tools": {

7993

"requireMetadata": ["risk", "sensitivity", "owner"],

8094

},

@@ -84,8 +98,12 @@ metadata looks like this:

8498

The rules are the authority. A category block is only a namespace; checks run

8599

when a concrete rule is present. OpenClaw reads current `channels.*` settings

86100

`mcp.servers.*`, `models.providers.*`, selected agent model refs, network SSRF

87-

settings, and `TOOLS.md` declarations as evidence, then reports observed state

88-

that does not conform.

101+

settings, OpenClaw config secret provider and SecretRef provenance, config auth

102+

profile metadata, and `TOOLS.md` declarations as evidence, then reports

103+

observed state that does not conform. Secret evidence records provider/source

104+

posture and SecretRef metadata, never raw secret values. Policy does not read

105+

or attest per-agent credential stores such as `auth-profiles.json`; those

106+

stores remain owned by the existing auth and credential flows.

8910790108

Run policy-only checks during authoring:

91109

@@ -218,6 +236,31 @@ Example JSON output:

218236

"value": false

219237

}

220238

],

239+

"secrets": [

240+

{

241+

"id": "vault",

242+

"kind": "provider",

243+

"source": "oc://openclaw.config/secrets/providers/vault",

244+

"providerSource": "env"

245+

},

246+

{

247+

"id": "oc://openclaw.config/models/providers/openai/apiKey",

248+

"kind": "input",

249+

"source": "oc://openclaw.config/models/providers/openai/apiKey",

250+

"provenance": "secretRef",

251+

"refSource": "env",

252+

"refProvider": "vault"

253+

}

254+

],

255+

"authProfiles": [

256+

{

257+

"id": "github",

258+

"source": "oc://openclaw.config/auth/profiles/github",

259+

"validMetadata": true,

260+

"provider": "github",

261+

"mode": "token"

262+

}

263+

],

221264

"tools": [

222265

{

223266

"id": "deploy",

@@ -229,7 +272,7 @@ Example JSON output:

229272

}

230273

]

231274

},

232-

"checksRun": 15,

275+

"checksRun": 20,

233276

"checksSkipped": 0,

234277

"findings": []

235278

}

@@ -277,23 +320,28 @@ choose a different interval.

277320278321

Policy currently verifies:

279322280-

| Check id | Finding |

281-

| ---------------------------------------- | --------------------------------------------------------------------- |

282-

| `policy/policy-jsonc-missing` | Policy is enabled but `policy.jsonc` is missing. |

283-

| `policy/policy-jsonc-invalid` | Policy cannot be parsed or contains malformed rule entries. |

284-

| `policy/policy-hash-mismatch` | Policy does not match configured `expectedHash`. |

285-

| `policy/attestation-hash-mismatch` | Current policy evidence no longer matches the accepted attestation. |

286-

| `policy/channels-denied-provider` | An enabled channel matches a channel deny rule. |

287-

| `policy/mcp-denied-server` | A configured MCP server is denied by policy. |

288-

| `policy/mcp-unapproved-server` | A configured MCP server is outside the allowlist. |

289-

| `policy/models-denied-provider` | A configured model provider or model ref uses a denied provider. |

290-

| `policy/models-unapproved-provider` | A configured model provider or model ref is outside the allowlist. |

291-

| `policy/network-private-access-enabled` | A private-network SSRF escape hatch is enabled when policy denies it. |

292-

| `policy/tools-missing-risk-level` | A governed tool declaration is missing risk metadata. |

293-

| `policy/tools-unknown-risk-level` | A governed tool declaration uses an unknown risk value. |

294-

| `policy/tools-missing-sensitivity-token` | A governed tool declaration is missing sensitivity metadata. |

295-

| `policy/tools-missing-owner` | A governed tool declaration is missing owner metadata. |

296-

| `policy/tools-unknown-sensitivity-token` | A governed tool declaration uses an unknown sensitivity value. |

323+

| Check id | Finding |

324+

| ---------------------------------------- | -------------------------------------------------------------------------------- |

325+

| `policy/policy-jsonc-missing` | Policy is enabled but `policy.jsonc` is missing. |

326+

| `policy/policy-jsonc-invalid` | Policy cannot be parsed or contains malformed rule entries. |

327+

| `policy/policy-hash-mismatch` | Policy does not match configured `expectedHash`. |

328+

| `policy/attestation-hash-mismatch` | Current policy evidence no longer matches the accepted attestation. |

329+

| `policy/channels-denied-provider` | An enabled channel matches a channel deny rule. |

330+

| `policy/mcp-denied-server` | A configured MCP server is denied by policy. |

331+

| `policy/mcp-unapproved-server` | A configured MCP server is outside the allowlist. |

332+

| `policy/models-denied-provider` | A configured model provider or model ref uses a denied provider. |

333+

| `policy/models-unapproved-provider` | A configured model provider or model ref is outside the allowlist. |

334+

| `policy/network-private-access-enabled` | A private-network SSRF escape hatch is enabled when policy denies it. |

335+

| `policy/secrets-unmanaged-provider` | A config SecretRef references a provider not declared under `secrets.providers`. |

336+

| `policy/secrets-denied-provider-source` | A config secret provider or SecretRef uses a source denied by policy. |

337+

| `policy/secrets-insecure-provider` | A secret provider opts into insecure posture when policy denies it. |

338+

| `policy/auth-profile-invalid-metadata` | A config auth profile is missing valid provider or mode metadata. |

339+

| `policy/auth-profile-unapproved-mode` | A config auth profile mode is outside the policy allowlist. |

340+

| `policy/tools-missing-risk-level` | A governed tool declaration is missing risk metadata. |

341+

| `policy/tools-unknown-risk-level` | A governed tool declaration uses an unknown risk value. |

342+

| `policy/tools-missing-sensitivity-token` | A governed tool declaration is missing sensitivity metadata. |

343+

| `policy/tools-missing-owner` | A governed tool declaration is missing owner metadata. |

344+

| `policy/tools-unknown-sensitivity-token` | A governed tool declaration uses an unknown sensitivity value. |

297345298346

Policy findings can include both `target` and `requirement`. `target` is the

299347

observed workspace thing that does not conform. `requirement` is the authored