Repository navigation
docs: accuracy remediation — reconcile documentation with shipped code - #14
Conversation
results_verifier.py: also catches FuturesTimeoutError so LLM call timeouts from thread-pool executors propagate correctly. tool_executor.py: also catches asyncio.TimeoutError alongside the builtin so async command execution timeouts are handled uniformly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents the gstack skills available to Claude Code agents on this project, including the /browse skill for web browsing and the full list of available skills. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adopt 3.4.0 as the one product version (matches CHANGELOG + git release): - pentestgpt/_version.py is the source of truth (3.0.0 -> 3.4.0) - pyproject.toml literal synced to 3.4.0; drop "v3.0" from the description - new tests/test_version_consistency.py fails CI if the two ever drift - docs/README.md and README.md H1 banners de-versioned Wave 0 decisions (documentation-accuracy remediation): - D1: adopt 3.4.0, sourced from _version.py (recommended) - D2: leave subsystem version fields and v3.0 docstrings alone (recommended) - D3: delete the nonexistent SDK docs (recommended) - D4: rewrite operations/DEPLOYMENT.md from scratch (recommended) - D5: document the monitoring API split; change neither module (no code change) - D6: generate the API reference from a live OpenAPI dump script (recommended) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…SDK docs Rewrites docs/api/README.md and docs/api/AGENT_API.md from the 11 generated OpenAPI schemas in docs/api/_generated/. Removes the fictional SDK_EXAMPLES.md (no pentestgpt_sdk package exists). Key corrections: - Describes the real architecture: 11 standalone FastAPI apps/routers, no shared aggregator or /api/v1 mount point. - Removes phantom auth endpoints; describes actual bearer-token middleware. - Fixes detection resistance prefix to /detection_resistance/ (underscore). - Fixes cost-optimization prefix to /api/ (not a doubled path). - Documents the monitoring split: monitoring_api (19 paths, active app) vs monitoring_api_secure (6 paths, router not currently mounted). - All route tables sourced directly from the _generated JSON files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pentestgpt/network/segmentation_traversal.py does `import nmap` at module level, so pentestgpt.api.network_api cannot be imported without python-nmap. It was previously undeclared in both requirements.txt and pyproject.toml. Add it (0.7.1) so a clean install can import the network API and CI can regenerate/verify the API docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…untime Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the example-only CLI coverage with a complete options table in the getting-started guide, generated from `pentestgpt --help` (all 20 flags, including --v2-mode/--v3-mode which the audit's grep missed). Add a --help pointer to the top-level README. No fictional flags; matches --help exactly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… subsystem) - Replace every pentestgpt/stealth/ path with canonical sources: pentestgpt/detection_resistance/evasion_engine.py (canonical evasion engine) and pentestgpt/monitoring/detection_monitor.py; mark pentestgpt/utils/evasion_engine.py as a deprecated shim - Fix all pentestgpt.stealth.* Python imports to canonical modules - Repoint MITRE examples to canonical pentestgpt/mitre/ package (taxonomy.py, planner.py, kb.py); mark utils/mitre_*.py as deprecated re-export shims slated for v4.0.0 removal - Remove nonexistent pentestgpt/utils/test_mitre.py reference - Correct technique count from "50+" to 38 (confirmed by taxonomy log) - Fix StealthLevel pseudocode: STEALTH -> MAXIMUM in all four files; remove phantom Minimal row from DETAILS.md stealth table - Document pentestgpt/network/ subsystem (protocol_evasion, segmentation_traversal, traffic_analyzer, traffic_obfuscation_manager) in DETAILS.md - Fix stray pentestgpt/utils/mitre_planner.py path in README.md Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- docs/README.md: remove the broken SDK_EXAMPLES link (file deleted in the API rewrite), drop the redundant CHANGELOG_V3 index line (it is a redirect stub, kept on disk as a tombstone), and add the orphaned Community Beta Testing Guide under Getting Started. - docs/ROADMAP.md: replace the year-stale v3.0-v3.2 roadmap with a short pointer to the changelog and GitHub milestones/issues. - Removed the empty docs/superpowers/ directory (untracked .DS_Store only). Index now: 33 links all resolve; the only unreferenced doc is the intentional CHANGELOG_V3 tombstone. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduces scripts/check_docs.py with four deterministic, offline checks: 1. Internal links in docs/ and README.md resolve to existing files. 2. pentestgpt.* imports in fenced code blocks (non-archive) map to a real .py or __init__.py on disk. 3. --flags in getting-started/README.md and README.md are a subset of `pentestgpt --help`. 4. HTTP-method+path pairs in docs/api/*.md exist in docs/api/_generated/*.json (skipped when no JSON files are present). Replaces the placeholder "Validate API documentation" step in quality.yml with a real check that fails CI on drift. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The new doc-lint guard flagged four stale imports the Phase 5 grep-based verification missed (it searched slash-form paths, not dotted imports in fenced blocks): - api.auth_middleware.get_current_user -> auth is middleware-based (AuthenticationMiddleware); routes do not declare a per-route dependency - database.repositories.session_repository.SessionRepository -> no such module/class; models are per-domain *_models.py, sessions via SessionManager - monitoring.alert_correlation_engine -> monitoring.alert_correlation - cost_optimization.budget_manager.BudgetManager -> intelligent_budget_manager.IntelligentBudgetManager Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds Claude Code gstack enforcement, updates CI documentation validation and environment examples, and revises project, API, architecture, configuration, development, and getting-started documentation for current module paths, stealth terminology, workflows, and CLI usage. ChangesClaude tooling and configuration
Documentation overhaul
Estimated code review effort: 3 (Moderate) | ~30 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/development/CONTRIBUTING.md (1)
265-267: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winReplace the stale
isortchecklist item.The surrounding guidance now standardizes on Ruff for import sorting, so the checklist should not point contributors back to isort.
♻️ Proposed fix
- [ ] Imports are properly sorted (isort) + [ ] Imports are properly sorted (Ruff)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/development/CONTRIBUTING.md` around lines 265 - 267, The checklist item in CONTRIBUTING.md still references the old isort workflow, but the import-sorting guidance should now align with Ruff. Update the checklist entry near the import-ordering guidance to remove the isort mention and replace it with the Ruff-based import sorting/check item, keeping the surrounding contributor instructions consistent with the current tooling.docs/architecture/STEALTH.md (1)
2495-2508: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep
stealth_levelasStealthLevelhere._increase_stealthassigns the raw string"maximum", but this section treatsstealth_levelas aStealthLevelenum everywhere else. That leavescurrent_level.valuecomparisons brittle and can break the next transition.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/architecture/STEALTH.md` around lines 2495 - 2508, Keep component.stealth_level as a StealthLevel enum in _increase_stealth and _reduce_stealth, since the current code assigns a raw string while later logic relies on current_level.value comparisons. Update the assignments in these methods to use the enum members consistently, and ensure all transition checks in _increase_stealth and _reduce_stealth compare against StealthLevel values instead of string literals.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.env.example:
- Around line 55-58: The OAuth2 environment variables in the .env.example block
are out of the order expected by dotenv-linter. Reorder the entries under the
OAuth2 section so that OAUTH2_CLIENT_ID and OAUTH2_CLIENT_SECRET appear before
OAUTH2_ENABLED, keeping the rest of the section unchanged.
In `@docs/api/AGENT_API.md`:
- Around line 14-15: The API table descriptions for the `/agents/start` and
`/agents/stop` rows are too broad; update them to describe actions on a single
agent rather than the whole system. Use the existing agent handler semantics
from the `agent_api.py` endpoints that accept an `agent_id`, and revise the
wording in the `AGENT_API.md` table so the `start` and `stop` entries clearly
reflect per-agent behavior.
In `@docs/architecture/DIAGRAMS.md`:
- Around line 361-364: The flow label for the highest stealth branch is
misaligned with the `StealthLevel.MAXIMUM` preset. Update the diagram in the
branch handling `B -->|Maximum 10| ...` so it routes to `E[Maximum Stealth]`
instead of `F[Research Mode]`, keeping the `Aggressive Stealth`, `Balanced
Stealth`, and `Maximum Stealth` labels consistent with the existing `B` decision
mapping.
In `@docs/architecture/MITRE_INTEGRATION.md`:
- Around line 23-26: The deprecation note is too broad and should apply only to
the MITRE re-export shims, not the entire utils area. Update the
MITRE_INTEGRATION documentation around the utils section to clearly mark only
mitre_attack.py, mitre_planner.py, and mitre_kb.py as deprecated shim files,
while leaving the rest of pentestgpt/utils as active modules. Keep the wording
tied to those three filenames and their “re-export shim” role so the deprecation
scope is unambiguous.
In `@docs/architecture/README.md`:
- Line 9: The version displayed in the architecture README is outdated and
should be brought in sync with the current project release. Update the Current
Version text in the README content that includes the AutoPentester paper
reference so it shows 3.4.0 instead of 3.0.0, keeping the rest of the line
unchanged.
---
Outside diff comments:
In `@docs/architecture/STEALTH.md`:
- Around line 2495-2508: Keep component.stealth_level as a StealthLevel enum in
_increase_stealth and _reduce_stealth, since the current code assigns a raw
string while later logic relies on current_level.value comparisons. Update the
assignments in these methods to use the enum members consistently, and ensure
all transition checks in _increase_stealth and _reduce_stealth compare against
StealthLevel values instead of string literals.
In `@docs/development/CONTRIBUTING.md`:
- Around line 265-267: The checklist item in CONTRIBUTING.md still references
the old isort workflow, but the import-sorting guidance should now align with
Ruff. Update the checklist entry near the import-ordering guidance to remove the
isort mention and replace it with the Ruff-based import sorting/check item,
keeping the surrounding contributor instructions consistent with the current
tooling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 03c17402-cc8e-47a2-8853-9cedf48e7a76
⛔ Files ignored due to path filters (11)
docs/api/_generated/agent_api.jsonis excluded by!**/_generated/**docs/api/_generated/cost_optimization_api.jsonis excluded by!**/_generated/**docs/api/_generated/detection_resistance_api.jsonis excluded by!**/_generated/**docs/api/_generated/effectiveness_api.jsonis excluded by!**/_generated/**docs/api/_generated/knowledge_api.jsonis excluded by!**/_generated/**docs/api/_generated/monitoring_api.jsonis excluded by!**/_generated/**docs/api/_generated/monitoring_api_secure.jsonis excluded by!**/_generated/**docs/api/_generated/network_api.jsonis excluded by!**/_generated/**docs/api/_generated/plugin_api.jsonis excluded by!**/_generated/**docs/api/_generated/stealth_api.jsonis excluded by!**/_generated/**docs/api/_generated/testing_api.jsonis excluded by!**/_generated/**
📒 Files selected for processing (35)
.claude/hooks/check-gstack.sh.claude/settings.json.env.example.github/workflows/quality.ymlCLAUDE.mdREADME.mddocs/README.mddocs/ROADMAP.mddocs/api/AGENT_API.mddocs/api/README.mddocs/api/SDK_EXAMPLES.mddocs/architecture/DETAILS.mddocs/architecture/DIAGRAMS.mddocs/architecture/MITRE_INTEGRATION.mddocs/architecture/README.mddocs/architecture/STEALTH.mddocs/architecture/STEALTH_IMPLEMENTATION.mddocs/configuration/ENVIRONMENT_VARIABLES.mddocs/configuration/REFERENCE.mddocs/development/CI_CD.mddocs/development/CODE_QUALITY.mddocs/development/CONTRIBUTING.mddocs/getting-started/README.mddocs/guides/INTEGRATION.mddocs/guides/PLUGINS.mddocs/operations/DEPLOYMENT.mddocs/operations/MONITORING.mdpentestgpt/_version.pypentestgpt/agents/results_verifier.pypentestgpt/agents/tool_executor.pypyproject.tomlrequirements.txtscripts/check_docs.pyscripts/dump_openapi.pytests/test_version_consistency.py
💤 Files with no reviewable changes (1)
- docs/api/SDK_EXAMPLES.md
- .env.example: reorder OAuth2 keys so CLIENT_ID/CLIENT_SECRET precede ENABLED (dotenv-linter ordering) - AGENT_API.md: /agents/start and /agents/stop act on a single agent (agent_id in body), not the whole system - DIAGRAMS.md: route Maximum 10 to Maximum Stealth instead of Research Mode, which select_stealth_level() only reaches via a separate research_mode override, never via security maturity; drop the resulting orphaned Research Mode node/edge - MITRE_INTEGRATION.md: scope the deprecation note to the 3 named shim files, not all of pentestgpt/utils/ - architecture/README.md: version 3.0.0 -> 3.4.0, matching _version.py - STEALTH.md: adaptation controller example assigns StealthLevel enum members instead of raw strings, matching the enum's usage elsewhere in the doc - CODE_QUALITY.md: checklist item isort -> Ruff (CodeRabbit cited CONTRIBUTING.md, but that file has no isort references; the stale line was here)
Summary
Fixes documentation drift across
docs/so the reference and operations material describes the shipped code rather than an aspirational or older system. Executed in six reviewed waves from the 2026-07-01 accuracy audit and remediation plan.What changed
pentestgpt/_version.py),pyproject.tomlsynced, drift-guard test added.AppSettings(16 phantom vars removed, real fields added, DB default fixed).scripts/dump_openapi.py; 204 real routes documented; phantom/auth/*and hyphenated paths removed; nonexistent SDK docs deleted.DEPLOYMENT.mdrewritten against the real runtime (no invented HTTP server or v1.0.0 build).PluginInterface, communication hub,OrchestratorFactory).50+to38, network subsystem documented.pentestgpt --help.scripts/check_docs.py(links, module paths, CLI flags, API paths) wired intoquality.ymlto fail CI on future drift. It already caught 4 real stale imports in INTEGRATION.md.python-nmap(imported by the network subsystem).Verification
mypy .clean (615 files);ruff check .clean;pytest5688 passed, 11 skippedscripts/dump_openapi.pyandscripts/check_docs.pyrun clean;pentestgpt --versionprints 3.4.0;--helpmatches the documented 20 flagsFollow-ups (surfaced, not fixed here)
testing_api.appregisters 0 routes (include_routerprecedes the route decorators)/api/v1/monitoringduplication (documented per decision; code untouched)os.getenvin two config classes vs the AppSettings convention;*_BASE_URLare code-set, not env-overridableisortlines in CODE_QUALITY.md; a SECURITY.md CLI example mismatchNote on commit count
origin/mainis currently 3 commits behind localmain, so this PR temporarily shows 3 pre-existing commits (c56a6f3,9db0605,079c7ef) on top of the 13 remediation commits. They drop off oncemainis synced.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores