Skip to content

Commit

Permalink
vuln thresholds dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Long committed Feb 21, 2024
1 parent 3a0d2e4 commit 9a9c192
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/present_findings.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def is_threshold_exceeded(vuln_count, threshold):
def main():
inspector_scan_file = sys.argv[1]
sbom_file = sys.argv[2]
thresholds_enabled = sys.argv[3]
thresholds_enabled = bool(sys.argv[3])
critical_threshold = sys.argv[4]
high_threshold = sys.argv[5]
medium_threshold = sys.argv[6]
Expand All @@ -91,10 +91,10 @@ def main():
print(json.dumps(output, indent=4))

logging.info(f"is threshold checking enabled? {thresholds_enabled}")
if thresholds_enabled == False:
if not thresholds_enabled:
sys.exit(0)
else:
logging.info("how did we land here?")

if thresholds_enabled:
thresholds = {critical_threshold: output['critical_vulnerabilities'],
high_threshold: output['high_vulnerabilities'],
medium_threshold: output['medium_vulnerabilities'],
Expand Down

0 comments on commit 9a9c192

Please sign in to comment.