diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index c85ec00..7d1656c 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -14,11 +14,16 @@ on: # serializing would only delay responses and cancelling would drop them. jobs: claude: + # SECURITY: restricts @claude to a single trusted account, not just + # matching comment text — otherwise anyone could trigger this job. 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.actor == 'jnasbyupgrade' && + ( + (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'))) + ) runs-on: ubuntu-latest timeout-minutes: 30 permissions: