fix(security): update tests for verdict and --force changes

This commit is contained in:
sprmn24 2026-03-27 00:27:30 +03:00 committed by Teknium
parent 0f8215f633
commit 789043b691
2 changed files with 11 additions and 11 deletions

View file

@ -661,7 +661,7 @@ def should_allow_install(result: ScanResult, force: bool = False) -> Tuple[bool,
if decision == "allow":
return True, f"Allowed ({result.trust_level} source, {result.verdict} verdict)"
if force and result.verdict != "dangerous":
if force and not (result.verdict == "dangerous" and result.trust_level in ("community", "trusted")):
return True, (
f"Force-installed despite {result.verdict} verdict "
f"({len(result.findings)} findings)"