fix(ci): load Grype ignore config in supply chain verification

This commit is contained in:
GitHub Actions
2026-04-05 02:33:40 +00:00
parent fc0e31df56
commit 85a80568b2
2 changed files with 7 additions and 3 deletions

View File

@@ -139,7 +139,10 @@ log_info "This may take 30-60 seconds on first run (database download)"
# Run Grype against the SBOM (generated from image, not filesystem)
# This matches exactly what CI does in supply-chain-pr.yml
# --config ensures .grype.yaml ignore rules are applied, separating
# ignored matches from actionable ones in the JSON output
if grype sbom:sbom.cyclonedx.json \
--config .grype.yaml \
--output json \
--file grype-results.json; then
log_success "Vulnerability scan complete"
@@ -149,6 +152,7 @@ fi
# Generate SARIF output for GitHub Security (matches CI)
grype sbom:sbom.cyclonedx.json \
--config .grype.yaml \
--output sarif \
--file grype-results.sarif 2>/dev/null || true

View File

@@ -281,7 +281,7 @@ jobs:
echo "component_count=${COMPONENT_COUNT}" >> "$GITHUB_OUTPUT"
echo "✅ SBOM generated with ${COMPONENT_COUNT} components"
# Scan for vulnerabilities using manual Grype installation (pinned to v0.107.1)
# Scan for vulnerabilities using manual Grype installation (pinned to v0.110.0)
- name: Install Grype
if: steps.set-target.outputs.image_name != ''
run: |
@@ -292,8 +292,8 @@ jobs:
id: grype-scan
run: |
echo "🔍 Scanning SBOM for vulnerabilities..."
grype sbom:sbom.cyclonedx.json -o json > grype-results.json
grype sbom:sbom.cyclonedx.json -o sarif > grype-results.sarif
grype sbom:sbom.cyclonedx.json --config .grype.yaml -o json > grype-results.json
grype sbom:sbom.cyclonedx.json --config .grype.yaml -o sarif > grype-results.sarif
- name: Debug Output Files
if: steps.set-target.outputs.image_name != ''