Skip to content

chore(ci): add Octorun review and commands workflows - #258

Merged
harlan-zw merged 2 commits into
mainfrom
chore/octorun-review
Dec 4, 2026
Merged

harlan-zw merged 2 commits into
mainfrom
chore/octorun-review

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

❓ Type of change

  • ✨ New feature (a non-breaking change that adds functionality)

📚 Description

  • Add .github/workflows/octorun-review.yml pinned to harlan-zw/octorun@b5393c1b05c7777767ce3f87ca71b60abde9b470 (v0.2.3) with ref: ${{ github.event.pull_request.head.sha }} and Job-Dispatch relay mode (OCTORUN_RELAY_URL + OCTORUN_CLIENT_TOKEN).
  • Add .github/workflows/octorun-commands.yml supporting @octorun review, @octorun review full, @octorun help, same-repo finding thread replies, and the octorun:review label with queue: max.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

@harlan-github-agent

harlan-github-agent Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🟣 Merged · 1 follow-up not fixed

  • 65 Unrelated comments can crowd out maintainer commands · octorun-commands.yml:11
    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.

  • File these as one issue

2026-12-04 14:20 UTC · Harlan Agent Kit automated review, not Harlan's · AI policy

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Adversarial review

No findings to address.

Commit 1616cb562ebe. Compared with the base branch.

For a full review, mention Octorun in a comment followed by review full. Reply to a review comment to ask about that finding.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 new finding from reading the diff.

Comment thread .github/workflows/octorun-commands.yml Outdated
jobs:
command:
if: >-
(github.event_name == 'issue_comment' && github.event.issue.pull_request != null && github.event.sender.type == 'User') ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_TOKEN with pull-requests: write and issues: 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') ||

Suggested change
(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)) ||

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ Pending · read the review

Harlan Agent Kit automated review, not Harlan's · AI policy

@harlan-github-agent harlan-github-agent Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Ready · 1 follow-up · read the review

Harlan Agent Kit automated review, not Harlan's · AI policy

@harlan-github-agent harlan-github-agent Bot added the harlan-agent-ready The automated Review passed every gate on this head commit. label Dec 4, 2026
pull_request_target:
types: [labeled]

concurrency:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ 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

@harlan-zw
harlan-zw merged commit d36b0d3 into main Dec 4, 2026
6 checks passed
@harlan-zw
harlan-zw deleted the chore/octorun-review branch December 4, 2026 14:19
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant