Conversation
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/cla.yml:
- Around line 5-6: The workflow runs the "Organization Members" step
unconditionally but uses secrets.READ_MEMBERS_SCOPE which is unavailable to
forked pull_request events; add a job-level conditional so the job (or the
"Organization Members" step) only runs when the event is an issue_comment or
when the pull_request originates from the same repo: add an if condition that
checks github.event_name == 'issue_comment' || (github.event_name ==
'pull_request' && github.event.pull_request.head.repo.full_name ==
github.repository) and apply it to the job or the "Organization Members" step
that uses secrets.READ_MEMBERS_SCOPE to prevent running on forked PRs.
| pull_request: | ||
| types: [opened,closed,synchronize] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat .github/workflows/cla.ymlRepository: SpecterOps/AzureHound
Length of output: 1828
🏁 Script executed:
rg -n '^\s*pull_request:|READ_MEMBERS_SCOPE|REPO_SCOPE|head\.repo\.full_name|github\.repository' .github/workflows/cla.ymlRepository: SpecterOps/AzureHound
Length of output: 396
Guard pull_request executions that require secrets.
The "Organization Members" step runs unconditionally and uses secrets.READ_MEMBERS_SCOPE, but pull_request triggers from forks don't expose repository secrets. This causes the workflow to fail for external contributor PRs. Add a job-level condition to allow the workflow to run only on issue_comment events (which have secrets) or same-repository pull_request events:
jobs:
CLAssistant:
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latestThis preserves CLA functionality for issue comments while preventing secret exposure issues on fork PRs.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/cla.yml around lines 5 - 6, The workflow runs the
"Organization Members" step unconditionally but uses secrets.READ_MEMBERS_SCOPE
which is unavailable to forked pull_request events; add a job-level conditional
so the job (or the "Organization Members" step) only runs when the event is an
issue_comment or when the pull_request originates from the same repo: add an if
condition that checks github.event_name == 'issue_comment' || (github.event_name
== 'pull_request' && github.event.pull_request.head.repo.full_name ==
github.repository) and apply it to the job or the "Organization Members" step
that uses secrets.READ_MEMBERS_SCOPE to prevent running on forked PRs.
Remove pull_request_target from cla.
Resolves BED-7555
Summary by CodeRabbit