Conversation
Enables repository_dispatch events so the Octi Pulpo brain can dispatch tasks to Cata agents via GitHub Actions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to allow external orchestration (Octi Pulpo) to dispatch work to “Cata” agents running in this repository via repository_dispatch, aligning with the governed SDLC automation described in the PR.
Changes:
- Introduces
.github/workflows/cata-dispatch.ymltriggered byrepository_dispatchtypeocti-pulpo-dispatch. - Downloads a
catabinary fromAgentGuardHQ/catareleases and executes it with task metadata fromclient_payload. - Reports a completion message at the end of the job.
| jobs: | ||
| cata-agent: | ||
| runs-on: ubuntu-latest | ||
| if: | |
There was a problem hiding this comment.
GITHUB_TOKEN permissions are not explicitly set. Other workflows in this repo declare least-privilege permissions (e.g., contents: read). Please add an explicit permissions: block (workflow- or job-level) so the token scope is intentional and consistent, especially since this workflow can run on external dispatch.
| on: | ||
| repository_dispatch: | ||
| types: [octi-pulpo-dispatch] |
There was a problem hiding this comment.
Because this workflow runs on repository_dispatch, any actor who can send a dispatch to this repo can trigger it. Consider adding an allowlist check (e.g., github.event.sender.login/github.actor) and/or a shared-secret check in client_payload before running any jobs.
| - name: Run Cata agent | ||
| env: | ||
| DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | |
There was a problem hiding this comment.
This job injects DEEPSEEK_API_KEY and GITHUB_TOKEN into a process whose behavior is determined by client_payload.prompt. Tightening dispatch authentication/authorization is especially important here to avoid untrusted prompts leading to secret exfiltration.
| gh release download --repo AgentGuardHQ/cata \ | ||
| --pattern "cata-linux-amd64" \ | ||
| --output cata \ | ||
| --clobber || echo "WARN: cata release not yet published" | ||
| chmod +x cata 2>/dev/null || true |
There was a problem hiding this comment.
The workflow downloads and executes a cata binary from another repo without pinning a specific version/tag and without integrity verification. Please pin to a known release and verify a checksum/signature before executing to reduce supply-chain risk.
| ./cata run \ | ||
| --provider deepseek \ | ||
| --model deepseek-chat \ | ||
| --max-turns 100 \ | ||
| "${TASK_PROMPT}" \ | ||
| || echo "WARN: cata exited non-zero for task ${TASK_ID}" |
There was a problem hiding this comment.
./cata run ... || echo ... masks agent failures and will still mark this step successful even when the agent exits non-zero. Consider letting the command fail (or capturing the exit code and explicitly failing after reporting) so dispatchers can reliably detect failure.
| ./cata run \ | |
| --provider deepseek \ | |
| --model deepseek-chat \ | |
| --max-turns 100 \ | |
| "${TASK_PROMPT}" \ | |
| || echo "WARN: cata exited non-zero for task ${TASK_ID}" | |
| if ! ./cata run \ | |
| --provider deepseek \ | |
| --model deepseek-chat \ | |
| --max-turns 100 \ | |
| "${TASK_PROMPT}"; then | |
| echo "WARN: cata exited non-zero for task ${TASK_ID}" | |
| exit 1 | |
| fi |
Enables repository_dispatch events so the Octi Pulpo brain can dispatch tasks to Cata agents via GitHub Actions. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
cata-dispatch.ymlGitHub Actions workflow to enablerepository_dispatcheventsTest plan
repository_dispatchevent from Octi Pulpo brain targeting this repo🤖 Generated with Claude Code