Skip to content

Commit 9efe8f0

Browse files
committed
Debug the OSV-scanner workflow failure
Signed-off-by: tdruez <[email protected]>
1 parent 5c5a897 commit 9efe8f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/sca-integration-osv-scanner.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ name: Generate SBOM with OSV-Scanner and load into ScanCode.io
1010

1111
on:
1212
workflow_dispatch:
13+
pull_request:
1314
schedule:
1415
# Run once a week (every 7 days) at 00:00 UTC on Sunday
1516
- cron: "0 0 * * 0"
@@ -19,6 +20,9 @@ permissions:
1920

2021
env:
2122
IMAGE_REFERENCE: "python:3.13.0-slim"
23+
EXPECTED_PACKAGE_COUNT: 100
24+
EXPECTED_VULNERABLE_PACKAGE_COUNT: 0
25+
EXPECTED_DEPENDENCY_COUNT: 100
2226

2327
jobs:
2428
generate-and-load-sbom:
@@ -56,4 +60,4 @@ jobs:
5660
- name: Verify SBOM Analysis Results in ScanCode.io
5761
shell: bash
5862
run: |
59-
scanpipe shell --command "from scanpipe.models import DiscoveredPackage, DiscoveredDependency; package_manager = DiscoveredPackage.objects; assert package_manager.count() >= 100; assert package_manager.vulnerable().count() == 0; assert DiscoveredDependency.objects.count() >= 100"
63+
scanpipe shell --command "from scanpipe.models import DiscoveredPackage, DiscoveredDependency; package_manager = DiscoveredPackage.objects; assert package_manager.count() >= int('${{ env.EXPECTED_PACKAGE_COUNT }}'), str(package_manager.count()); assert package_manager.vulnerable().count() >= int('${{ env.EXPECTED_VULNERABLE_PACKAGE_COUNT }}'), str(package_manager.vulnerable().count()); assert DiscoveredDependency.objects.count() >= int('${{ env.EXPECTED_DEPENDENCY_COUNT }}'), str(DiscoveredDependency.objects.count())"

0 commit comments

Comments
 (0)