Skip to content

Commit

Permalink
Removing False Positives (#12)
Browse files Browse the repository at this point in the history
Co-authored-by: Mehrin Kiani <mehrin@protectai.com>
  • Loading branch information
cherbel and mehrinkiani authored Aug 1, 2023
1 parent 129fe35 commit 8bd3874
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions modelscan/tools/picklescanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ def scan_pickle_bytes(

for rg in raw_globals:
global_module, global_name, severity = rg[0], rg[1], None
safe_filter = _safe_globals.get(global_module)
unsafe_critical_filter = _unsafe_globals["CRITICAL"].get(global_module)
unsafe_high_filter = _unsafe_globals["HIGH"].get(global_module)
unsafe_medium_filter = _unsafe_globals["MEDIUM"].get(global_module)
Expand All @@ -214,12 +213,6 @@ def scan_pickle_bytes(
severity = IssueSeverity.LOW
elif "unknown" in global_module or "unknown" in global_name:
severity = IssueSeverity.MEDIUM
elif (
unsafe_critical_filter is None
and unsafe_high_filter is None
and safe_filter is None
):
severity = IssueSeverity.MEDIUM
else:
continue
issues.append(
Expand Down

0 comments on commit 8bd3874

Please sign in to comment.