File zeroclaw-security-sanitize-case-sensitive.patch of Package zeroclaw
commit ddbd0b73f013cdb817533ec886f39540a8eefd31
Author: Oleksandr Ostrenko <openbuildservice@ostrenko.dev>
Date: Sat Mar 28 16:06:50 2026 +0100
Security policy: sanitize arguments case-sensitive
diff --git a/src/security/policy.rs b/src/security/policy.rs
index a839da24f..26d938f0e 100644
--- a/src/security/policy.rs
+++ b/src/security/policy.rs
@@ -800,7 +800,7 @@ impl SecurityPolicy {
| "branch"
| "checkout"
| "switch"
- | "tag"
+ | "tag" | "init"
)
}),
"npm" | "pnpm" | "yarn" => args.first().is_some_and(|verb| {
@@ -1008,7 +1008,7 @@ impl SecurityPolicy {
}
// Validate arguments for the command
- let args: Vec<String> = words.map(|w| w.to_ascii_lowercase()).collect();
+ let args: Vec<String> = words.map(String::from).collect();
if !self.is_args_safe(base_cmd, &args) {
return false;
}