Skip to content

Commit 2b3291b

Browse files
mrveisstclaude
authored
ci(security): pin all 3rd-party actions to commit SHAs (closes #7091) (#7102)
Per GitHub's security hardening guide for actions: > Pinning an action to a full length commit SHA is currently the only > way to use an action as an immutable release. Tags are mutable. A compromised maintainer could force-push v3 → a malicious commit that lands silently in our CI on next run. SHA pinning makes the action immutable until we explicitly update. 7 actions pinned (resolved 2026-05-06 via `git ls-remote`): codecov/codecov-action@v6 → 57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 docker/build-push-action@v7 → bcafcacb16a39f128d818304e6c9c0c18556b85f docker/login-action@v4 → 4907a6ddec9925e35a0a9e82d7399ccc52663121 docker/setup-buildx-action@v4 → 4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd dorny/paths-filter@v3 → d1c1ffe0248fe513906c8e24db8ea791d46f8590 orhun/git-cliff-action@v4 → f50e11560dce63f7c33227798f90b924471a88b5 softprops/action-gh-release@v3 → b4309332981a82ec1c5618f44dd2e27cc8bfbfda 11 occurrences across 6 workflows. Trailing `# vX` comment preserves human-readable version intent for future SHA bumps. actions/* (first-party, GitHub-maintained) left tag-pinned per common practice — the supply-chain risk surface is much smaller for those. Dependabot already covers `github-actions` ecosystem in `.github/dependabot.yml` — it'll auto-PR SHA updates as new versions release, using the version comment for changelog inference. Co-authored-by: t <t@t> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ff22ca6 commit 2b3291b

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

.github/workflows/autoresearch-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
- uses: actions/checkout@v6
2222

2323
- name: Log in to GHCR
24-
uses: docker/login-action@v4
24+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
2525
with:
2626
registry: ghcr.io
2727
username: ${{ github.actor }}
2828
password: ${{ secrets.GITHUB_TOKEN }}
2929

3030
- name: Build and push
31-
uses: docker/build-push-action@v7
31+
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7
3232
with:
3333
context: autobot-backend/services/autoresearch
3434
file: autobot-backend/services/autoresearch/Dockerfile

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
frontend: ${{ steps.filter.outputs.frontend }}
2626
steps:
2727
- uses: actions/checkout@v6
28-
- uses: dorny/paths-filter@v3
28+
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
2929
id: filter
3030
with:
3131
filters: |
@@ -160,7 +160,7 @@ jobs:
160160
fi
161161
162162
- name: Upload coverage reports
163-
uses: codecov/codecov-action@v6
163+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
164164
with:
165165
files: ./coverage.xml
166166
flags: unittests

.github/workflows/docker-smoke-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@v6
2626

2727
- name: Set up Docker Buildx
28-
uses: docker/setup-buildx-action@v4
28+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
2929

3030
- name: Create .env from .env.example
3131
run: cp .env.example .env

.github/workflows/frontend-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
run: npm run test:coverage
9292

9393
- name: Upload coverage reports to Codecov
94-
uses: codecov/codecov-action@v6
94+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
9595
with:
9696
files: ./autobot-frontend/coverage/lcov.info
9797
directory: ./autobot-frontend/coverage

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
3737
- name: Determine next version
3838
id: version
39-
uses: orhun/git-cliff-action@v4
39+
uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 # v4
4040
with:
4141
config: cliff.toml
4242
args: --bumped-version
@@ -59,7 +59,7 @@ jobs:
5959
- name: Generate release notes (git-cliff)
6060
if: steps.check.outputs.release_needed == 'true'
6161
id: cliff_notes
62-
uses: orhun/git-cliff-action@v4
62+
uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 # v4
6363
with:
6464
config: cliff.toml
6565
args: --latest --strip header
@@ -79,7 +79,7 @@ jobs:
7979
8080
- name: Update CHANGELOG.md (full history index)
8181
if: steps.check.outputs.release_needed == 'true'
82-
uses: orhun/git-cliff-action@v4
82+
uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 # v4
8383
with:
8484
config: cliff.toml
8585
args: --verbose
@@ -101,7 +101,7 @@ jobs:
101101
102102
- name: Create GitHub Release
103103
if: steps.check.outputs.release_needed == 'true'
104-
uses: softprops/action-gh-release@v3
104+
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3
105105
with:
106106
tag_name: ${{ steps.check.outputs.version }}
107107
name: ${{ steps.check.outputs.version }}

.github/workflows/security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
deps: ${{ steps.filter.outputs.deps }}
3535
steps:
3636
- uses: actions/checkout@v6
37-
- uses: dorny/paths-filter@v3
37+
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
3838
id: filter
3939
with:
4040
filters: |

0 commit comments

Comments
 (0)