Skip to content

Commit

Permalink
combiner
Browse files Browse the repository at this point in the history
  • Loading branch information
Scanteianu committed Dec 9, 2024
1 parent ca9b3ca commit c4b2d6b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion combiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,23 @@
sbom["metadata"] = {}
if "properties" not in sbom["metadata"]:
sbom["metadata"]["properties"] = []
properties_to_skip = []
properties_to_skip = [
"version"
] # todo: do we flatten this? or put it somewhere else in some meaningful way? cyclone dx wasn't expecting a dict
properties_to_flatten = [
""
] # todo: BUILD_CONFIGURATION_param - are these redundant/should we just skip this, or is this what andrew means we should add to that bash script arg
for property in metadata:
if property in properties_to_skip:
continue
if property in properties_to_flatten:
for sub in metadata[property]:
sbom["metadata"]["properties"].append(
{"name": sub, "value": json.dumps(metadata[property])}
)
print(property)
print(metadata[property])
print("\n\n\n")
sbom["metadata"]["properties"].append(
{"name": property, "value": metadata[property]}
)
Expand Down

0 comments on commit c4b2d6b

Please sign in to comment.