Skip to content

Skip dependabot-run steps that need Actions secrets - #666

Merged
defangdevs merged 1 commit into
mainfrom
fix/skip-dependabot-secret-required-checks
Aug 31, 2026
Merged

Skip dependabot-run steps that need Actions secrets#666
defangdevs merged 1 commit into
mainfrom
fix/skip-dependabot-secret-required-checks

Conversation

@defangdevs

@defangdevs defangdevs commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Dependabot-triggered pull_request runs get no access to repo Actions secrets — GitHub applies the same restriction it does for fork PRs, to stop a malicious dependency bump from exfiltrating secrets. FIXED_VERIFIER_PK, every TEST_* var, and TEMPLATES_MANAGER_TOKEN are all empty in that context.
  • deploy_changed_samples (Deploy Changed Samples) and check_samples (Check Samples) are both required status checks, and both fail every single dependabot PR because of this — e.g. runs 33447572730 and 33447572744 from PR chore(deps): bump engine.io and sails-hook-sockets in /samples/sailsjs-postgres/app #664 today. This has been happening on essentially every dependabot bump since at least July 21, and permanently blocks dependabot-automerge (.github/workflows/dependabot-automerge.yml) from ever merging anything — it approves and enables auto-merge, but the PR stays BLOCKED forever on these two checks.
  • This PR skips just the secret-dependent steps (the staging deploy, and the template-repo push) when github.actor == 'dependabot[bot]', so those jobs report success (skipped) instead of failure. Nothing changes for human-authored or other-bot PRs. Dependabot PRs weren't getting real deploy/template coverage from these steps anyway, since the secrets were always empty — this just stops that guaranteed failure from blocking merges.
  • I deliberately did not switch these workflows to pull_request_target to regain secret access — that would run dependency-bump code with full secrets, which is the exact supply-chain risk the current restriction exists to prevent.

Longer-term option

If real deploy coverage for dependabot bumps is wanted, the supported path is duplicating the needed secrets into the repo's separate Dependabot secrets store (Settings → Secrets and variables → Dependabot) — that requires someone with secret-value access, which I don't have. Happy to file that as a follow-up if wanted.

Test plan

  • Confirm a subsequent dependabot PR shows deploy_changed_samples and check_samples as passing (skipped) rather than failing
  • Confirm dependabot-automerge can then actually merge a patch/minor bump

Summary by CodeRabbit

  • Chores
    • Automated template repository updates no longer run for Dependabot-triggered changes.
    • Sample deployments and artifact uploads are skipped for Dependabot-triggered pull requests.
    • Existing deployment and artifact behavior remains unchanged for other eligible changes.

GitHub does not expose repository Actions secrets to pull_request runs
triggered by Dependabot (same restriction as fork PRs), so
FIXED_VERIFIER_PK, the TEST_* secrets, and TEMPLATES_MANAGER_TOKEN are
all empty on every dependabot bump. deploy_changed_samples and
check_samples are required status checks, so they fail every time and
permanently block dependabot-automerge from merging any dependency PR
(has been happening since at least July).

Skip the secret-dependent steps for github.actor == 'dependabot[bot]'
so the jobs report success (skipped) instead of failure. This changes
nothing for human-authored or other-bot PRs, and dependabot PRs were
never actually getting deploy/template coverage anyway since the
secrets were always empty.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 90c93759-eeac-4830-ba61-4a0301c212db

📥 Commits

Reviewing files that changed from the base of the PR and between 743d28f and 5080d91.

📒 Files selected for processing (2)
  • .github/workflows/check-sample.yml
  • .github/workflows/deploy-changed-samples.yml

Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

The GitHub Actions workflows now skip template repository updates, staging deployments, and artifact uploads for Dependabot-triggered pull requests.

Changes

Dependabot workflow gates

Layer / File(s) Summary
Workflow execution conditions
.github/workflows/check-sample.yml, .github/workflows/deploy-changed-samples.yml
Dependabot-triggered pull requests no longer update template repositories, deploy changed samples, or upload deployment artifacts. Other eligible runs retain their existing conditions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 5080d

The change limits secret-dependent workflow steps to Dependabot runs while preserving behavior for other pull requests; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: raphaeltm

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: skipping Dependabot-triggered workflow steps that require Actions secrets.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)


Comment @coderabbitai help to get the list of available commands.

@defangdevs
defangdevs merged commit fab0902 into main Aug 31, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants