Merge PR #388: fix --force bypassing dangerous verdict in should_allow_install
Authored by Farukest. Fixes #387. Removes 'and not force' from the dangerous verdict check so --force can never install skills with critical security findings (reverse shells, data exfiltration, etc). The docstring already documented this behavior but the code didn't enforce it.
This commit is contained in:
@@ -650,7 +650,7 @@ def should_allow_install(result: ScanResult, force: bool = False) -> Tuple[bool,
|
||||
Returns:
|
||||
(allowed, reason) tuple
|
||||
"""
|
||||
if result.verdict == "dangerous" and not force:
|
||||
if result.verdict == "dangerous":
|
||||
return False, f"Scan verdict is DANGEROUS ({len(result.findings)} findings). Blocked."
|
||||
|
||||
policy = INSTALL_POLICY.get(result.trust_level, INSTALL_POLICY["community"])
|
||||
|
||||
Reference in New Issue
Block a user