Skip to content

Commit

Permalink
tools: neuvector_api: fix Ruff linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pna-nca committed May 6, 2024
1 parent e12ad28 commit 3812e56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dojo/tools/neuvector_api/updater.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging
import json

from django.core.exceptions import ValidationError
from dojo.tools.neuvector_api.api_client import NeuVectorAPI
from dojo.tools.neuvector.parser import NEUVECTOR_IMAGE_SCAN_ENGAGEMENT_NAME
from dojo.tools.neuvector.parser import NEUVECTOR_CONTAINER_SCAN_ENGAGEMENT_NAME
Expand All @@ -26,6 +25,7 @@ def determine_namespaces(finding):
pass
return namespaces


def determine_images(finding):
images = []
if finding.test.engagement.name != NEUVECTOR_IMAGE_SCAN_ENGAGEMENT_NAME:
Expand All @@ -45,6 +45,7 @@ def determine_images(finding):

return images


def find_free_id(client):
vps = client.get_all_vp()
if (not vps) or (len(vps) == 0):
Expand All @@ -54,6 +55,7 @@ def find_free_id(client):
vp_id += 1
return vp_id


def find_id(client, name, namespaces=[], images=[]):
ns_set_orig = set(namespaces)
im_set_orig = set(images)
Expand All @@ -64,6 +66,7 @@ def find_id(client, name, namespaces=[], images=[]):
return vp['id']
return -1


def produce_comment(finding):
comment = "risk accepted in DefectDojo"

Expand Down

0 comments on commit 3812e56

Please sign in to comment.