Fix Dependabot auto-merge authentication issue #134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the Dependabot auto-merge workflow that was failing with a "Bad credentials" error.
Root Cause Analysis
After investigating the failed CI run (run #18668353570), I identified the following issues:
secrets.DEPENDABOT_AUTO_MERGE_TOKENwhich either doesn't exist in the repository or has incorrect/expired credentialsahmadnassri/action-dependabot-auto-merge@v2action has known issues with GitHub's security changes for Dependabot PRs (see issue #60)pull_request_targettrigger can execute untrusted code in a privileged contextSolution Implemented
Replaced the third-party action with the official GitHub-recommended approach based on their documentation:
Key Changes:
pull_request_targettopull_requestfor better securitycontents: writepull-requests: writesecrets.GITHUB_TOKENinstead of custom token (no configuration needed)dependabot/fetch-metadata@v2to get PR metadatatarget: minorconfiguration)dependabot[bot]Workflow Behavior:
The new workflow will:
Testing
To fully test this fix, we need to wait for the next Dependabot PR or manually trigger one. The workflow will run automatically on PR #132 and future Dependabot PRs.
Benefits
References
Fixes
Fixes #133
🤖 Generated with Claude Code