Skip to main content

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

# 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 (needs a provider key)
codejury eval --provider anthropic

# 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 (-). Real providers read their key from the environment (e.g. ANTHROPIC_API_KEY).

Development

python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest

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.1.0.tar.gz (51.0 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.1.0-py3-none-any.whl (57.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for codejury-0.1.0.tar.gz
Algorithm Hash digest
SHA256 167d6220148e6916aef7d134811186ccf5b390d370b4aa8223ce7bfb87972be4
MD5 adfe34bc135825a5c0483a8c992ddb28
BLAKE2b-256 6a7d23d4bd51e6d1675ccfd2d7a262053ea10f7d56b27ca18c9cc2ebd4d0cc47

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on 4234288/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.1.0-py3-none-any.whl.

File metadata

  • Download URL: codejury-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 57.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acf6d1c0a49a24f7555585418aa3d52b55362966cedabc55ac56b520e1a8f83a
MD5 b1524f7690a650cd5746192544cafcf9
BLAKE2b-256 8053dca343d0b24fb2aba2401ff37932f1df98f2c1341e9168f021bb5fce3d9c

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on 4234288/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