We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19c046f commit 62b8d96Copy full SHA for 62b8d96
stack_scanner/main.py
@@ -142,6 +142,12 @@ def scan_image(
142
cosign_output = json.loads(result.stdout.decode("utf-8"))
143
payload = base64.b64decode(cosign_output["payload"]).decode("utf-8")
144
sbom = json.loads(payload)["predicate"]
145
+
146
+ # Required workaround for Trivy to recognize the OS
147
+ for component in sbom.get("components", []):
148
+ if component.get("type") == "operating-system" and component.get("name") == "rhel":
149
+ component["name"] = "redhat"
150
151
with open("/tmp/stackable/bom.json", "w") as f:
152
json.dump(sbom, f)
153
else:
0 commit comments