Skip to content
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Pin GitHub Actions to full commit SHAs instead of mutable @v4 tags.

Line 42, Line 46, Line 57, and Line 71 use unpinned action tags. This leaves the workflow open to supply-chain risk if a tag is moved. Please pin each action to an immutable commit SHA.

🔐 Suggested change pattern
-      uses: actions/checkout@v4
+      uses: actions/checkout@<full_commit_sha>

-      uses: github/codeql-action/init@v4
+      uses: github/codeql-action/init@<full_commit_sha>

-      uses: github/codeql-action/autobuild@v4
+      uses: github/codeql-action/autobuild@<full_commit_sha>

-      uses: github/codeql-action/analyze@v4
+      uses: github/codeql-action/analyze@<full_commit_sha>

Also applies to: 46-46, 57-57, 71-71

🧰 Tools
🪛 zizmor (1.25.2)

[error] 42-42: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/codeql-analysis.yml at line 42, Replace mutable action
tags with immutable commit SHAs: locate each "uses:" entry that uses a floating
tag (e.g., uses: actions/checkout@v4 and the other similar uses entries in this
workflow) and change them to the corresponding full commit SHA for that action
repository (obtain the exact SHA from the action's GitHub repo tags/commits page
for the v4 release and replace the tag with @<full-commit-sha>); do this for
every unpinned action reference in the workflow so all "uses:" lines are pinned
to immutable SHAs.


# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v4

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v4