Skip to content

Commit 0977e0b

Browse files
justaugustusclaude
andcommitted
ci: add scorecard-monitor integration with results file
Update the Allstar workflow to: - Use the results-json-output branch (includes SARIF upload + results file output) - Pass -results-file to produce Scorecard JSON v2 output - Add a monitor job that feeds the results into scorecard-monitor for dashboard reporting The monitor job uses scorecard-monitor's results-path input (ossf/scorecard-monitor#90) to consume Allstar's output and generate a Markdown report with score history. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Stephen Augustus <foo@auggie.dev>
1 parent 5ea41c5 commit 0977e0b

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/allstar.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2727
with:
2828
repository: ossf/allstar
29-
ref: evidence-upload
29+
ref: results-json-output
3030
persist-credentials: false
3131
- name: Setup Go
3232
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
@@ -45,7 +45,7 @@ jobs:
4545
APP_ID: ${{ vars.APP_ID }}
4646
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
4747
run: |
48-
./allstar -once -policy "OpenSSF Scorecard" 2> "$ARTIFACT_DIR/allstar.log" | tee "$ARTIFACT_DIR/allstar.out"
48+
./allstar -once -policy "OpenSSF Scorecard" -results-file "$ARTIFACT_DIR/results.json" 2> "$ARTIFACT_DIR/allstar.log" | tee "$ARTIFACT_DIR/allstar.out"
4949
if [ -s "$ARTIFACT_DIR/allstar.log" ]; then
5050
echo "==== Errors ===="
5151
cat "$ARTIFACT_DIR/allstar.log"
@@ -56,3 +56,26 @@ jobs:
5656
with:
5757
name: allstar-scan
5858
path: ${{ env.ARTIFACT_DIR }}
59+
60+
monitor:
61+
runs-on: ubuntu-latest
62+
needs: scan
63+
permissions:
64+
contents: write
65+
steps:
66+
- name: Checkout this repo
67+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
68+
- name: Download scan artifacts
69+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
70+
with:
71+
name: allstar-scan
72+
path: ${{ env.ARTIFACT_DIR }}
73+
- name: OpenSSF Scorecard Monitor
74+
uses: ossf/scorecard-monitor@local-results # TODO: pin to release once merged
75+
with:
76+
results-path: ${{ env.ARTIFACT_DIR }}/results.json
77+
database: reporting/database.json
78+
report: reporting/scorecard-report.md
79+
auto-commit: true
80+
auto-push: true
81+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)