Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
Comment on lines 25 to +26
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

🧩 Analysis chain

🌐 Web query:

In actions/checkout v6, what is the default value of persist-credentials, and what are the recommended secure settings for workflows that do not need git push/auth after checkout?

💡 Result:

Default value (actions/checkout v6): persist-credentials defaults to true.[1] Recommended secure settings when your workflow does not need git push/auth after checkout: 1) Set with: persist-credentials: false on the actions/checkout step so the action does not configure the token/SSH key in the local git config (and thus avoids leaving credentials available for later steps after checkout).[2][1] 2) Ensure your workflow’s token permissions are least-privilege (read-only by default). GitHub notes the default GITHUB_TOKEN has extensive read/write access and recommends setting default permissions to read-only, granting write permissions only where needed.[3] Example: uses: actions/checkout@v6 with: persist-credentials: false permissions: contents: read

Citations:


Disable persisted checkout credentials unless explicitly needed.

At Line 26, add persist-credentials: false to the actions/checkout@v6 step to prevent the GITHUB_TOKEN from persisting in the local git config for subsequent steps.

Proposed hardening diff
       - name: Checkout
         uses: actions/checkout@v6
+        with:
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 25-26: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 26-26: 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/build.yml around lines 25 - 26, The checkout step using
actions/checkout@v6 currently lacks the persist-credentials setting; update the
Checkout step (the actions/checkout@v6 usage) to include persist-credentials:
false so the GITHUB_TOKEN is not persisted to the local git config for
subsequent steps.

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

🧩 Analysis chain

🌐 Web query:

What is the official GitHub Actions security guidance on pinning actions to full-length commit SHAs, and what is the current commit SHA for actions/checkout v6?

💡 Result:

GitHub officially recommends pinning actions to a full-length commit SHA as the primary method to ensure security and immutability [1]. This practice mitigates risks associated with tag manipulation—where a bad actor could alter a tag to point to malicious code—or repository compromise [1][2]. Because pinning to a tag (e.g., @v6) relies on a reference that can be moved or deleted, it is considered less secure than pinning to an immutable commit SHA [1][3]. Many organizations now enforce this via repository or organization-level policies, which fail workflows that use mutable tag references [1][4]. As of May 20, 2026, the current version of the actions/checkout action is v6.0.2 [5][6]. The full-length commit SHA for the v6.0.2 tag is: 44c2b7a8a4ea602854374358509873f848982cf0 [7] Note: You can always verify the SHA for any tag by running git ls-remote https://github.com/actions/checkout v6.0.2 in your local environment, or by navigating to the "Tags" section of the repository on GitHub and clicking on the specific tag to view its corresponding commit [8][9][5].

Citations:


Pin actions/checkout to a full commit SHA.

Line 26 uses a tag reference (@v6), which introduces a supply-chain risk through upstream tag retargeting. Pin to the specific commit SHA and optionally annotate the tag version in a comment.

Proposed fix
-      - name: Checkout
-        uses: actions/checkout@v6
+      - name: Checkout
+        uses: actions/checkout@44c2b7a8a4ea602854374358509873f848982cf0 # v6.0.2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions/checkout@v6
uses: actions/checkout@44c2b7a8a4ea602854374358509873f848982cf0 # v6.0.2
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 25-26: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 26-26: 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/build.yml at line 26, Replace the tag reference "uses:
actions/checkout@v6" with the corresponding full commit SHA for the
actions/checkout action to prevent tag retargeting; obtain the specific commit
SHA from the actions/checkout repository (e.g., its GitHub releases or commit
history) and update the workflow entry to use that SHA (and optionally leave a
trailing comment like "# `@v6`" to indicate the original tag version).


- name: Log in to GHCR
uses: docker/login-action@v3
Expand Down