Skip to content

Commit 645d73d

Browse files
fix(security): pin 25 action refs to SHAs and add a token permissions floor
All 25 third-party action refs ran from mutable tags. A tag is repointable by whoever controls the action repo, so the workflows trusted a moving target. Each now pins a commit SHA with the version kept in a trailing comment. 2 workflow(s) had no top-level permissions block, so any job without its own block inherited the repository default. contents: read is now the floor. Jobs that already declared their own permissions keep them, so nothing loses a capability it was using. Workflow-only, no source or test changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbDBXDWWvMFa7c2jGgyq9t
1 parent 9a4290b commit 645d73d

4 files changed

Lines changed: 31 additions & 25 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ on:
99
env:
1010
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
validate:
1417
runs-on: ubuntu-latest
1518
steps:
16-
- uses: actions/checkout@v7
19+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1720
- name: Validate JSON files
1821
run: |
1922
find . -name "*.json" -not -path "./.git/*" | while read f; do
@@ -32,10 +35,10 @@ jobs:
3235
run:
3336
working-directory: financial-services
3437
steps:
35-
- uses: actions/checkout@v7
38+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3639

3740
- name: Set up Python 3.11
38-
uses: actions/setup-python@v7
41+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
3942
with:
4043
python-version: "3.11"
4144

@@ -48,10 +51,10 @@ jobs:
4851
run:
4952
working-directory: agentic-commerce-accountability
5053
steps:
51-
- uses: actions/checkout@v7
54+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5255

5356
- name: Set up Python 3.11
54-
uses: actions/setup-python@v7
57+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
5558
with:
5659
python-version: "3.11"
5760

@@ -69,10 +72,10 @@ jobs:
6972
run:
7073
working-directory: industrial-embodied-ai
7174
steps:
72-
- uses: actions/checkout@v7
75+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7376

7477
- name: Set up Python 3.11
75-
uses: actions/setup-python@v7
78+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
7679
with:
7780
python-version: "3.11"
7881
cache: "pip"
@@ -98,10 +101,10 @@ jobs:
98101
run:
99102
working-directory: healthcare
100103
steps:
101-
- uses: actions/checkout@v7
104+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
102105

103106
- name: Set up Python 3.11
104-
uses: actions/setup-python@v7
107+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
105108
with:
106109
python-version: "3.11"
107110

@@ -114,10 +117,10 @@ jobs:
114117
run:
115118
working-directory: embodied-action-receipts
116119
steps:
117-
- uses: actions/checkout@v7
120+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
118121

119122
- name: Set up Python 3.11
120-
uses: actions/setup-python@v7
123+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
121124
with:
122125
python-version: "3.11"
123126
cache: "pip"
@@ -135,10 +138,10 @@ jobs:
135138
run:
136139
working-directory: multi-tenant-saas
137140
steps:
138-
- uses: actions/checkout@v7
141+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
139142

140143
- name: Set up Python 3.11
141-
uses: actions/setup-python@v7
144+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
142145
with:
143146
python-version: "3.11"
144147

@@ -151,10 +154,10 @@ jobs:
151154
run:
152155
working-directory: ca2a-delegation
153156
steps:
154-
- uses: actions/checkout@v7
157+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
155158

156159
- name: Set up Python 3.11
157-
uses: actions/setup-python@v7
160+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
158161
with:
159162
python-version: "3.11"
160163

@@ -173,10 +176,10 @@ jobs:
173176
run:
174177
working-directory: weight-custody-manifest
175178
steps:
176-
- uses: actions/checkout@v7
179+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
177180

178181
- name: Set up Python 3.11
179-
uses: actions/setup-python@v7
182+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
180183
with:
181184
python-version: "3.11"
182185

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v7
28+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2929

3030
- name: Initialize CodeQL
31-
uses: github/codeql-action/init@v4
31+
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
3232
with:
3333
languages: python
3434
queries: +security-extended
3535

3636
- name: Autobuild
37-
uses: github/codeql-action/autobuild@v4
37+
uses: github/codeql-action/autobuild@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
3838

3939
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v4
40+
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
4141
with:
4242
category: /language:python

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
actions: read
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v7
23+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2424
with:
2525
persist-credentials: false
2626
fetch-depth: 0
@@ -35,6 +35,6 @@ jobs:
3535
publish_results: false
3636

3737
- name: Upload SARIF
38-
uses: github/codeql-action/upload-sarif@v4
38+
uses: github/codeql-action/upload-sarif@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
3939
with:
4040
sarif_file: scorecard-results.sarif

.github/workflows/smoke.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ env:
1111
# cmcp CLI prints unicode glyphs; force UTF-8 so it is safe on any runner locale.
1212
PYTHONUTF8: "1"
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
smoke:
1619
name: smoke (${{ matrix.name }})
@@ -45,10 +48,10 @@ jobs:
4548
agent: agent/saas_agent.py
4649
args: "--tenant summit-us"
4750
steps:
48-
- uses: actions/checkout@v7
51+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4952

5053
- name: Set up Python 3.11
51-
uses: actions/setup-python@v7
54+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
5255
with:
5356
python-version: "3.11"
5457

0 commit comments

Comments
 (0)