Added bad publishers round 1
This commit is contained in:
+2
-2
@@ -79,13 +79,13 @@ def menu():
|
|||||||
path_eligible.to_html("EligblePaths.html", index=False)
|
path_eligible.to_html("EligblePaths.html", index=False)
|
||||||
path_ineligible.to_html("IneligiblePaths.html",index=False)
|
path_ineligible.to_html("IneligiblePaths.html",index=False)
|
||||||
|
|
||||||
badpublisherlist = []
|
badpublisherlist = ["Brave Software, Inc.", "Zoom Video Communications, Inc."]
|
||||||
categorized = utils.hashfunctions.categorizeHashes(augmented, 5, badpublisherlist)
|
categorized = utils.hashfunctions.categorizeHashes(augmented, 5, badpublisherlist)
|
||||||
categorized[0].to_html("needsreview.html", index=False)
|
categorized[0].to_html("needsreview.html", index=False)
|
||||||
categorized[1].to_html("approved.html", index=False)
|
categorized[1].to_html("approved.html", index=False)
|
||||||
categorized[2].to_html("remaining.html", index=False)
|
categorized[2].to_html("remaining.html", index=False)
|
||||||
|
|
||||||
allowpaths = utils.allowfunctions.filter_and_drop(categorized[1],path_eligible,2)
|
allowpaths = utils.allowfunctions.filter_and_drop(categorized[1],path_eligible,4)
|
||||||
allowpaths.to_html("AllowedPaths.html", index=False)
|
allowpaths.to_html("AllowedPaths.html", index=False)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -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_needsreview = (df["publisher_y"] == "Not Signed") & df.apply(lambda row: reputationtool(row, threat_tolerance), axis=1)
|
||||||
|
|
||||||
mask_approved = (
|
mask_approved = (
|
||||||
((df["publisher_y"] != "Not Signed") & (~df["publisher_y"].isin(untrusted_publishers))) |
|
((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") # 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]
|
needsreview_df = df[mask_needsreview]
|
||||||
approved_df = df[mask_approved]
|
approved_df = df[mask_approved]
|
||||||
remaining_df = df[~(mask_needsreview | mask_approved)]
|
remaining_df = df[~(mask_needsreview | mask_approved)]
|
||||||
|
|||||||
Reference in New Issue
Block a user