Skip to content

ci(cla): an allowlisted commit needs an allowlisted author and committer and a verified signature - #10

Merged
0xmanhnv merged 1 commit into
mainfrom
chore/cla-scope-fix
Oct 15, 2026
Merged

0xmanhnv merged 1 commit into
mainfrom
chore/cla-scope-fix

Conversation

@0xmanhnv

Copy link
Copy Markdown
Member

What

Follow-up to the CLA check that was merged here. A security review found a bypass in its "Decide who must sign" step, fixed here.

The hole: in a pull request opened by an outside account, a commit linked to an allowlisted account (the maintainer or a bot) was accepted when its signature was verified. A signature proves only the committer, and the author e-mail is free text, so a contributor could set the maintainer's e-mail as author, sign with their own key, and skip the CLA.

The fix: the step judges each commit by the account the CLA action uses (author, else committer). If that is an allowlisted account, the commit counts only when the author AND the committer are both allowlisted AND the signature is verified; otherwise the check fails and names the commit. Steps now select pull request events by payload (github.event.pull_request), not by event name.

Tests: .github/scripts/cla-scope.test.sh extracts the step from cla.yml and runs it against 10 recorded commit lists (maintainer, bot and outside pull requests; forged author, forged committer, contributor-signed). The previous logic fails 2 of them. cla-test.yml runs the test on pull requests and pushes that change the workflow or the test (read-only token, persist-credentials: false).

Also documented in the workflow header: keep cla required on pull requests; in the merge queue it passes at once. The archived upstream action's replacement is planned in openctemio/openctem#2299.

Security: same model as before. The check runs in the base context and never checks out or runs pull request code; the test workflow runs the pull request's own copy on pull_request with contents: read only. Secret still needed: org secret CLA_SIGNATURES_TOKEN (fine-grained PAT, resource owner openctemio, repository access only openctemio/cla-signatures, Contents read/write).

…ter and a verified signature

A signature proves only the committer, so an outside contributor could name
the maintainer as author and sign with their own key and skip the CLA. The
scope step now accepts such a commit only when author and committer are both
allowlisted and the signature is verified. Steps select pull request events
by payload. cla-scope.test.sh runs the step against recorded commit lists;
cla-test.yml runs it when the workflow changes.
@0xmanhnv
0xmanhnv merged commit b1d4110 into main Oct 15, 2026
3 checks passed
@0xmanhnv
0xmanhnv deleted the chore/cla-scope-fix branch October 16, 2026 19:04
0xmanhnv added a commit that referenced this pull request Oct 19, 2026
…ter and a verified signature (#10)

A signature proves only the committer, so an outside contributor could name
the maintainer as author and sign with their own key and skip the CLA. The
scope step now accepts such a commit only when author and committer are both
allowlisted and the signature is verified. Steps select pull request events
by payload. cla-scope.test.sh runs the step against recorded commit lists;
cla-test.yml runs it when the workflow changes.

Co-authored-by: Nguyen Manh <manhnv@openctem.io>
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