Skip to content

Commit

Permalink
tools: trivy_operator: support images referenced by digest instead of…
Browse files Browse the repository at this point in the history
… tag
  • Loading branch information
pna-nca committed Oct 17, 2024
1 parent dc79d96 commit 9c89da2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dojo/tools/trivy_operator/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def handle_resource(self, data, test):
registry = report.get("registry").get("server", "unknown_registry")
artifact = report.get("artifact")
repository = artifact.get("repository", "unknown_repo")
tag = artifact.get("tag", "unknown_tag")
tag = artifact.get("tag", "")
if tag == "":
tag = artifact.get("digest", "unknown_tag")
# having full path to an image (forward slashes) and a tag
# after colon as 'host' property of Endpoint makes an
# endpoint broken, although, this is a desired value. Thus,
Expand Down

0 comments on commit 9c89da2

Please sign in to comment.