cyberai 1.0.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 (181) hide show
  1. cyberai-1.0.0/.env.example +6 -0
  2. cyberai-1.0.0/.github/RELEASE_NOTES.md +25 -0
  3. cyberai-1.0.0/.github/workflows/badge_update.md +6 -0
  4. cyberai-1.0.0/.github/workflows/ci.yml +109 -0
  5. cyberai-1.0.0/.github/workflows/nightly.yml +32 -0
  6. cyberai-1.0.0/.github/workflows/release.yml +52 -0
  7. cyberai-1.0.0/.gitignore +19 -0
  8. cyberai-1.0.0/CHANGELOG.md +135 -0
  9. cyberai-1.0.0/CONTRIBUTING.md +18 -0
  10. cyberai-1.0.0/LICENSE +21 -0
  11. cyberai-1.0.0/PKG-INFO +250 -0
  12. cyberai-1.0.0/README.md +206 -0
  13. cyberai-1.0.0/STANDOFF.md +581 -0
  14. cyberai-1.0.0/config.example.yml +14 -0
  15. cyberai-1.0.0/cyberai/__init__.py +0 -0
  16. cyberai-1.0.0/cyberai/__main__.py +146 -0
  17. cyberai-1.0.0/cyberai/agents/__init__.py +0 -0
  18. cyberai-1.0.0/cyberai/agents/exploit/__init__.py +28 -0
  19. cyberai-1.0.0/cyberai/agents/exploit/agent.py +332 -0
  20. cyberai-1.0.0/cyberai/agents/exploit/attack_metadata.py +187 -0
  21. cyberai-1.0.0/cyberai/agents/exploit/attack_path.py +40 -0
  22. cyberai-1.0.0/cyberai/agents/exploit/chain_builder.py +86 -0
  23. cyberai-1.0.0/cyberai/agents/exploit/cvss_analyzer.py +70 -0
  24. cyberai-1.0.0/cyberai/agents/exploit/nuclei_engine.py +170 -0
  25. cyberai-1.0.0/cyberai/agents/exploit/oob_workflow.py +171 -0
  26. cyberai-1.0.0/cyberai/agents/exploit/poc_mapper.py +78 -0
  27. cyberai-1.0.0/cyberai/agents/exploit/safety_validator.py +177 -0
  28. cyberai-1.0.0/cyberai/agents/exploit/searchsploit.py +133 -0
  29. cyberai-1.0.0/cyberai/agents/exploit/ssrf_workflow.py +113 -0
  30. cyberai-1.0.0/cyberai/agents/exploit/xxe_workflow.py +115 -0
  31. cyberai-1.0.0/cyberai/agents/intel/__init__.py +13 -0
  32. cyberai-1.0.0/cyberai/agents/intel/agent.py +192 -0
  33. cyberai-1.0.0/cyberai/agents/intel/cve_scorer.py +138 -0
  34. cyberai-1.0.0/cyberai/agents/intel/epss_client.py +79 -0
  35. cyberai-1.0.0/cyberai/agents/intel/nvd_client.py +199 -0
  36. cyberai-1.0.0/cyberai/agents/intel/risk_prioritizer.py +102 -0
  37. cyberai-1.0.0/cyberai/agents/intel/service_mapper.py +47 -0
  38. cyberai-1.0.0/cyberai/agents/intel/tls_cve_mapper.py +82 -0
  39. cyberai-1.0.0/cyberai/agents/recon/__init__.py +0 -0
  40. cyberai-1.0.0/cyberai/agents/recon/agent.py +111 -0
  41. cyberai-1.0.0/cyberai/agents/recon/async_agent.py +69 -0
  42. cyberai-1.0.0/cyberai/agents/recon/dns_tool.py +90 -0
  43. cyberai-1.0.0/cyberai/agents/recon/fingerprinter.py +128 -0
  44. cyberai-1.0.0/cyberai/agents/recon/nmap_tool.py +132 -0
  45. cyberai-1.0.0/cyberai/agents/recon/subdomain_enum.py +190 -0
  46. cyberai-1.0.0/cyberai/agents/recon/tls_tool.py +111 -0
  47. cyberai-1.0.0/cyberai/agents/report/__init__.py +0 -0
  48. cyberai-1.0.0/cyberai/agents/report/agent.py +167 -0
  49. cyberai-1.0.0/cyberai/agents/report/h1_exporter.py +42 -0
  50. cyberai-1.0.0/cyberai/agents/report/html_renderer.py +162 -0
  51. cyberai-1.0.0/cyberai/agents/report/json_exporter.py +65 -0
  52. cyberai-1.0.0/cyberai/agents/report/judge.py +161 -0
  53. cyberai-1.0.0/cyberai/agents/report/markdown_renderer.py +83 -0
  54. cyberai-1.0.0/cyberai/agents/report/templates/report.html +61 -0
  55. cyberai-1.0.0/cyberai/agents/web3/__init__.py +0 -0
  56. cyberai-1.0.0/cyberai/agents/web3/agent.py +99 -0
  57. cyberai-1.0.0/cyberai/agents/web3/etherscan.py +86 -0
  58. cyberai-1.0.0/cyberai/agents/web3/immunefi_severity.py +108 -0
  59. cyberai-1.0.0/cyberai/agents/web3/slither_tool.py +133 -0
  60. cyberai-1.0.0/cyberai/cli/__init__.py +0 -0
  61. cyberai-1.0.0/cyberai/cli/dry_run.py +58 -0
  62. cyberai-1.0.0/cyberai/cli/progress.py +80 -0
  63. cyberai-1.0.0/cyberai/cli/replay.py +96 -0
  64. cyberai-1.0.0/cyberai/cli/scan.py +98 -0
  65. cyberai-1.0.0/cyberai/cli/scope.py +233 -0
  66. cyberai-1.0.0/cyberai/core/__init__.py +0 -0
  67. cyberai-1.0.0/cyberai/core/async_base_agent.py +56 -0
  68. cyberai-1.0.0/cyberai/core/base_agent.py +189 -0
  69. cyberai-1.0.0/cyberai/core/cache.py +76 -0
  70. cyberai-1.0.0/cyberai/core/config.py +68 -0
  71. cyberai-1.0.0/cyberai/core/cost_tracker.py +123 -0
  72. cyberai-1.0.0/cyberai/core/decorators.py +81 -0
  73. cyberai-1.0.0/cyberai/core/knowledge_base.py +89 -0
  74. cyberai-1.0.0/cyberai/core/llm_client.py +542 -0
  75. cyberai-1.0.0/cyberai/core/logger.py +142 -0
  76. cyberai-1.0.0/cyberai/core/orchestrator.py +326 -0
  77. cyberai-1.0.0/cyberai/core/pipeline.py +85 -0
  78. cyberai-1.0.0/cyberai/core/pricing.py +98 -0
  79. cyberai-1.0.0/cyberai/core/prompts.py +121 -0
  80. cyberai-1.0.0/cyberai/core/rate_limiter.py +154 -0
  81. cyberai-1.0.0/cyberai/core/recovery.py +94 -0
  82. cyberai-1.0.0/cyberai/core/safety.py +74 -0
  83. cyberai-1.0.0/cyberai/core/scan_session.py +347 -0
  84. cyberai-1.0.0/cyberai/core/security/__init__.py +0 -0
  85. cyberai-1.0.0/cyberai/core/security/injection_detector.py +101 -0
  86. cyberai-1.0.0/cyberai/core/security/input_sanitizer.py +110 -0
  87. cyberai-1.0.0/cyberai/core/security/llm_guard.py +71 -0
  88. cyberai-1.0.0/cyberai/core/session.py +125 -0
  89. cyberai-1.0.0/cyberai/core/session_signing.py +80 -0
  90. cyberai-1.0.0/cyberai/core/timeout.py +64 -0
  91. cyberai-1.0.0/cyberai/core/types.py +136 -0
  92. cyberai-1.0.0/cyberai/integrations/__init__.py +18 -0
  93. cyberai-1.0.0/cyberai/integrations/oob_payloads.py +238 -0
  94. cyberai-1.0.0/cyberai/integrations/phantom_grid.py +167 -0
  95. cyberai-1.0.0/cyberai/integrations/phantom_grid_poller.py +57 -0
  96. cyberai-1.0.0/cyberai/integrations/reality_probe_client.py +78 -0
  97. cyberai-1.0.0/cyberai/mcp/__init__.py +0 -0
  98. cyberai-1.0.0/cyberai/mcp/server.py +80 -0
  99. cyberai-1.0.0/cyberai/mcp/tools.py +170 -0
  100. cyberai-1.0.0/cyberai/utils/__init__.py +0 -0
  101. cyberai-1.0.0/cyberai/utils/backoff.py +84 -0
  102. cyberai-1.0.0/cyberai/version.py +3 -0
  103. cyberai-1.0.0/cyberai/web/__init__.py +0 -0
  104. cyberai-1.0.0/cyberai/web/app.py +55 -0
  105. cyberai-1.0.0/cyberai/web/routes/__init__.py +0 -0
  106. cyberai-1.0.0/cyberai/web/routes/report.py +65 -0
  107. cyberai-1.0.0/cyberai/web/routes/session.py +102 -0
  108. cyberai-1.0.0/cyberai/web/templates/dashboard.html +104 -0
  109. cyberai-1.0.0/docs/api/agents.md +100 -0
  110. cyberai-1.0.0/docs/architecture/known-issues.md +57 -0
  111. cyberai-1.0.0/docs/benchmarks.md +35 -0
  112. cyberai-1.0.0/docs/exploit/oob-exploitation-workflow.md +88 -0
  113. cyberai-1.0.0/docs/integrations/phantom-stack.md +29 -0
  114. cyberai-1.0.0/docs/journal/week-1.md +19 -0
  115. cyberai-1.0.0/docs/journal/week-2-notes.md +71 -0
  116. cyberai-1.0.0/docs/journal/week-3-notes.md +142 -0
  117. cyberai-1.0.0/docs/journal/week-3.md +37 -0
  118. cyberai-1.0.0/docs/journal/week-4-notes.md +176 -0
  119. cyberai-1.0.0/docs/journal/week-4.md +52 -0
  120. cyberai-1.0.0/docs/mcp/integration.md +99 -0
  121. cyberai-1.0.0/docs/security/adversarial-robustness.md +41 -0
  122. cyberai-1.0.0/docs/setup/nvd-apikey.md +32 -0
  123. cyberai-1.0.0/docs/usage/examples.md +25 -0
  124. cyberai-1.0.0/docs/web3/web3-audit.md +81 -0
  125. cyberai-1.0.0/main.py +4 -0
  126. cyberai-1.0.0/pyproject.toml +81 -0
  127. cyberai-1.0.0/pytest.ini +12 -0
  128. cyberai-1.0.0/requirements.txt +15 -0
  129. cyberai-1.0.0/tests/benchmarks/__init__.py +0 -0
  130. cyberai-1.0.0/tests/benchmarks/test_recon_speed.py +80 -0
  131. cyberai-1.0.0/tests/conftest.py +140 -0
  132. cyberai-1.0.0/tests/fixtures/dao_reentrant.sol +24 -0
  133. cyberai-1.0.0/tests/fixtures/epss_log4shell.json +29 -0
  134. cyberai-1.0.0/tests/integration/__init__.py +0 -0
  135. cyberai-1.0.0/tests/integration/test_async_pipeline.py +217 -0
  136. cyberai-1.0.0/tests/integration/test_cli_smoke.py +71 -0
  137. cyberai-1.0.0/tests/integration/test_full_pipeline.py +60 -0
  138. cyberai-1.0.0/tests/integration/test_injection_defense.py +72 -0
  139. cyberai-1.0.0/tests/integration/test_oob_ssrf.py +145 -0
  140. cyberai-1.0.0/tests/integration/test_pipeline.py +76 -0
  141. cyberai-1.0.0/tests/integration/test_real_intel.py +65 -0
  142. cyberai-1.0.0/tests/integration/test_real_recon.py +36 -0
  143. cyberai-1.0.0/tests/integration/test_reality_probe.py +97 -0
  144. cyberai-1.0.0/tests/integration/test_recon_intel_pipeline.py +64 -0
  145. cyberai-1.0.0/tests/integration/test_report_e2e.py +60 -0
  146. cyberai-1.0.0/tests/integration/test_web3.py +99 -0
  147. cyberai-1.0.0/tests/unit/test_attack_metadata.py +80 -0
  148. cyberai-1.0.0/tests/unit/test_base_agent.py +133 -0
  149. cyberai-1.0.0/tests/unit/test_budget.py +76 -0
  150. cyberai-1.0.0/tests/unit/test_cache.py +71 -0
  151. cyberai-1.0.0/tests/unit/test_cost_tracker.py +64 -0
  152. cyberai-1.0.0/tests/unit/test_cve_scorer.py +104 -0
  153. cyberai-1.0.0/tests/unit/test_epss.py +121 -0
  154. cyberai-1.0.0/tests/unit/test_exploit.py +14 -0
  155. cyberai-1.0.0/tests/unit/test_exploit_safety.py +73 -0
  156. cyberai-1.0.0/tests/unit/test_finding_model.py +98 -0
  157. cyberai-1.0.0/tests/unit/test_html_renderer.py +116 -0
  158. cyberai-1.0.0/tests/unit/test_intel.py +25 -0
  159. cyberai-1.0.0/tests/unit/test_intel_v2.py +120 -0
  160. cyberai-1.0.0/tests/unit/test_judge.py +179 -0
  161. cyberai-1.0.0/tests/unit/test_mcp.py +90 -0
  162. cyberai-1.0.0/tests/unit/test_nmap_tool.py +101 -0
  163. cyberai-1.0.0/tests/unit/test_nuclei.py +244 -0
  164. cyberai-1.0.0/tests/unit/test_orchestrator.py +95 -0
  165. cyberai-1.0.0/tests/unit/test_orchestrator_config.py +76 -0
  166. cyberai-1.0.0/tests/unit/test_phantom_grid.py +122 -0
  167. cyberai-1.0.0/tests/unit/test_pricing.py +147 -0
  168. cyberai-1.0.0/tests/unit/test_prompt_caching.py +160 -0
  169. cyberai-1.0.0/tests/unit/test_rate_limiter.py +64 -0
  170. cyberai-1.0.0/tests/unit/test_recon.py +33 -0
  171. cyberai-1.0.0/tests/unit/test_report.py +49 -0
  172. cyberai-1.0.0/tests/unit/test_risk_prioritizer.py +80 -0
  173. cyberai-1.0.0/tests/unit/test_safety_validator.py +71 -0
  174. cyberai-1.0.0/tests/unit/test_scan_session.py +93 -0
  175. cyberai-1.0.0/tests/unit/test_scope_matching.py +187 -0
  176. cyberai-1.0.0/tests/unit/test_security.py +100 -0
  177. cyberai-1.0.0/tests/unit/test_session_shim.py +64 -0
  178. cyberai-1.0.0/tests/unit/test_structured_report.py +194 -0
  179. cyberai-1.0.0/tests/unit/test_subdomain_enum.py +83 -0
  180. cyberai-1.0.0/tests/unit/test_tool_calling.py +198 -0
  181. cyberai-1.0.0/tests/unit/test_web_api.py +95 -0
