feat(api): the OpenAPI description covers the pentest routes (#1006) #1024

Merged
sharang merged 1 commits from feat/openapi-pentest into main 2026-11-16 22:25:57 +00:00
Owner

Part of #1006: the next group of the OpenAPI description, covering the pentest routes. This branch is stacked on #1022 and #1023. Until those are merged, it also contains their commits. After their squash merges it gets updated with main, and the diff shrinks to this group.

What changes

  • The 13 pentest paths (14 operations) are registered through routes! and described by #[utoipa::path] (tag "Pentest"):
    • sessions: list (page, limit), create and get
    • per session: chat, stop, pause and resume
    • the event stream (SSE)
    • attack chain, messages and findings (paged)
    • the encrypted report export
    • the repository lookup (url) and the statistics
  • Schemas: CreateSessionRequest, SendMessageRequest, ExportBody and LookupRepoQuery. The wizard configuration (PentestConfig, core) stays an object.
  • The status codes are as the handlers return them, for example:
    • 409 when the deployment is source-only
    • 429 when too many sessions are running
  • Route descriptions only; the pentest code is unchanged.
  • After this, undescribed_routes.txt lists only the 13 CVE/VEX routes. They follow once #1015 has landed.

Checks

  • cargo fmt --check and clippy with the CI flags pass.
  • The agent's API unit tests pass (129).
  • Every agent integration test binary passes against Mongo 7.
  • I dumped the spec (93 paths, 105 operations) and checked each pentest operation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

Part of #1006: the next group of the OpenAPI description, covering the pentest routes. **This branch is stacked on #1022 and #1023.** Until those are merged, it also contains their commits. After their squash merges it gets updated with main, and the diff shrinks to this group. ## What changes - The 13 pentest paths (14 operations) are registered through `routes!` and described by `#[utoipa::path]` (tag "Pentest"): - sessions: list (`page`, `limit`), create and get - per session: chat, stop, pause and resume - the event stream (SSE) - attack chain, messages and findings (paged) - the encrypted report export - the repository lookup (`url`) and the statistics - Schemas: `CreateSessionRequest`, `SendMessageRequest`, `ExportBody` and `LookupRepoQuery`. The wizard configuration (`PentestConfig`, core) stays an object. - The status codes are as the handlers return them, for example: - 409 when the deployment is source-only - 429 when too many sessions are running - Route descriptions only; the pentest code is unchanged. - After this, `undescribed_routes.txt` lists only the 13 CVE/VEX routes. They follow once #1015 has landed. ## Checks - `cargo fmt --check` and clippy with the CI flags pass. - The agent's API unit tests pass (129). - Every agent integration test binary passes against Mongo 7. - I dumped the spec (93 paths, 105 operations) and checked each pentest operation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-16 22:03:53 +00:00
feat(api): the OpenAPI description covers the pentest routes (#1006)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m45s
CI / Check (pull_request) Successful in 21m17s
4688ad2dbc
The 13 pentest paths (14 operations) are described from their handlers
(tag "Pentest"): sessions (list, create, get), their chat, stop, pause
and resume, the event stream, attack chain, messages and findings, the
encrypted report export, the repository lookup and the statistics.
CreateSessionRequest, SendMessageRequest, ExportBody and LookupRepoQuery
are schemas; the wizard configuration stays an object. Only the CVE/VEX
routes are left in undescribed_routes.txt (13 paths).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang force-pushed feat/openapi-pentest from eac4d8e4fc to 4688ad2dbc 2026-11-16 22:03:53 +00:00 Compare
sharang merged commit d679f9cbf1 into main 2026-11-16 22:25:57 +00:00
sharang deleted branch feat/openapi-pentest 2026-11-16 22:25:57 +00:00
Sign in to join this conversation.