1 Commits
Author SHA1 Message Date
e16f6b8419 feat: advisory AI review of needs-human and scout PRs with OpenCode V2 (#560)
* feat: advisory AI review of needs-human and scout PRs with OpenCode V2

A scheduled workflow runs `opencode run` (V2, pinned and checksummed)
with a read-only catalog-reviewer agent over evidence bundles for open
PRs labeled needs-human or scout and for unreviewed scout candidates.
PRs get one verdict comment and an ai-* label; confident scout accepts
get a bot PR. It never merges or closes.

The model runs in a job with no GitHub token; the agent may only read,
glob and grep inside the repository (a self-test proves it before each
run); verdicts are schema-validated and rendered by our own code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(ai-review): address CodeQL and SonarCloud security findings

Enforce HTTPS on the OpenCode download, run opencode by absolute path,
escape summary cells with escapeCell, rely on HTML escaping instead of
comment-stripping regexes, validate item IDs before routing API calls,
and bound verdict parsing on runaway output.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: John Smith <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-18 00:02:12 -04:00