General-purpose Application Security AI audit framework -- five-layer architecture, capabilities as first-class data
Project description
codejury
A general-purpose Application Security AI audit framework. Domain knowledge (11 capabilities aligned with OWASP ASVS) lives in versioned YAML files as first-class data, keeping the framework core small.
The name comes from the core orchestration metaphor: code goes before a "jury" of adversarial roles -- Finder / Challenger / Judge -- that converge on a verdict.
Five-layer architecture
Layer 5 Task task configuration (source + capabilities + orchestrator + agents)
Layer 4 Capability YAML domain knowledge (authn / authz / input_validation ...)
Layer 3 Orchestrator strategy (single / debate / pipeline / reflexion)
Source input (diff / function / repo)
Agent audit role (finder / challenger / judge / verifier)
Layer 2 Provider model backend (anthropic / openai / litellm / mock)
Layer 1 Infrastructure cross-cutting utilities (json parsing, ...)
Layers talk only through typed data. Each layer is an abstract base class (ABC) plus implementations, so the four axes (task / orchestration / model / input) compose independently.
Design notes
- Domain knowledge is data, not prompts: a capability YAML is readable by the LLM, by a rule engine, and by a human, and is versioned alongside code.
- Explains both "why it's wrong" and "why it's fine": every capability
yields a
Verdict, recording safe matches too -- a checkup dimension rather than an anomaly filter.
Status
Usable end to end across all five layers:
- Orchestrators: single, pipeline, debate, reflexion
- Sources: diff, function, repo (with chunking)
- Providers: anthropic, openai, litellm, mock (plus an opt-in retry wrapper)
- Capabilities: all 11 OWASP ASVS areas
- Tasks: named presets in
tasks/(e.g.audit_diff_debate) - Reporting: text, markdown, json
- Evaluation: a golden-case precision/recall harness
The golden set ships with seed cases; real precision/recall numbers need a model
(codejury eval with a provider key).
Install
pip install codejury # core + CLI
pip install 'codejury[anthropic]' # add the provider you'll use (anthropic / openai / litellm)
Usage
A real audit calls a model, so set the provider's key first (see .env.example):
export ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEY for --provider openai
# Audit a unified diff against the capability library
git diff | codejury audit --orchestrator debate --provider anthropic --format markdown -
# Run a named task preset (tasks/*.yaml)
git diff | codejury run audit_diff_debate -
# Score detection quality against the golden cases
codejury eval --provider anthropic
# Through a LiteLLM proxy / gateway. The flags default to CODEJURY_API_BASE /
# CODEJURY_API_KEY / CODEJURY_MODEL, so with those in a sourced .env this is just:
# codejury audit --provider litellm -
git diff | codejury audit --provider litellm \
--api-base https://litellm.example.com --api-key "$LITELLM_KEY" --model your-alias -
# No API key needed: prove the pipeline composes with mock layers
codejury dry-run
audit and run read a diff from a file argument or stdin (-). The provider
key is read from the environment: ANTHROPIC_API_KEY for --provider anthropic,
OPENAI_API_KEY for --provider openai. Without a key the model providers
raise an authentication error; codejury dry-run needs no key.
A task YAML can pin the provider, model, and base URL (the key stays in the
environment), so codejury run works through a proxy too:
# mytasks/proxy_scan.yaml -> codejury run proxy_scan --tasks mytasks
name: proxy_scan
orchestrator: debate
provider: litellm
model: your-alias
api_base: https://litellm.example.com # key from CODEJURY_API_KEY
Development
python -m venv .venv && source .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-0.2.0.tar.gz.
File metadata
- Download URL: codejury-0.2.0.tar.gz
- Upload date:
- Size: 54.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b05cc9ab4413c570550475ae711e354daa851647da86cf695045b21d5ee7ba6b
|
|
| MD5 |
541f57c0f65feb549a67c1c4615925cc
|
|
| BLAKE2b-256 |
ed9dc519bc5b3b6ec6b8342b68f7240a8fbe0b84fac9a7a23198572ae421d58f
|
Provenance
The following attestation bundles were made for codejury-0.2.0.tar.gz:
Publisher:
publish.yml on 4234288/codejury
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codejury-0.2.0.tar.gz -
Subject digest:
b05cc9ab4413c570550475ae711e354daa851647da86cf695045b21d5ee7ba6b - Sigstore transparency entry: 1689075722
- Sigstore integration time:
-
Permalink:
4234288/codejury@91ee1d6f9732ea78d8dc027a249df55ad84653ec -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/4234288
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@91ee1d6f9732ea78d8dc027a249df55ad84653ec -
Trigger Event:
release
-
Statement type:
File details
Details for the file codejury-0.2.0-py3-none-any.whl.
File metadata
- Download URL: codejury-0.2.0-py3-none-any.whl
- Upload date:
- Size: 64.0 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 |
af80bfca642f7af5423484d15b417cbe9cfdca37bbed8bda8d02ef5f32c5e844
|
|
| MD5 |
4249c4fd069766559b4d1ed2befdfa91
|
|
| BLAKE2b-256 |
5421ad1207528cd000b05d45c4304f47ae1c253282a852f68d8090dcbe5a8934
|
Provenance
The following attestation bundles were made for codejury-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on 4234288/codejury
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codejury-0.2.0-py3-none-any.whl -
Subject digest:
af80bfca642f7af5423484d15b417cbe9cfdca37bbed8bda8d02ef5f32c5e844 - Sigstore transparency entry: 1689075753
- Sigstore integration time:
-
Permalink:
4234288/codejury@91ee1d6f9732ea78d8dc027a249df55ad84653ec -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/4234288
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@91ee1d6f9732ea78d8dc027a249df55ad84653ec -
Trigger Event:
release
-
Statement type: