feat: v1.0 — profils sandbox par agent : commandes autorisées (allowlist, stem Windows), périmètre de répertoires, politique réseau best-effort, refus journalisés pour l'audit, --no-sandbox pour contourner (closes #79)

- src/sandbox.rs : profile_of + enforce (basename/stem allowlist, cwd starts_with périmètre, proxy env si network:false), EventKind::Sandbox
- enforcement au run et au start (start_one, --parallel, restart) ; AgentDef.sandbox + doc config.yaml
- 6 tests : défaut non sandboxé, refus + journalisation, stem .exe, périmètre cwd, env réseau, bypass --no-sandbox
This commit is contained in:
2026-08-19 22:57:45 -04:00
parent 900f70c249
commit 92af59a71f
17 changed files with 326 additions and 19 deletions
+8 -2
View File
@@ -512,6 +512,9 @@ pub enum Command {
/// Provider to use for this run (issue #92): registry lookup, base_url + keyring token + model
#[arg(long, value_name = "PROVIDER")]
provider: Option<String>,
/// Skip the agent's sandbox profile (issue #79)
#[arg(long)]
no_sandbox: bool,
/// Run the agent inside a container (issue #58)
#[arg(long)]
container: bool,
@@ -583,9 +586,12 @@ pub struct StartArgs {
/// Local model to use for this run (validated against the local runtimes)
#[arg(long, value_name = "MODEL")]
pub model: Option<String>,
/// Provider to use for this run (issue #92): registry lookup, base_url + keyring token + model
#[arg(long, value_name = "PROVIDER")]
/// Provider to use for this run (issue #92): resolved from the registry
#[arg(long)]
pub provider: Option<String>,
/// Skip the agent's sandbox profile for this run (issue #79)
#[arg(long)]
pub no_sandbox: bool,
/// Start every member of a group simultaneously (issue #57)
#[arg(long, action = ArgAction::SetTrue)]
pub parallel: bool,