You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the per-tool harden PRs land, the per-tool helpers will have a lot of structural overlap. Generalize into one primitive + one registry, so future tools we wrap inherit defense-in-depth by default.
Architectural shape (from research agent)
pubstructToolPolicy{pubname:&'staticstr,pubenv_strip:&'static[&'staticstr],pubarg_deny_exact:&'static[&'staticstr],pubarg_deny_prefix:&'static[&'staticstr],pubarg_deny_short_letters_in_bundle:&'static[char],}pubfnsecure_command(policy:&ToolPolicy) -> Command{letmut cmd = resolved_command(policy.name);for v inUNIVERSAL_ENV_STRIP{ cmd.env_remove(v);}for v in policy.env_strip{ cmd.env_remove(v);}
cmd
}pubfncheck_args(policy:&ToolPolicy,args:&[implAsRef<str>]) -> Result<(),String>{ ...}
Universal env-strip (applied to ALL wrapped tools regardless)
Activity
Merge pull request #41 from thehoff/harden/gen
feat(security): add generalized secure_command + universal env-strip (t…
review: serialize env-mutating policy_registry test + file thehoff#40 …