Skip to content
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0

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:

#!/usr/bin/env bash
set -euo pipefail

workflow=".github/workflows/deploy.yml"
rg -n -C 3 'actions/checkout|persist-credentials|(^|[[:space:]])git([[:space:]]|$)' "$workflow"

Repository: bufferapp/smart-tag

Length of output: 404


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

workflow=".github/workflows/deploy.yml"
echo '--- workflow excerpt ---'
sed -n '1,140p' "$workflow" | nl -ba

echo
echo '--- checkout references in workflows ---'
git ls-files '.github/workflows/*' | xargs -r rg -n -C 2 'actions/checkout|persist-credentials|git ' || true

Repository: bufferapp/smart-tag

Length of output: 222


🌐 Web query:

actions/checkout v6 persist-credentials default true documentation

💡 Result:

In actions/checkout v6, the persist-credentials input defaults to true [1]. When enabled (the default), the action configures the Git repository with the provided token or SSH key, allowing subsequent steps in your workflow to execute authenticated Git commands (such as git fetch or git push) automatically [2][3]. While the default remains true, v6 introduced an improvement to credential security: instead of storing these credentials directly in the.git/config file, they are now stored in a separate file under the $RUNNER_TEMP directory [2][4]. This change helps prevent the token from accidentally leaking (for example, through artifact publishing) while maintaining functionality [5]. The token is still removed during post-job cleanup [2][6]. To disable this behavior, you can explicitly set the input to false in your workflow file [2][3]: - uses: actions/checkout@v6 with: persist-credentials: false

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

workflow=".github/workflows/deploy.yml"
echo '--- workflow excerpt ---'
sed -n '1,140p' "$workflow" | sed -n '='

echo
echo '--- line-number excerpt with cat ---'
python3 - <<'PY'
from pathlib import Path
p = Path(".github/workflows/deploy.yml")
for i, line in enumerate(p.read_text().splitlines(), 1):
    if i <= 140:
        print(f"{i:4}: {line}")
PY

echo
echo '--- checkout references in workflows ---'
git ls-files '.github/workflows/*' | while read -r f; do
  rg -n -C 2 'actions/checkout|persist-credentials|git ' "$f" || true
done

Repository: bufferapp/smart-tag

Length of output: 1804


Disable checkout credential persistence.

actions/checkout preserves credentials by default, but this job never runs authenticated Git commands after checkout. Add persist-credentials: false so dependency installation and build steps do not retain unnecessary credentials.

Proposed fix
       - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
+        with:
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.28.0)

[warning] 18-18: 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/deploy.yml at line 18, Update the actions/checkout step in
the deploy workflow to set persist-credentials to false, ensuring checkout
credentials are not retained for subsequent dependency installation and build
steps.

Source: Linters/SAST tools


- uses: actions/setup-node@v6
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: 22
cache: npm
Expand All @@ -26,7 +26,7 @@ jobs:

- run: npm run build

- uses: actions/upload-pages-artifact@v5
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: out/

Expand All @@ -41,4 +41,4 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5