feat(api): the OpenAPI description covers compliance, evidence and manual findings (#1006) #1021

Merged
sharang merged 1 commits from feat/openapi-compliance into main 2026-11-16 20:22:03 +00:00
Owner

Part of #1006: the next group of the OpenAPI description, covering compliance, evidence and manual findings.

What changes

  • The 8 paths are registered through routes! and described by #[utoipa::path]:
    • Compliance: a target's CRA state per control, the summary across every target, the evidence pack, the master-control lookup (ids), and the OSCAL assessment results.
    • Findings: the finding breakdown, a manual finding from a DAST run or pentest, and a SARIF or ZAP import (format, kind; the body is the report).
  • The import keeps its own body limit (20 MiB) through UtoipaMethodRouterExt::layer.
  • Schemas: ManualFinding, CreateFindingRequest (flattened over ManualFinding) and AssessRequest for the bodies; ControlIdsQuery and ImportParams for the queries. Severity, kind and format are strings.
  • undescribed_routes.txt goes from 47 to 39 paths.

Checks

  • cargo fmt --check and clippy with the CI flags pass.
  • The agent's API unit tests pass. The summary gate caught one doc comment without a blank line after its first sentence, which is fixed.
  • Every agent integration test binary passes against Mongo 7.
  • I dumped the spec and checked each operation's summary, parameters, body and tag.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

Part of #1006: the next group of the OpenAPI description, covering compliance, evidence and manual findings. ## What changes - The 8 paths are registered through `routes!` and described by `#[utoipa::path]`: - **Compliance:** a target's CRA state per control, the summary across every target, the evidence pack, the master-control lookup (`ids`), and the OSCAL assessment results. - **Findings:** the finding breakdown, a manual finding from a DAST run or pentest, and a SARIF or ZAP import (`format`, `kind`; the body is the report). - The import keeps its own body limit (20 MiB) through `UtoipaMethodRouterExt::layer`. - Schemas: `ManualFinding`, `CreateFindingRequest` (flattened over `ManualFinding`) and `AssessRequest` for the bodies; `ControlIdsQuery` and `ImportParams` for the queries. Severity, kind and format are strings. - `undescribed_routes.txt` goes from 47 to 39 paths. ## Checks - `cargo fmt --check` and clippy with the CI flags pass. - The agent's API unit tests pass. The summary gate caught one doc comment without a blank line after its first sentence, which is fixed. - Every agent integration test binary passes against Mongo 7. - I dumped the spec and checked each operation's summary, parameters, body and tag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-16 19:10:41 +00:00
feat(api): the OpenAPI description covers compliance, evidence and manual findings (#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 4m50s
CI / Check (pull_request) Successful in 21m9s
12144a6584
The 8 paths are described from their handlers: the CRA state of a target
and of every target, the evidence pack, the master control lookup and
the OSCAL assessment results (tag "Compliance"), and the finding
breakdown, a manual finding and a SARIF or ZAP import (tag "Findings").
The import keeps its own body limit. ManualFinding, CreateFindingRequest
and AssessRequest are schemas. undescribed_routes.txt drops to 39 paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang merged commit 126345aa9d into main 2026-11-16 20:22:03 +00:00
sharang deleted branch feat/openapi-compliance 2026-11-16 20:22:03 +00:00
Sign in to join this conversation.