-
Notifications
You must be signed in to change notification settings - Fork 0
chore(deps): bump actions/checkout from 4 to 6 #27
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
base: main
Are you sure you want to change the base?
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 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,7 +13,7 @@ jobs: | |||||||||||||||
| name: commitlint | ||||||||||||||||
| runs-on: ubuntu-22.04 | ||||||||||||||||
| steps: | ||||||||||||||||
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | ||||||||||||||||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||||||||||||||||
| with: | ||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||
|
Comment on lines
+16
to
18
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🏁 Script executed: # Check if the file exists and read the relevant lines
if [ -f ".github/workflows/commitlint.yml" ]; then
echo "=== File content with line numbers ==="
cat -n .github/workflows/commitlint.yml | head -30
else
echo "File not found"
fiRepository: Sentriscloud/sdk-rs Length of output: 715 🏁 Script executed: # Also check for any other checkout actions in workflow files to understand patterns
rg "persist-credentials" .github/workflows/ || echo "No persist-credentials found in workflows"Repository: Sentriscloud/sdk-rs Length of output: 105 Add Lines 16–18 currently persist credentials by default; commitlint only performs static analysis of commit messages and does not require authenticated git operations. Suggested patch - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
+ persist-credentials: false
fetch-depth: 0📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.25.2)[warning] 16-18: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI Agents |
||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,7 +19,7 @@ jobs: | |||||||||
| name: Dependency review | ||||||||||
| runs-on: ubuntu-22.04 | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | ||||||||||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||||||||||
|
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🏁 Script executed: cat -n .github/workflows/dependency-review.ymlRepository: Sentriscloud/sdk-rs Length of output: 1383 Turn off persisted credentials for checkout. Line 22 should set Suggested patch- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ persist-credentials: false📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.25.2)[warning] 22-22: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| - uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4 | ||||||||||
| with: | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,7 +25,7 @@ jobs: | |||||||||||||||
| runs-on: ubuntu-22.04 | ||||||||||||||||
| steps: | ||||||||||||||||
| - name: Checkout | ||||||||||||||||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||||||||||||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||||||||||||||||
|
Comment on lines
27
to
+28
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🏁 Script executed: cat -n .github/workflows/link-check.ymlRepository: Sentriscloud/sdk-rs Length of output: 1406 Harden checkout by disabling persisted credentials. Lines 27–28 should set Suggested patch - name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ persist-credentials: false📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.25.2)[warning] 27-28: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI Agents |
||||||||||||||||
|
|
||||||||||||||||
| - name: Run lychee | ||||||||||||||||
| uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0 | ||||||||||||||||
|
|
||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| 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🏁 Script executed: # Check if file exists and read the relevant section
if [ -f ".github/workflows/rust.yml" ]; then
echo "=== File exists ==="
wc -l ".github/workflows/rust.yml"
echo ""
echo "=== Lines around line 17 ==="
sed -n '10,25p' ".github/workflows/rust.yml"
else
echo "File not found"
fiRepository: Sentriscloud/sdk-rs Length of output: 472 🌐 Web query:
💡 Result: Best practice (secure pinning): Pin third-party GitHub Actions (including actions/checkout) to the full-length immutable commit SHA in the form uses: owner/repo@, instead of using a mutable tag like Citations:
🌐 Web query:
💡 Result: The persist-credentials: false setting in the GitHub Actions actions/checkout action is a security best practice recommended to prevent the automatic persistence of Git credentials (such as the GITHUB_TOKEN) into the local Git configuration of the runner [1][2]. When persist-credentials is set to its default value of true, the action configures the local Git environment with the authentication token, allowing subsequent steps in the same job to perform authenticated Git operations (like git push or git fetch) without needing to explicitly handle the token [3][4]. However, this also means that any code running in subsequent steps—including third-party actions—can potentially access these credentials [5][2]. Security Recommendations: 1. Use persist-credentials: false by default: Unless your workflow specifically requires performing authenticated Git operations (e.g., pushing commits back to the repository), you should set persist-credentials: false [2]. This minimizes the attack surface by ensuring credentials are not unnecessarily exposed to the environment [2]. 2. Mitigate Credential Exposure: If you must use persist-credentials: true, ensure that you are using the principle of least privilege by restricting the permissions of the GITHUB_TOKEN [5]. 3. Recent Improvements: Note that recent versions of actions/checkout have improved security by storing credentials in a separate file under $RUNNER_TEMP rather than directly in.git/config [3][6]. While this reduces the risk of accidental leakage (e.g., through artifact uploads), explicitly setting persist-credentials: false remains the recommended practice for hardening workflows [7][2]. If you disable credential persistence but still need to perform authenticated Git operations later in your workflow, you will need to manually configure the credentials (e.g., using git remote set-url or by passing the token explicitly to the relevant Git commands) [8]. Citations:
Pin checkout action to a commit SHA and disable credential persistence. Line 17 uses mutable tag Suggested patch - name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ persist-credentials: false🧰 Tools🪛 zizmor (1.25.2)[warning] 16-17: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
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
🏁 Script executed:
# Check if the file exists and read its contents cat -n .github/workflows/cargo-deny.ymlRepository: Sentriscloud/sdk-rs
Length of output: 940
Add
persist-credentials: falseto the checkout step.Line 22 omits
persist-credentials: false, leaving the GitHub token available to downstream steps unnecessarily. This is a security risk, especially when using third-party actions.Suggested patch
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 22-22: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🤖 Prompt for AI Agents