Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-go@v2
- uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089 # master
- uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 HIGH RISK

The actions/checkout@master step is not pinned to a SHA. For a security-focused PR, it is essential to pin all actions—especially checkout, which has access to the entire codebase—to a specific commit hash to prevent supply chain attacks.

Try running the following prompt in your coding agent:

Update the actions/checkout step on line 11 of .github/workflows/build.yml to use a specific commit SHA, such as actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 (v4.1.7).

with:
go-version: "^1.25"
- name: "Checkup"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
environment: production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089 # master
with:
# Will fetch all history and tags required to generate version
fetch-depth: 0
- uses: actions/setup-go@v2
- uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

Suggestion: The actions/setup-go@v2 action is deprecated as it relies on Node.js 12. You should upgrade to v5 while pinning the SHA to ensure compatibility with modern GitHub runners.

Suggested change
- uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2
- uses: actions/setup-go@0ad4b8f35a13ee4665a0022f3d919229a46975a6 # v5

with:
go-version: "^1.15.5"
- name: "Checkup"
Expand All @@ -22,7 +22,7 @@ jobs:
run: go build
- name: "Git Version"
id: generate-version
uses: codacy/git-version@2.4.0
uses: codacy/git-version@fa06788276d7492a2af01662649696d249ecf4cb # 2.4.0
- name: "Tag version"
run: |
git tag ${{ steps.generate-version.outputs.version }}
Expand All @@ -34,7 +34,7 @@ jobs:
docker tag "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}" "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}"
docker tag "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}" "codacy/pulse-event-cli:latest"
- name: "Login to Docker Hub"
uses: docker/login-action@v1.12.0
uses: docker/login-action@42d299face0c5c43a0487c477f595ac9cf22f1a7 # v1.12.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
Expand All @@ -43,14 +43,14 @@ jobs:
docker push "codacy/pulse-event-cli:${{ steps.generate-version.outputs.version }}"
docker push "codacy/pulse-event-cli:latest"
- name: Push binaries to GitHub
uses: goreleaser/goreleaser-action@v6
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

Suggestion: Pinning the action SHA secures the execution wrapper, but version: latest still pulls a mutable binary at runtime. This makes the release process non-deterministic. Consider pinning the GoReleaser version to a specific release like v2.1.0.

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: latest
args: release --clean
- name: "Configure AWS Credentials"
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1
with:
aws-region: eu-west-1
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths "/${BINARY_PATH}/latest"
fi
- name: "Push data to pulse"
uses: codacy/pulse-action@0.0.3
uses: codacy/pulse-action@dd15d61f61272a7b4395e88de12d4f7d38b61686 # 0.0.3
with:
args: |
push git deployment \
Expand Down
Loading