AI-assisted security review for code diffs and whole repositories.
Project description
██████╗ ██████╗ ██████╗ ███████╗ ██╗██╗ ██╗██████╗ ██╗ ██╗
██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██║██║ ██║██╔══██╗╚██╗ ██╔╝
██║ ██║ ██║██║ ██║█████╗ ██║██║ ██║██████╔╝ ╚████╔╝
██║ ██║ ██║██║ ██║██╔══╝ ██ ██║██║ ██║██╔══██╗ ╚██╔╝
╚██████╗╚██████╔╝██████╔╝███████╗╚█████╔╝╚██████╔╝██║ ██║ ██║
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝
AI-assisted security review for code diffs and whole repositories.
The tool has two review paths:
- Diff Review audits a pull request or unified diff in one command.
- Repo Review fans out across a whole repository, reviews focused units, deduplicates candidates, verifies findings, and checks coverage with a gate.
Security knowledge is data. Vulnerability classes, language guides, framework guides, and
protocol guides live in markdown under codejury/knowledge/, so adding a stack or class is
usually a data change rather than a Python code change.
Install
Install the core package and one model backend:
pip install codejury
pip install "codejury[anthropic]" # or "codejury[openai]" or "codejury[litellm]"
Install the Repo Review slash command for an agent:
codejury install-slash-command # Claude Code
codejury install-slash-command --agent codex # Codex
install-slash-command copies /codejury-review-repo into the selected agent's command
directory. Pass --dir to install it somewhere else.
Configure a Model Backend
Set a provider key through flags or environment variables:
export CODEJURY_API_KEY=...
export CODEJURY_MODEL=claude-sonnet-4-6
export CODEJURY_API_BASE=... # optional gateway or proxy
The tool does not auto-load .env.
Useful flags:
--provider anthropic|openai|litellm--model <model>--api-key <key>--api-base <url>--retries <n>
Data Boundary
The tool sends code-derived content to the model provider you configure, so know what leaves the machine before reviewing a proprietary repository:
- Diff Review sends the unified diff under review.
- Repo Review with
--reviewer modelsends bounded source snippets, the detected stack notes, the vulnerability guidance, and the findings. - Verification with
--reviewer modelsends the cited source file and the finding details. With--reviewer claude-cli, Claude Code receives the finding details and reads the code itself through its read-only tools. --reviewer claude-clidoes not use the configured provider key. It runs Claude Code with read-only file tools, and Claude Code may send prompts and the code it reads through your Claude Code account, so the code does not stay local.
A custom --api-base or a LiteLLM proxy becomes part of the trust boundary, so the data
above also reaches that gateway. Prefer the CODEJURY_API_KEY environment variable over
--api-key, since a flag can leak through shell history and process listings. The review
workspace and the generated reports hold exploit paths, sensitive file locations, and
PoCs, so treat them as sensitive. The workspace is created private, mode 0700.
Diff Review
Diff Review is the fast coded path. It audits a unified diff with either a standard single model call or an adversarial Finder, Challenger, and Judge pass.
# Review a diff file
codejury review diff --file changes.diff
# Review a git range
codejury review diff --repo /path/to/app --git-range origin/main...HEAD
# Review stdin
git diff HEAD~1 | codejury review diff
# Use adversarial mode for extra recall on subtle cross-file logic
codejury review diff --file changes.diff --mode adversarial
# Emit SARIF and fail on HIGH or CRITICAL findings
codejury review diff --file changes.diff --format sarif --fail-on high
codejury review diff --dry-run uses a mock provider and a built-in demo diff, so it needs
no API key.
Repo Review
Repo Review is the recall-first path for whole repositories. A whole codebase is too large for one useful model call, so the tool creates a workspace, builds a unit worklist, and reviews focused units instead of doing one shallow pass.
Start by scaffolding a workspace:
codejury review repo /path/to/repo
The workspace contains:
inventory/ attack surface, authorization model, seeded entrypoints, severity rubric
units/ one review unit per candidate entrypoint
candidates/ agent proposals, one write-up per candidate finding
findings/ confirmed findings, written by finalize
pocs/ runnable PoCs, when available
findings.json ranked machine-readable findings
METHODOLOGY.md full review process
_stack.md detected stack notes
_refuted.md refuted candidates and why
_pocs.md PoC reconciliation, planned versus delivered
Then run the interactive slash command in Claude Code or Codex:
/codejury-review-repo /path/to/repo
The agent maps the attack surface, fills the authorization model, runs one focused sub-review per unit, records findings, and leaves deterministic post-processing to code. PoCs must run only against sandbox or dev environments, never production.
After the fan-out review, run the coded finalization and gate:
codejury review repo /path/to/repo --finalize
codejury review repo /path/to/repo --gate
--finalize deduplicates candidate files, verifies survivors, writes the confirmed
findings/, records refuted candidates in _refuted.md and PoC reconciliation in
_pocs.md, and writes ranked findings.json. --gate fails until the workspace has an
enumerated surface, reviewed units, and calibrated candidates.
For a headless run, use:
codejury review repo /path/to/repo --run
Use --reviewer claude-cli only when you want the Claude Code backend to run unit reviews
and verification through local Claude CLI access.
Supported Knowledge
Current guide coverage includes:
- Python: Django, Flask, FastAPI, Celery
- Go: Gin, Echo
- JavaScript and TypeScript: Express, NestJS
- Protocols: OAuth and OIDC
Unguided stacks still work, but the agent relies more on general methodology and model knowledge.
Findings
Every reportable finding should have:
- file and line
- severity
- category
- exploit scenario
- recommendation
- confidence or verification status
The tool is intentionally scoped to real exploitable application security issues. It should not report dependency CVEs, style notes, generic best practices, speculation, or risks that only matter if production configuration leaks.
Model and Mode Guidance
Detection quality is dominated by model quality first, then mode.
- Use standard mode with a strong model by default.
- Use adversarial mode when you want extra recall on subtle cross-file logic.
- Do not use adversarial mode as a false-positive reducer. False positives are controlled by the do-not-report guidance, deterministic filtering, and verification.
GitHub Actions
Use the example workflow:
cp examples/codejury-pr-review.yml .github/workflows/codejury-pr-review.yml
Add CODEJURY_API_KEY as a repository secret. The workflow reviews the pull request diff,
uploads SARIF to code scanning, and fails on HIGH or CRITICAL findings.
Extend the Knowledge
Add security knowledge as markdown:
- Vulnerability class:
codejury/knowledge/vulnerabilities/<id>.md - Language guide:
codejury/knowledge/guides/languages/<language>.md - Framework guide:
codejury/knowledge/guides/frameworks/<language>/<framework>.md - Protocol guide:
codejury/knowledge/guides/protocols/<protocol>.md
Keep frontmatter and detection signals data-driven. Avoid adding language, framework, or vulnerability-specific detection logic to Python unless the engine itself needs a generic capability.
Development
Run tests in a virtual environment:
python -m venv .venv
. .venv/bin/activate
pip install -e ".[dev]"
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codejury-1.0.1.tar.gz.
File metadata
- Download URL: codejury-1.0.1.tar.gz
- Upload date:
- Size: 123.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af27a5d8b810839251eb75ecb4a27df5df0154dae687e3bfd92ae656b5d851eb
|
|
| MD5 |
83863f36cf3b86ccfb25b6262e95c64e
|
|
| BLAKE2b-256 |
37946dae53ea202a842d51c314a493d8b57222335b7f7adc4452d6452671b648
|
Provenance
The following attestation bundles were made for codejury-1.0.1.tar.gz:
Publisher:
publish.yml on aiseclabs/codejury
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codejury-1.0.1.tar.gz -
Subject digest:
af27a5d8b810839251eb75ecb4a27df5df0154dae687e3bfd92ae656b5d851eb - Sigstore transparency entry: 1789310881
- Sigstore integration time:
-
Permalink:
aiseclabs/codejury@64ba19ae3a8617e2f59adf7cf56eecdbc15649f5 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/aiseclabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@64ba19ae3a8617e2f59adf7cf56eecdbc15649f5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file codejury-1.0.1-py3-none-any.whl.
File metadata
- Download URL: codejury-1.0.1-py3-none-any.whl
- Upload date:
- Size: 125.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fce243af89d1f412bea93c85f55e929e1bb9fe2066f23dc6c12cd6d33327807d
|
|
| MD5 |
ce33a79020256e88217f57d22a20781e
|
|
| BLAKE2b-256 |
718efe35dcdeb772a9094a38d16169f1ce9eab4ecd67a5790203c5b9a804a371
|
Provenance
The following attestation bundles were made for codejury-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on aiseclabs/codejury
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codejury-1.0.1-py3-none-any.whl -
Subject digest:
fce243af89d1f412bea93c85f55e929e1bb9fe2066f23dc6c12cd6d33327807d - Sigstore transparency entry: 1789310893
- Sigstore integration time:
-
Permalink:
aiseclabs/codejury@64ba19ae3a8617e2f59adf7cf56eecdbc15649f5 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/aiseclabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@64ba19ae3a8617e2f59adf7cf56eecdbc15649f5 -
Trigger Event:
release
-
Statement type: