Preapprove agent tmp directory access (#25226)

This commit is contained in:
Dax
2026-04-30 23:47:15 -04:00
committed by GitHub
parent 33f7f593ee
commit 2283979199
4 changed files with 14 additions and 1 deletions

View File

@@ -81,7 +81,11 @@ export const layer = Layer.effect(
Effect.fn("Agent.state")(function* (ctx) {
const cfg = yield* config.get()
const skillDirs = yield* skill.dirs()
const whitelistedDirs = [Truncate.GLOB, ...skillDirs.map((dir) => path.join(dir, "*"))]
const whitelistedDirs = [
Truncate.GLOB,
path.join(Global.Path.tmp, "*"),
...skillDirs.map((dir) => path.join(dir, "*")),
]
const defaults = Permission.fromConfig({
"*": "allow",