codejury 1.0.1__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codejury-1.0.1 → codejury-1.1.0}/PKG-INFO +62 -17
- {codejury-1.0.1 → codejury-1.1.0}/README.md +56 -16
- {codejury-1.0.1 → codejury-1.1.0}/codejury/cli.py +184 -38
- {codejury-1.0.1 → codejury-1.1.0}/codejury/detection.py +6 -3
- codejury-1.1.0/codejury/domains/__init__.py +9 -0
- codejury-1.1.0/codejury/domains/base.py +153 -0
- codejury-1.1.0/codejury/domains/evm/__init__.py +74 -0
- codejury-1.1.0/codejury/domains/evm/detection.yaml +13 -0
- codejury-1.1.0/codejury/domains/evm/facts/__init__.py +5 -0
- codejury-1.1.0/codejury/domains/evm/facts/call_path.py +93 -0
- codejury-1.1.0/codejury/domains/evm/facts/slither.py +151 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/guides/languages/solidity.md +52 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/index.md +32 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/vulnerabilities/access-control.md +40 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/vulnerabilities/accounting-precision.md +35 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/vulnerabilities/denial-of-service.md +37 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/vulnerabilities/oracle-price-manipulation.md +34 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/vulnerabilities/proxy-delegatecall.md +41 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/vulnerabilities/reentrancy.md +38 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/vulnerabilities/signature-replay.md +37 -0
- codejury-1.1.0/codejury/domains/evm/knowledge/vulnerabilities/unchecked-low-level-call.md +35 -0
- codejury-1.1.0/codejury/domains/evm/playbook/false-positive-traps.md +82 -0
- codejury-1.1.0/codejury/domains/evm/playbook/methodology.md +160 -0
- codejury-1.1.0/codejury/domains/evm/playbook/severity-rubric.md +48 -0
- codejury-1.1.0/codejury/domains/evm/playbook/slash-command.md +92 -0
- codejury-1.1.0/codejury/domains/evm/playbook/unit-review.md +109 -0
- codejury-1.1.0/codejury/domains/evm/poc.py +41 -0
- codejury-1.1.0/codejury/domains/registry.py +56 -0
- codejury-1.1.0/codejury/domains/web/__init__.py +57 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/providers/anthropic.py +6 -2
- codejury-1.1.0/codejury/providers/factory.py +59 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/providers/litellm.py +6 -2
- codejury-1.1.0/codejury/providers/openai.py +86 -0
- codejury-1.1.0/codejury/providers/retry.py +155 -0
- codejury-1.1.0/codejury/resources.py +29 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/diff/adversarial.py +24 -7
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/diff/audit.py +24 -9
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/diff/engine.py +10 -2
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/diff/prompts.py +17 -34
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/diff/vulnerabilities.py +30 -1
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/repo/agent.py +10 -7
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/repo/engine.py +267 -61
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/repo/model.py +9 -9
- codejury-1.1.0/codejury/review/repo/pass_loop.py +103 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/repo/reviewer.py +54 -51
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/repo/scaffold.py +118 -25
- codejury-1.1.0/codejury/review/repo/severity.py +36 -0
- codejury-1.1.0/codejury/review/repo/shapes.py +106 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/repo/union.py +63 -19
- codejury-1.1.0/codejury/review/repo/verifier.py +355 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury.egg-info/PKG-INFO +62 -17
- codejury-1.1.0/codejury.egg-info/SOURCES.txt +147 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury.egg-info/requires.txt +4 -0
- {codejury-1.0.1 → codejury-1.1.0}/pyproject.toml +6 -2
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_cli.py +47 -5
- codejury-1.1.0/tests/test_domains.py +251 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_evals.py +106 -1
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_openai_provider.py +26 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_repo_agent.py +1 -1
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_repo_engine.py +161 -4
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_repo_pass_loop.py +89 -1
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_repo_scaffold.py +164 -0
- codejury-1.1.0/tests/test_repo_severity.py +23 -0
- codejury-1.1.0/tests/test_repo_union.py +281 -0
- codejury-1.1.0/tests/test_repo_verifier.py +193 -0
- codejury-1.1.0/tests/test_retry_provider.py +191 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_vulnerabilities.py +31 -0
- codejury-1.0.1/codejury/providers/factory.py +0 -33
- codejury-1.0.1/codejury/providers/openai.py +0 -59
- codejury-1.0.1/codejury/providers/retry.py +0 -64
- codejury-1.0.1/codejury/resources.py +0 -28
- codejury-1.0.1/codejury/review/repo/pass_loop.py +0 -80
- codejury-1.0.1/codejury/review/repo/severity.py +0 -69
- codejury-1.0.1/codejury/review/repo/shapes.py +0 -23
- codejury-1.0.1/codejury/review/repo/verifier.py +0 -174
- codejury-1.0.1/codejury.egg-info/SOURCES.txt +0 -121
- codejury-1.0.1/tests/test_repo_severity.py +0 -37
- codejury-1.0.1/tests/test_repo_union.py +0 -104
- codejury-1.0.1/tests/test_repo_verifier.py +0 -96
- codejury-1.0.1/tests/test_retry_provider.py +0 -76
- {codejury-1.0.1 → codejury-1.1.0}/LICENSE +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/__init__.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/__main__.py +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/detection.yaml +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/frameworks/go/echo.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/frameworks/go/gin.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/frameworks/javascript/express.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/frameworks/javascript/nestjs.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/frameworks/python/celery.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/frameworks/python/django.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/frameworks/python/fastapi.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/frameworks/python/flask.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/languages/go.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/languages/javascript.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/languages/python.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/languages/typescript.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/guides/protocols/oauth.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/index.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/business-logic.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/code-injection.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/command-injection.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/cross-site-request-forgery.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/cross-site-scripting.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/hardcoded-secrets.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/http-response-splitting.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/improper-authentication.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/information-exposure.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/insecure-cryptography.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/insecure-deserialization.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/insecure-direct-object-reference.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/insecure-session-management.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/insecure-transport.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/jwt-validation.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/mass-assignment.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/missing-authorization.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/open-redirect.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/path-traversal.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/race-condition.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/replay-attack.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/server-side-request-forgery.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/server-side-template-injection.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/sql-injection.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/knowledge/vulnerabilities/xml-external-entity.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/playbook/false-positive-traps.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/playbook/methodology.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/playbook/severity-rubric.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/playbook/slash-command.md +0 -0
- {codejury-1.0.1/codejury → codejury-1.1.0/codejury/domains/web}/playbook/unit-review.md +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/finding.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/guides.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/json_parse.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/markdown_docs.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/providers/__init__.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/providers/base.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/providers/chat_format.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/providers/mock.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/report.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/__init__.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/diff/__init__.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/diff/filter.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/repo/__init__.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/repo/gate.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/review/repo/paths.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury/severity.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury.egg-info/dependency_links.txt +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury.egg-info/entry_points.txt +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/codejury.egg-info/top_level.txt +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/setup.cfg +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_anthropic_provider.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_chat_format.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_detection.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_diff_adversarial.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_diff_audit.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_guides.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_json_parse.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_litellm_provider.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_markdown_docs.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_provider_factory.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_repo_gate.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_repo_model.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_repo_paths.py +0 -0
- {codejury-1.0.1 → codejury-1.1.0}/tests/test_report.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codejury
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: AI-assisted security review for code diffs and whole repositories.
|
|
5
5
|
Author: AISecLabs
|
|
6
6
|
License-Expression: MIT
|
|
@@ -14,6 +14,8 @@ Classifier: Intended Audience :: Developers
|
|
|
14
14
|
Classifier: Topic :: Security
|
|
15
15
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
19
|
Classifier: Operating System :: OS Independent
|
|
18
20
|
Requires-Python: >=3.12
|
|
19
21
|
Description-Content-Type: text/markdown
|
|
@@ -30,6 +32,9 @@ Provides-Extra: all
|
|
|
30
32
|
Requires-Dist: anthropic>=0.40; extra == "all"
|
|
31
33
|
Requires-Dist: openai>=1.0; extra == "all"
|
|
32
34
|
Requires-Dist: litellm>=1.0; extra == "all"
|
|
35
|
+
Provides-Extra: evm
|
|
36
|
+
Requires-Dist: slither-analyzer>=0.10; extra == "evm"
|
|
37
|
+
Requires-Dist: web3>=6.0; extra == "evm"
|
|
33
38
|
Provides-Extra: dev
|
|
34
39
|
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
35
40
|
Requires-Dist: jsonschema>=4.0; extra == "dev"
|
|
@@ -44,9 +49,10 @@ Dynamic: license-file
|
|
|
44
49
|
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝
|
|
45
50
|
```
|
|
46
51
|
|
|
52
|
+
[](https://github.com/aiseclabs/codejury/actions/workflows/test.yml)
|
|
47
53
|
[](https://pypi.org/project/codejury/)
|
|
48
54
|
[](https://pypi.org/project/codejury/)
|
|
49
|
-
[](https://github.com/aiseclabs/codejury/blob/
|
|
55
|
+
[](https://github.com/aiseclabs/codejury/blob/main/LICENSE)
|
|
50
56
|
|
|
51
57
|
AI-assisted security review for code diffs and whole repositories.
|
|
52
58
|
|
|
@@ -57,8 +63,10 @@ The tool has two review paths:
|
|
|
57
63
|
candidates, verifies findings, and checks coverage with a gate.
|
|
58
64
|
|
|
59
65
|
Security knowledge is data. Vulnerability classes, language guides, framework guides, and
|
|
60
|
-
protocol guides live in markdown under
|
|
61
|
-
|
|
66
|
+
protocol guides live in markdown under each review domain's `knowledge/` directory, for
|
|
67
|
+
example `codejury/domains/web/knowledge/`, so adding a stack or class is usually a data
|
|
68
|
+
change rather than a Python code change. The `web` domain is the default and `evm` reviews
|
|
69
|
+
Solidity smart contracts, selected with `--domain` or detected automatically.
|
|
62
70
|
|
|
63
71
|
## Install
|
|
64
72
|
|
|
@@ -85,10 +93,25 @@ Set a provider key through flags or environment variables:
|
|
|
85
93
|
|
|
86
94
|
```bash
|
|
87
95
|
export CODEJURY_API_KEY=...
|
|
88
|
-
export CODEJURY_MODEL=claude-
|
|
96
|
+
export CODEJURY_MODEL=claude-opus-4-8
|
|
89
97
|
export CODEJURY_API_BASE=... # optional gateway or proxy
|
|
90
98
|
```
|
|
91
99
|
|
|
100
|
+
Repo Review uses a second, deliberately different model for two roles at once. On the recall
|
|
101
|
+
side it finds alongside the main model, so the union takes whatever either catches and a
|
|
102
|
+
single model's blind spot no longer caps recall. On the precision side it must agree before a
|
|
103
|
+
candidate is refuted, so a deletion needs two models with uncorrelated blind spots and no lone
|
|
104
|
+
skeptic drops a real finding. Point it at a cross-vendor model. With none set, both models
|
|
105
|
+
collapse to one, the finder is single-model and the verify stage keeps every candidate, the
|
|
106
|
+
recall-safe default.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
export CODEJURY_CHECKER_PROVIDER=openai # default
|
|
110
|
+
export CODEJURY_CHECKER_MODEL=... # a different model from CODEJURY_MODEL
|
|
111
|
+
export CODEJURY_CHECKER_API_KEY=...
|
|
112
|
+
export CODEJURY_CHECKER_API_BASE=... # optional
|
|
113
|
+
```
|
|
114
|
+
|
|
92
115
|
The tool does not auto-load `.env`.
|
|
93
116
|
|
|
94
117
|
Useful flags:
|
|
@@ -126,19 +149,19 @@ Diff Review is the fast coded path. It audits a unified diff with either a stand
|
|
|
126
149
|
single model call or an adversarial Finder, Challenger, and Judge pass.
|
|
127
150
|
|
|
128
151
|
```bash
|
|
129
|
-
#
|
|
152
|
+
# review a diff file
|
|
130
153
|
codejury review diff --file changes.diff
|
|
131
154
|
|
|
132
|
-
#
|
|
155
|
+
# review a git range
|
|
133
156
|
codejury review diff --repo /path/to/app --git-range origin/main...HEAD
|
|
134
157
|
|
|
135
|
-
#
|
|
158
|
+
# review stdin
|
|
136
159
|
git diff HEAD~1 | codejury review diff
|
|
137
160
|
|
|
138
|
-
#
|
|
161
|
+
# use adversarial mode for extra recall on subtle cross-file logic
|
|
139
162
|
codejury review diff --file changes.diff --mode adversarial
|
|
140
163
|
|
|
141
|
-
#
|
|
164
|
+
# emit SARIF and fail on HIGH or CRITICAL findings
|
|
142
165
|
codejury review diff --file changes.diff --format sarif --fail-on high
|
|
143
166
|
```
|
|
144
167
|
|
|
@@ -200,18 +223,40 @@ For a headless run, use:
|
|
|
200
223
|
codejury review repo /path/to/repo --run
|
|
201
224
|
```
|
|
202
225
|
|
|
203
|
-
|
|
204
|
-
|
|
226
|
+
### Review Strategy
|
|
227
|
+
|
|
228
|
+
A `--run` chooses how each unit is reviewed:
|
|
229
|
+
|
|
230
|
+
- `--reviewer model` is the default. It makes one grounded model call per unit. Add
|
|
231
|
+
`--facts` to ground that call in a tool-extracted call graph, storage layout, and read
|
|
232
|
+
and write sets when the domain binds a facts backend, such as the EVM Slither backend.
|
|
233
|
+
This is what gives a smart contract review its call relationships, so prefer
|
|
234
|
+
`--run --facts` on Solidity.
|
|
235
|
+
- `--reviewer claude-cli` runs each unit and its verification as a headless `claude -p`
|
|
236
|
+
agent that reads and traces the files itself with read-only tools, using your Claude Code
|
|
237
|
+
access and no provider key. Use it when you want a tool-using agent rather than a single
|
|
238
|
+
grounded call.
|
|
239
|
+
|
|
240
|
+
Add `--checker-model`, a different model from `--model`, to enable cross-model
|
|
241
|
+
verification. It finds alongside the main model on the recall side and must agree before a
|
|
242
|
+
finding is dropped on the precision side. With none set, the verify stage refutes nothing,
|
|
243
|
+
the recall-safe default.
|
|
205
244
|
|
|
206
245
|
## Supported Knowledge
|
|
207
246
|
|
|
208
|
-
|
|
247
|
+
The tool selects a review domain with `--domain`, `auto` by default. The `web` domain is
|
|
248
|
+
the default for application code. The `evm` domain reviews Solidity smart contracts for
|
|
249
|
+
classes such as reentrancy, access control, oracle manipulation, accounting precision, and
|
|
250
|
+
signature replay.
|
|
251
|
+
|
|
252
|
+
Current guide coverage in the web domain includes:
|
|
209
253
|
|
|
210
254
|
- Python: Django, Flask, FastAPI, Celery
|
|
211
255
|
- Go: Gin, Echo
|
|
212
256
|
- JavaScript and TypeScript: Express, NestJS
|
|
213
257
|
- Protocols: OAuth and OIDC
|
|
214
258
|
|
|
259
|
+
The evm domain ships a Solidity guide and the smart contract vulnerability classes above.
|
|
215
260
|
Unguided stacks still work, but the agent relies more on general methodology and model
|
|
216
261
|
knowledge.
|
|
217
262
|
|
|
@@ -255,13 +300,13 @@ uploads SARIF to code scanning, and fails on HIGH or CRITICAL findings.
|
|
|
255
300
|
Add security knowledge as markdown:
|
|
256
301
|
|
|
257
302
|
- Vulnerability class:
|
|
258
|
-
`codejury/knowledge/vulnerabilities/<id>.md`
|
|
303
|
+
`codejury/domains/<domain>/knowledge/vulnerabilities/<id>.md`
|
|
259
304
|
- Language guide:
|
|
260
|
-
`codejury/knowledge/guides/languages/<language>.md`
|
|
305
|
+
`codejury/domains/<domain>/knowledge/guides/languages/<language>.md`
|
|
261
306
|
- Framework guide:
|
|
262
|
-
`codejury/knowledge/guides/frameworks/<language>/<framework>.md`
|
|
307
|
+
`codejury/domains/<domain>/knowledge/guides/frameworks/<language>/<framework>.md`
|
|
263
308
|
- Protocol guide:
|
|
264
|
-
`codejury/knowledge/guides/protocols/<protocol>.md`
|
|
309
|
+
`codejury/domains/<domain>/knowledge/guides/protocols/<protocol>.md`
|
|
265
310
|
|
|
266
311
|
Keep frontmatter and detection signals data-driven. Avoid adding language, framework, or
|
|
267
312
|
vulnerability-specific detection logic to Python unless the engine itself needs a generic
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
+
[](https://github.com/aiseclabs/codejury/actions/workflows/test.yml)
|
|
10
11
|
[](https://pypi.org/project/codejury/)
|
|
11
12
|
[](https://pypi.org/project/codejury/)
|
|
12
|
-
[](https://github.com/aiseclabs/codejury/blob/
|
|
13
|
+
[](https://github.com/aiseclabs/codejury/blob/main/LICENSE)
|
|
13
14
|
|
|
14
15
|
AI-assisted security review for code diffs and whole repositories.
|
|
15
16
|
|
|
@@ -20,8 +21,10 @@ The tool has two review paths:
|
|
|
20
21
|
candidates, verifies findings, and checks coverage with a gate.
|
|
21
22
|
|
|
22
23
|
Security knowledge is data. Vulnerability classes, language guides, framework guides, and
|
|
23
|
-
protocol guides live in markdown under
|
|
24
|
-
|
|
24
|
+
protocol guides live in markdown under each review domain's `knowledge/` directory, for
|
|
25
|
+
example `codejury/domains/web/knowledge/`, so adding a stack or class is usually a data
|
|
26
|
+
change rather than a Python code change. The `web` domain is the default and `evm` reviews
|
|
27
|
+
Solidity smart contracts, selected with `--domain` or detected automatically.
|
|
25
28
|
|
|
26
29
|
## Install
|
|
27
30
|
|
|
@@ -48,10 +51,25 @@ Set a provider key through flags or environment variables:
|
|
|
48
51
|
|
|
49
52
|
```bash
|
|
50
53
|
export CODEJURY_API_KEY=...
|
|
51
|
-
export CODEJURY_MODEL=claude-
|
|
54
|
+
export CODEJURY_MODEL=claude-opus-4-8
|
|
52
55
|
export CODEJURY_API_BASE=... # optional gateway or proxy
|
|
53
56
|
```
|
|
54
57
|
|
|
58
|
+
Repo Review uses a second, deliberately different model for two roles at once. On the recall
|
|
59
|
+
side it finds alongside the main model, so the union takes whatever either catches and a
|
|
60
|
+
single model's blind spot no longer caps recall. On the precision side it must agree before a
|
|
61
|
+
candidate is refuted, so a deletion needs two models with uncorrelated blind spots and no lone
|
|
62
|
+
skeptic drops a real finding. Point it at a cross-vendor model. With none set, both models
|
|
63
|
+
collapse to one, the finder is single-model and the verify stage keeps every candidate, the
|
|
64
|
+
recall-safe default.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
export CODEJURY_CHECKER_PROVIDER=openai # default
|
|
68
|
+
export CODEJURY_CHECKER_MODEL=... # a different model from CODEJURY_MODEL
|
|
69
|
+
export CODEJURY_CHECKER_API_KEY=...
|
|
70
|
+
export CODEJURY_CHECKER_API_BASE=... # optional
|
|
71
|
+
```
|
|
72
|
+
|
|
55
73
|
The tool does not auto-load `.env`.
|
|
56
74
|
|
|
57
75
|
Useful flags:
|
|
@@ -89,19 +107,19 @@ Diff Review is the fast coded path. It audits a unified diff with either a stand
|
|
|
89
107
|
single model call or an adversarial Finder, Challenger, and Judge pass.
|
|
90
108
|
|
|
91
109
|
```bash
|
|
92
|
-
#
|
|
110
|
+
# review a diff file
|
|
93
111
|
codejury review diff --file changes.diff
|
|
94
112
|
|
|
95
|
-
#
|
|
113
|
+
# review a git range
|
|
96
114
|
codejury review diff --repo /path/to/app --git-range origin/main...HEAD
|
|
97
115
|
|
|
98
|
-
#
|
|
116
|
+
# review stdin
|
|
99
117
|
git diff HEAD~1 | codejury review diff
|
|
100
118
|
|
|
101
|
-
#
|
|
119
|
+
# use adversarial mode for extra recall on subtle cross-file logic
|
|
102
120
|
codejury review diff --file changes.diff --mode adversarial
|
|
103
121
|
|
|
104
|
-
#
|
|
122
|
+
# emit SARIF and fail on HIGH or CRITICAL findings
|
|
105
123
|
codejury review diff --file changes.diff --format sarif --fail-on high
|
|
106
124
|
```
|
|
107
125
|
|
|
@@ -163,18 +181,40 @@ For a headless run, use:
|
|
|
163
181
|
codejury review repo /path/to/repo --run
|
|
164
182
|
```
|
|
165
183
|
|
|
166
|
-
|
|
167
|
-
|
|
184
|
+
### Review Strategy
|
|
185
|
+
|
|
186
|
+
A `--run` chooses how each unit is reviewed:
|
|
187
|
+
|
|
188
|
+
- `--reviewer model` is the default. It makes one grounded model call per unit. Add
|
|
189
|
+
`--facts` to ground that call in a tool-extracted call graph, storage layout, and read
|
|
190
|
+
and write sets when the domain binds a facts backend, such as the EVM Slither backend.
|
|
191
|
+
This is what gives a smart contract review its call relationships, so prefer
|
|
192
|
+
`--run --facts` on Solidity.
|
|
193
|
+
- `--reviewer claude-cli` runs each unit and its verification as a headless `claude -p`
|
|
194
|
+
agent that reads and traces the files itself with read-only tools, using your Claude Code
|
|
195
|
+
access and no provider key. Use it when you want a tool-using agent rather than a single
|
|
196
|
+
grounded call.
|
|
197
|
+
|
|
198
|
+
Add `--checker-model`, a different model from `--model`, to enable cross-model
|
|
199
|
+
verification. It finds alongside the main model on the recall side and must agree before a
|
|
200
|
+
finding is dropped on the precision side. With none set, the verify stage refutes nothing,
|
|
201
|
+
the recall-safe default.
|
|
168
202
|
|
|
169
203
|
## Supported Knowledge
|
|
170
204
|
|
|
171
|
-
|
|
205
|
+
The tool selects a review domain with `--domain`, `auto` by default. The `web` domain is
|
|
206
|
+
the default for application code. The `evm` domain reviews Solidity smart contracts for
|
|
207
|
+
classes such as reentrancy, access control, oracle manipulation, accounting precision, and
|
|
208
|
+
signature replay.
|
|
209
|
+
|
|
210
|
+
Current guide coverage in the web domain includes:
|
|
172
211
|
|
|
173
212
|
- Python: Django, Flask, FastAPI, Celery
|
|
174
213
|
- Go: Gin, Echo
|
|
175
214
|
- JavaScript and TypeScript: Express, NestJS
|
|
176
215
|
- Protocols: OAuth and OIDC
|
|
177
216
|
|
|
217
|
+
The evm domain ships a Solidity guide and the smart contract vulnerability classes above.
|
|
178
218
|
Unguided stacks still work, but the agent relies more on general methodology and model
|
|
179
219
|
knowledge.
|
|
180
220
|
|
|
@@ -218,13 +258,13 @@ uploads SARIF to code scanning, and fails on HIGH or CRITICAL findings.
|
|
|
218
258
|
Add security knowledge as markdown:
|
|
219
259
|
|
|
220
260
|
- Vulnerability class:
|
|
221
|
-
`codejury/knowledge/vulnerabilities/<id>.md`
|
|
261
|
+
`codejury/domains/<domain>/knowledge/vulnerabilities/<id>.md`
|
|
222
262
|
- Language guide:
|
|
223
|
-
`codejury/knowledge/guides/languages/<language>.md`
|
|
263
|
+
`codejury/domains/<domain>/knowledge/guides/languages/<language>.md`
|
|
224
264
|
- Framework guide:
|
|
225
|
-
`codejury/knowledge/guides/frameworks/<language>/<framework>.md`
|
|
265
|
+
`codejury/domains/<domain>/knowledge/guides/frameworks/<language>/<framework>.md`
|
|
226
266
|
- Protocol guide:
|
|
227
|
-
`codejury/knowledge/guides/protocols/<protocol>.md`
|
|
267
|
+
`codejury/domains/<domain>/knowledge/guides/protocols/<protocol>.md`
|
|
228
268
|
|
|
229
269
|
Keep frontmatter and detection signals data-driven. Avoid adding language, framework, or
|
|
230
270
|
vulnerability-specific detection logic to Python unless the engine itself needs a generic
|