From 210d0a3cf5b1879ddcd18a4647cd0ef1e01cea29 Mon Sep 17 00:00:00 2001 From: kevin zhao Date: Wed, 3 Dec 2025 19:08:26 +0000 Subject: [PATCH] Add PR description file for execpolicy refactor --- PR-refactor.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 PR-refactor.md diff --git a/PR-refactor.md b/PR-refactor.md new file mode 100644 index 0000000000..4f43f74384 --- /dev/null +++ b/PR-refactor.md @@ -0,0 +1,11 @@ +## Summary + +Refactor of the `execpolicy` crate + +To make `1` possible, we needed to refactor the `execpolicy` crate. To illustrate why, consider an agent attempting to run `apple | rm -rf ./`. Suppose `apple` is allowed by `execpolicy`. Before this PR, `execpolicy` would consider `apple` and `pear` and only render one rule match: `Allow`. We would skip any heuristics checks on `rm -rf ./` and immediately approve `apple | rm -rf ./` to run. + +To fix this, we now thread a `fallback` evaluation function into `execpolicy` that runs when no `execpolicy` rules match a given command. In our example, we would run `fallback` on `rm -rf ./` and prevent `apple | rm -rf ./` from being run without approval. + +## Testing + +- not run (not requested)