# Shared rules only allow commands that are generally safe for every project # developer. Prompt and denial policies belong in user config so the repository # does not impose those flows globally. prefix_rule( pattern = [ "just", [ "fmt", "fmt-check", "test", "clippy", "fix", "bench", "bench-smoke", "bazel-test", "bazel-clippy", "bazel-lock-check", "bazel-lock-update", "bazel-argument-comment-lint", "argument-comment-lint", "build-for-release", ], ], decision = "allow", justification = """ Needed: host caches or nested sandbox capabilities. Safe: fixed non-publishing recipes only operate on the trusted checkout. """, ) # Cargo accepts `--manifest-path`, so these rules may target manifests outside # this checkout. That flexibility is an accepted tradeoff for development. prefix_rule( pattern = ["cargo", ["build", "check", "clippy", "test"]], decision = "allow", justification = """ Needed: Cargo uses host registry, Git, and cache state. Safe: these non-installing subcommands are standard development operations. """, ) prefix_rule( pattern = ["cargo", "nextest", "run"], decision = "allow", justification = """ Needed: Nextest needs host runtime and nested sandboxes. Safe: it only runs tests and does not install or publish artifacts. """, ) prefix_rule( pattern = ["bazel", ["build", "test", "query", "aquery", "cquery"]], decision = "allow", justification = """ Needed: Bazel uses its host output base and caches. Safe: these commands only build, test, or inspect trusted checkout targets. """, ) prefix_rule( pattern = ["pnpm", ["format", "test"]], decision = "allow", justification = """ Needed: pnpm uses its host store and metadata cache. Safe: checked-in scripts exclude install, exec, and publish operations. """, ) prefix_rule( pattern = ["pnpm", "run", ["format", "test"]], decision = "allow", justification = """ Needed: pnpm uses its host store and metadata cache. Safe: checked-in scripts exclude install, exec, and publish operations. """, )