Skip to content

fix(ci): pass the named CLA secret instead of secrets: inherit - #160

Open
ywatanabe1989 wants to merge 1 commit into
mainfrom
fix/cla-named-secret-not-inherit
Open

fix(ci): pass the named CLA secret instead of secrets: inherit#160
ywatanabe1989 wants to merge 1 commit into
mainfrom
fix/cla-named-secret-not-inherit

Conversation

@ywatanabe1989

Copy link
Copy Markdown
Collaborator

secrets: inherit in cla.yml forwards every secret this repo holds into the reusable CLA workflow.

That caller is triggered by issue_comment and pull_request_target — both fireable by an unauthenticated outsider on a public repo — and the callee runs on a shared persistent self-hosted runner.

Neither file shows the exposure on its own: this caller names no runs-on, so the destination lives in the callee. That is why it survived review.

Change: pass only GH_PERSONAL_ACCESS_TOKEN, the one secret the callee declares as required. Every other secret stops being forwarded into an attacker-startable job; the CLA check is unaffected.

Reference implementation: scitex-dev's own .github/workflows/cla.yml.

Found while auditing the fleet after scitex-logging hit this on their own repo (their PR #29 is the same change).

🤖 Generated with Claude Code

`secrets: inherit` forwards EVERY secret this repo holds into the reusable CLA
workflow. That caller is triggered by `issue_comment` and `pull_request_target`,
both of which an unauthenticated outsider can fire on a public repo, and the
callee runs on a shared persistent self-hosted runner.

Neither file shows the exposure alone: this caller names no `runs-on`, so the
destination lives in the callee. The callee declares exactly one secret
(GH_PERSONAL_ACCESS_TOKEN, required), so passing it by name drops every other
secret from an attacker-startable job while keeping the CLA check working.

Reference implementation: scitex-dev's own .github/workflows/cla.yml.
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.

1 participant