-
Notifications
You must be signed in to change notification settings - Fork 2
fix(gha-lint): allow lint workflow to be triggered by github-actions[bot] #41
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
Conversation
WalkthroughThe workflow configuration for linting in the GitHub Actions setup was updated to change its trigger event from pull_request to pull_request_target. This adjustment alters the event context in which the lint workflow runs, but no modifications were made to the workflow's logic, permissions, or job steps. No exported or public entities in the codebase were affected by this change. 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/lint.yaml (1)
7-7
: Ensure security when usingpull_request_target
This switch correctly allows the lint workflow to run on PRs bygithub-actions[bot]
. However,pull_request_target
grants elevated privileges and can expose secrets when checking out PR code. Since this is purely a lint job:
- Use
actions/checkout@v4
withpersist-credentials: false
.- Remove any unnecessary permissions or secrets.
- Optionally add an
if: github.actor == 'github-actions[bot]'
guard to restrict execution.
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.
🤖 I have created a release *beep* *boop* --- ## [0.7.1](v0.7.0...v0.7.1) (2025-06-11) ### Bug Fixes * **gha-lint:** allow lint workflow to be triggered by github-actions[bot] ([#41](#41)) ([d68ff09](d68ff09)) * use `pull_request_target` to allow permissions ([#37](#37)) ([5292ae3](5292ae3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
what
on: pull_request_target
event in lint workflow.why
on: pull_request
do not trigger for Pull Requests created by the default github-actions[bot] user. This leads to PRs being "blocked" or "pending checks" indefinitely, if repository rulesets require those checks.references
pull_request_target
to allow permissions #37Summary by CodeRabbit