Skip to content

Commit cd248fe

Browse files
ci: redistribute concurrency-cancel guard to read-only check workflows (#81)
Redistributes the canonical read-only-check workflow templates that gained `concurrency{cancel-in-progress:true}` in hyperpolymath/standards#122, so this consumer stops holding account-wide concurrent-job slots on superseded runs. Files updated: codeql.yml governance.yml scorecard-enforcer.yml scorecard.yml secret-scanner.yml. Read-only checks only; no publish/mutation workflow touched. Refs hyperpolymath/standards#122 Generated with Claude Code
1 parent 6565244 commit cd248fe

5 files changed

Lines changed: 49 additions & 48 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0-or-later
1+
# SPDX-License-Identifier: PMPL-1.0
22
name: CodeQL Security Analysis
33

44
on:
@@ -9,8 +9,10 @@ on:
99
schedule:
1010
- cron: '0 6 * * 1'
1111

12-
# Cause-B mitigation (#77): cancel superseded runs so stacked pushes
13-
# to the same ref don't pile up identical jobs in the queue.
12+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
13+
# updates do not pile up queued runs against the shared account-wide
14+
# Actions concurrency pool. Applied only to read-only check workflows
15+
# (no publish/mutation), so cancelling a superseded run is always safe.
1416
concurrency:
1517
group: ${{ github.workflow }}-${{ github.ref }}
1618
cancel-in-progress: true
@@ -30,20 +32,18 @@ jobs:
3032
include:
3133
- language: javascript-typescript
3234
build-mode: none
33-
- language: rust
34-
build-mode: none
3535

3636
steps:
3737
- name: Checkout
38-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3939

4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.28.1
41+
uses: github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
4242
with:
4343
languages: ${{ matrix.language }}
4444
build-mode: ${{ matrix.build-mode }}
4545

4646
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.28.1
47+
uses: github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
4848
with:
4949
category: "/language:${{ matrix.language }}"

.github/workflows/governance.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ on:
1616
push:
1717
branches: [main, master]
1818
pull_request:
19-
# Cause-B mitigation (#77): was unscoped (fired on PRs to every
20-
# branch); narrowed to integration branches like the other gates.
21-
branches: [main, master]
2219
workflow_dispatch:
2320

24-
# Cause-B mitigation (#77): cancel superseded runs so stacked pushes
25-
# to the same ref don't pile up identical jobs in the queue.
21+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
22+
# updates do not pile up queued runs against the shared account-wide
23+
# Actions concurrency pool. Applied only to read-only check workflows
24+
# (no publish/mutation), so cancelling a superseded run is always safe.
2625
concurrency:
2726
group: ${{ github.workflow }}-${{ github.ref }}
2827
cancel-in-progress: true

.github/workflows/scorecard-enforcer.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ on:
99
- cron: '0 6 * * 1' # Weekly on Monday
1010
workflow_dispatch:
1111

12-
# Cause-B mitigation (#77): de-duplicate stacked enforcer runs.
13-
# cancel-in-progress is false — never abort a governance gate in flight.
12+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
13+
# updates do not pile up queued runs against the shared account-wide
14+
# Actions concurrency pool. Applied only to read-only check workflows
15+
# (no publish/mutation), so cancelling a superseded run is always safe.
1416
concurrency:
1517
group: ${{ github.workflow }}-${{ github.ref }}
16-
cancel-in-progress: false
18+
cancel-in-progress: true
1719

1820
permissions:
1921
contents: read
@@ -25,19 +27,19 @@ jobs:
2527
security-events: write
2628
id-token: write # For OIDC
2729
steps:
28-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
30+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2931
with:
3032
persist-credentials: false
3133

3234
- name: Run Scorecard
33-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
35+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
3436
with:
3537
results_file: results.sarif
3638
results_format: sarif
3739
publish_results: true
3840

3941
- name: Upload SARIF
40-
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3
42+
uses: github/codeql-action/upload-sarif@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v4
4143
with:
4244
sarif_file: results.sarif
4345

@@ -60,7 +62,7 @@ jobs:
6062
check-critical:
6163
runs-on: ubuntu-latest
6264
steps:
63-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
65+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6466

6567
- name: Check SECURITY.md exists
6668
run: |

.github/workflows/scorecard.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
# SPDX-License-Identifier: PMPL-1.0-or-later
1+
# SPDX-License-Identifier: PMPL-1.0
22
name: OSSF Scorecard
33
on:
44
push:
55
branches: [main, master]
66
schedule:
77
- cron: '0 4 * * *'
8+
workflow_dispatch:
89

9-
# Cause-B mitigation (#77): de-duplicate stacked scorecard runs.
10-
# cancel-in-progress is false — never abort a security scan in flight.
10+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
11+
# updates do not pile up queued runs against the shared account-wide
12+
# Actions concurrency pool. Applied only to read-only check workflows
13+
# (no publish/mutation), so cancelling a superseded run is always safe.
1114
concurrency:
1215
group: ${{ github.workflow }}-${{ github.ref }}
13-
cancel-in-progress: false
16+
cancel-in-progress: true
1417

1518
permissions:
1619
contents: read
@@ -22,17 +25,17 @@ jobs:
2225
security-events: write
2326
id-token: write
2427
steps:
25-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
28+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2629
with:
2730
persist-credentials: false
28-
31+
2932
- name: Run Scorecard
30-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
33+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.3.1
3134
with:
3235
results_file: results.sarif
3336
results_format: sarif
34-
37+
3538
- name: Upload results
36-
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.28.1
39+
uses: github/codeql-action/upload-sarif@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3.31.8
3740
with:
3841
sarif_file: results.sarif

.github/workflows/secret-scanner.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-License-Identifier: PMPL-1.0-or-later
1+
# SPDX-License-Identifier: PMPL-1.0
22
# Prevention workflow - scans for hardcoded secrets before they reach main
33
name: Secret Scanner
44

@@ -7,8 +7,10 @@ on:
77
push:
88
branches: [main]
99

10-
# Cause-B mitigation (#77): cancel superseded runs so stacked pushes
11-
# to the same ref don't pile up identical jobs in the queue.
10+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
11+
# updates do not pile up queued runs against the shared account-wide
12+
# Actions concurrency pool. Applied only to read-only check workflows
13+
# (no publish/mutation), so cancelling a superseded run is always safe.
1214
concurrency:
1315
group: ${{ github.workflow }}-${{ github.ref }}
1416
cancel-in-progress: true
@@ -20,19 +22,21 @@ jobs:
2022
trufflehog:
2123
runs-on: ubuntu-latest
2224
steps:
23-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
2426
with:
2527
fetch-depth: 0 # Full history for scanning
2628

2729
- name: TruffleHog Secret Scan
28-
uses: trufflesecurity/trufflehog@8a8ef8526528d8a4ff3e2c90be08e25ef8efbd9b # v3
30+
uses: trufflesecurity/trufflehog@6c05c4a00b91aa542267d8e32a8254774799d68d # v3
2931
with:
30-
extra_args: --only-verified --fail
32+
# The v3 action injects --fail automatically on pull_request events.
33+
# Passing --fail here triggers "flag 'fail' cannot be repeated".
34+
extra_args: --only-verified
3135

3236
gitleaks:
3337
runs-on: ubuntu-latest
3438
steps:
35-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
39+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
3640
with:
3741
fetch-depth: 0
3842

@@ -45,21 +49,14 @@ jobs:
4549
rust-secrets:
4650
runs-on: ubuntu-latest
4751
steps:
48-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
49-
50-
- name: Detect Rust sources
51-
id: detect
52-
run: |
53-
if find . -name Cargo.toml -print -quit | grep -q .; then
54-
echo "present=true" >> "$GITHUB_OUTPUT"
55-
else
56-
echo "present=false" >> "$GITHUB_OUTPUT"
57-
echo "No Cargo.toml — skipping Rust secret heuristics." >> "$GITHUB_STEP_SUMMARY"
58-
fi
52+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
5953

6054
- name: Check for hardcoded secrets in Rust
61-
if: steps.detect.outputs.present == 'true'
6255
run: |
56+
if ! find . -name Cargo.toml -not -path './target/*' -print -quit | grep -q .; then
57+
echo 'No Cargo.toml found — skipping Rust secrets check'
58+
exit 0
59+
fi
6360
# Patterns that suggest hardcoded secrets
6461
PATTERNS=(
6562
'const.*SECRET.*=.*"'

0 commit comments

Comments
 (0)