Interview Prep/GitHub Actions/Secrets, OIDC & Environments

Dependabot PRs fail because secrets are empty. Why, and what do you do?

BeginnerScenarioSecrets, OIDC & Environments
Answer

Situation read → Dependabot-triggered runs use Dependabot secrets, not Actions secrets, and get a read-only token.

What I'd do →

  1. Add needed secrets under Settings, Secrets, Dependabot (for example a private registry token).
  2. Skip steps that need write or deploy access when github.actor == 'dependabot[bot]'.
  3. For auto-merge, use a separate pull_request_target workflow that only calls the API (no code checkout) with dependabot/fetch-metadata.

Why → Dependabot PR code is treated as untrusted, like fork code.

Interview tip → Know that Dependabot has its own secret store.

All GitHub Actions questions Roadmap: GitHub Actions

More on Secrets, OIDC & Environments