Skip to main content

AI code security review: an adversarial diff-audit engine and an agent-driven whole-repo review methodology, with security knowledge as rich rules

Project description

codejury

AI code security review, in two paths matched to their nature:

  • Diff review (coded): audit a pull request's diff for newly introduced, exploitable risks. A single balanced LLM call, or an adversarial Finder/Challenger/Judge pass for higher coverage and fewer false positives.
  • Whole-repo review (agent-driven): a methodology an interactive agent (Claude Code, Codex) runs to traverse a codebase from its API entrypoints, verify issues with a real PoC, and iterate over rounds with a persistent memory. Too large for a single LLM call, so codejury ships the methodology and scaffolds the workspace rather than running a pipeline.

Security knowledge lives in rich rules (codejury/data/rules/*.md, with per-language vulnerable/secure examples), injected into the audit prompt, not buried in code.

Install

pip install codejury                 # core
pip install "codejury[anthropic]"    # or [openai] / [litellm] for a backend

Diff review

# audit a diff file
codejury audit --diff-file changes.diff

# audit a git range in a repo
codejury audit --repo /path/to/app --git-range origin/main...HEAD

# from stdin
git diff HEAD~1 | codejury audit

# adversarial mode: Finder + Challenger + Judge (higher coverage, lower FP, ~3x cost)
codejury audit --diff-file changes.diff --mode adversarial

# CI gate + SARIF
codejury audit --diff-file changes.diff --format sarif --fail-on high

Configure a backend with --provider/--model/--api-key/--api-base or the CODEJURY_API_KEY / CODEJURY_MODEL / CODEJURY_API_BASE environment variables. codejury dry-run exercises the engine with a mock provider and no key.

Whole-repo review

codejury full-review /path/to/your/repo

This scaffolds a review workspace (api/, issues/, analysis/, and a security-review-memory.md), seeds the API inventory from a deterministic scan, and prints the methodology. Run it with an interactive agent: it reads the methodology and the rules, traverses the code from its API entrypoints, records high-confidence issues with a PoC, and asks you to confirm credentials or false positives along the way. Nothing runs against production.

Findings

Each finding carries a file and line, a severity and category, a concrete exploit scenario, a recommendation, and a confidence. A false-positive filter drops test/mock-path and low-confidence noise; the model is also told not to report dependency CVEs, style notes, speculation, or config-leak-only risks.

Extending

Add a vulnerability class by dropping a new codejury/data/rules/<class>.md with the standard frontmatter (title, impact, tags, triggers) and vulnerable/secure examples. It is data; no code change needed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codejury-0.13.3.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codejury-0.13.3-py3-none-any.whl (57.0 kB view details)

Uploaded Python 3

File details

Details for the file codejury-0.13.3.tar.gz.

File metadata

  • Download URL: codejury-0.13.3.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codejury-0.13.3.tar.gz
Algorithm Hash digest
SHA256 1c4c1b746dab208f016667a732b4de10884ddfd52cd84fa2a0adb5a0e286ce8e
MD5 323005075d067c9763fc764073cdc616
BLAKE2b-256 1ce21a3ef269b89237ba11bdb9314e400fd94463486f3525ef69c6a5b9fb2412

See more details on using hashes here.

Provenance

The following attestation bundles were made for codejury-0.13.3.tar.gz:

Publisher: publish.yml on aiseclabs/codejury

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codejury-0.13.3-py3-none-any.whl.

File metadata

  • Download URL: codejury-0.13.3-py3-none-any.whl
  • Upload date:
  • Size: 57.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codejury-0.13.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7cadcfe80538e338fe3156bba8ab134ba06996f4dec6563446b2db5652694213
MD5 5f6aa2c5aa464c36d6863f876394730a
BLAKE2b-256 6678272c47efa9e202af353472b910849e2c4a739285f93d6b7f7fdd1ae31b0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for codejury-0.13.3-py3-none-any.whl:

Publisher: publish.yml on aiseclabs/codejury

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page