Skip to content

fix(security): report canonical agents.entries paths in audit and diagnostics - #113603

Merged
steipete merged 1 commit into
mainfrom
claude/audit-entries-display-paths
Jul 25, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/audit-entries-display-paths

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Security audit findings, dangerous-config-flag labels, exec-approval provenance strings, filesystem-policy drift labels, and the skill-workshop tool diagnostic all reported per-agent config paths in agents.list.* form. Users cannot paste those into openclaw.json: the canonical user-editable shape is the keyed map agents.entries.<id>…, while agents.list is an internal validation projection (an array the config schema rejects as input). Worse, most of these labels were dotted-id fictions like agents.list.ops.tools.exec — valid in no shape, past or present.

Follow-up deferred from #113160, which swept the simple agents.list[] hint literals; these paths are traversal-built.

Why This Change Was Made

  • Every user-facing display surface in src/security (audit findings, trust-model context labels, model-ref sources, plugin-trust contexts, sandbox-docker paths, exec safe-bins hits, minimal-profile overrides), plus exec-approvals-effective provenance and the skill-workshop diagnostic, now emits agents.entries.<id>….
  • audit-extra.summary.ts parses agent ids back out of those labels; its extraction regex moves with them (a silent-breakage coupling the sweep surfaced).
  • Roster-aware builders (dangerous-config-flags-core, workshop diagnostic) keep an indexed agents.list.<n> fallback only for id-less malformed legacy rows, so a remediation can never point at agents.entries.undefined.
  • Intentionally unchanged: src/config/validation.ts and doctor/legacy-migration code (validation errors must point into the user's actual file, and a legacy list-shaped file really contains agents.list), the internal .list projection property, secrets provenance collectors for legacy sources, and the agents.list gateway RPC id. A full rg 'agents\.list\.' sweep disposition was reviewed hit-by-hit.

User Impact

openclaw security audit, dangerous-flag reports, exec-approval explanations, and skill-workshop diagnostics now name config paths that can be pasted directly into openclaw.json (e.g. agents.entries.ops.tools.exec.safeBins instead of agents.list.ops.tools.exec.safeBins).

Evidence

  • node scripts/run-vitest.mjs src/security — 131 files, 887 tests green (includes new canonical-path regression tests per surface plus explicit legacy-shape cases: list-sourced entries with ids report canonical paths; an id-less legacy row keeps its indexed path).
  • src/skills/workshop/tool-policy-diagnostic.test.ts 10/10, src/infra/exec-approvals-policy.test.ts 69/69, src/commands/sandbox-explain.test.ts 12/12.
  • tsgo core + core-test lanes clean; oxfmt/git diff --check clean; dangerous-config-flags-current-snapshot.test.ts unchanged and green.
  • Codex autoreview clean on the final bundle (one earlier P2 — agents.entries.undefined for id-less legacy rows in the workshop diagnostic — was accepted and fixed with the indexed fallback).

…gnostics

Audit findings, dangerous-flag labels, exec-approval provenance, filesystem
policy drift, and the skill-workshop tool diagnostic printed agents.list.*
paths users cannot paste into openclaw.json: dotted agents.list.<id> is valid
in no shape, and index-keyed agents.list.<n> only names the internal
validation projection. All display surfaces now emit agents.entries.<id>;
the summary agent-id extractor regex follows the new labels. Roster-aware
builders keep an indexed fallback only for id-less malformed legacy rows,
and validation/doctor/legacy-migration paths intentionally keep the legacy
form because they point into the user's actual file. Follow-up deferred
from #113160.
@steipete
steipete marked this pull request as ready for review July 25, 2026 10:07
@steipete
steipete requested a review from a team as a code owner July 25, 2026 10:07
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Jul 25, 2026
@steipete
steipete merged commit e26fc17 into main Jul 25, 2026
187 of 191 checks passed
@steipete
steipete deleted the claude/audit-entries-display-paths branch July 25, 2026 10:19
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 26, 2026
…gnostics (openclaw#113603)

Audit findings, dangerous-flag labels, exec-approval provenance, filesystem
policy drift, and the skill-workshop tool diagnostic printed agents.list.*
paths users cannot paste into openclaw.json: dotted agents.list.<id> is valid
in no shape, and index-keyed agents.list.<n> only names the internal
validation projection. All display surfaces now emit agents.entries.<id>;
the summary agent-id extractor regex follows the new labels. Roster-aware
builders keep an indexed fallback only for id-less malformed legacy rows,
and validation/doctor/legacy-migration paths intentionally keep the legacy
form because they point into the user's actual file. Follow-up deferred
from openclaw#113160.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant