Skip to content
Snippets Groups Projects
Commit 5b52b174 authored by Gioacchino Vino's avatar Gioacchino Vino
Browse files

Added logic accepted/know issues during oid validation

parent 0f69ecc2
No related branches found
No related tags found
1 merge request!144Debug paas ci
...@@ -463,16 +463,16 @@ class Task: ...@@ -463,16 +463,16 @@ class Task:
glob_severity = -1 # severities are not negative glob_severity = -1 # severities are not negative
glob_threat = 'None' glob_threat = 'None'
for o, s, t, p in zip(o_ids, severities, treats, ports): for o, s, t, p in zip(o_ids, severities, treats, ports):
msg = f"Detected oid: {o}, severity: {s}, threat: {t} and port: {p}\t=> " msg = f"Detected oid: {o}, severity: {s}, threat: {t} and port: {p}"
if s >= 4: # If severity is not negligible if s >= 4: # If severity is not negligible
if o in accepted_issues: if o in accepted_issues:
msg += "ACCEPTED" msg += "\t=> ACCEPTED"
else: else:
if o in known_issues: if o in known_issues:
msg += "DROPPED (not accepted but known)" msg += "\t=> DROPPED (not accepted but known)"
continue continue
else: else:
msg += "NEW (not accepted and not known)" msg += "\t=> NEW (not accepted and not known)"
logging.debug(msg) logging.debug(msg)
if p in report: if p in report:
if s > report[p]['severity']: if s > report[p]['severity']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment