agent-repo-preflight: Open-Source Read-Only Audit of AGENTS.md, MCP and Hook Configs Before Cloned Repos Hit Your Coding Agent

Digital-Fortress-Sec · reddit · 2026-10-28

Digital Fortress released agent-repo-preflight (v0.1.0, MIT, stdlib-only Python), a read-only script that audits what a freshly cloned repo would feed your coding agent: rule files (AGENTS.md, CLAUDE.md, .cursorrules), declared MCP servers, and hooks.

It flags hidden Unicode (zero-width/bidi/tag characters), package-install and curl-pipe-to-shell lines in rule files, auto-approve/permission-bypass settings, MCP entries with command/args, and hook definitions, with an optional --known-packages allowlist. FAIL/WARN exits nonzero for CI gating; it never executes anything or touches the network.

The author notes limits: line-based heuristics, fixed filename list, and a clean result ≠ safe repo. It complements their earlier mcp-tool-pin-check, which pins live tool definitions after connection — one checks before you open the repo, the other after you connect.

Original post →

More from coding & agent

coding & agent channel →