Skip to content

Fetched the built commit without checking it out in the Chromatic publish job - #19

Merged
CodyCBakerPhD merged 2 commits into
mainfrom
claude/happy-cori-ke2ppt
Nov 20, 2026
Merged

CodyCBakerPhD merged 2 commits into
mainfrom
claude/happy-cori-ke2ppt

Conversation

@CodyCBakerPhD

@CodyCBakerPhD CodyCBakerPhD commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Security follow-up to #17, from the review of con/skills#50:

  • The publish job checked out the built commit and ran the Chromatic CLI inside it, and the CLI runs the repository's own Storybook and package-manager configuration from there, so a fork's pull request to an app generated from this template could read the project tokens (reproduced with chromatic 18.9.4 and a .yarnrc).
    The job now fetches the commit without checking it out (HEAD plus a stub package.json), and references each token statically behind its own condition, so a missing one stays empty and no other secret reaches the runner (CodeQL flagged an indexed secrets[...] form tried in between).
    The template's own guard on the publish job is unchanged, so the template itself still never publishes.
  • apm.yml pins setup-chromatic at setup-chromatic: build without a token and publish from the default branch con/skills#50's head (71e788c); it should move to that PR's merge commit once it lands.

No version bump or changelog entry: nothing under src/, configs/, index.html or package.json changed.
Checked locally: apm install and apm audit --ci, actionlint, npm run format:check and pre-commit run --all-files; the fixed fetch against the same .yarnrc attack ran nothing and reached authentication.

Original prompt

open the matching PR on web-app-template too

adjjust #17 to use the con/skills setup chromatic and improve the skill there in the way you ust did

🤖 Generated with Claude Code

https://claude.ai/code/session_01DQrzw3QuYxA1bV48ZgQcor

…lish job

Run inside a checkout of the built commit, the Chromatic CLI loads its Storybook config and
starts the package manager it detects there, which honours repository-local configuration, so a
fork's pull request to an app generated from this template could read the project tokens
(reproduced with chromatic 18.9.4 and a .yarnrc). The publish job now points HEAD at the commit
and writes only a stub package.json, and picks the token by the secret's name. Both come from
setup-chromatic at con/skills c65afe5, which apm.yml now pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DQrzw3QuYxA1bV48ZgQcor
Comment thread .github/workflows/chromatic-publish.yml Dismissed
CodyCBakerPhD pushed a commit to con/skills that referenced this pull request Nov 19, 2026
A computed secrets[...] name makes GitHub send every repository and organization secret to
the runner (CodeQL: excessive secrets exposure, flagged on brain-bbqs/bbqs-web-app-template#19).
Each token now sits behind its own condition instead, which keeps a missing secret empty so the
CLI stops rather than uploading into the other project. Also takes the review's wording for the
README template's first-baseline step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DQrzw3QuYxA1bV48ZgQcor
A computed secrets[...] name makes GitHub send every repository and organization secret to the
runner (CodeQL: excessive secrets exposure). Each token now sits behind its own condition, which
keeps a missing secret empty so the CLI stops rather than uploading into the other project.
From setup-chromatic at con/skills 71e788c, which apm.yml now pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DQrzw3QuYxA1bV48ZgQcor
@CodyCBakerPhD
CodyCBakerPhD marked this pull request as ready for review November 20, 2026 01:35
@CodyCBakerPhD CodyCBakerPhD self-assigned this Nov 20, 2026
@CodyCBakerPhD
CodyCBakerPhD merged commit e01d904 into main Nov 20, 2026
11 checks passed
@CodyCBakerPhD
CodyCBakerPhD deleted the claude/happy-cori-ke2ppt branch November 20, 2026 01:59
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.

3 participants