mirror of
https://github.com/openai/codex.git
synced 2026-09-04 15:08:45 +00:00
fix(core): require exact outer argv authority
This commit is contained in:
@@ -365,7 +365,7 @@ impl ExecPolicyManager {
|
||||
matched_prefix,
|
||||
decision: Decision::Allow,
|
||||
..
|
||||
} if matched_prefix.len() == outer.len()
|
||||
} if matched_prefix.as_slice() == outer
|
||||
)
|
||||
})
|
||||
});
|
||||
|
||||
@@ -146,7 +146,11 @@ async fn only_exact_outer_rules_can_bypass_runtime_resolution() {
|
||||
"host_executable(name = \"powershell\", paths = [\"{executable}\"])\n\
|
||||
prefix_rule(pattern=[\"powershell\", {rest}], decision=\"allow\")"
|
||||
),
|
||||
Some(true),
|
||||
Some(false),
|
||||
),
|
||||
(
|
||||
format!("prefix_rule(pattern=[\"powershell\", {rest}], decision=\"allow\")"),
|
||||
Some(false),
|
||||
),
|
||||
(
|
||||
format!(
|
||||
|
||||
Reference in New Issue
Block a user