Skip to content

Commit a5d779a

Browse files
committed
Fix CycloneDX SBOM generation command syntax and improve error handling
Signed-off-by: DavidOsipov <[email protected]>
1 parent 7220933 commit a5d779a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/sonarqube.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,17 @@ jobs:
135135
# Install the correct package
136136
poetry run pip install cyclonedx-bom
137137
138-
# Generate SBOM in JSON format from Poetry project with improved options
139-
# --pyproject helps find project metadata including name
140-
# Use correct format for specifying groups with proper quotes
141-
poetry run cyclonedx-py poetry --with "dev" --pyproject pyproject.toml -o cyclonedx_report.json --of JSON .
138+
# Generate SBOM in JSON format from Poetry project with correct parameter syntax
139+
# Remove the trailing dot and fix the --with parameter syntax
140+
poetry run cyclonedx-py poetry --with dev --pyproject pyproject.toml -o cyclonedx_report.json --of JSON --validate
142141
143142
# Add error handling and debugging
144143
if [ -f "cyclonedx_report.json" ]; then
145144
echo "✅ Successfully generated cyclonedx_report.json"
146145
else
147146
echo "❌ Failed to generate cyclonedx_report.json"
148147
# Create a minimal valid file to prevent upload failure
149-
echo '{"bomFormat":"CycloneDX","specVersion":"1.4","version":1,"metadata":{"component":{"name":"PostQuantum-Feldman-VSS","type":"application"}},"components":[]}' > cyclonedx_report.json
148+
echo '{"bomFormat":"CycloneDX","specVersion":"1.5","version":1,"metadata":{"component":{"name":"PostQuantum-Feldman-VSS","type":"application"}},"components":[]}' > cyclonedx_report.json
150149
fi
151150
152151
- name: Initialize CodeQL

0 commit comments

Comments
 (0)