-
Notifications
You must be signed in to change notification settings - Fork 0
chore(deps): update actions/checkout action to v6 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -23,7 +23,7 @@ jobs: | |||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@v4 | ||||||
| uses: actions/checkout@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. 🧩 Analysis chain🌐 Web query:
💡 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., Citations:
Pin Line 26 uses a tag reference ( Proposed fix- - name: Checkout
- uses: actions/checkout@v6
+ - name: Checkout
+ uses: actions/checkout@44c2b7a8a4ea602854374358509873f848982cf0 # v6.0.2📝 Committable suggestion
Suggested change
🧰 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 |
||||||
|
|
||||||
| - name: Log in to GHCR | ||||||
| uses: docker/login-action@v3 | ||||||
|
|
||||||
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.
🧩 Analysis chain
🌐 Web query:
In actions/checkout v6, what is the default value ofpersist-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-credentialsdefaults totrue.[1] Recommended secure settings when your workflow does not need git push/auth after checkout: 1) Setwith: persist-credentials: falseon theactions/checkoutstep 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 defaultGITHUB_TOKENhas 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: readCitations:
Disable persisted checkout credentials unless explicitly needed.
At Line 26, add
persist-credentials: falseto theactions/checkout@v6step to prevent theGITHUB_TOKENfrom persisting in the local git config for subsequent steps.Proposed hardening diff
- name: Checkout uses: actions/checkout@v6 + with: + persist-credentials: false📝 Committable suggestion
🧰 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