Skip to content

Commit

Permalink
Merge pull request #207 from CybercentreCanada/feature/whitelist
Browse files Browse the repository at this point in the history
Feature/whitelist
  • Loading branch information
cccs-rs authored Jun 24, 2021
2 parents dd8bf08 + 37641b5 commit 4bd4def
Show file tree
Hide file tree
Showing 12 changed files with 842 additions and 31 deletions.
6 changes: 4 additions & 2 deletions assemblyline_ui/api/v4/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,9 @@ def get_file_results(sha256, **kwargs):

if sec.get('heuristic', False):
# Get the heuristics data
if sec['heuristic']['score'] < 100:
if sec['heuristic']['score'] < 0:
h_type = "safe"
elif sec['heuristic']['score'] < 100:
h_type = "info"
elif sec['heuristic']['score'] < 1000:
h_type = "suspicious"
Expand Down Expand Up @@ -521,7 +523,7 @@ def get_file_results(sha256, **kwargs):
# Process tags
for t in sec['tags']:
output["tags"].setdefault(t['type'], [])
t_item = (t['value'], h_type)
t_item = (t['value'], h_type, t['safelisted'])
if t_item not in output["tags"][t['type']]:
output["tags"][t['type']].append(t_item)

Expand Down
Loading

0 comments on commit 4bd4def

Please sign in to comment.