Skip to content

Commit dc9497d

Browse files
jorgebrazCodacy Security Bot
andauthored
Security: pin GitHub Actions to SHA hashes (#39)
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 66f4bf2 commit dc9497d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@master
12-
- uses: actions/setup-go@v2
11+
- uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089 # master
12+
- uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2
1313
with:
1414
go-version: "^1.25"
1515
- name: "Checkup"

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
environment: production
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@master
12+
- uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089 # master
1313
with:
1414
# Will fetch all history and tags required to generate version
1515
fetch-depth: 0
16-
- uses: actions/setup-go@v2
16+
- uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2
1717
with:
1818
go-version: "^1.15.5"
1919
- name: "Checkup"
@@ -22,7 +22,7 @@ jobs:
2222
run: go build
2323
- name: "Git Version"
2424
id: generate-version
25-
uses: codacy/git-version@2.4.0
25+
uses: codacy/git-version@fa06788276d7492a2af01662649696d249ecf4cb # 2.4.0
2626
- name: "Tag version"
2727
run: |
2828
git tag ${{ steps.generate-version.outputs.version }}
@@ -34,7 +34,7 @@ jobs:
3434
docker tag "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}" "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}"
3535
docker tag "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}" "codacy/pulse-event-cli:latest"
3636
- name: "Login to Docker Hub"
37-
uses: docker/login-action@v1.12.0
37+
uses: docker/login-action@42d299face0c5c43a0487c477f595ac9cf22f1a7 # v1.12.0
3838
with:
3939
username: ${{ secrets.DOCKER_USER }}
4040
password: ${{ secrets.DOCKER_PASS }}
@@ -43,14 +43,14 @@ jobs:
4343
docker push "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}"
4444
docker push "codacy/pulse-event-cli:latest"
4545
- name: Push binaries to GitHub
46-
uses: goreleaser/goreleaser-action@v6
46+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6
4747
env:
4848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4949
with:
5050
version: latest
5151
args: release --clean
5252
- name: "Configure AWS Credentials"
53-
uses: aws-actions/configure-aws-credentials@v1
53+
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1
5454
with:
5555
aws-region: eu-west-1
5656
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -79,7 +79,7 @@ jobs:
7979
aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths "/${BINARY_PATH}/latest"
8080
fi
8181
- name: "Push data to pulse"
82-
uses: codacy/pulse-action@0.0.3
82+
uses: codacy/pulse-action@dd15d61f61272a7b4395e88de12d4f7d38b61686 # 0.0.3
8383
with:
8484
args: |
8585
push git deployment \

0 commit comments

Comments
 (0)