Repository navigation
chore(ci): add Octorun review and commands workflows - #258
Conversation
|
🟣 Merged · 1 follow-up not fixed
|
Adversarial reviewNo findings to address. Commit For a full review, mention Octorun in a comment followed by |
| jobs: | ||
| command: | ||
| if: >- | ||
| (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && github.event.sender.type == 'User') || |
There was a problem hiding this comment.
Any GitHub user can trigger secret-backed runs on fork PRs (high, 75% confidence)
The issue_comment branch of the if only checks that the comment is on a PR and that the sender is a User. It does not check github.event.comment.author_association, and it does not check the PR head repo.
The review comment branch requires a same-repo PR. The label branch needs triage access. The comment branch has neither guard.
issue_comment workflows run in the base repo context. So any account can post @octorun review on any PR, including a fork PR. That run gets:
OCTORUN_CLIENT_TOKEN- a
GITHUB_TOKENwithpull-requests: writeandissues: write
The action then feeds attacker-controlled PR content to the model. This creates two risks:
- Paid runs on demand. Strangers can start relay and model jobs (
queue: max, 15-minute timeout) and spend the maintainer's quota. - Prompt injection with write access. Untrusted fork content runs in a job that can post comments and edit issues or PRs.
octorun-review.yml excludes fork PRs on purpose. This path bypasses that boundary.
Evidence: (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && github.event.sender.type == 'User') ||
| (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && github.event.sender.type == 'User') || | |
| (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && github.event.sender.type == 'User' && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) || |
There was a problem hiding this comment.
⚪ Pending · read the review
Harlan Agent Kit automated review, not Harlan's · AI policy
There was a problem hiding this comment.
🟢 Ready · 1 follow-up · read the review
Harlan Agent Kit automated review, not Harlan's · AI policy
| pull_request_target: | ||
| types: [labeled] | ||
|
|
||
| concurrency: |
There was a problem hiding this comment.
⚪ Unrelated comments can crowd out maintainer commands · 65/100 · does not block merge
When an Octorun command is running and an unaffiliated user comments on the same pull request, workflow-level concurrency queues the new run before the job condition can skip it. If unrelated events fill the pending queue, GitHub cancels a subsequent maintainer command for that pull request.
Fix: Move concurrency into the conditional command job so events rejected by the job condition never occupy queue slots.
- Ask an agent to verify and fix this finding
Harlan Agent Kit automated review, not Harlan's · AI policy
❓ Type of change
📚 Description
.github/workflows/octorun-review.ymlpinned toharlan-zw/octorun@b5393c1b05c7777767ce3f87ca71b60abde9b470(v0.2.3) withref: ${{ github.event.pull_request.head.sha }}and Job-Dispatch relay mode (OCTORUN_RELAY_URL+OCTORUN_CLIENT_TOKEN)..github/workflows/octorun-commands.ymlsupporting@octorun review,@octorun review full,@octorun help, same-repo finding thread replies, and theoctorun:reviewlabel withqueue: max.