Skip to content

Commit 1112a82

Browse files
committed
Import SBOM into ScanCode.io
Signed-off-by: tdruez <[email protected]>
1 parent c297aea commit 1112a82

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/sca-integration-ort.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
name: Generate SBOM with ORT and load into ScanCode.io
22

3+
# This workflow:
4+
# 1. Generates a CycloneDX SBOM for a requirement file using ORT.
5+
# 2. Uploads the SBOM as a GitHub artifact for future inspection.
6+
# 3. Loads the SBOM into ScanCode.io for further analysis.
7+
# 4. Runs assertions to verify that the SBOM was properly processed in ScanCode.io.
8+
#
9+
# It runs on demand, and once a week (scheduled).
10+
311
on:
412
workflow_dispatch:
513
pull_request:
@@ -28,3 +36,15 @@ jobs:
2836
2937
- name: Run GitHub Action for ORT
3038
uses: oss-review-toolkit/ort-ci-github-action@v1
39+
40+
- name: Import SBOM into ScanCode.io
41+
uses: aboutcode-org/scancode-action@main
42+
with:
43+
pipelines: "load_sbom"
44+
inputs-path: "${{ env.ORT_RESULTS_PATH }}/bom.cyclonedx.json"
45+
scancodeio-repo-branch: "main"
46+
47+
- name: Verify SBOM Analysis Results in ScanCode.io
48+
shell: bash
49+
run: |
50+
scanpipe shell --command "from scanpipe.models import DiscoveredPackage, DiscoveredDependency; package_manager = DiscoveredPackage.objects; print(package_manager.count()); print(package_manager.vulnerable().count()); print(DiscoveredDependency.objects.count())"

0 commit comments

Comments
 (0)