@@ -0,0 +1,6 @@
1
+ OPENAI_API_KEY=sk-...
2
+ ANTHROPIC_API_KEY=sk-ant-...
3
+ PHANTOM_GRID_KEY=your-grid-key
4
+ CYBERAI_LLM_PROVIDER=openai
5
+ CYBERAI_MODEL=gpt-4o
6
+ NVD_API_KEY=
@@ -0,0 +1,25 @@
1
+ # CyberAI v1.0.0
2
+
3
+ First stable release of CyberAI — AI-native multi-agent pentest platform.
4
+
5
+ ## Highlights
6
+
7
+ - Full async pipeline: recon → intel → exploit → report
8
+ - phantom stack integration: phantom-grid + phantom-intel + reality-probe
9
+ - Safety-first: scope validation, input sanitization, trust boundaries
10
+ - REST API + HTML dashboard
11
+ - CLI with --dry-run, --scope, --output
12
+ - 160+ tests, Python 3.11/3.12, CI green
13
+
14
+ ## Quick Start
15
+
16
+ ```bash
17
+ pip install -r requirements.txt
18
+ cyberai scan 10.10.10.1 --scope 10.10.10.0/24 --dry-run
19
+ ```
20
+
21
+ ## Links
22
+
23
+ - Docs: docs/
24
+ - API Reference: docs/api/agents.md
25
+ - Contributing: CONTRIBUTING.md
@@ -0,0 +1,6 @@
1
+ ## CI Badges — add these to README.md
2
+
3
+ ![CI](https://github.com/evkir/CyberAI/actions/workflows/ci.yml/badge.svg)
4
+ ![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue)
5
+ ![License](https://img.shields.io/badge/license-MIT-green)
6
+ ![Status](https://img.shields.io/badge/status-active--development-orange)
@@ -0,0 +1,109 @@
1
+ name: CyberAI CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, dev ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+ name: Run Tests
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ python-version: ["3.11", "3.12"]
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+
27
+ - name: Cache pip dependencies
28
+ uses: actions/cache@v4
29
+ with:
30
+ path: ~/.cache/pip
31
+ key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
32
+ restore-keys: |
33
+ ${{ runner.os }}-pip-
34
+
35
+ - name: Install dependencies
36
+ run: |
37
+ python -m pip install --upgrade pip
38
+ pip install -r requirements.txt
39
+ pip install pytest pytest-cov
40
+ pip install -e .
41
+
42
+ - name: Run unit tests
43
+ run: |
44
+ pytest tests/unit/ -v --tb=short -m "not slow"
45
+
46
+ - name: Run integration tests (excluding smoke)
47
+ run: |
48
+ pytest tests/integration/ -v --tb=short -m "not smoke and not slow"
49
+
50
+ - name: Generate coverage report
51
+ run: |
52
+ pytest tests/ --cov=cyberai --cov-report=term-missing --cov-report=xml -m "not smoke and not slow"
53
+
54
+ - name: Upload coverage to Codecov
55
+ uses: codecov/codecov-action@v4
56
+ with:
57
+ file: ./coverage.xml
58
+ fail_ci_if_error: false
59
+
60
+ smoke:
61
+ name: Smoke Tests (end-to-end)
62
+ runs-on: ubuntu-latest
63
+
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+ - uses: actions/setup-python@v5
67
+ with:
68
+ python-version: "3.12"
69
+ - name: Install dependencies
70
+ run: |
71
+ python -m pip install --upgrade pip
72
+ pip install -r requirements.txt
73
+ pip install pytest
74
+ pip install -e .
75
+ - name: Run smoke tests
76
+ run: |
77
+ pytest tests/ -v --tb=short -m smoke
78
+
79
+ lint:
80
+ name: Lint & Format
81
+ runs-on: ubuntu-latest
82
+
83
+ steps:
84
+ - uses: actions/checkout@v4
85
+ - uses: actions/setup-python@v5
86
+ with:
87
+ python-version: "3.11"
88
+ - name: Install ruff
89
+ run: pip install "ruff>=0.6.0,<1"
90
+ - name: Run ruff linter
91
+ run: ruff check cyberai/
92
+ - name: Check formatting
93
+ run: ruff format --check cyberai/ tests/
94
+
95
+ typecheck:
96
+ name: Type check (strict)
97
+ runs-on: ubuntu-latest
98
+
99
+ steps:
100
+ - uses: actions/checkout@v4
101
+ - uses: actions/setup-python@v5
102
+ with:
103
+ python-version: "3.11"
104
+ - name: Install deps
105
+ run: |
106
+ python -m pip install --upgrade pip
107
+ pip install -e ".[dev]"
108
+ - name: Run mypy --strict
109
+ run: mypy
@@ -0,0 +1,32 @@
1
+ name: Nightly Slow Tests
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 2 * * *' # 02:00 UTC daily
6
+ workflow_dispatch: # allow manual trigger from Actions UI
7
+
8
+ jobs:
9
+ slow:
10
+ name: Real-world e2e (slow + network)
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.12"
19
+
20
+ - name: Install nmap
21
+ run: sudo apt-get update && sudo apt-get install -y nmap
22
+
23
+ - name: Install Python deps
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ pip install -e ".[test]"
27
+
28
+ - name: Run slow tests
29
+ env:
30
+ NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
31
+ run: |
32
+ pytest tests/ -v --tb=short -m slow
@@ -0,0 +1,52 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build:
10
+ name: Build distribution
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.11"
21
+
22
+ - name: Install build backend
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install build
26
+
27
+ - name: Build sdist and wheel
28
+ run: python -m build
29
+
30
+ - name: Upload distribution artifacts
31
+ uses: actions/upload-artifact@v4
32
+ with:
33
+ name: dist
34
+ path: dist/
35
+
36
+ publish:
37
+ name: Publish to PyPI
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+ environment: pypi
41
+ permissions:
42
+ id-token: write
43
+
44
+ steps:
45
+ - name: Download distribution artifacts
46
+ uses: actions/download-artifact@v4
47
+ with:
48
+ name: dist
49
+ path: dist/
50
+
51
+ - name: Publish to PyPI (trusted publishing)
52
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,19 @@
1
+ venv/
2
+ __pycache__/
3
+ *.pyc
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .env
8
+ *.log
9
+ reports/output/
10
+ .DS_Store
11
+ .idea/
12
+ config.yml
13
+ *.json.bak
14
+ .pytest_cache/
15
+ htmlcov/
16
+
17
+ # audit logs from scan runs
18
+ reports/*.jsonl
19
+ reports/
@@ -0,0 +1,135 @@
1
+ # Changelog
2
+
3
+ All notable changes to CyberAI are documented here.
4
+
5
+ ## [1.0.0] - 2026-06-20
6
+ ### Production Release — STANDOFF complete
7
+ The 30-day STANDOFF is done: a non-working skeleton is now a production-ready
8
+ AI-native multi-agent pentest platform. CLI, web dashboard and MCP server all
9
+ operational; ~120 commits across five phases. This release tags the cumulative
10
+ result of weeks 1-4 plus the polish sprint.
11
+
12
+ ### Highlights by phase
13
+ - **Week 1 — Reanimation:** unified `ScanSession`, `BaseAgent` contract,
14
+ rewritten orchestrator, all 4 agents migrated, end-to-end `--dry-run`
15
+ pipeline with smoke coverage.
16
+ - **Week 2 — Hardening:** Pydantic result schemas, prompt-injection defense at
17
+ phase boundaries, command-injection-safe nmap with caching, EPSS enrichment,
18
+ NVD API key + rate limiting, datetime/pyproject modernization, real e2e tests.
19
+ - **Week 3 — Acceleration:** async pipeline (`AsyncOrchestrator`), cost tracking
20
+ with budget caps, Anthropic prompt caching, native LLM tool calling,
21
+ structured outputs, SQLite audit log + session replay.
22
+ - **Week 4 — Differentiation:** OOB-driven exploitation (phantom-grid v2.0),
23
+ Nuclei exploit engine, Web3 audit track (Slither + Immunefi severity),
24
+ MCP server, LLM-as-Judge report validation, bug-bounty scope import,
25
+ FastAPI dashboard with SSE live progress.
26
+ - **Polish:** full documentation sprint (README, agent API reference, OOB and
27
+ Web3 workflow guides), PyPI trusted publishing on tag.
28
+
29
+ ### Added
30
+ - `release.yml` workflow: PyPI trusted publishing triggered on `v*` tags.
31
+
32
+ ### Changed
33
+ - Version bumped to 1.0.0 — first stable release.
34
+
35
+ ## [0.5.0] - 2026-06-18
36
+ ### Differentiated Platform — Week 4
37
+ Week 4 gives CyberAI its unique edge: out-of-band-driven exploitation, a
38
+ Web3 audit track, an MCP server, report self-validation, bug-bounty scope
39
+ import, and a web dashboard.
40
+
41
+ ### Added
42
+ - OOB-driven exploitation: phantom-grid v2.0 client (token-flow), payload
43
+ library v2 (7 categories), `OOBWorkflow` + `ExploitAgentOOB` correlating
44
+ injected payloads against live callbacks.
45
+ - Nuclei exploit engine: subprocess wrapper with JSONL parsing, searchsploit
46
+ integration (graceful), CVE→OOB heuristic for JNDI/SSRF templates.
47
+ - Web3 track: standalone `SmartContractAgent`, Slither wrapper, Immunefi
48
+ severity classifier (per-check table + impact×confidence fallback).
49
+ - MCP server: official `mcp` SDK, recon + intel tools exposed as MCP tools
50
+ with JSON Schema and graceful dispatch (Claude Desktop / Cursor docs).
51
+ - LLM-as-Judge: `judge_report` cross-checks report claims against KB
52
+ evidence, `JudgeVerdict`, feedback-driven retry, per-finding confidence.
53
+ - Bug-bounty scope import: HackerOne / Bugcrowd JSON → in/out scope with
54
+ exclusion-aware matching (`!host` overrides allow-wildcards).
55
+ - Web dashboard: FastAPI backend reading sessions from disk, SSE live phase
56
+ progress, single-file htmx + alpinejs UI (no build step).
57
+
58
+ ### Changed
59
+ - Web backend migrated from dead Flask stubs to FastAPI; sessions are now
60
+ read from disk (single source of truth shared with `cyberai replay`).
61
+
62
+ ## [0.4.0] - 2026-06-12
63
+
64
+ ### Accelerated & Observable — Week 3
65
+
66
+ Week 3 turns the working pipeline into a fast, cost-aware and auditable one.
67
+
68
+ ### Added
69
+ - Async pipeline: `AsyncOrchestrator`, async DNS / subdomain enum, batched
70
+ async CVE lookups with a sync-vs-async no-regression benchmark gate.
71
+ - Cost tracking: `CostTracker` + `TokenUsage`, per-model pricing, CLI cost
72
+ summary, `BudgetExceeded` hard cap via `max_cost_usd`.
73
+ - Anthropic prompt caching (`cache_control`) with cache-aware pricing.
74
+ - Native LLM tool calling: Tool→OpenAI/Anthropic spec converters, `call_tools`
75
+ returning structured `LLMResponse`, provider-aware tool-result threading.
76
+ - Structured outputs: `structured_call` (OpenAI `json_schema` / Anthropic
77
+ forced tool), Pydantic `ReportSection`, HackerOne-compatible export.
78
+ - Observability: SQLite-backed audit log, full session export/import
79
+ (`to_json` / `from_json`), and `cyberai replay <session_id>`.
80
+
81
+ ## [0.3.0] - 2026-06-02
82
+
83
+ ### Hardening — Week 2 complete
84
+
85
+ Type safety and real-world integration. Agents now produce typed
86
+ pydantic models, the pipeline defends against prompt injection at phase
87
+ boundaries, and CVE prioritization is enriched with live exploit-in-the-
88
+ wild data from EPSS.
89
+
90
+ ### Added
91
+ - Pydantic schemas for Recon/Intel/Exploit results (`core/types.py`).
92
+ - Prompt-injection detector at phase boundaries (33 patterns, severity
93
+ classification, banner sanitization with UNTRUSTED markers).
94
+ - nmap flag whitelist and target sanitization; FileCache (1h TTL) for
95
+ successful scans.
96
+ - EPSS client (api.first.org) with per-CVE 24h cache; CVE scorer
97
+ rebalanced (EPSS weight 0.10 → 0.25, non-linear boost above 0.5).
98
+ - NVD API key support: header-based auth, 50 req/30s when present,
99
+ exponential backoff on 429/503.
100
+ - Unified rate limiter with per-API presets (NVD, EPSS, OpenAI,
101
+ Anthropic, phantom-grid).
102
+ - Real e2e tests against scanme.nmap.org and the NVD API, gated by
103
+ `@pytest.mark.slow` and run nightly only.
104
+ - `pyproject.toml` (PEP 621, hatchling backend) replaces `setup.py`.
105
+ - Upper-bound pins on all 13 runtime dependencies.
106
+ - `ruff format --check` and `mypy --strict` (initial scope:
107
+ `cyberai/core/types.py`) added to CI.
108
+
109
+ ### Changed
110
+ - Minimum Python bumped 3.10 → 3.11.
111
+ - `datetime.utcnow()` replaced with timezone-aware `datetime.now(tz)`
112
+ throughout the codebase.
113
+
114
+ ### Fixed
115
+ - Dead `nmap_wrapper` removed; flag injection vector closed.
116
+
117
+ ## [0.2.0] - 2026-05-25
118
+
119
+ ### Reanimation — Week 1 complete
120
+
121
+ Skeleton-to-working pipeline. CyberAI runs end-to-end: `cyberai scan
122
+ <target> --dry-run` walks all 4 phases and completes cleanly.
123
+
124
+ ### Added
125
+ - Unified `ScanSession` state object shared across all components.
126
+ - `BaseAgent` contract — consistent agent lifecycle and API.
127
+ - End-to-end smoke tests for the `scan` CLI covering all 4 phases.
128
+
129
+ ### Changed
130
+ - Orchestrator rewritten against the new agent contract.
131
+ - All 4 agents (recon, intel, exploit, report) migrated to `BaseAgent`.
132
+ - `--dry-run` walks the full pipeline with no network calls or API key.
133
+
134
+ ### Fixed
135
+ - All 8 known issues resolved (KI-1 through KI-8).
@@ -0,0 +1,18 @@
1
+ # Contributing to CyberAI
2
+
3
+ ## Setup
4
+ git clone https://github.com/evkir/CyberAI
5
+ cd CyberAI && pip install -r requirements.txt
6
+
7
+ ## Tests
8
+ pytest tests/unit/ -v
9
+ pytest tests/integration/ -v
10
+
11
+ ## Lint
12
+ ruff check cyberai/ --fix
13
+
14
+ ## Commits
15
+ feat(scope): new feature
16
+ fix(scope): bug fix
17
+ docs: documentation
18
+ test(scope): tests
cyberai-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Evgeny Kiriyak (evkir)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
cyberai-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,250 @@
1
+ Metadata-Version: 2.4
2
+ Name: cyberai
3
+ Version: 1.0.0
4
+ Summary: CyberAI — AI-native multi-agent pentest platform
5
+ Project-URL: Homepage, https://github.com/evkir/CyberAI
6
+ Project-URL: Repository, https://github.com/evkir/CyberAI
7
+ Project-URL: Issues, https://github.com/evkir/CyberAI/issues
8
+ Author: evkir
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai,multi-agent,offensive-security,pentest,security
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Information Technology
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Security
19
+ Requires-Python: >=3.11
20
+ Requires-Dist: anthropic<1,>=0.28.0
21
+ Requires-Dist: click<9,>=8.1.7
22
+ Requires-Dist: colorama<1,>=0.4.6
23
+ Requires-Dist: dnspython<3,>=2.6.1
24
+ Requires-Dist: fastapi<1,>=0.110
25
+ Requires-Dist: httpx<1,>=0.27.0
26
+ Requires-Dist: jinja2<4,>=3.1.2
27
+ Requires-Dist: mcp<2,>=1.0
28
+ Requires-Dist: networkx<4,>=3.2.1
29
+ Requires-Dist: openai<3,>=2.0
30
+ Requires-Dist: pydantic<3,>=2.7.0
31
+ Requires-Dist: python-dotenv<2,>=1.0.0
32
+ Requires-Dist: python-whois<1,>=0.9.4
33
+ Requires-Dist: requests<3,>=2.31.0
34
+ Requires-Dist: rich<14,>=13.7.0
35
+ Requires-Dist: uvicorn<1,>=0.29
36
+ Provides-Extra: dev
37
+ Requires-Dist: mypy>=1.10.0; extra == 'dev'
38
+ Requires-Dist: ruff>=0.6.0; extra == 'dev'
39
+ Provides-Extra: test
40
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'test'
41
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'test'
42
+ Requires-Dist: pytest>=7.4.3; extra == 'test'
43
+ Description-Content-Type: text/markdown
44
+
45
+ <div align="center">
46
+
47
+ ![CI](https://github.com/evkir/CyberAI/actions/workflows/ci.yml/badge.svg)
48
+ ![Python](https://img.shields.io/badge/python-3.11%2B-blue)
49
+ ![License](https://img.shields.io/badge/license-MIT-green)
50
+ ![Status](https://img.shields.io/badge/status-v0.5.0-orange)
51
+ ![LLM](https://img.shields.io/badge/LLM-OpenAI%20%7C%20Anthropic-blueviolet)
52
+
53
+ # 🤖 CyberAI
54
+
55
+ **OOB-driven, agent-trust-aware AI pentest platform**
56
+
57
+ > Built by someone who red-teams AI, not just with it.
58
+
59
+ </div>
60
+
61
+ ---
62
+
63
+ ## What is CyberAI?
64
+
65
+ CyberAI is a multi-agent orchestration layer for offensive security. Five
66
+ specialized agents — **Recon, Intel, Exploit, Report, Web3** — run a typed,
67
+ auditable pipeline that turns a target into actionable attack paths and a
68
+ validated report.
69
+
70
+ Two things set it apart from "LLM wrapper over nmap":
71
+
72
+ - **OOB-driven exploitation.** Blind vulns (SSRF, XXE, blind injection) are
73
+ confirmed through out-of-band callbacks captured by
74
+ [phantom-grid](https://github.com/evkir/phantom-grid), not guessed from
75
+ response diffs.
76
+ - **Agent-trust-aware design.** Every banner and tool output is treated as
77
+ untrusted input: sanitized, injection-scanned, and parsed before it ever
78
+ reaches the LLM context. Adversarial thinking is a design input, not a
79
+ disclaimer.
80
+
81
+ Reach beyond the network: the **Web3 agent** runs Slither static analysis and
82
+ maps detectors to Immunefi severity tiers for smart-contract audits.
83
+
84
+ ---
85
+
86
+ ## Architecture +------------------+ target -----------> | Orchestrator | typed pipeline, dry-run, budget
87
+
88
+ +--------+---------+ injection-scan at phase boundaries
89
+
90
+ |
91
+
92
+ +-----------+----------+-----------+------------+
93
+
94
+ v v v v v
95
+
96
+ +------+ +------+ +--------+ +--------+ +------+
97
+
98
+ |Recon |-->|Intel |-->|Exploit |->|Report | | Web3 | (standalone)
99
+
100
+ +------+ +------+ +---+----+ +--------+ +--+---+
101
+
102
+ DNS NVD/CVE OOB | PoC judge | Slither
103
+
104
+ nmap EPSS nuclei H1-export | Immunefi
105
+
106
+ subdom prioritize | | severity
107
+
108
+ v
109
+
110
+ +-------------+
111
+
112
+ | phantom-grid| OOB callback capture
113
+
114
+ +-------------+
115
+ Observability: SQLite audit log . session export/import . cyberai replay
116
+
117
+ Interfaces: CLI . FastAPI dashboard (SSE) . MCP server (Claude Desktop) ### Agents
118
+
119
+ | Agent | Input | Output | Key tools |
120
+ |-------|-------|--------|-----------|
121
+ | **Recon** | target | open ports, DNS, WHOIS, subdomains | nmap (flag-whitelisted), async DNS, subdomain enum |
122
+ | **Intel** | recon kb | ranked CVEs | NVD client, EPSS enrichment, risk prioritizer |
123
+ | **Exploit** | intel kb | attack paths, OOB findings | nuclei, searchsploit, OOB/SSRF/XXE workflows |
124
+ | **Report** | session kb | structured Markdown / H1 export | LLM summary + LLM-as-judge validation |
125
+ | **Web3** | .sol path / address | severity-tiered findings | Slither, Etherscan, Immunefi classifier |
126
+
127
+ ---
128
+
129
+ ## Security design
130
+
131
+ - **Agent trust boundaries** — each agent runs with minimal permissions.
132
+ - **Untrusted input handling** — banners sanitized, length-capped, marked
133
+ `UNTRUSTED` before LLM context.
134
+ - **Prompt-injection detection** — 33-pattern detector at every phase boundary;
135
+ hits become MEDIUM findings, visible in the report.
136
+ - **Scope enforcement** — wildcard + `!`-exclusion matching honors HackerOne /
137
+ Bugcrowd briefs (`cyberai scope import`).
138
+ - **Audit trail** — every agent action logged (JSONL or SQLite) with full
139
+ inputs/outputs; sessions are replayable.
140
+
141
+ ---
142
+
143
+ ## Quick start
144
+
145
+ ```bash
146
+ git clone https://github.com/evkir/CyberAI.git
147
+ cd CyberAI
148
+ pip install -e .
149
+ ```
150
+
151
+ ```bash
152
+ cp config.example.yml config.yml
153
+ cp .env.example .env
154
+ # Edit .env — add OPENAI_API_KEY or ANTHROPIC_API_KEY (not needed for --dry-run)
155
+ ```
156
+
157
+ ```bash
158
+ # Dry-run: walks all 4 phases, no network, no API key
159
+ python -m cyberai scan example.com --dry-run
160
+
161
+ # Real scan, scope-restricted
162
+ python -m cyberai scan target.htb --scope '*.target.htb'
163
+
164
+ # Replay a saved session deterministically
165
+ python -m cyberai replay <session_id>
166
+
167
+ # Import a bug-bounty scope
168
+ python -m cyberai scope import h1 --program acme
169
+
170
+ # Status / config
171
+ python -m cyberai status
172
+ ```
173
+
174
+ ### Web dashboard
175
+
176
+ ```bash
177
+ uvicorn cyberai.web.app:app --reload
178
+ # http://127.0.0.1:8000 — session list, live SSE progress, report view
179
+ ```
180
+
181
+ ### MCP server (Claude Desktop / Cursor)
182
+
183
+ ```bash
184
+ python -m cyberai.mcp.server
185
+ ```
186
+
187
+ Exposes recon/intel tools (`nmap_scan`, `dns_enum`, `cve_search`,
188
+ `epss_score`, …) over the Model Context Protocol. See
189
+ [docs/mcp/integration.md](docs/mcp/integration.md).
190
+
191
+ ---
192
+
193
+ ## Configuration
194
+
195
+ ```yaml
196
+ # config.yml
197
+ llm:
198
+ provider: openai # openai | anthropic
199
+ model: gpt-4o
200
+ max_tokens: 4096
201
+ temperature: 0.2
202
+
203
+ phantom:
204
+ grid_url: http://127.0.0.1:9090
205
+
206
+ output_dir: reports/
207
+ max_cost_usd: 0.0 # 0 = disabled; set to enforce a budget
208
+ ```
209
+
210
+ Optional feature flags (default off, no-regression):
211
+ `use_native_tools`, `use_nuclei`, `use_llm_summary`, `use_judge`.
212
+
213
+ ---
214
+
215
+ ## Documentation
216
+
217
+ | Doc | What |
218
+ |-----|------|
219
+ | [docs/api/agents.md](docs/api/agents.md) | Agent API reference |
220
+ | [docs/exploit/oob-exploitation-workflow.md](docs/exploit/oob-exploitation-workflow.md) | OOB / SSRF walkthrough |
221
+ | [docs/web3/web3-audit.md](docs/web3/web3-audit.md) | Smart-contract audit for Immunefi |
222
+ | [docs/mcp/integration.md](docs/mcp/integration.md) | MCP server setup |
223
+
224
+ ---
225
+
226
+ ## Related tools
227
+
228
+ | Tool | Role |
229
+ |------|------|
230
+ | [phantom-grid](https://github.com/evkir/phantom-grid) | OOB interaction capture |
231
+ | [phantom-intel](https://github.com/evkir/phantom-intel) | CVE intelligence feed |
232
+ | [reality-probe](https://github.com/evkir/reality-probe) | TLS analysis & config auditing |
233
+
234
+ ---
235
+
236
+ ## Requirements
237
+
238
+ - Python 3.11+
239
+ - OpenAI **or** Anthropic API key (not required for `--dry-run`)
240
+ - Optional: phantom-grid (OOB), nuclei, slither, NVD API key
241
+
242
+ ---
243
+
244
+ ## License
245
+
246
+ MIT — see [LICENSE](LICENSE)
247
+
248
+ <div align="center">
249
+ <sub>Part of the <a href="https://github.com/evkir">evkir</a> security toolchain.</sub>
250
+ </div>