-
Notifications
You must be signed in to change notification settings - Fork 1
chore(github-tag): update tag actions/checkout to v7 #553
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 |
|---|---|---|
|
|
@@ -45,7 +45,7 @@ jobs: | |
| uses: DevSecNinja/.github/actions/harden-runner@bf22fcfcb4ef94a359eed55cea4b5ce7f5b98167 # main | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Install mise | ||
| uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | ||
|
|
@@ -101,7 +101,7 @@ jobs: | |
| uses: DevSecNinja/.github/actions/harden-runner@bf22fcfcb4ef94a359eed55cea4b5ce7f5b98167 # main | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
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. 🔒 Security & Privacy | 🛡️ Analyzed with Security Review | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- checkout sites and surrounding workflow sections ---'
for file in .github/workflows/ci.yaml .github/workflows/devcontainer-prebuild.yaml; do
echo "### $file"
nl -ba "$file" | sed -n '1,120p;155,195p;220,260p;280,355p;450,490p;525,555p'
done
printf '%s\n' '--- checkout and credential-related references ---'
rg -n -C 3 'actions/checkout|persist-credentials|GITHUB_TOKEN|git (fetch|push|config)|docker build|build-context|context:' .github/workflows/ci.yaml .github/workflows/devcontainer-prebuild.yamlRepository: DevSecNinja/dotfiles Length of output: 39681 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- CI devcontainer build section ---'
nl -ba .github/workflows/ci.yaml | sed -n '120,160p'
printf '%s\n' '--- prebuild build section ---'
nl -ba .github/workflows/devcontainer-prebuild.yaml | sed -n '101,155p'
printf '%s\n' '--- devcontainer files ---'
git ls-files .devcontainer
for file in $(git ls-files .devcontainer); do
echo "### $file"
nl -ba "$file" | sed -n '1,220p'
doneRepository: DevSecNinja/dotfiles Length of output: 16530 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- Docker ignore files ---'
find . -maxdepth 2 -type f \( -name '.dockerignore' -o -name '*.dockerignore' \) -print
printf '%s\n' '--- tracked Docker ignore files ---'
git ls-files | grep -E '(^|/)([^/]*dockerignore)$' || true
if [ -f .dockerignore ]; then
nl -ba .dockerignore
fiRepository: DevSecNinja/dotfiles Length of output: 222 Sensitive Data Exposure Reachability: External Disable persisted checkout credentials in all nine pull-request checkout steps. 🧰 Tools🪛 zizmor (1.29.0)[warning] 103-104: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [warning] 1-579: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 | ||
|
|
@@ -174,7 +174,7 @@ jobs: | |
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Install mise | ||
| uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | ||
|
|
@@ -239,7 +239,7 @@ jobs: | |
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Install mise | ||
| uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | ||
|
|
@@ -295,7 +295,7 @@ jobs: | |
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Install mise | ||
| uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | ||
|
|
@@ -324,7 +324,7 @@ jobs: | |
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Install mise | ||
| uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | ||
|
|
@@ -342,7 +342,7 @@ jobs: | |
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Run Windows install script | ||
| shell: pwsh | ||
|
|
@@ -472,7 +472,7 @@ jobs: | |
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Run root Windows install script (Coder support) | ||
| shell: pwsh | ||
|
|
@@ -540,7 +540,7 @@ jobs: | |
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Install Pester | ||
| shell: pwsh | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,7 +23,7 @@ jobs: | |||||||||
|
|
||||||||||
| steps: | ||||||||||
| - name: Checkout code | ||||||||||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||||||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||||||
|
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. 🔒 Security & Privacy | 🛡️ Analyzed with Security Review | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: sed -n '1,95p' .github/workflows/sign-powershell.yml
rg -n -C 3 'workflow_dispatch|permissions:|ref:|repository_dispatch|pull_request_target|pull_request|sign-powershell|Sign-PowerShellScripts' .github/workflows .github 2>/dev/null || trueRepository: DevSecNinja/dotfiles Length of output: 50376 🌐 Web query:
💡 Result: <search_synthesis> <source_evidence> Citations:
🌐 Web query:
💡 Result: <search_synthesis> <source_evidence> Citations:
Sensitive Data Exposure Reachability: External Harden manually dispatched signing runs.
Proposed fix uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.30.0)[warning] 25-28: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI Agents |
||||||||||
| with: | ||||||||||
| fetch-depth: 0 | ||||||||||
|
|
||||||||||
|
|
||||||||||
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.
🔒 Security & Privacy | 🛡️ Analyzed with Security Review | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: DevSecNinja/dotfiles
Length of output: 9350
🏁 Script executed:
Repository: DevSecNinja/dotfiles
Length of output: 50377
🤖 get_repo_knowledge executed:
get_repo_knowledge DevSecNinja/dotfiles /tmp/coderabbit-repo-knowledge/devsecninja-dotfiles-4760b0b5/conventionsLength of output: 9985
🏁 Script executed:
Repository: DevSecNinja/dotfiles
Length of output: 50377
🌐 Web query:
official GitHub Actions documentation pull_request GITHUB_TOKEN permissions checkout persist-credentials default💡 Result:
<search_synthesis>
In GitHub Actions, the interaction between the
checkoutaction, theGITHUB_TOKEN, and credential persistence is governed by the following technical specifications: Persist Credentials Default Theactions/checkoutaction includes an input namedpersist-credentialswhich determines whether the authentication token (theGITHUB_TOKENby default) is configured in the local git config [1][2]. The default value for this input istrue[1][2]. While there has been community discussion regarding changing this default tofalseto reduce the risk of secret exposure [3], the official documentation and currentaction.ymlconfirm that it remainstrueby default [1][2]. Whentrue, it allows your workflow scripts to execute authenticated git commands; the token is automatically removed by the action during post-job cleanup [1][4]. GITHUB_TOKEN and Pull Request Permissions TheGITHUB_TOKENis a scoped, temporary token automatically created for each workflow job [5]. Its permissions are critical when handling pull requests: 1. Standard pull_request event: When a workflow is triggered by apull_requestevent from a forked repository, GitHub restricts theGITHUB_TOKENto read-only permissions [6][7]. This is a security measure to prevent untrusted code in a pull request from executing actions with elevated privileges [7]. 2. pull_request_target event: Workflows triggered bypull_request_targetrun with the base repository'sGITHUB_TOKENand access to repository secrets [7]. This event is designed for automation that needs elevated permissions (e.g., labeling or status checks) and runs the workflow code from the base repository's default branch rather than the untrusted pull request branch [7]. 3. Security Best Practice: It is a standard security practice to explicitly definepermissionsin your workflow file to grant theGITHUB_TOKENonly the minimum access required for the job [8][9]. This can be done at the workflow or job level [9][10]. If you specify permissions for any scope, all other unspecified scopes are set tonone[8]. Safe Checkout Handling Thecheckoutaction includes security safeguards for pull requests, particularly for thepull_request_targetandworkflow_runtriggers. It will refuse to check out untrusted code from a fork by default in these contexts to prevent "pwn request" vulnerabilities [1]. If you specifically require this behavior, you must set theallow-unsafe-pr-checkout: trueinput [1][2].</search_synthesis>
<source_evidence>
Citations:
🏁 Script executed:
Repository: DevSecNinja/dotfiles
Length of output: 9941
🏁 Script executed:
Repository: DevSecNinja/dotfiles
Length of output: 3484
Sensitive Data Exposure
Reachability: External
Exploitability: Moderate
CWE: CWE-522 — Insufficiently Protected Credentials
<PRIVATE_PERSON>Disable credential persistence for the validation checkout.
The
pull_requestworkflow checks out the pull-request ref and runs validation code from that checkout. The validation job executesrun-tests.sh, which runs all checked-out Bats tests. Withoutpersist-credentials: false,actions/checkoutpersistsGITHUB_TOKENfor authenticated Git commands. Pull-request-controlled code can access and exfiltrate the repository-scoped token.The later base-branch fetch uses this repository's public HTTPS remote, so it does not require persisted credentials.
Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.30.0)
[warning] 47-48: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[warning] 1-579: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
[warning] 31-87: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents