mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-05 07:41:39 +00:00
fix(security): update tests for verdict and --force changes
This commit is contained in:
parent
0f8215f633
commit
789043b691
2 changed files with 11 additions and 11 deletions
|
|
@ -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)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue