OpenCode Gitea Review plugin

Gitea and Forgejo pull request review through OpenCode: line comments, approve and request_changes decisions, triggered by /oc.

  • 78 ★ on the repository
  • Last commit
  • MIT
Plugin

Extended access

Why this level

  • The Gitea token with repository write access posts comments and review decisions as the account.
  • Code fragments from the PR go to the chosen model provider.
All reasons and checks

ccsert/opencode-review-gitea

Install

Works in

Manual install

curl -fsSL https://raw.githubusercontent.com/ccsert/opencode-review-gitea/main/templates/workflow-docker.yaml -o .gitea/workflows/opencode-review.yaml

Downloads the workflow without running a script. Create the `.gitea/workflows` folder beforehand.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The Gitea token with repository write access posts comments and review decisions as the account.
  • Code fragments from the PR go to the chosen model provider.

This is third-party code. Review the repository files before installing.

What it does

OpenCode Gitea Review is a code review tool for Gitea and Forgejo pull requests built on OpenCode plugins. Claude, GPT or DeepSeek models read the changes and write comments on specific lines, tagging issues by type (bug, security, performance) and severity. The result can be an approval, a change request or a plain comment. A review is triggered by a `/oc` or `/opencode` comment, or on PR open through Gitea Actions. A repeat run checks only new changes. Draft mode saves comments in a pending review under the human's account so they can edit and submit in the UI. Team standards come from the base branch, a shared repository or a URL, with six review templates and checklists for Go, Java, Python, frontend, infrastructure and security.

Who it is for. Teams on Gitea or Forgejo that need an automatic first pass over PRs with clear issue tags and manual control.

Good fit when

  • A PR has many lines and the reviewer wants preliminary notes before reading it.
  • The author updated the PR and a repeat pass over only new changes is needed.
  • The team wants code checked against its own standards document from a shared repository.
  • The AI result should land in a draft under your name instead of publishing at once.
  • A Python service needs a security checklist before merge.

Not a fit when

  • The repository is hosted on GitHub: the project targets Gitea and Forgejo.
  • Code cannot be sent to external model providers without your own gateway.
  • You need a full replacement for human review without checking comments.

Example request

/oc check this PR for bugs and security issues and leave the result in a draft review.

Limitations

A Gitea or Forgejo Actions runner and repository secrets are required: the Gitea token `OPENCODE_GIT_TOKEN` with `read:user` and `write:repository` scopes, plus `write:issue` for drafts, and a provider key, `DEEPSEEK_API_KEY` by default. Code fragments are sent to the chosen model provider. For gateways like LiteLLM with non-standard model names you must define a custom provider in `.opencode-review/opencode.json`. The Docker image `ghcr.io/ccsert/opencode-review:latest` is rebuilt on Mondays, and pinning a version makes reviews reproducible.

How to disable. Delete the `.gitea/workflows/opencode-review.yaml` file and, if installed from source, the `.opencode-review/` folder. Remove repository secrets in Gitea settings.

FAQ

How do I connect the review to Gitea?

Download the workflow template with `curl -fsSL https://raw.githubusercontent.com/ccsert/opencode-review-gitea/main/templates/workflow-docker.yaml -o .gitea/workflows/opencode-review.yaml`, inspect it and commit. No install script is needed.

How do I start a review manually?

Open a PR and comment `/oc` or `/opencode`. You can also skip installing in the repository: external draft mode runs through Docker for a selected PR.

Which model should I pick?

The `MODEL` variable in the workflow takes `provider/model`: `deepseek/deepseek-chat` by default, also `anthropic/claude-sonnet-4-5` and `openai/gpt-4o` with the matching key.

What is draft mode?

Comments are saved as a pending review under the human's account. You edit them in the normal Gitea UI and submit yourself.

Does it check the whole PR every time?

No, when a PR is updated an incremental review checks only changes since the last pass.

Discussion

No questions or reviews yet.

Plugins

Claude Code plugins by shokai: Codex second opinions, pull request review, repository security patrol and a factory mode.

PluginBroad access88Repository stars

A background daemon loops over GitHub or Forgejo issues, drafts specs, reviews and fixes PRs until they are ready for human merge.

CLIBroad access143Repository stars
Editors’ pick

A GitHub Action that runs Claude Code in pull requests and issues: answers mentions, reviews and makes changes

PluginBroad access9.9KRepository stars

gitai is an open source-control server for hundreds of agents: landing by compare-and-swap, server-side history and the graft CLI.

CLIExtended access1KRepository stars

A skill and plugin for Git and GitHub: branches, Conventional Commits and a pull request path to a green merge.

SkillExtended access59Repository stars

A Git client with a built-in MCP server for Windows, macOS and Linux: an agent reads repos, PRs, issues and CI logs, read-only

MCP serverBroad access248Repository stars

README in short

Configuration lives in a separate `.opencode-review/` folder and does not clash with your `.opencode/`. The Docker option adds one workflow file and the source option gives full control over agents and tools.

README badge

Original SKILL.md

---
name: review-security
description: Security review checklist for a PR diff. Use when the diff touches authentication, authorization, sessions, tokens, passwords, cryptography, user input parsing, SQL or shell construction, file paths, URLs fetched by the server, deserialization, secrets, CORS, or CI workflows.
---

# Security Review Checklist

Report a security finding only with a concrete path: **attacker-controlled input → code in the diff → sink → capability gained**. Name each step with `path:line`. "Could be unsafe" without an input is not a finding.

## Injection
- SQL built by string concatenation or interpolation with request data. Parameterized queries, ORM query builders and constant identifiers are safe.
- Shell commands with `shell=True`, `exec`, backticks or `sh -c` that include input. Argument arrays without a shell are safe.
- Template rendering with autoescape disabled, `innerHTML`, `dangerouslySetInnerHTML`, `v-html`, `|safe`.
- Paths joined from input without normalization and a base-directory check (`../` traversal, absolute paths, symlinks).
- Regular expressions compiled from input (ReDoS) or applied to unbounded input with nested quantifiers.

## Authentication and authorization
- New endpoints or handlers without the auth middleware/decorator that their neighbors use.
- Object access by ID without an ownership or tenant check (IDOR).
- Mass assignment: request bodies bound directly to models that contain role, owner, price or `isAdmin` fields.
- Debug flags, test bypasses or environment toggles that skip checks in production.
- Token comparison with `==` instead of a constant-time comparison; JWT `alg: none`, missing expiry or audience checks.

## Secrets and data exposure
- Credentials, keys or tokens committed in code, fixtures or configuration.
- Secrets, passwords, tokens or personal data written to logs, error messages or API responses.
- Stack traces or internal errors returned to clients.

## Server-side requests and deserialization
- Server fetching a URL derived from input without an allowlist (SSRF to metadata services, localhost, internal hosts).
- `pickle`, `yaml.load` without SafeLoader, Java native serialization, `BinaryFormatter`, or `eval` on untrusted data.

## Cryptography
- MD5/SHA1 for passwords or signatures; passwords hashed without a slow KDF (bcrypt, scrypt, argon2, PBKDF2).
- Hard-coded IVs or keys, ECB mode, `Math.random()`/`random` for tokens.
- TLS verification disabled (`verify=False`, `InsecureSkipVerify`, `rejectUnauthorized: false`).

## CI and supply chain
- Workflows that run untrusted PR code with secrets, `pull_request_target` checkouts of the PR head, or interpolating `${{ github.event.* }}` text directly into `run:` scripts.
- New dependencies from unusual registries, unpinned install scripts (`curl | sh`), or loosened lockfile integrity.

## Do not report
- Missing rate limiting, CSP or headers when the diff does not touch them.
- Theoretical issues in test-only code that never handles real input.
- Internal values (constants, config read at startup) treated as attacker input.

Report a problem