deps: bump actions/checkout from 4 to 7 - #59
Conversation
Up to standards ✅🟢 Issues
|
✅ Action performedReview finished.
|
📝 WalkthroughWalkthroughChangesCheckout Action Updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](actions/checkout@v4...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
11ac0c0 to
b07989b
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with 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.
Inline comments:
In @.github/workflows/base-image.yml:
- Line 95: Make checkout credential persistence explicit by adding
persist-credentials: false to the checkout steps at
.github/workflows/base-image.yml:95, .github/workflows/ci-walkthrough.yml:22 and
:36, and .github/workflows/ci.yml:49, :101, and :146. If any of these checkout
sites require authenticated Git operations later, retain persistence only there
and explicitly unset the credential store afterward.
In @.github/workflows/ci-walkthrough.yml:
- Line 22: Update the actions/checkout steps in both workflow jobs to set
with.persist-credentials to false. Preserve the existing checkout behavior while
ensuring downstream repository scripts and Docker Compose commands cannot access
the persisted GitHub token.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 9eb77056-8d42-44b8-8d3f-150fed9df13a
📒 Files selected for processing (4)
.github/workflows/base-image.yml.github/workflows/ci-walkthrough.yml.github/workflows/ci.yml.github/workflows/release.yml
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipeforce
echo "== workflow files =="
git ls-files '.github/workflows/*'
echo
echo "== checkout occurrences =="
rg -n 'actions/checkout|persist-credentials|GITHUB_TOKEN|\$\{{\s*secrets|permission|permissions' .github/workflows || true
echo
echo "== affected workflow excerpts =="
for f in .github/workflows/base-image.yml .github/workflows/ci-walkthrough.yml .github/workflows/ci.yml; do
if [ -f "$f" ]; then
echo "--- $f ($(wc -l < "$f") lines) ---"
nl -ba "$f" | sed -n '1,190p'
fi
done
echo
echo "== deterministic documentation/source evidence for actions/checkout persist option =="
python3 - <<'PY'
# Read-only local probe: inspect whether any of the affected workflows already configure
# persist-credentials or run privileged build/tooling immediately after checkout.
from pathlib import Path
import re
paths = ['.github/workflows/base-image.yml','.github/workflows/ci-walkthrough.yml','.github/workflows/ci.yml']
for p in paths:
text = Path(p).read_text()
print(f'{p}: has persist-credentials: {bool(re.search(r"persist-credentials:\s*false", text))}')
for m in re.finditer(r'uses:\s*actions/checkout@([^\s#]+)\s*(?:#\s*([^\n]+))?', text):
ref = m.group(1)
line = text.count('\n',0,m.start())+1
print(f' line {line}: actions/checkout@{ref}')
PYRepository: pgEdge/coldfront
Length of output: 204
🏁 Script executed:
#!/bin/bash
set -eu
echo "== workflow files =="
git ls-files '.github/workflows/*'
echo
echo "== checkout occurrences =="
rg -n 'actions/checkout|persist-credentials|GITHUB_TOKEN|\$\{{\s*secrets|permission|permissions' .github/workflows || true
echo
echo "== affected workflow excerpts =="
for f in .github/workflows/base-image.yml .github/workflows/ci-walkthrough.yml .github/workflows/ci.yml; do
if [ -f "$f" ]; then
echo "--- $f ($(wc -l < "$f") lines) ---"
nl -ba "$f" | sed -n '1,190p'
fi
done
echo
echo "== simple workflow invariant probe =="
python3 - <<'PY'
from pathlib import Path
import re
paths = ['.github/workflows/base-image.yml','.github/workflows/ci-walkthrough.yml','.github/workflows/ci.yml']
for p in paths:
text = Path(p).read_text()
print(f'{p}: has persist-credentials false: {bool(re.search(r"persist-credentials:\s*false", text))}')
for m in re.finditer(r'uses:\s*actions/checkout@([^\s#]+)\s*(?:#\s*([^\n]+))?', text):
ref = m.group(1)
line = text.count('\n',0,m.start())+1
print(f' line {line}: actions/checkout@{ref}')
PYRepository: pgEdge/coldfront
Length of output: 1207
🏁 Script executed:
#!/bin/bash
set -eu
echo "== checkout occurrences =="
rg -n --no-heading 'actions/checkout|persist-credentials|GITHUB_TOKEN|secrets\.|permissions:' .github/workflows || true
echo
echo "== affected workflow excerpts =="
python3 - <<'PY'
from pathlib import Path
for fn in ['base-image.yml','ci-walkthrough.yml','ci.yml']:
p = Path('.github/workflows')/fn
lines = p.read_text().splitlines()
print(f'--- .github/workflows/{fn} ({len(lines)} lines) ---')
first=max(1, len(lines)-180)
last=len(lines)+1
for i in range(first, last):
print(f'{i:4}: {lines[i-1]}')
PY
echo
echo "== simple workflow invariant probe =="
python3 - <<'PY'
from pathlib import Path
import re
paths = ['.github/workflows/base-image.yml','.github/workflows/ci-walkthrough.yml','.github/workflows/ci.yml']
for p in paths:
text = Path(p).read_text()
print(f'{p}: has persist-credentials false: {bool(re.search(r"persist-credentials:\s*false", text))}')
for m in re.finditer(r'uses:\s*actions/checkout@([^\s#]+)\s*(?:#\s*([^\n]+))?', text):
ref = m.group(1)
start = text.find(f'uses: actions/checkout@{ref}', m.start())
line = text.count('\n',0,start)+1
print(f' line {line}: actions/checkout@{ref}')
PY
echo
echo "== GitHub API action ref candidates =="
python3 - <<'PY'
import urllib.request
url='https://api.github.com/repos/actions/checkout/git/refs/tags/v7'
req=urllib.request.Request(url, headers={'Accept':'application/vnd.github+json','User-Agent':'code-rabbit-verify'})
print(urllib.request.urlopen(req, timeout=20).read().decode())
PYRepository: pgEdge/coldfront
Length of output: 22593
🌐 Web query:
actions/checkout persist-credentials input defaults true git config credential.helper
💡 Result:
The persist-credentials input in actions/checkout is set to true by default [1][2]. This setting controls whether the action configures Git to use the provided authentication token or SSH key for subsequent Git commands within the workflow job [3][4]. When persist-credentials is set to true, the action configures local Git settings so that scripts in your workflow can run authenticated Git commands (e.g., git fetch, git push) without needing to manually provide credentials [3][4]. Regarding your query on git config credential.helper: 1. Mechanism: Historically, actions/checkout persisted credentials by writing them directly into the local.git/config file [4][2]. Since version v6.0.0, the action has been updated to improve security by storing credentials in a separate file located in $RUNNER_TEMP, rather than directly in.git/config [4][5]. 2. Interaction with credential.helper: actions/checkout does not explicitly rely on a standard Git credential.helper (as documented in git-scm.com [6]) to manage this token. Instead, it directly manipulates Git configuration (using git config --local) to inject the token or SSH key, effectively making them available to the Git environment for the duration of the job [5][7]. The token is then automatically removed during the post-job cleanup phase [3][4]. Security Note: Because this mechanism makes the credentials accessible to any process running within the job, there have been ongoing discussions and community requests to change the default value to false to enhance security [8][9]. If you require higher security, you should explicitly set persist-credentials: false in your workflow step [3][4].
Citations:
- 1: https://github.com/actions/checkout/blob/cbb722410c2e876e24abbe8de2cc27693e501dcb/action.yml
- 2: https://github.com/actions/checkout/tree/v6.0.2
- 3: https://github.com/marketplace/actions/checkout?version=v3.6.0
- 4: https://github.com/actions/checkout/tree/v6.0.2?tab=readme-ov-file
- 5: actions/checkout@v5.0.1...v6.0.0
- 6: https://git-scm.com/docs/gitcredentials
- 7: https://github.com/actions/checkout/blob/5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f/src/git-auth-helper.ts
- 8: Change the default value of persist-credentials to false actions/checkout#1687
- 9: Remove
persist-credentialsor change the default tofalseactions/checkout#485
Make checkout credential persistence explicit where credentials are used. Since actions/checkout continues to expose the GitHub token to authenticated Git commands in the job, add persist-credentials: false to the listed checkouts unless later steps need authenticated Git operations; unset any persisted credential store afterward if it must remain true.
🧰 Tools
🪛 zizmor (1.26.1)
[warning] 94-95: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
📍 Affects 3 files
.github/workflows/base-image.yml#L95-L95(this comment).github/workflows/ci-walkthrough.yml#L22-L22.github/workflows/ci-walkthrough.yml#L36-L36.github/workflows/ci.yml#L49-L49.github/workflows/ci.yml#L101-L101.github/workflows/ci.yml#L146-L146
🤖 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/base-image.yml at line 95, Make checkout credential
persistence explicit by adding persist-credentials: false to the checkout steps
at .github/workflows/base-image.yml:95, .github/workflows/ci-walkthrough.yml:22
and :36, and .github/workflows/ci.yml:49, :101, and :146. If any of these
checkout sites require authenticated Git operations later, retain persistence
only there and explicitly unset the credential store afterward.
Source: Linters/SAST tools
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v7 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Repository files matching workflow names:"
git ls-files .github/workflows | sed -n '1,120p'
echo
echo "Target workflow excerpts:"
if [ -f .github/workflows/ci-walkthrough.yml ]; then
nl -ba .github/workflows/ci-walkthrough.yml | sed -n '1,90p'
else
echo ".github/workflows/ci-walkthrough.yml not found"
fi
echo
echo "Search for checkout usage in target workflow:"
rg -n "actions/checkout|persist-credentials|run:|container:" .github/workflows/ci-walkthrough.yml || true
echo
echo "Repository evidence: list files in .github/workflows"
git ls-files .github/workflows | wc -lRepository: pgEdge/coldfront
Length of output: 389
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Target workflow excerpts:"
awk '{printf "%6d\t%s\n", NR, $0}' .github/workflows/ci-walkthrough.yml | sed -n '1,120p'
echo
echo "Checkout and downstream action usage:"
awk '/actions\/checkout|run:|container:|permissions:|persist-credentials/ {printf "%6d\t%s\n", NR, $0}' .github/workflows/ci-walkthrough.yml
echo
echo "All actions uses pins:"
awk '/uses:/ {printf "%6d\t%s\n", NR, $0}' .github/workflows/ci-walkthrough.ymlRepository: pgEdge/coldfront
Length of output: 4900
Disable persisted checkout credentials before running repository code in both jobs.
This workflow checks out the repo before running repository scripts and Docker compose commands, but actions/checkout leaves the GitHub token in .git/config by default. Add with: persist-credentials: false to the checkout steps so downstream scripts cannot read the checkout token.
🧰 Tools
🪛 zizmor (1.26.1)
[warning] 22-22: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🤖 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/ci-walkthrough.yml at line 22, Update the actions/checkout
steps in both workflow jobs to set with.persist-credentials to false. Preserve
the existing checkout behavior while ensuring downstream repository scripts and
Docker Compose commands cannot access the persisted GitHub token.
Source: Linters/SAST tools
Bumps actions/checkout from 4 to 7.
Release notes
Sourced from actions/checkout's releases.
... (truncated)
Commits
3d3c42eprep v7.0.1 release (#2531)2880268escape values passed to --unset (#2530)12cd223trim only ascii whitespace for branch (#2521)62661c4skip running unsafe pr check if input is default (#2518)e8d4307Bump the minor-actions-dependencies group with 2 updates (#2499)631c942eslint 9 (#2474)4f1f4aeBump actions/upload-artifact from 4 to 7 (#2476)ba09753Bump actions/checkout from 6 to 7 (#2488)b9e0990Bump docker/login-action from 3.3.0 to 4.2.0 (#2479)e8cb398Bump docker/build-push-action from 6.5.0 to 7.2.0 (#2478)