Update framework workflow: Use default token#1087
Conversation
📝 WalkthroughWalkthroughThe framework update workflow removes unnecessary issue permissions, switches checkout and GitHub CLI authentication to ChangesFramework update workflow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/update-framework.yml:
- Line 32: Update the actions/checkout configuration to set persist-credentials
to false, then authenticate Git immediately before the git push step using the
existing checkout token. Ensure later Composer steps cannot access persisted
checkout credentials while preserving push authentication.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 75b77aff-d3ea-4a6a-9ddb-96c97df47426
📒 Files selected for processing (1)
.github/workflows/update-framework.yml
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| token: ${{ secrets.ACTIONS_BOT }} | ||
| token: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Map the workflow file and inspect the relevant range with line numbers.
wc -l .github/workflows/update-framework.yml
sed -n '1,220p' .github/workflows/update-framework.yml | cat -n
# Also search for any later git/auth/push steps in this workflow.
rg -n "actions/checkout|persist-credentials|composer|gh auth|git push|GITHUB_TOKEN|GH_TOKEN" .github/workflows/update-framework.ymlRepository: wp-cli/wp-cli-bundle
Length of output: 4895
Do not persist the checkout token.
actions/checkout writes the token into .git/config by default, and the later Composer steps can access it through scripts/plugins. Set persist-credentials: false here and authenticate Git only right before git push.
🧰 Tools
🪛 zizmor (1.26.1)
[warning] 29-32: 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/update-framework.yml at line 32, Update the
actions/checkout configuration to set persist-credentials to false, then
authenticate Git immediately before the git push step using the existing
checkout token. Ensure later Composer steps cannot access persisted checkout
credentials while preserving push authentication.
Source: Linters/SAST tools
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary by CodeRabbit