← Back to PRs

#10357: Guardian: add validation script + docs

by DD-Ching open 2026-02-06 11:19 View on GitHub →
docs scripts commands agents stale
## Summary - Add a lightweight Guardian validation script to compare Stable vs Guardian ports, verify audit logging, and ensure configs are unchanged. - Document the validation workflow for diagnostics. ## Notes - Guardian layer remains optional and non-breaking; default behavior is unchanged. - Audit logging is append-only and safe. ## Testing - corepack pnpm exec tsx scripts/guardian-validate.mts <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> - Introduces a new optional **Guardian** layer (config + enforcement) that checks file/system actions against path rules and writes append-only JSONL audit logs. - Wires Guardian into key action entrypoints: `apply_patch` file modifications, `exec` command execution, and OpenClaw coding tool wrappers. - Adds a `scripts/guardian-validate.mts` script to compare Stable vs Guardian behavior/perf and confirm audit logging + config immutability. - Adds docs describing Guardian and the validation workflow, and updates docs navigation to include them. <h3>Confidence Score: 2/5</h3> - This PR needs fixes before merge due to security/behavioral issues in Guardian enforcement and auditing. - Guardian enforcement is currently inconsistent (notably reads are not guarded), and audit logging for exec records full command strings which can persist secrets to disk. There is also a likely schema brace/nesting issue in the zod config that could break config validation. - src/agents/pi-tools.ts, src/agents/bash-tools.exec.ts, src/config/zod-schema.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs