-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add CLA enforcement via contributor-assistant #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||||||||||
| name: CLA Assistant | ||||||||||||||||||
| on: | ||||||||||||||||||
| issue_comment: | ||||||||||||||||||
| types: [created] | ||||||||||||||||||
| pull_request_target: | ||||||||||||||||||
| types: [opened, closed, synchronize] | ||||||||||||||||||
|
|
||||||||||||||||||
| permissions: | ||||||||||||||||||
| actions: write | ||||||||||||||||||
| contents: write | ||||||||||||||||||
| pull-requests: write | ||||||||||||||||||
| statuses: write | ||||||||||||||||||
|
Comment on lines
+8
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 suggestion (security): Consider tightening the permissions block to the minimal scopes required for the CLA action. This workflow grants
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| jobs: | ||||||||||||||||||
| CLAssistant: | ||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
| steps: | ||||||||||||||||||
| - name: CLA Assistant | ||||||||||||||||||
| if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' | ||||||||||||||||||
|
Comment on lines
+18
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1 | Confidence: High The Code Suggestion: - name: CLA Assistant
# For issue_comment events, only run on PR comments with the specific signature phrase or 'recheck'.
# For pull_request_target events, always run.
if: |
(github.event_name == 'issue_comment' && github.event.issue.pull_request &&
(github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA')
) || github.event_name == 'pull_request_target' |
||||||||||||||||||
| uses: contributor-assistant/github-action@v2.6.1 | ||||||||||||||||||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'CLA Assistant' step
Uses Step Error loading related location Loading |
||||||||||||||||||
|
|
||||||||||||||||||
| env: | ||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||
| with: | ||||||||||||||||||
| path-to-signatures: 'signatures/cla.json' | ||||||||||||||||||
| path-to-document: 'https://github.com/meta-organvm/.github/blob/main/CLA.md' | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
curl -sI -o /dev/null -w "%{http_code}\n" https://github.com/meta-organvm/.github/blob/main/CLA.mdRepository: organvm-i-theoria/recursive-engine--generative-entity Length of output: 100 Fix the CLA URL — it returns 404 and uses an incorrect format. The URL Verify that the 🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1 | Confidence: High The workflow configures the CLA assistant to read the CLA document from an external repository ( Code Suggestion: # Option 1: Host a copy locally for resilience (recommended for critical legal docs)
path-to-document: 'https://github.com/organvm-i-theoria/recursive-engine--generative-entity/blob/main/CLA.md'
# Option 2: Keep external reference but add a verification step or fallback in the workflow.Evidence: path:meta-organvm/.github/CLA.md |
||||||||||||||||||
| branch: 'main' | ||||||||||||||||||
| allowlist: 'bot*,dependabot[bot],github-actions[bot],4444J99' | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allowlist has redundant entries and a risky wildcard.
🔒 Proposed fix- allowlist: 'bot*,dependabot[bot],github-actions[bot],4444J99'
+ allowlist: 'dependabot[bot],github-actions[bot],4444J99'📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2 | Confidence: Medium The user Code Suggestion: allowlist: 'dependabot[bot],github-actions[bot],4444J99'
# If other generic bots are needed, add them explicitly, e.g., 'renovate[bot]'Evidence: path:README.md|search:4444J99 |
||||||||||||||||||
| custom-notsigned-prcomment: | | ||||||||||||||||||
| Thank you for your contribution to **recursive-engine--generative-entity**! Before we can merge this PR, we need you to sign our [Contributor License Agreement](https://github.com/meta-organvm/.github/blob/main/CLA.md). | ||||||||||||||||||
|
|
||||||||||||||||||
| To sign, please comment on this PR with: | ||||||||||||||||||
|
|
||||||||||||||||||
| > I have read the CLA Document and I hereby sign the CLA | ||||||||||||||||||
|
|
||||||||||||||||||
| This is a one-time requirement that covers all future contributions to the ORGANVM ecosystem. | ||||||||||||||||||
| custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA' | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pull request is incomplete as it lacks the GitHub Actions workflow file (e.g., There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change introduces a new governance protocol but does not include the required documentation updates. According to the repository style guide (Logos Documentation Layer, lines 181-194), significant changes to the project's state or community standards should be recorded in the References
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The workflow is wired to Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2 | Confidence: High The initial |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P0 | Confidence: High
The workflow is triggered by the privileged
pull_request_targetevent. This event runs in the context of the base repository (target branch) with write permissions, not the untrusted PR source. While necessary for thecontributor-assistantaction to write statuses and signature files, this PR does NOT implement the required security guardrails. Malicious external contributors could submit a PR with a modified.github/workflows/directory that runs arbitrary, privileged code in the base repository context during thepull_request_targetevent, potentially leading to repository compromise or secret exfiltration. The standard mitigation is to ensure the workflowifcondition excludes changes to workflows, but no such condition is present.Code Suggestion: