Skip to content

Commit 91f2207

Browse files
committed
DEBUG the SBOM tool workflow
1 parent 53a56be commit 91f2207

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

.github/workflows/sca-integration-sbom-tool.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,47 @@ jobs:
1717
generate-and-load-sbom:
1818
runs-on: ubuntu-24.04
1919
steps:
20-
- name: Setup .NET
21-
uses: actions/setup-dotnet@v4
22-
with:
23-
dotnet-version: 8.0.x
24-
25-
# - name: Build
26-
# run: dotnet build Sample.sln --output buildOutput
20+
# - name: Setup .NET
21+
# uses: actions/setup-dotnet@v4
22+
# with:
23+
# dotnet-version: 8.0.x
2724

28-
- name: Download SBOM Tool
25+
- name: Download SBOM tool
2926
run: |
3027
curl -Lo $RUNNER_TEMP/sbom-tool https://github.com/microsoft/sbom-tool/releases/latest/download/sbom-tool-linux-x64
3128
chmod +x $RUNNER_TEMP/sbom-tool
3229
33-
- name: Generate SBOM for Docker image
30+
- name: Generate SBOM with SBOM tool
3431
run: |
3532
mkdir -p sbom-output
3633
$RUNNER_TEMP/sbom-tool generate \
3734
-di ${{ env.IMAGE_REFERENCE }} \
38-
-pn DockerImage \
35+
# -pn DockerImage \
3936
-pv 1.0.0 \
4037
-ps Company \
4138
-nsb https://sbom.company.com \
4239
-m sbom-output \
4340
-V Verbose
4441

42+
- name: Verify SBOM Analysis Results in ScanCode.io
43+
shell: bash
44+
run: |
45+
ls -la
46+
ls -la sbom-output
47+
4548
- name: Upload SBOM artifact
4649
uses: actions/upload-artifact@v4
4750
with:
4851
name: sbom-tool-output
4952
path: sbom-output
53+
54+
- name: Import SBOM into ScanCode.io
55+
uses: aboutcode-org/scancode-action@main
56+
with:
57+
pipelines: "load_sbom"
58+
inputs-path: "sbom-output/_manifest/spdx_2.2/manifest.spdx.json"
59+
60+
# - name: Verify SBOM Analysis Results in ScanCode.io
61+
# shell: bash
62+
# run: |
63+
# scanpipe shell --command "from scanpipe.models import DiscoveredPackage, DiscoveredDependency; package_manager = DiscoveredPackage.objects; assert package_manager.count() > 220; assert package_manager.vulnerable().count() > 10; assert DiscoveredDependency.objects.count() > 150"

0 commit comments

Comments
 (0)