Added bad publishers round 1
This commit is contained in:
@@ -87,10 +87,15 @@ def categorizeHashes(aug_df: pd.DataFrame, threat_tolerance: int, untrusted_publ
|
||||
mask_needsreview = (df["publisher_y"] == "Not Signed") & df.apply(lambda row: reputationtool(row, threat_tolerance), axis=1)
|
||||
|
||||
mask_approved = (
|
||||
((df["publisher_y"] != "Not Signed") & (~df["publisher_y"].isin(untrusted_publishers))) |
|
||||
((df["publisher_y"] == "Not Signed") & (~df.apply(lambda row: reputationtool(row, threat_tolerance), axis=1)))
|
||||
((df["publisher_y"] != "Not Signed") & (~df["publisher_y"].isin(untrusted_publishers))) &
|
||||
(df["publisher_y"] != "Not Signed") # explicitly signed
|
||||
) | (
|
||||
(df["publisher_y"] == "Not Signed") &
|
||||
(~df.apply(lambda row: reputationtool(row, threat_tolerance), axis=1)) &
|
||||
(~df["publisher_y"].isin(untrusted_publishers)) # exclude untrusted even if unsigned
|
||||
)
|
||||
|
||||
|
||||
needsreview_df = df[mask_needsreview]
|
||||
approved_df = df[mask_approved]
|
||||
remaining_df = df[~(mask_needsreview | mask_approved)]
|
||||
|
||||
Reference in New Issue
Block a user