Skip to content

Commit e238d70

Browse files
feat: 🎸 version 1.0 agentic workflow (#325)
* feat: 🎸 version 1.0 agentic workflow Major rewrite of PentestGPT to use an agentic pipeline architecture: Core Changes: - New event-driven architecture with EventBus for TUI-agent decoupling - Implemented AgentController with 5-state lifecycle (IDLE->RUNNING->PAUSED->COMPLETED->ERROR) - Added AgentBackend interface with ClaudeCodeBackend implementation - Session management with file-based persistence for resumable pentests - Langfuse integration for observability and tracing Interface: - New Textual-based TUI with real-time activity feed - Keyboard shortcuts: F1 help, Ctrl+P pause, Ctrl+Q quit - Enhanced CLI with --target, --instruction, --non-interactive, --debug flags Project Structure: - Moved legacy multi-LLM version (v0.15) to legacy/ directory - New pentestgpt/core/ for agent, controller, events, session modules - New pentestgpt/interface/ for TUI and CLI components - New pentestgpt/benchmark/ for xbow benchmark integration - Comprehensive test suite in tests/ with unit and integration tests DevOps: - Docker support with Ubuntu 24.04 container - GitHub Actions CI/CD pipeline - Makefile with dev commands (test, lint, format, typecheck) - Added xbow-validation-benchmarks as submodule * style: format code with Black This commit fixes the style issues introduced in abe3be0 according to the output from Black. Details: #325 * fix: 🐛 fix test pipeline * feat: 🎸 update format * feat: 🎸 update --------- Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
1 parent 0f8e73a commit e238d70

File tree

161 files changed

+15932
-463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+15932
-463
lines changed

.env.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# PentestGPT Configuration
2+
# Copy this file to .env if you want to customize settings
3+
4+
# =============================================================================
5+
# Claude Configuration
6+
# =============================================================================
7+
# Claude Code manages its own API configuration.
8+
# Configure with: claude config (inside container)
9+
10+
# Optional: Claude model to use
11+
# Options: claude-sonnet-4-5-20250929, claude-opus-4-20250514
12+
LLM_MODEL=claude-sonnet-4-5-20250929

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v4
18+
with:
19+
version: "latest"
20+
21+
- name: Set up Python
22+
run: uv python install 3.12
23+
24+
- name: Install dependencies
25+
run: uv sync
26+
27+
- name: Run ruff check
28+
run: uv run ruff check pentestgpt/ tests/
29+
30+
- name: Run ruff format check
31+
run: uv run ruff format --check pentestgpt/ tests/
32+
33+
typecheck:
34+
name: Type Check
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Install uv
40+
uses: astral-sh/setup-uv@v4
41+
with:
42+
version: "latest"
43+
44+
- name: Set up Python
45+
run: uv python install 3.12
46+
47+
- name: Install dependencies
48+
run: uv sync
49+
50+
- name: Run mypy
51+
run: uv run mypy pentestgpt/
52+
53+
test:
54+
name: Test
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- name: Install uv
60+
uses: astral-sh/setup-uv@v4
61+
with:
62+
version: "latest"
63+
64+
- name: Set up Python
65+
run: uv python install 3.12
66+
67+
- name: Install dependencies
68+
run: uv sync
69+
70+
- name: Run tests
71+
run: uv run pytest tests/ -v --ignore=tests/docker/
72+
73+
test-docker:
74+
name: Docker Tests
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v4
78+
with:
79+
submodules: recursive
80+
81+
- name: Validate docker-compose config
82+
run: docker compose config
83+
84+
- name: Build Docker image
85+
run: docker compose build
86+
87+
- name: Install uv
88+
uses: astral-sh/setup-uv@v4
89+
with:
90+
version: "latest"
91+
92+
- name: Set up Python
93+
run: uv python install 3.12
94+
95+
- name: Install dependencies
96+
run: uv sync
97+
98+
- name: Run Docker tests
99+
run: uv run pytest tests/docker/ -v -m docker
100+
101+
build:
102+
name: Build
103+
runs-on: ubuntu-latest
104+
steps:
105+
- uses: actions/checkout@v4
106+
107+
- name: Install uv
108+
uses: astral-sh/setup-uv@v4
109+
with:
110+
version: "latest"
111+
112+
- name: Set up Python
113+
run: uv python install 3.12
114+
115+
- name: Build package
116+
run: uv build
117+
118+
- name: Upload artifacts
119+
uses: actions/upload-artifact@v4
120+
with:
121+
name: dist
122+
path: dist/
123+
retention-days: 7

0 commit comments

Comments
 (0)