Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
pna-nca committed Jul 31, 2024
1 parent 5c7874e commit fd6a6aa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dojo/tools/trivy_operator/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,18 @@ def handle_resource(self, data, test):
resource_name = labels.get("trivy-operator.resource.name", "")
container_name = labels.get("trivy-operator.container.name", "")

image = "unknown_image"
if report.get("registry"):
registry = report.get("registry").get("server", "unknown_server")
if report.get("artifact"):
artifact = report.get("artifact")
repository = artifact.get("repository", "unknown_repo")
tag = artifact.get("tag", "unknown_tag")
image = f"{registry}/{repository}:{tag}"

endpoint = Endpoint(
host=resource_namespace,
path=f"{resource_kind}/{resource_name}/{container_name}"
host=image,
path=f"{resource_namespace}/{resource_kind}/{resource_name}/{container_name}"
)

service = ""
Expand Down

0 comments on commit fd6a6aa

Please sign in to comment.