Skip to content

Security: pin GitHub Actions to SHA hashes#192

Open
jorgebraz wants to merge 1 commit intomainfrom
security/pin-actions-to-sha
Open

Security: pin GitHub Actions to SHA hashes#192
jorgebraz wants to merge 1 commit intomainfrom
security/pin-actions-to-sha

Conversation

@jorgebraz
Copy link
Copy Markdown

Pins all GitHub Actions from mutable tags/branches to immutable SHA hashes.

This prevents supply chain attacks like the TeamPCP/Trivy incident (March 2026), where attackers force-pushed tags to point at malicious commits.

Auto-generated by the Codacy security audit script.

Replaces mutable tag/branch references with immutable SHA hashes
to prevent supply chain attacks (ref: TeamPCP/Trivy March 2026).

Actions left as tags: 0
@jorgebraz jorgebraz requested a review from a team as a code owner March 24, 2026 17:35
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Mar 24, 2026

Up to standards ✅

🟢 Issues 0 issues

Alerts:

"

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation
Metric Results
Coverage variation +0.00% coverage variation
Diff coverage diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (3075123) Report Missing Report Missing Report Missing
Head commit (f9097c5) 6629 (+0) 1532 (+0) 23.11% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#192) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes. Give us feedback

Copy link
Copy Markdown

@codacy-production codacy-production bot left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Although Codacy analysis reports the PR is up to standards, there is a critical logic error that will break the release workflow. The SHA hash provided for actions/setup-node is incorrect, belonging to the actions/setup-python repository. Furthermore, none of the required actions appear to have been correctly pinned with the mandatory version comments, leaving the security requirements for this PR largely unfulfilled.

Test suggestions

  • Verify 'actions/checkout' is pinned to a commit SHA and includes a version comment.
  • Verify 'actions/setup-node' is pinned to a commit SHA and includes a version comment.
  • Verify 'HaaLeo/publish-vscode-extension' is pinned to a commit SHA and includes a version comment.
  • Verify 'ncipollo/release-action' is pinned to a commit SHA and includes a version comment.
  • Verify 'slackapi/slack-github-action' is pinned to a commit SHA and includes a version comment.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify 'actions/checkout' is pinned to a commit SHA and includes a version comment.
2. Verify 'actions/setup-node' is pinned to a commit SHA and includes a version comment.
3. Verify 'HaaLeo/publish-vscode-extension' is pinned to a commit SHA and includes a version comment.
4. Verify 'ncipollo/release-action' is pinned to a commit SHA and includes a version comment.
5. Verify 'slackapi/slack-github-action' is pinned to a commit SHA and includes a version comment.

🗒️ Improve review quality by adding custom instructions

fetch-depth: 0
- name: Setup Node version
uses: actions/setup-node@v3
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
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 SHA 3235b876344d2a9aa001b8d1453c930bba69e610 belongs to the actions/setup-python repository, not actions/setup-node. This will cause the workflow to fail. Use the correct SHA for actions/setup-node@v3.8.2 instead.

Suggested change
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3
uses: actions/setup-node@64ed570e647c51e000939a0658227bccb3561bd2 # v3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this comment accurate @jorgebraz ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants