Skip to content

Commit 4da9ffe

Browse files
committed
ci: adopt standards reusable workflows for Scorecard, Hypatia, and Governance
1 parent 9e0c8a6 commit 4da9ffe

32 files changed

Lines changed: 2550 additions & 219 deletions

.github/workflows/ada.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,23 @@
11
# SPDX-License-Identifier: MPL-2.0
22
name: Ada (GNAT)
3-
43
on:
54
push:
6-
branches: [ "main" ]
5+
branches: ["main"]
76
pull_request:
8-
branches: [ "main" ]
9-
7+
branches: ["main"]
108
permissions: read-all
11-
129
jobs:
1310
build:
1411
permissions:
1512
contents: read
16-
1713
runs-on: ubuntu-latest
1814
timeout-minutes: 15
19-
2015
steps:
21-
- name: Checkout
22-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23-
24-
- name: Set up GNAT toolchain
25-
run: >
26-
sudo apt-get update &&
27-
sudo apt-get install gnat gprbuild
16+
- name: Checkout
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
- name: Set up GNAT toolchain
19+
run: >
20+
sudo apt-get update && sudo apt-get install gnat gprbuild
2821
29-
- name: Build
30-
run: gprbuild -j0 -p
22+
- name: Build
23+
run: gprbuild -j0 -p

.github/workflows/codeql.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
# SPDX-License-Identifier: AGPL-3.0-or-later
22
name: CodeQL Security Analysis
3-
43
on:
54
push:
65
branches: [main, master]
76
pull_request:
87
branches: [main, master]
98
schedule:
109
- cron: '0 6 * * 1'
11-
1210
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
1311
# updates do not pile up queued runs against the shared account-wide
1412
# Actions concurrency pool. Applied only to read-only check workflows
1513
# (no publish/mutation), so cancelling a superseded run is always safe.
1614
concurrency:
1715
group: ${{ github.workflow }}-${{ github.ref }}
1816
cancel-in-progress: true
19-
20-
2117
permissions: read-all
22-
2318
jobs:
2419
analyze:
2520
runs-on: ubuntu-latest
@@ -39,17 +34,14 @@ jobs:
3934
# produces results on every push. See hyperpolymath/hypatia#260.
4035
- language: actions
4136
build-mode: none
42-
4337
steps:
4438
- name: Checkout
4539
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
46-
4740
- name: Initialize CodeQL
4841
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.28.1
4942
with:
5043
languages: ${{ matrix.language }}
5144
build-mode: ${{ matrix.build-mode }}
52-
5345
- name: Perform CodeQL Analysis
5446
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.28.1
5547
with:

.github/workflows/generator-generic-ossf-slsa3-publish.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ on:
1616
workflow_dispatch:
1717
release:
1818
types: [created]
19-
2019
permissions: read-all
21-
2220
jobs:
2321
build:
2422
runs-on: ubuntu-latest
@@ -27,21 +25,18 @@ jobs:
2725
contents: read
2826
outputs:
2927
digests: ${{ steps.hash.outputs.digests }}
30-
3128
steps:
3229
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33-
3430
# ========================================================
3531
#
3632
# Step 1: Build your artifacts.
3733
#
3834
# ========================================================
3935
- name: Build artifacts
4036
run: |
41-
# These are some amazing artifacts.
42-
echo "artifact1" > artifact1
43-
echo "artifact2" > artifact2
44-
37+
# These are some amazing artifacts.
38+
echo "artifact1" > artifact1
39+
echo "artifact2" > artifact2
4540
# ========================================================
4641
#
4742
# Step 2: Add a step to generate the provenance subjects
@@ -59,11 +54,10 @@ jobs:
5954
files=$(ls artifact*)
6055
# Generate the subjects (base64 encoded).
6156
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"
62-
6357
provenance:
6458
needs: [build]
6559
permissions:
66-
actions: read # To read the workflow path.
60+
actions: read # To read the workflow path.
6761
id-token: write # To sign the provenance.
6862
contents: write # To add assets to a release.
6963
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0

.github/workflows/governance.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
1-
# SPDX-License-Identifier: MPL-2.0
2-
# governance.yml — single wrapper calling the shared estate governance bundle
3-
# in hyperpolymath/standards. Replaces ~8 duplicated per-repo governance
4-
# workflows (verisimiser#59 estate rollout). Load-bearing build/security
5-
# workflows (rust-ci, codeql, dependabot, release, secret-scanner, scorecard)
6-
# stay standalone in this repo.
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
72
name: Governance
83

94
on:
105
push:
116
branches: [main, master]
127
pull_request:
8+
branches: [main, master]
139
workflow_dispatch:
1410

15-
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
16-
# updates do not pile up queued runs against the shared account-wide
17-
# Actions concurrency pool. Applied only to read-only check workflows
18-
# (no publish/mutation), so cancelling a superseded run is always safe.
19-
concurrency:
20-
group: ${{ github.workflow }}-${{ github.ref }}
21-
cancel-in-progress: true
22-
2311
permissions:
2412
contents: read
2513

2614
jobs:
2715
governance:
28-
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@861b5e911d9e5dcfb3c0ab3dd2a9a3c8fd0a1613
29-
timeout-minutes: 10
16+
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@5a93d9da1bbf6ca9eb4eec89e900c733f114c995

.github/workflows/hypatia-scan.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# SPDX-License-Identifier: MPL-2.0
2-
# Thin wrapper around hyperpolymath/standards hypatia-scan-reusable.yml.
3-
# See standards#191 for the reusable's purpose and design.
4-
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
52
name: Hypatia Security Scan
63

74
on:
@@ -13,18 +10,10 @@ on:
1310
- cron: '0 0 * * 0'
1411
workflow_dispatch:
1512

16-
# Estate guardrail: cancel superseded runs so re-pushes don't pile up.
17-
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}
19-
cancel-in-progress: true
20-
2113
permissions:
2214
contents: read
23-
security-events: write
24-
pull-requests: write
15+
security-events: read
2516

2617
jobs:
27-
hypatia:
28-
uses: hyperpolymath/standards/.github/workflows/hypatia-scan-reusable.yml@6cd3772824e59c8c9affeab66061e25383544242
29-
timeout-minutes: 10
30-
secrets: inherit
18+
scan:
19+
uses: hyperpolymath/standards/.github/workflows/hypatia-scan-reusable.yml@5a93d9da1bbf6ca9eb4eec89e900c733f114c995

.github/workflows/instant-sync.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# Instant Forge Sync - Triggers propagation to all forges on push/release
33
name: Instant Sync
4-
54
on:
65
push:
76
branches: [main, master]
87
release:
98
types: [published]
10-
119
permissions:
1210
contents: read
13-
1411
jobs:
1512
dispatch:
1613
runs-on: ubuntu-latest
@@ -29,6 +26,5 @@ jobs:
2926
"sha": "${{ github.sha }}",
3027
"forges": ""
3128
}
32-
3329
- name: Confirm
3430
run: echo "::notice::Propagation triggered for ${{ github.event.repository.name }}"

.github/workflows/mirror.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
# SPDX-License-Identifier: AGPL-3.0-or-later
22
name: Mirror to Git Forges
3-
43
on:
54
push:
65
branches: [main]
76
workflow_dispatch:
8-
97
permissions:
108
contents: read
11-
129
jobs:
1310
mirror:
1411
uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@e6b2884722350515934d443daf23442f2195796f

.github/workflows/scorecard-enforcer.yml

Lines changed: 0 additions & 111 deletions
This file was deleted.

.github/workflows/scorecard.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
# SPDX-License-Identifier: AGPL-3.0-or-later
2-
name: Scorecards supply-chain security
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: OSSF Scorecard
33

44
on:
5-
branch_protection_rule:
6-
schedule:
7-
- cron: '23 4 * * 1'
85
push:
9-
branches: [main]
6+
branches: [main, master]
7+
schedule:
8+
- cron: '0 4 * * *'
9+
workflow_dispatch:
1010

11-
permissions: read-all
11+
permissions:
12+
contents: read
1213

1314
jobs:
14-
analysis:
15-
permissions:
16-
security-events: write
17-
id-token: write
18-
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@e0caf11508a3989574713c78f5f444f2ce5e33ef
19-
timeout-minutes: 10
20-
secrets: inherit
15+
scorecard:
16+
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@5a93d9da1bbf6ca9eb4eec89e900c733f114c995

0 commit comments

Comments
 (0)