File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 with :
4343 path : ' .'
4444 strict : ' false'
45+ paths-ignore : |
46+ vendor/
47+ vendored/
48+ verified-container-spec/
49+ .audittraining/
50+ integration/fixtures/
51+ test/fixtures/
52+ tests/fixtures/
53+ absolute-zero/
54+ docs/governance/CRG-CRITERIA.a2ml
55+ docs/governance/MAINTENANCE-CHECKLIST.a2ml
56+ docs/governance/TSDM.a2ml
4557
4658 - name : Write summary
4759 run : |
@@ -90,6 +102,16 @@ jobs:
90102 with :
91103 path : ' .'
92104 strict : ' false'
105+ paths-ignore : |
106+ vendor/
107+ vendored/
108+ verified-container-spec/
109+ .audittraining/
110+ integration/fixtures/
111+ test/fixtures/
112+ tests/fixtures/
113+ absolute-zero/
114+ container/deploy.k9.ncl
93115
94116 - name : Write summary
95117 run : |
Original file line number Diff line number Diff line change @@ -48,15 +48,35 @@ jobs:
4848
4949 - name : Check minimum score
5050 run : |
51- # Parse score from results
52- SCORE=$(jq -r '.runs[0].tool.driver.properties.score // 0' results.sarif 2>/dev/null || echo "0")
51+ set -euo pipefail
52+
53+ # Scorecard's SARIF output is useful for code scanning, but some
54+ # versions do not expose an aggregate score in SARIF. Treat missing
55+ # score metadata as "not enforceable" instead of a false zero.
56+ SCORE="$(jq -r '
57+ .runs[0].invocations[0].properties.score //
58+ .runs[0].tool.driver.properties.score //
59+ empty
60+ ' results.sarif 2>/dev/null || true)"
61+
62+ if [ -z "$SCORE" ] || [ "$SCORE" = "null" ]; then
63+ echo "::warning::OpenSSF Scorecard SARIF did not expose an aggregate score; SARIF upload succeeded, skipping numeric threshold."
64+ exit 0
65+ fi
66+
67+ case "$SCORE" in
68+ ''|*[!0-9.]*)
69+ echo "::warning::OpenSSF Scorecard score '$SCORE' is not numeric; skipping numeric threshold."
70+ exit 0
71+ ;;
72+ esac
5373
5474 echo "OpenSSF Scorecard Score: $SCORE"
5575
5676 # Minimum acceptable score (0-10 scale)
5777 MIN_SCORE=5
5878
59- if [ "$(echo "$SCORE < $MIN_SCORE" | bc -l)" = "1" ] ; then
79+ if awk -v score= "$SCORE" -v min=" $MIN_SCORE" 'BEGIN { exit !(score < min) }' ; then
6080 echo "::error::Scorecard score $SCORE is below minimum $MIN_SCORE"
6181 exit 1
6282 fi
Original file line number Diff line number Diff line change 88 push :
99 branches : [main]
1010
11- permissions : read-all
11+ permissions :
12+ contents : read
13+ security-events : write
14+ id-token : write
1215
1316jobs :
1417 analysis :
18+ permissions :
19+ contents : read
20+ security-events : write
21+ id-token : write
1522 uses : hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@e0caf11508a3989574713c78f5f444f2ce5e33ef
1623 secrets : inherit
You can’t perform that action at this time.
0 commit comments