Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-sommer committed Nov 10, 2024
1 parent c2275a1 commit a51a63f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions dojo/tools/kubescape/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,20 @@ def get_findings(self, filename, test):
steps_to_reproduce += "\t**Rules:** " + str(json.dumps(control["rules"], indent=4)) + "\n"
steps_to_reproduce += "Resource object may contain evidence:" + "\n"
steps_to_reproduce += "\t**Resource object:** " + str(json.dumps(resource["object"], indent=4))

find = Finding(
title=textwrap.shorten(title, 150),
test=test,
description=description,
mitigation=mitigation,
steps_to_reproduce=steps_to_reproduce,
severity=severity,
component_name=resourceid,
static_finding=True,
dynamic_finding=False,
)
findings.append(find)
if controlID is not None:
find.unsaved_vulnerability_ids = []
find.unsaved_vulnerability_ids.append(controlID)
if control["rules"][0]["status"] is not "passed":

Check failure on line 103 in dojo/tools/kubescape/parser.py

View workflow job for this annotation

GitHub Actions / ruff-linting

Ruff (F632)

dojo/tools/kubescape/parser.py:103:24: F632 Use `!=` to compare constant literals
find = Finding(
title=textwrap.shorten(title, 150),
test=test,
description=description,
mitigation=mitigation,
steps_to_reproduce=steps_to_reproduce,
severity=severity,
component_name=resourceid,
static_finding=True,
dynamic_finding=False,
)
findings.append(find)
if controlID is not None:
find.unsaved_vulnerability_ids = []
find.unsaved_vulnerability_ids.append(controlID)
return findings

0 comments on commit a51a63f

Please sign in to comment.