Skip to content

ci(cla): add CLA check workflow - #224

Closed
ajianaz wants to merge 1 commit into
developfrom
cla-check
Closed

ci(cla): add CLA check workflow#224
ajianaz wants to merge 1 commit into
developfrom
cla-check

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

What

Add CLA check workflow to enforce Contributor License Agreement for all external contributors.

Why

Standardize CLA enforcement across all public CodeCoraDev repos. Without this, external PRs bypass CLA requirement.

Changes

  • Added .github/workflows/cla-check.yml (identical to cora-code + uteke)
  • Triggers on PR opened/synchronize/reopened
  • Checks signatures.json from codecoradev/.github org repo
  • Comments on PR with sign link if unsigned
  • Sets commit status (pass/fail)

Testing

Workflow is identical to the proven implementation in cora-code (#514) and uteke (#966).

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

✅ CodeCoraDev CLA Bot

Thank you @ajianaz! Your CLA is on file. 🎉

Your contribution can now be reviewed.

cla-check:
runs-on: ubuntu-latest
steps:
- name: Fetch & check CLA signature
repo: context.repo.repo,
issue_number: prNumber,
});

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

Blocked — critical issues found.

🔴 Error (2)

  • .github/workflows/cla-check.yml:62 — The PR author username (github.event.pull_request.user.login) is interpolated directly into the inline JavaScript via single quotes: const author = '${{ github.event.pull_request.user.login }}';. GitHub usernames can contain single quotes (or an attacker could rename themselves to include a quote), which would break out of the string and allow arbitrary JavaScript execution in the github-script action context. This grants the PR author the ability to run arbitrary code with the workflow's GITHUB_TOKEN (which has pull-requests: write and statuses: write). The same injection also affects prNumber on line 63, though number is safer as it's an integer. The head.sha on line 113 is also interpolated but SHA hashes are restricted to hex characters, making them safe.
  • .github/workflows/cla-check.yml:16 — The actions/github-script@v7 steps do not explicitly pass the GITHUB_TOKEN. While actions/github-script automatically provides a default token, relying on the default token in conjunction with explicit permissions: blocks at the top of the workflow can sometimes lead to unexpected permission denials depending on repository settings. It is best practice to explicitly map the token to ensure the action uses a token with the intended scopes.

Review powered by cora-code · BYOK · MIT

@ajianaz ajianaz closed this Aug 9, 2026
@ajianaz
ajianaz deleted the cla-check branch August 9, 2026 07:02
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