Cleaning up menu, added Move to Audit/Enforcement
This commit is contained in:
+1
-1
@@ -69,7 +69,7 @@ groupid_to_name = {policy.groupid: policy.name for policy in policies}
|
||||
|
||||
# Step 3: Enrich agents
|
||||
for agent in agents:
|
||||
agent.enrich(groupid_to_name)
|
||||
agent.enrich_with_policies(groupid_to_name)
|
||||
|
||||
|
||||
"""
|
||||
|
||||
+5
-4
@@ -26,7 +26,8 @@ import dotenv
|
||||
import pandas as pd
|
||||
|
||||
from services.policyhandler import pullPolicyExechistories
|
||||
from utils.utils import colorText, load_env, load_env_json, regulator
|
||||
from utils.configmanager import get_protected_value, load_env_json
|
||||
from utils.utils import colorText, regulator
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -126,7 +127,7 @@ class Hash:
|
||||
|
||||
@classmethod
|
||||
def categorize_hashes(cls, hashes):
|
||||
threat_tolerance = load_env("VT_THREAT_TOLERANCE", cast_type=int)
|
||||
threat_tolerance = get_protected_value("VT_THREAT_TOLERANCE", cast_type=int)
|
||||
bad_publishers_pattern = regulator(load_env_json("BAD_PUBLISHERS", "[]"))
|
||||
pups_pattern = regulator(load_env_json("PUPS", "[]"))
|
||||
|
||||
@@ -162,9 +163,9 @@ class Hash:
|
||||
|
||||
# 3. Approved or Unapproved based on threat level
|
||||
try:
|
||||
score = int(scannermatch)
|
||||
score = int(scannermatch) # pyright: ignore[reportArgumentType]
|
||||
logger.debug(f"Parsed scannermatch score: {score}")
|
||||
if score > threat_tolerance:
|
||||
if score > threat_tolerance: # pyright: ignore[reportOperatorIssue]
|
||||
logger.debug("Unapproved: Unsigned file with high threat score.")
|
||||
unapproved.append(hash_obj)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user