Skip to content

Commit 43ea823

Browse files
Fixing silkbomb compatability
1 parent f217c84 commit 43ea823

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/sbom.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,25 @@ jobs:
5050
--required-only \
5151
--output sbom.json
5252
53-
# Prettify the JSON output
54-
jq . sbom.json > sbom.tmp.json && mv sbom.tmp.json sbom.json
53+
# Post-process SBOM: remove incompatible fields and fix licenses
54+
jq '
55+
# Remove incompatible fields for silkbomb compatibility
56+
del(.metadata.lifecycles) |
57+
walk(if type == "object" then del(.evidence) else . end) |
58+
59+
# Fix missing licenses
60+
.components |= map(
61+
if .name == "yard-solargraph" and
62+
(.licenses == null or .licenses == []) then
63+
. + {licenses: [{license: {
64+
id: "MIT",
65+
url: "https://opensource.org/licenses/MIT"
66+
}}]}
67+
else
68+
.
69+
end
70+
)
71+
' sbom.json > sbom.tmp.json && mv sbom.tmp.json sbom.json
5572
5673
- name: Download CycloneDX CLI
5774
run: |

0 commit comments

Comments
 (0)