Skip to content
Merged
Show file tree
Hide file tree
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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
exit 1
fi

- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && hashFiles('package-lock.json') != '' && 'npm' || '' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cross-browser-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
runs-on: [self-hosted, linux, x64, vps-verify]
timeout-minutes: 45
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && 'npm' || '' }}
Expand All @@ -45,7 +45,7 @@ jobs:

- name: Upload artifacts on failure
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: cross-browser-failures
path: test-results/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/d1-backup-r2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
printf 'D1_BACKUP_LOCAL_DIRECTORY=%s\n' \
"$RUNNER_TEMP/0509-d1-backups-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" \
>> "$GITHUB_ENV"
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && 'npm' || '' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/d1-backup-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: [self-hosted, linux, x64, vps-verify]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && 'npm' || '' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/d1-remote-restore-evidence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
printf 'D1_BACKUP_LOCAL_DIRECTORY=%s\n' \
"$RUNNER_TEMP/0509-d1-backups-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" \
>> "$GITHUB_ENV"
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && 'npm' || '' }}
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
printf 'D1_BACKUP_LOCAL_DIRECTORY=%s\n' \
"$RUNNER_TEMP/0509-d1-backups-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" \
>> "$GITHUB_ENV"
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && 'npm' || '' }}
Expand Down Expand Up @@ -289,7 +289,7 @@ jobs:
printf 'D1_BACKUP_LOCAL_DIRECTORY=%s\n' \
"$RUNNER_TEMP/0509-d1-backups-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" \
>> "$GITHUB_ENV"
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && 'npm' || '' }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
sha: ${{ steps.pin.outputs.sha }}
backup_proof_status: ${{ needs.authorize_release.outputs.backup_proof_status }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ needs.authorize_release.outputs.sha }}
fetch-depth: 0
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
PINNED_SHA: ${{ needs.pin_candidate.outputs.sha }}
BACKUP_PROOF_STATUS: ${{ needs.pin_candidate.outputs.backup_proof_status }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ needs.pin_candidate.outputs.sha }}
fetch-depth: 0
Expand All @@ -131,7 +131,7 @@ jobs:
EXPECTED_SHA: ${{ inputs.expected_sha || '' }}
GH_TOKEN: ${{ github.token }}
run: ./scripts/deploy-window-lock.sh run -- ./scripts/ci-verify-production-candidate.sh
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && 'npm' || '' }}
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
PINNED_SHA: ${{ needs.pin_candidate.outputs.sha }}
BACKUP_PROOF_STATUS: ${{ needs.pin_candidate.outputs.backup_proof_status }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ needs.pin_candidate.outputs.sha }}
fetch-depth: 0
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
exit 1
fi

- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && 'npm' || '' }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/finalize-production-soak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
name: production
url: https://0509.io
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
persist-credentials: false
Expand All @@ -60,7 +60,7 @@ jobs:

- name: Verify successful protected production deploy
id: verify_deploy_run
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
DEPLOY_RUN_ID: ${{ inputs.deploy_run_id }}
DEPLOY_RUN_ATTEMPT: ${{ inputs.deploy_run_attempt }}
Expand Down Expand Up @@ -105,11 +105,11 @@ jobs:
core.setOutput("run-id", String(run.id));
core.setOutput("run-attempt", String(run.run_attempt));

- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ steps.verify_deploy_run.outputs.sha }}
Comment on lines +108 to 110

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
file=".github/workflows/finalize-production-soak.yml"
printf '%s\n' "Relevant workflow section:"
sed -n '1,180p' "$file"

printf '%s\n' "All checkout and Git-related references:"
rg -n -i 'checkout|git|release|artifact|upload|persist-credentials|token' "$file"

Repository: nish3451/0509

Length of output: 11148


🌐 Web query:

actions/checkout v7 persist-credentials default .git/config documentation

💡 Result:

In actions/checkout (including v7), the persist-credentials input defaults to true [1][2]. When enabled, this option configures Git to use the provided authentication token or SSH key for subsequent Git commands within the workflow [3][4]. Important changes to how this is implemented were introduced starting in v6: 1. Security Improvement: Instead of writing credentials directly into the repository's local.git/config file, the action now stores them in a separate configuration file located under $RUNNER_TEMP [5][6][7]. 2. Implementation: The action uses Git's includeIf mechanism to conditionally include this separate credential file based on the Git directory path [8][9]. This design isolates credentials from the main repository configuration, improving security while maintaining automatic functionality for commands like git fetch or git push [5][8][9]. You can opt out of this behavior by explicitly setting persist-credentials to false in your workflow step [3][4]. If you choose to do so, the action will not configure any credentials for Git commands [3][4]. The token is automatically removed during the post-job cleanup phase regardless of the configuration [3][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
file=".github/workflows/finalize-production-soak.yml"

printf '%s\n' "Remaining workflow steps:"
sed -n '175,220p' "$file"

printf '%s\n' "Git command references after the second checkout:"
python3 - <<'PY'
from pathlib import Path

path = Path(".github/workflows/finalize-production-soak.yml")
lines = path.read_text().splitlines()
second = next(i for i, line in enumerate(lines) if "actions/checkout@" in line and i > 0)
for number, line in enumerate(lines[second + 1:], second + 2):
    if any(token in line.lower() for token in ("git ", "git\n", "git\t")):
        print(f"{number}: {line}")
PY

printf '%s\n' "Credential persistence settings:"
rg -n -C 2 'persist-credentials|actions/checkout@' "$file"

Repository: nish3451/0509

Length of output: 1504


Disable credential persistence on the second checkout.

actions/checkout@v7 persists ${{ github.token }} for later Git commands by default. It stores this configuration under $RUNNER_TEMP, not .git/config. Set persist-credentials: false because no later step requires Git credentials.

🧰 Tools
🪛 zizmor (1.28.0)

[warning] 108-110: 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/finalize-production-soak.yml around lines 108 - 110,
Update the second actions/checkout step using the verify_deploy_run SHA to set
persist-credentials to false, while preserving its existing ref configuration.

Source: Linters/SAST tools


- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
cache: ${{ runner.environment == 'github-hosted' && 'npm' || '' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ needs.authorize_release.outputs.sha }}
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion tests/deploy-production-gate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ writeFileSync(process.env.FAKE_WRANGLER_INVOCATION, JSON.stringify(process.argv.
"utf8",
);
const checkoutIndex = workflow.indexOf(
"- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10",
"- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1",
);
const acquireIndex = workflow.indexOf("- name: Acquire deploy window");
const verifySecretsIndex = workflow.indexOf(
Expand Down
2 changes: 1 addition & 1 deletion tests/finalize-production-soak-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe("production soak finalization workflow", () => {
const provenance = parsed.jobs?.finalize?.steps?.find((step) => step.name === "Verify successful protected production deploy");
expect(provenance?.id).toBe("verify_deploy_run");
expect(provenance?.uses).toBe(
"actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd",
"actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3",
);
const script = String(provenance?.with?.script);
expect(script).toContain("github.rest.actions.getWorkflowRun");
Expand Down