feat: set hx to yolo in sandbox mode else auto mode
This commit is contained in:
1 parent
3f396b112a
commit
8ecbd504a2
6 files changed
+79
-18
No files matched your search
+2
-2
@@ -454,7 +454,7 @@ fn process(
|
||||
telemetry: &Path,
|
||||
) -> Result<state::Run> {
|
||||
let mut r = run::new_run(t, repo, profile)?;
|
||||
if p.allow.is_none() && !p.sandbox {
|
||||
if p.allow.is_none() && !p.sandboxed() {
|
||||
eprintln!(
|
||||
"warning: profile {profile} has no `allow` list and no sandbox: hx may use every tool"
|
||||
);
|
||||
@@ -463,7 +463,7 @@ fn process(
|
||||
let audit = |ev: &str, d: serde_json::Value| policy::audit(&policy::audit_path(), &id, ev, d);
|
||||
audit(
|
||||
"run_start",
|
||||
serde_json::json!({"profile": profile, "repo": repo, "allow": p.allow, "sandbox": p.sandbox, "yolo": p.yolo, "task": t.id}),
|
||||
serde_json::json!({"profile": profile, "repo": repo, "allow": p.allow, "sandbox": p.sandboxed(), "yolo": p.yolo_on(), "task": t.id}),
|
||||
);
|
||||
run::execute(&mut r, p, t)?;
|
||||
audit(
|
||||
|
||||
Reference in new issue
Block a user