cyberjury 0.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.
Files changed (183) hide show
  1. cyberjury-0.1.0/LICENSE +202 -0
  2. cyberjury-0.1.0/PKG-INFO +454 -0
  3. cyberjury-0.1.0/README.md +416 -0
  4. cyberjury-0.1.0/cyberjury/__init__.py +16 -0
  5. cyberjury-0.1.0/cyberjury/__main__.py +10 -0
  6. cyberjury-0.1.0/cyberjury/cli.py +1223 -0
  7. cyberjury-0.1.0/cyberjury/detection.py +92 -0
  8. cyberjury-0.1.0/cyberjury/domains/__init__.py +9 -0
  9. cyberjury-0.1.0/cyberjury/domains/base.py +188 -0
  10. cyberjury-0.1.0/cyberjury/domains/evm/__init__.py +90 -0
  11. cyberjury-0.1.0/cyberjury/domains/evm/detection.yaml +17 -0
  12. cyberjury-0.1.0/cyberjury/domains/evm/facts/__init__.py +5 -0
  13. cyberjury-0.1.0/cyberjury/domains/evm/facts/call_path.py +92 -0
  14. cyberjury-0.1.0/cyberjury/domains/evm/facts/slither.py +160 -0
  15. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/guides/languages/solidity.md +52 -0
  16. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/guides/protocols/defi-primitives.md +41 -0
  17. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/guides/protocols/erc-standards.md +39 -0
  18. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/guides/protocols/token-launches.md +39 -0
  19. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/index.md +38 -0
  20. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/access-control.md +57 -0
  21. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/accounting-precision.md +42 -0
  22. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/bad-randomness.md +41 -0
  23. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/denial-of-service.md +38 -0
  24. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/front-running.md +50 -0
  25. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/oracle-price-manipulation.md +41 -0
  26. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/proxy-delegatecall.md +42 -0
  27. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/reentrancy.md +61 -0
  28. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/signature-replay.md +38 -0
  29. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/unchecked-low-level-call.md +42 -0
  30. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/unsafe-math.md +32 -0
  31. cyberjury-0.1.0/cyberjury/domains/evm/knowledge/vulnerabilities/weird-erc20.md +51 -0
  32. cyberjury-0.1.0/cyberjury/domains/evm/playbook/false-positive-traps.md +83 -0
  33. cyberjury-0.1.0/cyberjury/domains/evm/playbook/methodology.md +169 -0
  34. cyberjury-0.1.0/cyberjury/domains/evm/playbook/severity-rubric.md +51 -0
  35. cyberjury-0.1.0/cyberjury/domains/evm/playbook/unit-review.md +129 -0
  36. cyberjury-0.1.0/cyberjury/domains/evm/poc.py +296 -0
  37. cyberjury-0.1.0/cyberjury/domains/registry.py +57 -0
  38. cyberjury-0.1.0/cyberjury/domains/web/__init__.py +85 -0
  39. cyberjury-0.1.0/cyberjury/domains/web/detection.yaml +15 -0
  40. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/frameworks/go/echo.md +31 -0
  41. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/frameworks/go/gin.md +34 -0
  42. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/frameworks/javascript/express.md +36 -0
  43. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/frameworks/javascript/nestjs.md +36 -0
  44. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/frameworks/python/celery.md +39 -0
  45. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/frameworks/python/django.md +34 -0
  46. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/frameworks/python/fastapi.md +37 -0
  47. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/frameworks/python/flask.md +42 -0
  48. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/languages/go.md +42 -0
  49. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/languages/javascript.md +35 -0
  50. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/languages/python.md +32 -0
  51. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/languages/typescript.md +29 -0
  52. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/protocols/graphql.md +83 -0
  53. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/protocols/mcp.md +73 -0
  54. cyberjury-0.1.0/cyberjury/domains/web/knowledge/guides/protocols/oauth.md +55 -0
  55. cyberjury-0.1.0/cyberjury/domains/web/knowledge/index.md +64 -0
  56. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/business-logic.md +24 -0
  57. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/code-injection.md +25 -0
  58. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/command-injection.md +42 -0
  59. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/cors-misconfiguration.md +46 -0
  60. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/cross-site-request-forgery.md +41 -0
  61. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/cross-site-scripting.md +26 -0
  62. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/hardcoded-secrets.md +22 -0
  63. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/http-request-smuggling.md +49 -0
  64. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/http-response-splitting.md +25 -0
  65. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/improper-authentication.md +28 -0
  66. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/information-exposure.md +35 -0
  67. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/insecure-cryptography.md +28 -0
  68. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/insecure-deserialization.md +24 -0
  69. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/insecure-direct-object-reference.md +32 -0
  70. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/insecure-session-management.md +23 -0
  71. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/insecure-transport.md +27 -0
  72. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/jwt-validation.md +34 -0
  73. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/mass-assignment.md +23 -0
  74. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/missing-authorization.md +30 -0
  75. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/nosql-injection.md +41 -0
  76. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/open-redirect.md +25 -0
  77. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/path-traversal.md +40 -0
  78. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/prompt-injection.md +51 -0
  79. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/prototype-pollution.md +46 -0
  80. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/race-condition.md +38 -0
  81. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/replay-attack.md +28 -0
  82. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/resource-exhaustion.md +45 -0
  83. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/security-misconfiguration.md +48 -0
  84. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/server-side-request-forgery.md +41 -0
  85. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/server-side-template-injection.md +22 -0
  86. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/sql-injection.md +27 -0
  87. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/unrestricted-file-upload.md +49 -0
  88. cyberjury-0.1.0/cyberjury/domains/web/knowledge/vulnerabilities/xml-external-entity.md +35 -0
  89. cyberjury-0.1.0/cyberjury/domains/web/playbook/false-positive-traps.md +78 -0
  90. cyberjury-0.1.0/cyberjury/domains/web/playbook/methodology.md +230 -0
  91. cyberjury-0.1.0/cyberjury/domains/web/playbook/severity-rubric.md +58 -0
  92. cyberjury-0.1.0/cyberjury/domains/web/playbook/unit-review.md +100 -0
  93. cyberjury-0.1.0/cyberjury/domains/web/poc.py +132 -0
  94. cyberjury-0.1.0/cyberjury/envfile.py +59 -0
  95. cyberjury-0.1.0/cyberjury/finding.py +72 -0
  96. cyberjury-0.1.0/cyberjury/guides.py +127 -0
  97. cyberjury-0.1.0/cyberjury/json_parse.py +118 -0
  98. cyberjury-0.1.0/cyberjury/markdown_docs.py +50 -0
  99. cyberjury-0.1.0/cyberjury/playbook/slash-command.md +172 -0
  100. cyberjury-0.1.0/cyberjury/providers/__init__.py +5 -0
  101. cyberjury-0.1.0/cyberjury/providers/anthropic.py +153 -0
  102. cyberjury-0.1.0/cyberjury/providers/base.py +62 -0
  103. cyberjury-0.1.0/cyberjury/providers/chat_format.py +30 -0
  104. cyberjury-0.1.0/cyberjury/providers/claude_agent.py +490 -0
  105. cyberjury-0.1.0/cyberjury/providers/factory.py +63 -0
  106. cyberjury-0.1.0/cyberjury/providers/litellm.py +75 -0
  107. cyberjury-0.1.0/cyberjury/providers/metering.py +68 -0
  108. cyberjury-0.1.0/cyberjury/providers/mock.py +40 -0
  109. cyberjury-0.1.0/cyberjury/providers/openai.py +137 -0
  110. cyberjury-0.1.0/cyberjury/providers/retry.py +161 -0
  111. cyberjury-0.1.0/cyberjury/report.py +145 -0
  112. cyberjury-0.1.0/cyberjury/resources.py +35 -0
  113. cyberjury-0.1.0/cyberjury/review/__init__.py +0 -0
  114. cyberjury-0.1.0/cyberjury/review/diff/__init__.py +0 -0
  115. cyberjury-0.1.0/cyberjury/review/diff/adversarial.py +341 -0
  116. cyberjury-0.1.0/cyberjury/review/diff/audit.py +103 -0
  117. cyberjury-0.1.0/cyberjury/review/diff/engine.py +190 -0
  118. cyberjury-0.1.0/cyberjury/review/diff/filter.py +46 -0
  119. cyberjury-0.1.0/cyberjury/review/diff/prompts.py +88 -0
  120. cyberjury-0.1.0/cyberjury/review/diff/vulnerabilities.py +103 -0
  121. cyberjury-0.1.0/cyberjury/review/repository/__init__.py +0 -0
  122. cyberjury-0.1.0/cyberjury/review/repository/agent.py +145 -0
  123. cyberjury-0.1.0/cyberjury/review/repository/engine.py +1048 -0
  124. cyberjury-0.1.0/cyberjury/review/repository/gate.py +175 -0
  125. cyberjury-0.1.0/cyberjury/review/repository/model.py +204 -0
  126. cyberjury-0.1.0/cyberjury/review/repository/pass_loop.py +117 -0
  127. cyberjury-0.1.0/cyberjury/review/repository/paths.py +80 -0
  128. cyberjury-0.1.0/cyberjury/review/repository/reviewer.py +172 -0
  129. cyberjury-0.1.0/cyberjury/review/repository/scaffold.py +581 -0
  130. cyberjury-0.1.0/cyberjury/review/repository/severity.py +36 -0
  131. cyberjury-0.1.0/cyberjury/review/repository/shapes.py +125 -0
  132. cyberjury-0.1.0/cyberjury/review/repository/union.py +178 -0
  133. cyberjury-0.1.0/cyberjury/review/repository/verifier.py +319 -0
  134. cyberjury-0.1.0/cyberjury/severity.py +29 -0
  135. cyberjury-0.1.0/cyberjury/sources/__init__.py +16 -0
  136. cyberjury-0.1.0/cyberjury/sources/explorer.py +74 -0
  137. cyberjury-0.1.0/cyberjury/sources/fetch.py +85 -0
  138. cyberjury-0.1.0/cyberjury/sources/metadata.py +125 -0
  139. cyberjury-0.1.0/cyberjury/sources/reconstruct.py +123 -0
  140. cyberjury-0.1.0/cyberjury/telemetry.py +78 -0
  141. cyberjury-0.1.0/cyberjury.egg-info/PKG-INFO +454 -0
  142. cyberjury-0.1.0/cyberjury.egg-info/SOURCES.txt +181 -0
  143. cyberjury-0.1.0/cyberjury.egg-info/dependency_links.txt +1 -0
  144. cyberjury-0.1.0/cyberjury.egg-info/entry_points.txt +2 -0
  145. cyberjury-0.1.0/cyberjury.egg-info/requires.txt +16 -0
  146. cyberjury-0.1.0/cyberjury.egg-info/top_level.txt +1 -0
  147. cyberjury-0.1.0/pyproject.toml +67 -0
  148. cyberjury-0.1.0/setup.cfg +4 -0
  149. cyberjury-0.1.0/tests/test_anthropic_provider.py +164 -0
  150. cyberjury-0.1.0/tests/test_chat_format.py +31 -0
  151. cyberjury-0.1.0/tests/test_claude_agent_provider.py +211 -0
  152. cyberjury-0.1.0/tests/test_claude_agent_transport.py +244 -0
  153. cyberjury-0.1.0/tests/test_cli.py +888 -0
  154. cyberjury-0.1.0/tests/test_detection.py +86 -0
  155. cyberjury-0.1.0/tests/test_diff_adversarial.py +317 -0
  156. cyberjury-0.1.0/tests/test_diff_audit.py +221 -0
  157. cyberjury-0.1.0/tests/test_diff_vulnerabilities.py +161 -0
  158. cyberjury-0.1.0/tests/test_domains.py +576 -0
  159. cyberjury-0.1.0/tests/test_envfile.py +54 -0
  160. cyberjury-0.1.0/tests/test_evals.py +878 -0
  161. cyberjury-0.1.0/tests/test_finding.py +47 -0
  162. cyberjury-0.1.0/tests/test_guides.py +83 -0
  163. cyberjury-0.1.0/tests/test_json_parse.py +95 -0
  164. cyberjury-0.1.0/tests/test_litellm_provider.py +101 -0
  165. cyberjury-0.1.0/tests/test_markdown_docs.py +32 -0
  166. cyberjury-0.1.0/tests/test_metering.py +54 -0
  167. cyberjury-0.1.0/tests/test_openai_provider.py +146 -0
  168. cyberjury-0.1.0/tests/test_provider_factory.py +37 -0
  169. cyberjury-0.1.0/tests/test_report.py +127 -0
  170. cyberjury-0.1.0/tests/test_repository_agent.py +168 -0
  171. cyberjury-0.1.0/tests/test_repository_engine.py +1113 -0
  172. cyberjury-0.1.0/tests/test_repository_gate.py +167 -0
  173. cyberjury-0.1.0/tests/test_repository_model.py +77 -0
  174. cyberjury-0.1.0/tests/test_repository_pass_loop.py +251 -0
  175. cyberjury-0.1.0/tests/test_repository_paths.py +76 -0
  176. cyberjury-0.1.0/tests/test_repository_scaffold.py +488 -0
  177. cyberjury-0.1.0/tests/test_repository_severity.py +29 -0
  178. cyberjury-0.1.0/tests/test_repository_union.py +315 -0
  179. cyberjury-0.1.0/tests/test_repository_verifier.py +320 -0
  180. cyberjury-0.1.0/tests/test_retry_provider.py +210 -0
  181. cyberjury-0.1.0/tests/test_sources.py +169 -0
  182. cyberjury-0.1.0/tests/test_sources_fetch.py +200 -0
  183. cyberjury-0.1.0/tests/test_telemetry.py +61 -0
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,454 @@
1
+ Metadata-Version: 2.4
2
+ Name: cyberjury
3
+ Version: 0.1.0
4
+ Summary: AI-assisted security review for code diffs and whole repositories.
5
+ Author: eth4nr00t
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/eth4nr00t/cyberjury
8
+ Project-URL: Repository, https://github.com/eth4nr00t/cyberjury
9
+ Project-URL: Issues, https://github.com/eth4nr00t/cyberjury/issues
10
+ Project-URL: Changelog, https://github.com/eth4nr00t/cyberjury/releases
11
+ Keywords: appsec,sast,code review,llm,owasp,solidity,smart contracts,sarif
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Topic :: Security
15
+ Classifier: Topic :: Software Development :: Quality Assurance
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Operating System :: OS Independent
20
+ Requires-Python: >=3.12
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: pyyaml>=6.0
24
+ Requires-Dist: json-repair>=0.30
25
+ Requires-Dist: anthropic>=0.40
26
+ Requires-Dist: openai>=1.0
27
+ Requires-Dist: claude-agent-sdk>=0.2
28
+ Requires-Dist: slither-analyzer>=0.10
29
+ Requires-Dist: web3>=6.0
30
+ Provides-Extra: litellm
31
+ Requires-Dist: litellm>=1.0; extra == "litellm"
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=8.0; extra == "dev"
34
+ Requires-Dist: jsonschema>=4.0; extra == "dev"
35
+ Requires-Dist: ruff>=0.16; extra == "dev"
36
+ Requires-Dist: pre-commit>=3.5; extra == "dev"
37
+ Dynamic: license-file
38
+
39
+ # Cyberjury
40
+
41
+ AI-assisted security review for code diffs and whole repositories.
42
+
43
+ The tool has two review paths:
44
+
45
+ - **Diff Review** audits a pull request or unified diff in one command.
46
+ - **Repository Review** fans out across a whole repository, reviews focused units, deduplicates
47
+ candidates, verifies findings, and checks coverage with a gate.
48
+
49
+ Diff Review is fast and reads only the change, so it catches what is visible in the diff.
50
+ Cross-file business logic and invariants that span files need context from across the
51
+ repository, which is Repository Review's job, so a clean Diff Review does not by itself clear the
52
+ repository.
53
+
54
+ Security knowledge is data. Vulnerability classes, language guides, framework guides, and
55
+ protocol guides live in markdown under each review domain's `knowledge/` directory, for
56
+ example `cyberjury/domains/web/knowledge/`, so adding a stack or class is usually a data
57
+ change rather than a Python code change. The `web` domain is the default and `evm` reviews
58
+ Solidity smart contracts, selected with `--domain` or detected automatically.
59
+
60
+ ## When to Use This Tool
61
+
62
+ Direct model review is often best for a small, one off check. This tool is useful when
63
+ security review needs a repeatable harness around the model: scoped inputs, domain
64
+ guidance, review state, verification, fail loud behavior, structured output, and gates.
65
+
66
+ Use **Diff Review** for pull requests, release branches, and CI gates. It asks whether a
67
+ code change introduced a reportable security issue.
68
+
69
+ Use **Repository Review** for full repository audits, release reviews, high risk systems,
70
+ authorization boundaries, business invariants, and smart contracts. It asks whether a
71
+ repository was reviewed through a tracked worklist and which findings survived
72
+ verification.
73
+
74
+ For the detailed decision matrix, see
75
+ [`docs/direct-model-review-vs-diff-and-repository-review.md`](docs/direct-model-review-vs-diff-and-repository-review.md).
76
+
77
+ ## Install
78
+
79
+ ```bash
80
+ pip install cyberjury
81
+ cyberjury install-slash-command
82
+ ```
83
+
84
+ That is the whole setup. `pip install cyberjury` pulls everything a normal review needs, the
85
+ Anthropic and OpenAI backends and the Claude Code subscription transport, with no extras to
86
+ choose. `cyberjury install-slash-command` drops the `/cyberjury-review` command into both the
87
+ Claude Code and Codex command directories, so it works in either agent: run it on a repository
88
+ directory for a whole-repository review, or on a diff file or git range for a diff review.
89
+
90
+ ## Configure a Model Backend
91
+
92
+ Set a provider key, or run keyless on your Claude Code subscription with `--executor subscription`:
93
+
94
+ ```bash
95
+ export CYBERJURY_MODEL=claude-opus-4-8
96
+ export CYBERJURY_API_KEY=...
97
+ export CYBERJURY_API_BASE=... # optional gateway or proxy
98
+ export CYBERJURY_WIRE_API=chat # set responses for a GPT-5 reasoning model, see below
99
+ ```
100
+
101
+ An OpenAI GPT-5 reasoning model answers on the Responses API, not Chat Completions, so set
102
+ `CYBERJURY_WIRE_API=responses` or pass `--wire-api responses` for the base model, otherwise the
103
+ call comes back blank and the review fails loud. Chat is the default and fits the other models.
104
+
105
+ The CLI loads a `.env` from the working directory at startup, so a project can set its provider
106
+ config once instead of exporting it every session. A value already exported in the shell wins
107
+ over the file, and a missing file is fine. The auto-load is a CLI convenience, so importing the
108
+ library directly does not read `.env`.
109
+
110
+ Useful flags:
111
+
112
+ - `--provider anthropic|openai|litellm`
113
+ - `--model <model>`
114
+ - `--api-key <key>`
115
+ - `--api-base <url>`
116
+ - `--wire-api chat|responses`
117
+ - `--retries <n>`
118
+ - `--timeout <seconds>`
119
+
120
+ ### Cross-Model Review
121
+
122
+ A single-model run needs only the setup above. For stronger verification, both review paths name
123
+ three model roles, finder, challenger, and judge. The finder finds, the challenger refutes, the
124
+ judge confirms before a deletion. Each role defaults to the base `--model`. Put a different vendor
125
+ in any seat for cross-model review, where uncorrelated blind spots catch what one model misses, and
126
+ a deletion needs the judge to be a distinct model from the challenger so no lone skeptic drops a
127
+ real finding. With the judge not distinct, nothing is refuted, the recall-safe default.
128
+
129
+ Each role takes a full backend, the same five fields as the base, every one unset by default:
130
+ `CYBERJURY_<ROLE>_PROVIDER`, `_MODEL`, `_API_KEY`, `_API_BASE`, `_WIRE_API`, with `<ROLE>` one of
131
+ `FINDER`, `CHALLENGER`, `JUDGE`, and the matching `--<role>-provider`, `--<role>-model`,
132
+ `--<role>-api-key`, `--<role>-api-base`, `--<role>-wire-api` flags. An unset field inherits the
133
+ base, so override only the seat you want to change, and a role that switches vendor brings its own
134
+ key since the base key belongs to the base vendor. For example a Claude base finder challenged by
135
+ GPT and confirmed by Claude:
136
+
137
+ ```bash
138
+ export CYBERJURY_CHALLENGER_PROVIDER=openai
139
+ export CYBERJURY_CHALLENGER_MODEL=... # a GPT model, the skeptic
140
+ export CYBERJURY_CHALLENGER_API_KEY=...
141
+ export CYBERJURY_CHALLENGER_WIRE_API=responses # the GPT-5 reasoning models speak Responses
142
+ export CYBERJURY_JUDGE_MODEL=... # a Claude model, the confirmer, distinct from the challenger
143
+ ```
144
+
145
+ The same `CYBERJURY_FINDER_*` / `CYBERJURY_CHALLENGER_*` / `CYBERJURY_JUDGE_*` and the matching
146
+ `--finder-* / --challenger-* / --judge-*` flags work on both `review diff` and `review repository`.
147
+ Note that `review repository --run` finds with one model, the finder, and a seat that runs on the
148
+ subscription supplies its own review, so it ignores that seat's backend flags while the others
149
+ still apply.
150
+
151
+ ## Diff Review
152
+
153
+ Diff Review is the fast coded path. It audits a unified diff with either a standard
154
+ single model call or an adversarial Finder, Challenger, and Judge pass.
155
+
156
+ ```text
157
+ cyberjury review diff [--file <file> | --git-range <range>] [options]
158
+ ```
159
+
160
+ ```bash
161
+ # review a diff file
162
+ cyberjury review diff --file changes.diff
163
+
164
+ # review a git range
165
+ cyberjury review diff --repository /path/to/app --git-range origin/main...HEAD
166
+
167
+ # review stdin
168
+ git diff HEAD~1 | cyberjury review diff
169
+
170
+ # use adversarial mode for extra recall on subtle cross-file logic
171
+ cyberjury review diff --file changes.diff --mode adversarial
172
+
173
+ # emit SARIF and fail on HIGH or CRITICAL findings
174
+ cyberjury review diff --file changes.diff --format sarif --fail-on high
175
+
176
+ # review with no provider key, riding your Claude Code subscription
177
+ cyberjury review diff --file changes.diff --executor subscription
178
+
179
+ # carry fetched source provenance into the report, see Fetch Verified Source
180
+ cyberjury review diff --file changes.diff --source-meta target/cyberjury-source.json
181
+
182
+ # run adversarial mode with a keyless Claude finder and judge plus an OpenAI challenger on its own key
183
+ cyberjury review diff --file changes.diff --mode adversarial \
184
+ --challenger-provider openai --challenger-api-key "$OPENAI_API_KEY"
185
+ ```
186
+
187
+ Diff Review takes the same `--executor auto|api|subscription` as Repository Review, see Review
188
+ Strategy. The default `auto` calls the provider when a seat has a key and falls back to your
189
+ Claude Code subscription for a keyless Anthropic seat. Unlike the repository agent, the diff agent
190
+ answers from the diff in the prompt and reads no files.
191
+
192
+ `cyberjury review diff --dry-run` uses a mock provider and a built-in demo diff, so it needs
193
+ no API key.
194
+
195
+ ## Repository Review
196
+
197
+ Repository Review is the recall-first path for whole repositories. A whole codebase is too large
198
+ for one useful model call, so the tool creates a workspace, builds a unit worklist, and
199
+ reviews focused units instead of doing one shallow pass.
200
+
201
+ ```text
202
+ cyberjury review repository <repository> (--scaffold | --run | --finalize | --gate) [--invariants <file>] [options]
203
+ ```
204
+
205
+ ### From an Agent
206
+
207
+ In Claude Code or Codex, one command runs the whole review, scaffold, fan-out, finalize, and gate:
208
+
209
+ ```text
210
+ /cyberjury-review <target> [--coded] [--domain auto|web|evm] [--effort low|medium|high] [--invariants <file>] [--workspace <path>]
211
+ ```
212
+
213
+ `--coded` picks the engine and the model backend together. Without it, the default, a
214
+ repository is reviewed by the agent fan-out on your Claude Code subscription, so your `.env`
215
+ provider config is not used. With it, Cyberjury's own coded engine reviews the repository through `--run` on
216
+ `--executor api`, so your `.env` provider config is used throughout. The slash command
217
+ announces the choice on its first line, so which backend ran is never a guess. In the default
218
+ fan-out mode the agent maps the attack surface, fills the authorization model, runs one focused
219
+ sub-review per unit, records findings, and leaves deterministic post-processing to code. PoCs
220
+ run only against sandbox or dev environments, never production.
221
+
222
+ ### From the CLI
223
+
224
+ The slash command runs these four steps for you. Only the second, the find step, changes: `--run`
225
+ drives the coded engine below, or an agent fans out over the units, the default when the slash
226
+ command runs it. Scaffold, finalize, and gate are the same either way. Run them yourself for a
227
+ headless or CI review, or to drive the coded engine without an agent:
228
+
229
+ ```bash
230
+ cyberjury review repository /path/to/repository --scaffold # build the workspace and unit worklist
231
+ cyberjury review repository /path/to/repository --run # coded multi-pass review to convergence
232
+ cyberjury review repository /path/to/repository --finalize # dedup candidates, verify, write findings
233
+ cyberjury review repository /path/to/repository --gate # check coverage, non-zero until it is met
234
+ ```
235
+
236
+ `--run` reviews every unit each pass, cycles lenses until convergence, verifies inline, and writes
237
+ the confirmed `findings/`, so on the coded path `--finalize` is optional. See Review Strategy for
238
+ how each unit is reviewed. `--finalize` deduplicates and verifies the candidates an agent fan-out
239
+ proposed, the step the agent path needs, records refuted candidates in `_refuted.md` and PoC
240
+ reconciliation in `_pocs.md`, and writes the confirmed `findings/` and the ranked `findings.json`. `--gate` fails until the workspace has an enumerated
241
+ surface, reviewed units, and calibrated candidates. Add `--strict-coverage` to also fail when a
242
+ source file is owned by no unit, instead of noting it. Add `--poc` on finalize to write a runnable
243
+ PoC for each confirmed finding when the domain binds a PoC backend. Where the domain runs safely and
244
+ locally it also runs the PoC, such as the EVM Foundry reproducer, which compiles and runs the test
245
+ with no fork, no broadcast, and no key. A web PoC is written for a human to run against a sandbox or
246
+ dev host, never automatically, since it needs a live server and credentials. It is off by default
247
+ since it calls a model per finding, and for EVM also compiles and runs one. When the run toolchain
248
+ is absent the PoC is written but not run, with a note on how to run it by hand, rather than failing.
249
+ It only adds evidence, so a finding is kept whether or not its PoC reproduces.
250
+
251
+ ### The Workspace
252
+
253
+ Scaffold creates a private workspace holding:
254
+
255
+ ```text
256
+ inventory/ attack surface, authorization model, seeded entrypoints, severity rubric
257
+ units/ one review unit per candidate entrypoint
258
+ candidates/ agent proposals, one write-up per candidate finding
259
+ findings/ confirmed findings, written by --run or finalize
260
+ pocs/ runnable PoCs, when available
261
+ findings.json ranked machine-readable findings
262
+ METHODOLOGY.md full review process
263
+ _stack.md detected stack notes
264
+ _refuted.md refuted candidates and why
265
+ _pocs.md PoC reconciliation, planned versus delivered
266
+ ```
267
+
268
+ To seed intent invariants, the business rules only you know that a static read cannot infer, keep
269
+ an invariants file with the repository and pass `--invariants <path>` to scaffold. It imports the
270
+ file into `inventory/_invariants.md` and never overwrites an edited one, so clear the workspace
271
+ with `--fresh` to replace it. Write one rule per line as `only <who> may <operation> <asset>,
272
+ under <condition>`. Leave it out to seed nothing.
273
+
274
+ ### Review Strategy
275
+
276
+ A `--run` chooses how each unit is reviewed:
277
+
278
+ - `--executor auto` is the default. Each seat, the finder and the skeptic, calls the
279
+ provider when it has a reachable key and falls back to a headless `claude -p`
280
+ subscription agent for a keyless Anthropic seat, so a keyless run works with no provider
281
+ key. A keyless non-Anthropic seat, such as an OpenAI finder with no key, is a loud error,
282
+ it has no subscription to fall back to. This is what lets a Claude finder ride your
283
+ subscription while an OpenAI challenger uses its own key.
284
+ - `--executor api` makes one grounded model call per unit and requires a key, a missing key
285
+ is a loud startup error, the same point as auto. Facts ground that call in a tool-extracted
286
+ call graph, storage layout, and read and write sets when the domain binds a facts backend,
287
+ such as the EVM Slither backend, which is what gives a smart contract review its call
288
+ relationships and co-locates a cross-function path the file slices would otherwise split.
289
+ A domain with a backend, the EVM domain, grounds with facts by default, except at `--effort
290
+ low`, the cheap fast tier where the pass stays file-slice only. When the toolchain is absent
291
+ or the target does not compile the review degrades to file-slice review with a loud note
292
+ rather than failing. Pass `--no-facts` to force it off for a faster pass, or `--facts` to
293
+ force it on where it is not the default.
294
+ - `--executor subscription` always runs each unit and its verification as a headless
295
+ `claude -p` agent that reads and traces the files itself with read-only tools, using your
296
+ Claude Code access and no provider key. Use it when you want a tool-using agent rather
297
+ than a single grounded call even where a key is present.
298
+
299
+ The subscription backend keeps a Claude Agent SDK session alive across calls by default,
300
+ amortizing the Claude Code startup that a fresh `claude -p` per call would pay on a many-call
301
+ Repository Review run. The SDK ships in the base install. Set `CYBERJURY_CLAUDE_TRANSPORT=process`
302
+ for one `claude -p` per call. An unknown transport value fails at startup rather than silently
303
+ falling back.
304
+
305
+ `--effort low|medium|high` is the one depth dial, each level fixing three things at once:
306
+
307
+ | `--effort` | Shots per lens | Skeptics to drop a candidate | Facts default |
308
+ |:---|:---|:---|:---|
309
+ | `low` | 1 | 1 | Off |
310
+ | `medium` (default) | 2 | 1 | On |
311
+ | `high` | 3 | 2 | On |
312
+
313
+ `--min-lens-shots` and `--votes` override the shot and skeptic columns, and `--facts` or
314
+ `--no-facts` overrides the facts column.
315
+
316
+ On the subscription backend the concurrency within a pass defaults to 2 so a wide fan-out does not
317
+ trip the shared rate cap, and to 6 on an API key, override it with `--concurrency`.
318
+
319
+ Set a distinct `--judge-model`, the confirmer, from the challenger to enable cross-model
320
+ verification. The challenger refutes a finding and the judge must agree before it is dropped,
321
+ so a deletion needs two models. With the judge not distinct from the challenger, the verify
322
+ stage refutes nothing, the recall-safe default.
323
+
324
+ ## Data Boundary
325
+
326
+ The tool sends code-derived content to the model provider you configure, so know what
327
+ leaves the machine before reviewing a proprietary repository:
328
+
329
+ - Diff Review on the `api` row sends the unified diff under review. On the `subscription`
330
+ row it sends the diff in the `claude -p` prompt through your Claude Code account, and the
331
+ diff agent uses no file tools, so only the diff text leaves the machine, not local files.
332
+ - Under the default `--executor auto`, each seat follows the `api` row when it has a key
333
+ and the `subscription` row when it falls back to your Claude Code subscription, so what
334
+ leaves the machine is decided per seat by whether that seat has a key.
335
+ - Repository Review with `--executor api` sends bounded source snippets, the detected stack
336
+ notes, the vulnerability guidance, and the findings.
337
+ - Verification with `--executor api` sends the cited source file and the finding
338
+ details. On the `subscription` row, Claude Code receives the finding details and reads
339
+ the code itself through its read-only tools.
340
+ - A repository seat on the `subscription` row does not use the configured provider key. It runs
341
+ Claude Code with read-only file tools, and Claude Code may send prompts and the code it
342
+ reads through your Claude Code account, so the code does not stay local. The diff agent is
343
+ narrower, it reads no files and sees only the diff in the prompt.
344
+
345
+ A custom `--api-base` or a LiteLLM proxy becomes part of the trust boundary, so the data
346
+ above also reaches that gateway. Prefer the `CYBERJURY_API_KEY` environment variable over
347
+ `--api-key`, since a flag can leak through shell history and process listings. The review
348
+ workspace and the generated reports hold exploit paths, sensitive file locations, and
349
+ PoCs, so treat them as sensitive. The workspace is created private, mode `0700`.
350
+
351
+ ## Fetch Verified Source
352
+
353
+ Review a deployed contract by first pulling its verified source from a block explorer, then
354
+ running Repository Review on the local tree:
355
+
356
+ ```text
357
+ cyberjury fetch source --address <address> --out <dir> [options]
358
+ ```
359
+
360
+ ```bash
361
+ cyberjury fetch source --chain eth --address 0x... --out ./target
362
+ cyberjury review repository ./target --domain evm --run
363
+ ```
364
+
365
+ `fetch source` queries the Etherscan V2 API, which serves every supported chain from one
366
+ endpoint with one key, so a single `CYBERJURY_ETHERSCAN_API_KEY` covers `arbitrum`, `bsc`,
367
+ `eth`, and `polygon`, chosen with `--chain`. Pass the key with `--api-key` or that
368
+ environment variable.
369
+ It writes the reconstructed source tree and a `cyberjury-source.json` recording the chain,
370
+ address, compiler, and source URL, and it fails loud on an unverified or malformed response.
371
+ It never runs a review on its own. Point Diff Review at that metadata file with
372
+ `--source-meta` to carry the provenance into the report.
373
+
374
+ ## Supported Knowledge
375
+
376
+ The tool selects a review domain with `--domain`, `auto` by default. The `web` domain is
377
+ the default for application code. The `evm` domain reviews Solidity smart contracts for
378
+ classes such as reentrancy, access control, oracle manipulation, accounting precision, and
379
+ signature replay.
380
+
381
+ Current guide coverage in the web domain includes:
382
+
383
+ - Python: Django, Flask, FastAPI, Celery
384
+ - Go: Gin, Echo
385
+ - JavaScript and TypeScript: Express, NestJS
386
+ - Protocols: OAuth, OIDC, GraphQL, and MCP
387
+
388
+ The evm domain ships a Solidity guide and the smart contract vulnerability classes above.
389
+ Unguided stacks still work, but the agent relies more on general methodology and model
390
+ knowledge.
391
+
392
+ ## Findings
393
+
394
+ Every reportable finding should have:
395
+
396
+ - file and line
397
+ - severity
398
+ - category
399
+ - description
400
+ - exploit scenario
401
+ - recommendation
402
+ - confidence or verification status
403
+
404
+ The tool is intentionally scoped to real exploitable application security issues. It should
405
+ not report dependency CVEs, style notes, generic best practices, speculation, or risks that
406
+ only matter if production configuration leaks.
407
+
408
+ ## Model and Mode Guidance
409
+
410
+ Detection quality is dominated by model quality first, then mode.
411
+
412
+ - Use standard mode with a strong model by default.
413
+ - Use adversarial mode when you want extra recall on subtle cross-file logic.
414
+ - Do not use adversarial mode as a false-positive reducer. False positives are controlled
415
+ by the do-not-report guidance, deterministic filtering, and verification.
416
+
417
+ ## GitHub Actions
418
+
419
+ Use the example workflow:
420
+
421
+ ```bash
422
+ cp examples/cyberjury-pr-review.yml .github/workflows/cyberjury-pr-review.yml
423
+ ```
424
+
425
+ Add `CYBERJURY_API_KEY` as a repository secret. The workflow reviews the pull request diff,
426
+ uploads SARIF to code scanning, and fails on HIGH or CRITICAL findings.
427
+
428
+ ## Extend the Knowledge
429
+
430
+ Add security knowledge as markdown:
431
+
432
+ - Vulnerability class:
433
+ `cyberjury/domains/<domain>/knowledge/vulnerabilities/<id>.md`
434
+ - Language guide:
435
+ `cyberjury/domains/<domain>/knowledge/guides/languages/<language>.md`
436
+ - Framework guide:
437
+ `cyberjury/domains/<domain>/knowledge/guides/frameworks/<language>/<framework>.md`
438
+ - Protocol guide:
439
+ `cyberjury/domains/<domain>/knowledge/guides/protocols/<protocol>.md`
440
+
441
+ Keep frontmatter and detection signals data-driven. Avoid adding language, framework, or
442
+ vulnerability-specific detection logic to Python unless the engine itself needs a generic
443
+ capability.
444
+
445
+ ## Development
446
+
447
+ Run tests in a virtual environment:
448
+
449
+ ```bash
450
+ python -m venv .venv
451
+ . .venv/bin/activate
452
+ pip install -e ".[dev]"
453
+ pytest
454
+ ```