Implement working directory scope locking for ADF agents
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with item 2.2 in cto-executive-system/plans/adf-architecture-improvements.md and the ManagedAgent model, then trace the PostToolUse hook, structured envelope, and NightwatchMonitor integration, noting dependencies #688 and #689. Done means working-directory binding, traversal and symlink escape rejection, scope-violation events, and the listed scope-negative tests all work before deployment.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
ADF agents currently have unrestricted filesystem access on bigbox. There is no mechanism to prevent an agent from reading or writing files outside its assigned working directory. Piwork (ferologics/Piwork) implements a robust scope locking model: one-time bind of working folder per task, traversal/symlink escape blocking, and a dedicated scope-negative test suite.
Proposal
Scope Locking
- One-time bind: once an agent is assigned a
working_dir, it is locked for the session - Record
scope_locked: boolinManagedAgent - Reject any attempt to change working directory after binding
Escape Prevention
- Block
..path traversal in file operation arguments - Block symlink escapes (symlinks pointing outside scope)
- Log violations to NightwatchMonitor as security events
Scope-Negative Test Suite
- Attempt traversal:
../../../etc/passwd-- must fail - Attempt symlink escape: create symlink pointing outside scope -- must fail
- Attempt working_dir change after lock -- must fail
- All tests must pass as prerequisites for agent deployment
Integration
- With Agent SDK (#689):
PostToolUsehook inspects file paths - With subprocess model: parse file paths from structured envelope (#688)
- NightwatchMonitor: new signal type for scope violations (alongside drift and error rate)
References
- Piwork permissions model: https://github.com/ferologics/Piwork/blob/main/docs/permissions-model.md
- Piwork scope-negative tests:
mise run test-scope-negative - KB article:
cto-executive-system/knowledge/external/context-engineering/piwork-desktop-ui-for-pi-agent.md - Plan:
cto-executive-system/plans/adf-architecture-improvements.md(item 2.2) - Depends on: #688 (RPC envelope) or #689 (Agent SDK)
- Lingua principale
- Rust
- Stelle
- 62
- Fork
- 5
- Merge medio
- 2h 27m
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di terraphim/terraphim-ai
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
terraphim/terraphim-ai#885 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
terraphim/terraphim-ai#871 ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
terraphim/terraphim-ai#810 · 2 commenti ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
terraphim/terraphim-ai#729 ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
terraphim/terraphim-ai#728 ·
Tutte le issue di terraphim/terraphim-ai
Issue simili
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
paritytech/zombienet-sdk#591 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
farion1231/cc-switch#7638 · 1 commento ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100