Skip to content

Commit 30ee997

Browse files
chore: pin GitHub Actions to commit SHAs (#209)
## Pin GitHub Actions to commit SHAs GitHub Actions referenced by tag (e.g. `actions/checkout@v4`) use a mutable pointer — the tag owner can move it to a different commit at any time, including a malicious one. This is the attack vector used in the tj-actions/changed-files incident (CVE-2025-30066). Pinning to a full 40-character commit SHA makes the reference immutable. The `# tag` comment preserves human readability so reviewers can tell which version is pinned. Important: a SHA can also originate from a forked repository. A malicious actor can fork an action, push a compromised commit to the fork, and the SHA will resolve — but it won't exist in the upstream canonical repo. Each SHA in this PR was verified against the action's canonical repository (not a fork). ### Changes - `dfinity/ci-tools/.github/workflows/check-pr-title.yaml@main` -> `dfinity/ci-tools/.github/workflows/check-pr-title.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main` - Version: main | Latest: ? | Release age: ? - Commit: dfinity/ci-tools@afeee4f - `dfinity/ci-tools/.github/workflows/check-commit-messages.yaml@main` -> `dfinity/ci-tools/.github/workflows/check-commit-messages.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main` - Version: main | Latest: ? | Release age: ? - Commit: dfinity/ci-tools@afeee4f - `dfinity/ci-tools/.github/workflows/generate-changelog.yaml@main` -> `dfinity/ci-tools/.github/workflows/generate-changelog.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main` - Version: main | Latest: ? | Release age: ? - Commit: dfinity/ci-tools@afeee4f - `dfinity/ci-tools/actions/create-pr@main` -> `dfinity/ci-tools/actions/create-pr@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main` - Version: main | Latest: ? | Release age: ? - Commit: dfinity/ci-tools@afeee4f ### Files modified - `.github/workflows/commitizen.yml` - `.github/workflows/generate-changelog.yml` - `.github/workflows/pull-project-docs.yml`
1 parent 58fecf2 commit 30ee997

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/commitizen.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ concurrency:
1111
jobs:
1212
check_pr_title:
1313
if: github.event_name == 'pull_request'
14-
uses: dfinity/ci-tools/.github/workflows/check-pr-title.yaml@main
14+
uses: dfinity/ci-tools/.github/workflows/check-pr-title.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main
1515

1616
check_commit_messages:
1717
if: github.event_name == 'merge_group'
18-
uses: dfinity/ci-tools/.github/workflows/check-commit-messages.yaml@main
18+
uses: dfinity/ci-tools/.github/workflows/check-commit-messages.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main
1919

2020
commitizen:
2121
name: commitizen:required

.github/workflows/generate-changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111

1212
jobs:
1313
generate_changelog:
14-
uses: dfinity/ci-tools/.github/workflows/generate-changelog.yaml@main
14+
uses: dfinity/ci-tools/.github/workflows/generate-changelog.yaml@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main
1515
with:
1616
token_app_id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }}
1717
environment: create-prs

.github/workflows/pull-project-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
deno task fetch-project-commit --project "${{ steps.params.outputs.project_repository }}" --token "${{ steps.generate_token.outputs.token }}"
4747
4848
- name: Create pull request
49-
uses: dfinity/ci-tools/actions/create-pr@main
49+
uses: dfinity/ci-tools/actions/create-pr@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main
5050
with:
5151
branch_name: "build/docs-update"
5252
base_branch_name: "main"

0 commit comments

Comments
 (0)