This repository was archived by the owner on Jul 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Security: pin GitHub Actions to SHA hashes #39
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MEDIUM RISK Suggestion: The
Suggested change
|
||||||
| with: | ||||||
| go-version: "^1.15.5" | ||||||
| - name: "Checkup" | ||||||
|
|
@@ -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 }} | ||||||
|
|
@@ -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 }} | ||||||
|
|
@@ -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 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MEDIUM RISK Suggestion: Pinning the action SHA secures the execution wrapper, but |
||||||
| 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 }} | ||||||
|
|
@@ -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 \ | ||||||
|
|
||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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@masterstep is not pinned to a SHA. For a security-focused PR, it is essential to pin all actions—especiallycheckout, 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: