ci(chromatic): skip Chromatic on Dependabot PRs#7425
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Dependabot PRs run with a separate secrets store (Settings → Secrets → Dependabot) that doesn't include CHROMATIC_PROJECT_TOKEN, so the action aborts with "Missing project token". Skip the job for Dependabot — main's post-merge push runs Chromatic with full secrets, so any visual regression a bump introduces is still caught one merge later. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4b84781 to
349efa7
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7425 +/- ##
=======================================
Coverage 98.44% 98.44%
=======================================
Files 1398 1398
Lines 52646 52646
=======================================
Hits 51826 51826
Misses 820 820 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
Docker builds report
|
|
Important Testing in progress…🟢 UI Tests: 284 tests unchanged |
|
Tip All tests passed and all changes approved!🟢 UI Tests: 284 tests unchanged |
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression16 screenshots compared. See report for details. |
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Follow-up to a question raised on #7375 by @Zaimwa9 — Chromatic CI is currently failing on every Dependabot npm PR with
✖ Missing project token.TL;DR. Dependabot PRs can't read
CHROMATIC_PROJECT_TOKEN(separate secrets store), so Chromatic fails with "Missing project token". This skips Chromatic on Dependabot PRs only. main's post-merge push still runs Chromatic with full secrets, so coverage isn't lost.Cause
GitHub runs Dependabot PRs with a separate secrets store (
Settings → Secrets and variables → Dependabot) that doesn't include theCHROMATIC_PROJECT_TOKENwe have in the regular Actions secrets. The Chromatic action then aborts withMissing project token.This isn't a misconfiguration — it's the platform protecting us. If Actions secrets were exposed to Dependabot PRs, a malicious
package-lock.jsonpoisoned dep could exfiltrate them viapostinstallscripts (see e.g. the Codecov 2021 incident for the canonical version of this attack).Confirmed via the workflow logs of #7375's last run:
Fix
Skip the Chromatic job when
github.actor == 'dependabot[bot]':When the Dependabot PR eventually merges into
main, the push event runs Chromatic with the parent's secrets — so any visual regression a bump introduces is still caught, one merge later instead of pre-merge. Trade-off accepted given dep bumps rarely change visual output.Alternatives considered
CHROMATIC_PROJECT_TOKENto Dependabot secrets store. Would make Chromatic run on Dependabot PRs the same as any other. Rejected: widens the secret-access surface for the bot whose PRs are most likely to bring in arbitrary transitive deps.pull_request_targetevent. Foot-gun. Gives PR code access to the base repo's secrets — exactly the attack vector the platform-level isolation is preventing. Hard pass.How did you test this code?
github.actorbehaviour for Dependabot PRs (Actions context docs, Dependabot secret-isolation behaviour).