GitHub: checks fail on a Dependabot pull request
By default, GitHub Actions workflow runs that Dependabot triggers from push, pull_request, pull_request_review or pull_request_review_comment events are treated as if they were opened from a fork of the repository. They receive a read-only GITHUB_TOKEN and do not have access to the secrets normally available, so a workflow that tries to write to the repository fails when Dependabot triggers it (GitHub's troubleshooting Dependabot on GitHub Actions, checked October 27, 2026).
triggered by Dependabot treated as from a fork GITHUB_TOKEN read-only by default secrets Dependabot secrets only, not Actions secrets permissions: raises the token for the workflow re-run by hand same privileges as before
Why it fails
- Writing needs a token that can write: a step that comments, labels or pushes with the read-only
GITHUB_TOKENis refused. - The secret is empty: when a Dependabot event triggers a workflow, the only secrets available to it are Dependabot secrets. GitHub Actions secrets are not available, so a login to a private registry, for example, gets nothing (GitHub's accessing secrets).
- An organization secret the repository cannot use: an organization's Dependabot secret has a
visibility, one ofall,privateorselected, which says which type of the organization's repositories can use it. Withselected, only the repositories inselected_repository_idscan, andPUT /orgs/ORG/dependabot/secrets/SECRET_NAME/repositories/REPOSITORY_IDadds one more. A fine-grained token needs Organization dependabot secrets (write), and a classic token theadmin:orgscope (GitHub's create or update an organization secret and add selected repository to an organization secret). - A re-run does not help: when you re-run a Dependabot workflow by hand, it runs with the same privileges as before, even if the person who re-ran it has different privileges.
- More events, and pull_request_target: for workflows Dependabot starts (
github.actor == 'dependabot[bot]'), the read-only token and the Dependabot secrets also apply to thecreate,deploymentanddeployment_statusevents. Withpull_request_target, if the base ref of the pull request was created by Dependabot, theGITHUB_TOKENis read-only and no secrets are available. These restrictions apply even when someone else re-runs the workflow (GitHub's restrictions when Dependabot triggers events).
To open the failed job of a Dependabot pull request: Pull Request Inbox for GitHub, a plugin for JetBrains IDEs, lists the checks on the head commit, each with a link to its run, and on a pull request Dependabot opened, suggests commenting @dependabot rebase instead of updating the branch.
What to do
- Skip Dependabot: stop the workflow from running for Dependabot with an expression such as
if: github.actor != 'dependabot[bot]'. - Use two steps: change the workflow to a two-step process that includes
pull_request_target, which does not have these limits. In public repositories GitHub adds a default policy that blockspull_request_target; it only evaluates for now, and GitHub says it will be enforced on December 2, 2026 (see pull requests from forks). - Store the secrets as Dependabot secrets: they are read from the same
secretscontext with the same syntax. If the workflow runs for Dependabot and for others, give the Dependabot secret and the Actions secret the same name, so one reference works for both; with different names, choose by condition. - Setting a Dependabot secret from the GitHub CLI:
gh secret set MYSECRET --app dependabotsets a repository secret for Dependabot. Without--bodyit reads the value from standard input, and the value is encrypted locally before it is sent to GitHub.gh secret set -f .envsets several at once from a dotenv file (the GitHub CLI manual, gh secret set). - Raise the token: add the
permissionskey to the workflow, for examplepull-requests: writeandissues: write, orwrite-all(GitHub's changing GITHUB_TOKEN permissions). - Read what the update is: the
dependabot/fetch-metadataaction reads the dependency name, whether it is a production dependency, and whether it is a major, minor or patch update. In GitHub's example it getsgithub-token: "${{ secrets.GITHUB_TOKEN }}", and later steps readsteps.metadata.outputs.dependency-names,dependency-typeandupdate-type. GitHub marks it as an action that is not certified by GitHub (GitHub's fetching metadata about a pull request). - GitHub's checklist for a failed run: the workflow runs only when the right actor triggers it, it checks out the correct
reffor thepull_request, its secrets are Dependabot secrets rather than Actions secrets, and theGITHUB_TOKENhas the permissions it needs. GitHub's own examples check the author of the pull request withgithub.event.pull_request.user.login == 'dependabot[bot]'(GitHub's investigating failed workflow runs). - A label from that: GitHub's example adds the label with
gh pr edit "$PR_URL" --add-label "production"only whensteps.metadata.outputs.dependency-type == 'direct:production', withPR_URLtaken fromgithub.event.pull_request.html_url. The workflow runs onpull_requestwithpull-requests: writeandissues: write(GitHub's labeling a pull request). - Auto-merge through a merge queue: if the target branch uses a merge queue, the built-in
GITHUB_TOKENcannot add pull requests to the queue; authenticate with a personal access token or a GitHub App token that has permission to merge, and use it in place ofGITHUB_TOKENfor thegh pr mergestep. If status checks test the pull requests, enable Require status checks to pass before merging for the target branch (GitHub's enabling automerge on a pull request). - Approve it in the workflow: GitHub's example approves with the GitHub CLI,
gh pr review --approve "$PR_URL", withGH_TOKEN: ${{secrets.GITHUB_TOKEN}}in the step'senv. The workflow runs onpull_requestwithpull-requests: write(GitHub's automatically approving a pull request). - Setting a Dependabot secret through REST: first
GET /repos/OWNER/REPO/dependabot/secrets/public-keygets the repository's public key, which anyone with read access to the repository can get. Encrypt the value with LibSodium using that key, and send it asencrypted_value, with the key'skey_id, toPUT /repos/OWNER/REPO/dependabot/secrets/SECRET_NAME. It answers 201 when it creates the secret and 204 when it updates it. A fine-grained token needs Dependabot secrets (write), and a classic token thereposcope (GitHub's get a repository public key and create or update a repository secret).
In IntelliJ IDEA: the failure is counted, and the reason is read on GitHub
Checked in the IntelliJ IDEA source on November 2, 2026: CodeReviewDetailsStatusComponentFactory.kt, CollaborationToolsBundle.properties, GHPRMergeabilityStateBuilder.kt, checkRun.graphql, GithubApiRequests.kt.
When a required check from a workflow that Dependabot triggered fails, and nothing else is running, the checks line of the pull request reads:
Checks failed Details…
For each check run the IDE asks for its name, its conclusion, whether it is required and two URLs (GitHub: the merge waits for code quality results). The error in the log, such as a write refused to the read-only GITHUB_TOKEN or an empty secret, is not among them. Details… lists the checks by name, and choosing one opens its details URL in the browser.
Its REST requests include none for GitHub Actions, so it does not re-run a workflow (GitHub: a check on the pull request was cancelled) or read the secrets and token permissions of one. Those fixes go into the workflow file and the Dependabot secrets on GitHub.
GitHub pull requests in IntelliJ IDEA
Pull Request Inbox for GitHub, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, shows a pull request's reviews, checks and conversations next to the diff, and merges it with the methods the target branch allows. It lists the checks GitHub reports on the head commit, each with a link to its run, so a failed job on a Dependabot pull request opens on GitHub, where its log shows the refused write or the missing secret. It does not re-run workflows. On a pull request Dependabot opened, it suggests commenting @dependabot rebase instead of updating the branch. The review inbox, diffs and conversations are free; approving, commenting, resolving and merging are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GitHub and Dependabot are trademarks of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitHub, Inc. or JetBrains.
More: GitHub merge refused (405, 409) · GitHub review refused (422) · GitHub search 422 "Validation Failed" · "Resource not accessible by personal access token" · 401 "Bad credentials" · "Resource protected by organization SAML enforcement" · "API rate limit exceeded" · GitHub diff 406 "too_large", 3,000 files · GitHub line comment 422 "must be part of the diff" · GitHub branch update refused (422) · GitHub pull request not created (422, 403) · GitHub auto-merge refused · GitHub draft, ready for review or close refused · GitHub conversation not resolved · GitHub checks not shown (check runs 403) · GitHub file contents not read · GitHub compare refused (404, 422) · GitHub comment or reply refused (403 locked, archived) · GitHub merge method not allowed (405) · GitHub branch not found (404, 301) · GitHub Enterprise Server not reached · GitHub review request not shown · GitHub pull request list incomplete · GitHub 404 Not Found, renamed repositories (301, 307) · GitHub line comment outdated or not on the diff · GitHub pull requests not updating, notifications late · GitHub suggested change cannot be applied · GitHub required check stuck at "Expected" · GitHub code owner review required · GitHub merge blocked by unresolved conversations · GitHub merge blocked by unsigned commits · GitHub branch that merges through a merge queue · GitHub merge waiting for an approval of the most recent push · GitHub merge waiting for code scanning results · GitHub merge waiting for code quality results · GitHub merge blocked by a code coverage threshold · GitHub merge blocked by license compliance results · GitHub branch locked or its updates restricted · GitHub branch not deleted after merging · GitHub merge waiting for a team's approval (Required reviewers) · GitHub merge blocked by secret scanning alerts · GitHub stacked pull request not merging · GitHub push blocked by push rules · GitHub merge blocked by commit metadata rules · GitHub force push blocked · GitHub issue not closed by a merged pull request · GitHub pull request not checked out locally · GitHub pull request has merge conflicts · GitHub changes requested and dismissing a review · GitHub co-author not credited for a commit · GitHub dependency review check failed · GitHub Dependabot not rebasing its pull request · GitHub fork not syncing with upstream · GitHub pull request base branch not changing · GitHub pull request not reverting · GitHub pull request template not showing · GitHub pull request labels or assignees not added · GitHub pull request not closing or reopening · GitHub push blocked by push protection · GitHub pull request comment hidden · GitHub pull request blocked until deployments succeed · GitHub team review request replaced by members · GitHub pull request file no longer marked Viewed · GitHub pull request marked merged without being merged · GitHub Copilot review does not count as an approval · GitHub checks not running on a pull request a workflow created · GitHub Update branch button not shown on a pull request · GitHub checks failing on a pull request from a fork · GitHub checks skipped by [skip ci] in a commit message · GitHub checks gone after the retention period · GitHub code review limits in a public repository · GitHub pull requests turned off or limited in a repository · GitHub checks run on every pull request in a stack · GitHub pull request showing commits already squash merged · GitHub pull request not showing a file diff · GitHub push to a pull request branch from a fork refused · GitHub check cancelled on a pull request · GitHub Rebase and merge not available · GitHub merge commit message not what you expected · GitHub pull request shows every line changed · GitHub API request timed out · GitHub pull request image or document diff not shown · GitHub review request refused (422) · GitHub pull request from Copilot: checks not running, approval not counted · GitHub push refused: GH006 and GH013 on a protected branch · GitHub "At least 1 approving review is required", approvals that do not count · GitHub pull request plugins for IntelliJ IDEA, compared · 日本語