Skip to content

Commit ee5a618

Browse files
ci(scorecard): adopt standards scorecard-reusable wrapper (#34)
Replace the standalone OSSF Scorecard job with a thin wrapper around hyperpolymath/standards scorecard-reusable.yml, matching governance.yml. - Pinned to the estate-canonical standards commit 861b5e9 (same as governance.yml) so the estate moves in lockstep. - Grants security-events:write + id-token:write on the calling job: for a reusable call the caller is the ceiling for the called token, so without this the reusable's SARIF upload is silently downgraded and fails. - Keeps the MPL-2.0 header, existing triggers, and the concurrency guardrail. - Leaves scorecard-enforcer.yml standalone (it owns the score-threshold gate and the SECURITY.md / pinned-deps checks the reusable does not cover). Supersedes the scorecard portion of the closed, stale PR #30 (which relicensed these files to PMPL-1.0-or-later against #33 and pinned an older standards SHA). Claude-Session: https://claude.ai/code/session_01AHygjxRyU3WwmXEhA9KF5L Co-authored-by: Claude <noreply@anthropic.com>
1 parent accf7ed commit ee5a618

1 file changed

Lines changed: 16 additions & 17 deletions

File tree

.github/workflows/scorecard.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# // Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
22
# SPDX-License-Identifier: MPL-2.0
3+
# scorecard.yml — thin wrapper calling the shared OSSF Scorecard analysis in
4+
# hyperpolymath/standards (scorecard-reusable.yml) instead of a per-repo copy,
5+
# matching the governance.yml wrapper. Pinned to the same standards commit as
6+
# governance.yml so the estate moves in lockstep.
7+
#
8+
# scorecard-enforcer.yml deliberately stays standalone: it owns the score
9+
# threshold gate and the SECURITY.md / pinned-deps checks, which the reusable
10+
# does not cover.
311
name: Scorecards supply-chain security
4-
512
on:
613
branch_protection_rule:
714
schedule:
@@ -17,22 +24,14 @@ concurrency:
1724
permissions:
1825
contents: read
1926
jobs:
20-
analysis:
21-
runs-on: ubuntu-latest
22-
timeout-minutes: 15
27+
scorecard:
28+
# The reusable's analysis job declares security-events:write + id-token:write;
29+
# for a reusable call the caller's grant is the ceiling for the called
30+
# workflow's GITHUB_TOKEN, so these must be granted here or the SARIF upload
31+
# is silently downgraded and fails. (timeout-minutes is intentionally absent:
32+
# it is not a permitted key on a reusable-calling job — the reusable owns it.)
2333
permissions:
34+
contents: read
2435
security-events: write
2536
id-token: write
26-
steps:
27-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
28-
with:
29-
persist-credentials: false
30-
- name: Run Scorecard
31-
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.3.1
32-
with:
33-
results_file: results.sarif
34-
results_format: sarif
35-
- name: Upload results
36-
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v3.31.8
37-
with:
38-
sarif_file: results.sarif
37+
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@861b5e911d9e5dcfb3c0ab3dd2a9a3c8fd0a1613

0 commit comments

Comments
 (0)