Skip to content

Commit df55ffa

Browse files
jorgebrazCodacy Security Bot
andauthored
Security: pin GitHub Actions to SHA hashes (#197)
Replaces mutable tag/branch references with immutable SHA hashes to prevent supply chain attacks (ref: TeamPCP/Trivy March 2026). Actions left as tags: 0 Co-authored-by: Codacy Security Bot <security-bot@codacy.com>
1 parent 301c53e commit df55ffa

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.github/workflows/go.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1212
with:
1313
fetch-depth: 0 # Needed for git history
1414
- name: Set up Go
15-
uses: actions/setup-go@v4
15+
uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4
1616
- name: Build CLI for all platforms
1717
run: make build-all
1818
- name: Upload CLI binaries
19-
uses: actions/upload-artifact@v4
19+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
2020
with:
2121
name: cli-binaries
2222
path: |
@@ -28,9 +28,9 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3232
- name: Set up Go
33-
uses: actions/setup-go@v4
33+
uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4
3434
- name: Install dependencies from .codacy/codacy.yaml
3535
run: |
3636
make build
@@ -51,14 +51,14 @@ jobs:
5151
runs-on: ubuntu-latest
5252
steps:
5353
- name: Checkout
54-
uses: actions/checkout@v4
54+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
5555
with:
5656
fetch-depth: 0
5757
- name: Set up Go
58-
uses: actions/setup-go@v4
58+
uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4
5959
- name: "Git Version"
6060
id: generate-version
61-
uses: codacy/git-version@2.8.0
61+
uses: codacy/git-version@80c816f11db8dea5e3a81025f598193015b51832 # 2.8.0
6262
- name: "Tag version"
6363
run: |
6464
git tag ${{ steps.generate-version.outputs.version }}
@@ -67,7 +67,7 @@ jobs:
6767
id: go-version
6868
run: echo "VERSION=$(go version | cut -d' ' -f3)" >> $GITHUB_OUTPUT
6969
- name: Run GoReleaser
70-
uses: goreleaser/goreleaser-action@v5
70+
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5
7171
with:
7272
distribution: goreleaser
7373
version: "~> v2"

.github/workflows/it-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1515
with:
1616
fetch-depth: 0 # Needed for git history
1717
- name: Set up Go
18-
uses: actions/setup-go@v4
18+
uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4
1919
- name: Build CLI for all platforms
2020
run: make build-all
2121
- name: Upload CLI binaries
22-
uses: actions/upload-artifact@v4
22+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
2323
with:
2424
name: cli-binaries
2525
path: |
@@ -36,12 +36,12 @@ jobs:
3636
fail-fast: false
3737
steps:
3838
- name: Checkout code
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
4040
with:
4141
fetch-depth: 0 # Needed for git history
4242

4343
- name: Download CLI binaries
44-
uses: actions/download-artifact@v4
44+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
4545
with:
4646
name: cli-binaries
4747
path: .

0 commit comments

Comments
 (0)