Repository navigation
Security: pin GitHub Actions to SHA hashes - #56
Conversation
Replaces mutable tag/branch references with immutable SHA hashes to prevent supply chain attacks (ref: TeamPCP/Trivy March 2026). Actions left as tags: 0
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull Request Overview
While the PR successfully implements the security requirement of pinning GitHub Actions to SHA hashes, several critical errors in the specific commit hashes will cause immediate workflow failures and must be addressed before merging.
Invalid SHAs were detected for atlassian/gajira-login and atlassian/gajira-create, meaning these workflows will fail to initialize. Additionally, there is a systemic version mismatch for actions/github-script across all workflow files; the hashes point to version 3.x (Node 12 runtime) while being labeled as version 2.0.0. This could introduce breaking changes to existing logic.
About this PR
- Multiple actions are pinned to non-existent SHAs in the Atlassian suite (gajira-login and gajira-create). These must be corrected to the valid commit hashes for the intended versions or the workflows will fail to pull the actions.
- There is a systemic issue where the commit hashes used do not match the version labels provided in the comments. Specifically, the hash for
actions/github-scriptpoints to v3.x while the code is labeled for v2.0.0. This pattern occurs in all modified YAML files.
Test suggestions
- Verify actions/github-script is pinned to SHA 6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45
- Verify atlassian/gajira-login is pinned to SHA 90a599561baaf8c05b080645ed73db7391c246ed
- Verify atlassian/gajira-create is pinned to SHA c0a9c69ac9d6aa063fed57201e55336ada860183
- Verify atlassian/gajira-comment is pinned to SHA 8ec356b5df49f1325653db7ee2da2b59a1d78203
🗒️ Improve review quality by adding custom instructions
| if: env.JIRA_CREATE_ISSUE_AUTO == 'true' | ||
| id: create_jira_issue | ||
| uses: atlassian/gajira-create@v2.0.1 | ||
| uses: atlassian/gajira-create@c0a9c69ac9d6aa063fed57201e55336ada860183 # v2.0.1 |
There was a problem hiding this comment.
🔴 HIGH RISK
The SHA c0a9c69ac9d6aa063fed57201e55336ada860183 is invalid for the atlassian/gajira-create repository. Please use the official SHA associated with the v2.0.1 tag to ensure the action can be resolved correctly.
| uses: atlassian/gajira-create@c0a9c69ac9d6aa063fed57201e55336ada860183 # v2.0.1 | |
| uses: atlassian/gajira-create@4459f4296b088828f0808a3d1d4d80a138981442 # v2.0.1 |
| if: env.JIRA_CREATE_COMMENT_AUTO == 'true' && env.GITHUB_ISSUE_TYPE == 'issue' && env.GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL == 'true' | ||
| id: login | ||
| uses: atlassian/gajira-login@v2.0.0 | ||
| uses: atlassian/gajira-login@90a599561baaf8c05b080645ed73db7391c246ed # v2.0.0 |
There was a problem hiding this comment.
🔴 HIGH RISK
The SHA 90a599561baaf8c05b080645ed73db7391c246ed does not exist in the official atlassian/gajira-login repository. Pinning to a SHA that cannot be resolved will cause the workflow to fail. Use the commit SHA for the official v2.0.0 tag instead.
| uses: atlassian/gajira-login@90a599561baaf8c05b080645ed73db7391c246ed # v2.0.0 | |
| uses: atlassian/gajira-login@f463236e84d7a8d57b3f94ec601004246830509a # v2.0.0 |
| if: env.JIRA_CREATE_COMMENT_AUTO == 'true' | ||
| id: github_issue_type | ||
| uses: actions/github-script@v2.0.0 | ||
| uses: actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45 # v2.0.0 |
There was a problem hiding this comment.
🔴 HIGH RISK
The SHA 6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45 corresponds to version v3.1.0, but the comment indicates v2.0.0. This mismatch appears on lines 21, 36, and 70 of this file. Version 3 introduced potential breaking changes, such as the switch to a Node 12 runtime. Please use the correct SHA for v2.0.0 to maintain compatibility.
| uses: actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45 # v2.0.0 | |
| uses: actions/github-script@79e000451f2216584c3bc1f7535b44c698e6c89f # v2.0.0 |
| - name: Change Title | ||
| if: github.event.label.name == env.JIRA_ISSUE_LABEL | ||
| uses: actions/github-script@v2.0.0 | ||
| uses: actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45 # v2.0.0 |
There was a problem hiding this comment.
🟡 MEDIUM RISK
The commit SHA 6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45 corresponds to v3.0.0, but the label says v2.0.0. This also affects line 73 in this file.
| uses: actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45 # v2.0.0 | |
| uses: actions/github-script@79e000451f2216584c3bc1f7535b44c698e6c89f # v2.0.0 |
| - name: Update GitHub issue | ||
| if: env.JIRA_CREATE_ISSUE_AUTO == 'true' | ||
| uses: actions/github-script@v2.0.0 | ||
| uses: actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45 # v2.0.0 |
There was a problem hiding this comment.
🟡 MEDIUM RISK
The commit SHA 6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45 corresponds to v3.0.0, but the label says v2.0.0. This also affects line 81 in this file.
| uses: actions/github-script@6e5ee1dc1cb3740e5e5e76ad668e3f526edbfe45 # v2.0.0 | |
| uses: actions/github-script@79e000451f2216584c3bc1f7535b44c698e6c89f # v2.0.0 |
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.