A security-hardened fork by haotool
This repository is not an official Alibaba product. It is an independent fork maintained by haotool, derived from alibaba/open-code-review under the Apache License 2.0.
- We do not use Alibaba trademarks or imply official endorsement.
- See NOTICE for upstream copyright attribution and a summary of fork modifications.
- See LICENSE for the full Apache-2.0 terms.
Open Code Review (Delegate Edition) ships a single CLI binary — ocr-delegate — that provides deterministic code-review engineering:
- File selection — precisely determines which changed files need review
- Rule resolution — matches review rules to each file from
rule.json - Zero network — the binary never calls an LLM or opens outbound connections
- Zero credentials — no API keys, tokens, or provider configuration required
Your AI coding agent (Cursor, Claude Code, Codex, etc.) performs the actual review using its own subscription LLM. ocr-delegate handles the engineering; the host agent handles the intelligence.
This design eliminates supply-chain risks from npm auto-updaters, prebuilt binary downloads, and embedded provider endpoints present in the upstream distribution model.
Build from source — no npm, no prebuilt binaries, no API keys:
# 1. Clone
git clone https://github.com/haotool/open-code-review.git && cd open-code-review
# 2. Build ocr-delegate
make build
# 3. Install the agent skill
make install-skill
# Claude Code users:
make install-skill SKILL_DIR=~/.claude/skillsVerify:
which ocr-delegate && ocr-delegate -hInstallation verified by test/e2e/dryrun.sh (see E2E verification).
The skill at skills/open-code-review/SKILL.md is the single source of truth for the delegation workflow. Summary:
ocr-delegate preview [--from main --to feature] [--commit <hash>] [-b "context"]ocr-delegate rule <path1> <path2> ...Use git based on mode/ref metadata from preview output. The host agent reviews each file and produces structured findings.
See the skill documentation for the complete workflow, security discipline (T7/T9), and output schema.
| Property | Guarantee |
|---|---|
| Zero outbound | ocr-delegate makes no network connections (verified by CI string scan + E2E) |
| Zero credentials | No LLM provider config needed for delegate mode |
| Minimal dependency closure | Forbidden modules (internal/llm, telemetry, mcp, viewer, session) excluded from binary |
| Source-first distribution | No npm wrapper, no prebuilt binary downloads, no auto-updater |
| Supply-chain stripped | Upstream install scripts, npm packages, and GitHub Action removed |
Full details: SECURITY.md
This fork is source-first: releases do not ship prebuilt binaries. Reproduce locally and verify integrity yourself:
make build # produces dist/ocr-delegate
shasum -a 256 dist/ocr-delegate # local checksum for your build
# Cross-platform local builds (optional)
make dist # builds all platforms + sha256sum.txtmake build # build ocr-delegate
make test # run test suite
make check # fmt + vet + mod tidy
make coverage # coverage report (80% threshold)See CONTRIBUTING.md for guidelines.
The following directories are retained from upstream but not maintained in this fork:
| Directory | Status |
|---|---|
pages/ |
Upstream landing page — not built or deployed by this fork |
extensions/ |
Upstream VS Code extension — requires full ocr CLI, not ocr-delegate |
Licensed under Apache-2.0. Copyright notices for upstream Alibaba contributors are preserved in NOTICE.
This fork modifies upstream substantially. See CHANGELOG.md for v1.0.0 changes.
| ID | Requirement | Verification |
|---|---|---|
| S1 | Zero outbound network | test/e2e/dryrun.sh + CI Gate 4 string scan |
| S2 | Zero credentials | E2E dry-run + delegate-only binary |
| S3 | Deterministic engine | 26-scenario golden equivalence suite |
| S4 | No npm distribution | Removed; install docs contain no npm commands |
| S5 | Install ≤3 steps | E2E dry-run three-step verification |
| S6 | Test suite passes | CI Gate 2 (go test ./...) |
| S7 | Injection resistance | Adversarial fixture library + E2E spot-checks |