Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix security: check commenter not issue author for @claude

Manav Rathic1cbb95f0fed
diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml
index 3d0b00c611..4f3d802be4 100644
--- a/.github/workflows/claude.yml
+++ b/.github/workflows/claude.yml
@@ -13,22 +13,23 @@ on:
jobs:
claude:
if: |
- (
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
- (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
- ) && (
- github.event.comment.author_association == 'OWNER' ||
- github.event.comment.author_association == 'MEMBER' ||
- github.event.comment.author_association == 'COLLABORATOR' ||
- github.event.review.author_association == 'OWNER' ||
- github.event.review.author_association == 'MEMBER' ||
- github.event.review.author_association == 'COLLABORATOR' ||
- github.event.issue.author_association == 'OWNER' ||
- github.event.issue.author_association == 'MEMBER' ||
- github.event.issue.author_association == 'COLLABORATOR'
- )
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') &&
+ (github.event.comment.author_association == 'OWNER' ||
+ github.event.comment.author_association == 'MEMBER' ||
+ github.event.comment.author_association == 'COLLABORATOR')) ||
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') &&
+ (github.event.comment.author_association == 'OWNER' ||
+ github.event.comment.author_association == 'MEMBER' ||
+ github.event.comment.author_association == 'COLLABORATOR')) ||
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') &&
+ (github.event.review.author_association == 'OWNER' ||
+ github.event.review.author_association == 'MEMBER' ||
+ github.event.review.author_association == 'COLLABORATOR')) ||
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')) &&
+ (github.event.issue.user.type == 'User' &&
+ (github.event.issue.author_association == 'OWNER' ||
+ github.event.issue.author_association == 'MEMBER' ||
+ github.event.issue.author_association == 'COLLABORATOR')))
runs-on: ubuntu-latest
permissions:
contents: read