Commit Graph
28 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5 e4f7fb540b feat(platform): graceful shutdown and restart recovery (#259)
CI / Deploy Dashboard (pull_request) Skipped
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 5m53s
A redeploy used to cut every request mid-flight and leave the scans it
killed marked `running` forever.

- The agent API, webhook and MCP servers stop accepting connections on
  SIGTERM/Ctrl+C, let in-flight requests finish, and drop what is still
  open after 8 s (under Docker's 10 s stop timeout).
  `compliance_core::shutdown` holds the shared signal/drain helper.
- At startup, before anything can start a run, runs the previous process
  left open are closed in every tenant. Scan runs get a new `interrupted`
  status. DAST runs, pentest sessions (running or paused: pause state lives
  in memory), and graph/embedding builds become `failed` with the message
  "interrupted by agent restart".
- `JobQueue::sweep_expired` now runs every 60 s across tenants (at most 3
  lease attempts per job).
- The webhook port comes from `WEBHOOK_PORT` (default 3002).

Assumes one agent per environment, as in every Orca deployment today.

Closes #65, closes #68.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-21 17:26:22 +02:00
sharang bc4553d576 chore: replace every remaining "tramiton" with Firmwerk (#300)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 5m10s
CI / Deploy Docs (push) Successful in 1m7s
CI / Deploy Agent (push) Successful in 6m50s
CI / Deploy MCP (push) Successful in 2m25s
2026-09-21 11:38:35 +00:00
sharang 55da128a3c feat(security): bound memory on queries, archives and concurrent scans (#258) (#297)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 3m52s
CI / Deploy Dashboard (push) Successful in 5m33s
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy Agent (push) Successful in 6m57s
2026-09-21 11:01:54 +00:00
sharang 06d2f458e6 feat(security): stop executing code from scanned repositories (#257) (#296)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 4m54s
CI / Deploy MCP (push) Successful in 2m56s
CI / Deploy Docs (push) Successful in 1m7s
CI / Deploy Dashboard (push) Successful in 3m57s
2026-09-21 10:27:59 +00:00
sharang cc3a9c7130 feat(platform): isolate tenants on disk, in the runner API and on webhooks (#255) (#295)
CI / Deploy Docs (push) Successful in 1m10s
CI / Deploy Dashboard (push) Successful in 5m32s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 3m49s
CI / Deploy Agent (push) Successful in 6m52s
2026-09-21 06:53:36 +00:00
sharang eef3ccdf43 feat(security): refuse scans aimed at our own network (#256) (#293)
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m12s
CI / Deploy Docs (push) Successful in 1m23s
CI / Deploy Agent (push) Successful in 11m3s
CI / Deploy Dashboard (push) Successful in 11m34s
2026-09-20 21:59:50 +00:00
sharang aa64e2b25a feat(platform): fail closed when auth configuration is missing (#254) (#292)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy Dashboard (push) Canceled after 0s
CI / Deploy Docs (push) Canceled after 0s
CI / Deploy MCP (push) Canceled after 0s
2026-09-20 21:37:00 +00:00
sharangandSharang Parnerkar 6557f03d7c feat(dashboard): add demo targets, fix MCP status, source-only UI (#252)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m0s
CI / Deploy Docs (push) Successful in 1m6s
CI / Check (push) Skipped
Demonstration plan, phase D3 (dashboard side). Pairs with #251, which adds the agent endpoints and the `source_only` feature flag.

**Add demo targets.** The Targets page (empty state) and the onboarding wizard now offer a button that lists what the agent would create, seeds it, and reports per target `created` / `already there` / `failed` with the error inline. That replaces "onboard something by hand before you can see anything" for a trial user; the curl script stays for ops.

**MCP status.** The card never turned *running* on staging: the health URL was built by appending `/health` to an endpoint that already ends in `/mcp`, and the ingress routes `/mcp/*` to a server that serves `/health` at its own root. The probe now tries `…/mcp/health` and then `…/health`, and `MCP_HEALTH_URL` overrides it outright for the seeded cards (staging: `https://pruefwerk-stage.breakpilot.com/mcp/health`). Unit-tested through `mcp_health_url_candidates`.

**Source-only mode.** The dashboard reads the agent's `features` list from the public version handshake (cached, and an older agent without the key degrades to "everything enabled"). With `source_only` it hides dynamic application testing, pentest, the ICS probe and the PLC runtime behind one short note rather than offering actions that fail at the tool, and a stage the pipeline reports as skipped for that reason renders neutral instead of red.

**Control column.** The findings table shows the control-mapping column only when at least one finding in view carries `control_refs`, so an environment without a control catalog does not show a column of em dashes.

Docs: getting-started gains the demo-target entry point and a section on static-analysis-only environments; the MCP feature page documents the status probe and `MCP_HEALTH_URL`, which is also in `.env.example`.

Verified locally: `cargo fmt --all --check`, `cargo clippy -p compliance-dashboard --features server --no-default-features`, both dashboard test suites (`server` and `web` features) green.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #252
2026-09-14 08:24:43 +00:00
sharangandSharang Parnerkar d9850bef90 feat(demo): seed curated targets from the agent, source-only mode (#251)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 6m58s
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy MCP (push) Successful in 3m53s
CI / Deploy Dashboard (push) Successful in 5m34s
Demonstration plan, phase D3 (agent side). Two things blocked a self-serve demo: a fresh trial tenant landed on an empty targets page, and staging tried to run DAST, pentest, the ICS probe and the soft-PLC runtime that are not deployed there, so those stages surfaced as tool errors.

## Seeding

| Request | Meaning |
|---|---|
| `GET /api/v1/targets/demo-seed` | what would be created: `key`, display `name`, `kind`, `description`, `source_only` |
| `POST /api/v1/targets/demo-seed` | body `{"names":[…],"rescan":false}`, empty `names` seeds all; `202` with one row per target, `status` = `queued` \| `exists` \| `failed` |
| `POST /api/v1/platform/tenants/demo/reset` | now takes `{"seed": true}` and reseeds with a service token, for the nightly sales-demo reset |

Seeding runs through a new shared target lifecycle (`compliance-agent/src/targets.rs`: create → store upload → attach → detect), which the onboarding handlers now call as well — so a seeded target is an ordinary target with the same records and the same `target.added` usage events, and there is no HTTP self-call. It is idempotent by display name: the seeder owns the `Demo · ` prefix, so a second call finds its own targets. `scan_id` is always `null` in the response because the scan run is created inside the background pipeline.

## Source-only set

The manifest is now source-only: `plc-pump-station`, `plc-conveyor-line`, `git-cra-vuln-demo`, `firmware-zephyr-example`. The Juice Shop target needed a running instance for DAST and pentest and is removed, along with `DEMO_WEB_URL`. Everything ships inside the agent binary (manifest plus the PLC upload fixtures), so a deployed agent seeds without the repo.

## `PW_FEATURES=source_only`

A static-analysis-only deployment: DAST, the ICS probe and the ephemeral PLC runtime record a `skipped_stages` entry on the scan run (`{stage, status:"skipped", reason:"feature disabled"}`) instead of failing; starting a DAST run or a pentest session answers `409`; the flag list is published on the public `/api/v1/platform/version` handshake so the dashboard reads the set the agent enforces rather than its own copy of the env. Unknown flags are kept and reported, so a dashboard-only flag needs no agent release.

Docs and the ops script are updated: `scripts/seed-demo-targets.sh --api` hands the job to the agent, the client-side path stays for `--reset` and for agents older than the checkout.

Verified locally: `cargo fmt --all --check`, `cargo clippy -p compliance-agent -- -D warnings`, `cargo clippy -p compliance-core -- -D warnings`, `cargo test -p compliance-core -p compliance-agent -p werkbank-exec -p control-map --lib` (414 tests). `compliance-agent/tests/demo_seed.rs` needs Mongo and runs outside CI like the other integration tests.

Pairs with the dashboard's "Add demo targets" button and with orca-platform setting `PW_FEATURES=source_only` on the staging agent.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #251
2026-09-14 08:24:33 +00:00
sharangandSharang Parnerkar 728f3ab3bc feat(controls): ship a CRA catalog snapshot, map without the backend (#250)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 4m20s
CI / Deploy Docs (push) Successful in 1m8s
Demonstration plan, phase D3: on staging `BREAKPILOT_BASE_URL` points at `api-dev.breakpilot.ai`, which answers 401 until the dsms migration (M-MIG-9, parked). Control mapping was gated on that URL, so demo scans produce findings with **no control references** — the one thing a CRA prospect looks for.

The catalog loader already snapshotted the bytes it fetched and fell back to them when the backend was down. This promotes the snapshot to a real source:

- `OscalControlsProvider` takes `Option<String>` for the base URL; with `None` it serves snapshots only, and `has_snapshots()` decides whether control triage runs at all.
- The agent image ships `compliance-agent/controls/snapshot/oscal-catalog-cra.json` — CRA Annex I, 8 groups / 40 controls, generated by breakpilot-compliance's own `build_cra_catalog()`, so it is byte-identical to what `?framework=cra` serves. The entrypoint copies it into `BREAKPILOT_SNAPSHOT_DIR` only if that file is absent, so a snapshot fetched from a live backend (or a mounted volume) always wins.
- `scripts/refresh-oscal-snapshot.sh` regenerates the committed snapshots from a backend when one is reachable.
- A test asserts the shipped file parses and still carries 40 controls, so a bad refresh cannot silently disable mapping.

`master-controls` is DB-derived (~3k controls) and is not shipped, so the semantic pass stays a no-op offline; staging should set `BREAKPILOT_SEMANTIC_MAPPING=false` and drop `BREAKPILOT_BASE_URL` (separate orca-platform change). Deterministic LUT triage and the grounded surface checks then run against the CRA catalog and findings carry `control_refs`.

Verified locally: `cargo fmt --all --check`, `cargo clippy -p compliance-agent -- -D warnings`, `cargo test -p compliance-agent --lib` (314 passed).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #250
2026-09-14 07:53:19 +00:00
sharang 5822b51cec feat(agent): registry entitlements, platform endpoints, JWT aud/iss (#246)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 3m51s
CI / Deploy Dashboard (push) Successful in 5m26s
CI / Deploy Agent (push) Successful in 6m47s
CI / Deploy Docs (push) Successful in 57s
2026-09-12 07:39:01 +00:00
sharang 498d1cc443 chore: move to platform/pruefwerk — firmwerk deps, CI token, image project (#245)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 3m43s
CI / Deploy Dashboard (push) Successful in 3m21s
CI / Deploy Docs (push) Successful in 30s
CI / Deploy MCP (push) Successful in 1m34s
2026-09-11 13:48:22 +00:00
sharang 710fdcab6f docs: rebrand Certifai → Prüfwerk (user-facing name) (#243)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m13s
2026-09-02 08:00:12 +00:00
sharang 8dcdad9fe7 feat(fixtures): curated demo targets + seed script + golden PLC baselines (#187) (#232)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Failing after 18s
CI / Deploy Docs (push) Successful in 1m11s
2026-08-31 15:58:16 +00:00
sharang 53bd93c96e docs: align tool inventory with what actually runs (no Grype, no ZAP/nuclei) (#233)
CI / Check (push) Canceled after 0s
CI / Detect Changes (push) Canceled after 0s
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy Dashboard (push) Canceled after 0s
CI / Deploy Docs (push) Canceled after 0s
CI / Deploy MCP (push) Canceled after 0s
2026-08-31 15:58:11 +00:00
sharang ea516cc054 docs(control-mapping): MCP emission loop + default-on flags (#227)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Deploy Docs (push) Successful in 57s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
2026-07-22 11:23:51 +00:00
sharang 182dec69b8 docs(features): compliance control-mapping pipeline (#223)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Failing after 4s
2026-07-22 07:30:10 +00:00
sharang 1aba85b28e docs(plc): PLC Runtime Landscape reference + support watch-list (#185)
CI / Check (push) Has been skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Has been skipped
CI / Deploy Dashboard (push) Has been skipped
CI / Deploy Docs (push) Successful in 49s
CI / Deploy MCP (push) Has been skipped
2026-07-16 22:05:39 +00:00
sharang c6a84b327f docs(plc): soft-PLC architecture + CODESYS/Yocto lifecycle diagram (#184)
CI / Check (push) Waiting to run
CI / Detect Changes (push) Waiting to run
CI / Deploy Agent (push) Blocked by required conditions
CI / Deploy Dashboard (push) Blocked by required conditions
CI / Deploy Docs (push) Blocked by required conditions
CI / Deploy MCP (push) Blocked by required conditions
2026-07-16 22:00:17 +00:00
sharang 77eced8314 feat(ics): dynamic Modbus/TCP probe for PLC/SPS devices (#172)
CI / Check (push) Has been skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy Agent (push) Has been cancelled
CI / Deploy Dashboard (push) Has been cancelled
CI / Deploy Docs (push) Has been cancelled
CI / Deploy MCP (push) Has been cancelled
2026-07-16 16:25:04 +00:00
sharang a3f3f1d4f5 feat(plc): ingest CODESYS projects from a git repo (SAST + SBOM) (#171)
CI / Deploy Agent (push) Successful in 11m7s
CI / Check (push) Has been skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 7m0s
CI / Deploy Docs (push) Successful in 57s
CI / Deploy MCP (push) Successful in 1m48s
2026-07-16 15:47:04 +00:00
sharang a8bb05d7b1 feat: add floating help chat widget, remove settings page (#51)
CI / Deploy Docs (push) Successful in 2s
CI / Deploy MCP (push) Has been skipped
CI / Check (push) Has been skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 2s
2026-03-30 08:05:29 +00:00
sharangandSharang Parnerkar c461faa2fb feat: pentest onboarding — streaming, browser automation, reports, user cleanup (#16)
CI / Deploy MCP (push) Successful in 2s
CI / Check (push) Has been skipped
CI / Detect Changes (push) Successful in 7s
CI / Deploy Agent (push) Successful in 2s
CI / Deploy Dashboard (push) Successful in 2s
CI / Deploy Docs (push) Successful in 2s
Complete pentest feature overhaul: SSE streaming, session-persistent browser tool (CDP), AES-256 credential encryption, auto-screenshots in reports, code-level remediation correlation, SAST triage chunking, context window optimization, test user cleanup (Keycloak/Auth0/Okta), wizard dropdowns, attack chain improvements, architecture docs with Mermaid diagrams.

Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com>
Reviewed-on: https://gitea.meghsakha.com/sharang/compliance-scanner-agent/pulls/16
2026-03-17 20:32:20 +00:00
sharang acc5b86aa4 feat: AI-driven automated penetration testing (#12)
CI / Clippy (push) Failing after 1m51s
CI / Security Audit (push) Successful in 2m1s
CI / Tests (push) Has been skipped
CI / Detect Changes (push) Has been skipped
CI / Deploy Agent (push) Has been skipped
CI / Deploy Dashboard (push) Has been skipped
CI / Deploy Docs (push) Has been skipped
CI / Format (push) Failing after 42s
CI / Deploy MCP (push) Has been skipped
2026-03-12 14:42:54 +00:00
sharang 3ec1456b0d docs: rewrite user-facing documentation with screenshots (#11)
CI / Clippy (push) Successful in 4m56s
CI / Security Audit (push) Successful in 1m48s
CI / Tests (push) Successful in 5m36s
CI / Deploy MCP (push) Has been skipped
CI / Format (push) Successful in 6s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 2s
CI / Deploy Dashboard (push) Successful in 2s
CI / Deploy Docs (push) Successful in 3s
2026-03-11 15:26:00 +00:00
32e5fc21e7 feat: add MCP server for exposing compliance data to LLMs (#5)
CI / Format (push) Successful in 3s
CI / Clippy (push) Successful in 4m4s
CI / Security Audit (push) Successful in 1m42s
CI / Tests (push) Successful in 4m38s
CI / Deploy Agent (push) Successful in 2s
CI / Deploy Dashboard (push) Successful in 1s
CI / Deploy MCP (push) Failing after 2s
CI / Detect Changes (push) Successful in 7s
CI / Deploy Docs (push) Successful in 2s
New `compliance-mcp` crate providing a Model Context Protocol server
with 7 tools: list/get/summarize findings, list SBOM packages, SBOM
vulnerability report, list DAST findings, and DAST scan summary.
Supports stdio (local dev) and Streamable HTTP (deployment via MCP_PORT).
Includes Dockerfile, CI clippy check, and Coolify deploy job.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com>
Reviewed-on: https://gitea.meghsakha.com/sharang/compliance-scanner-agent/pulls/5
2026-03-09 08:21:04 +00:00
Sharang ParnerkarandClaude Opus 4.6 d67a51db18 Add nginx config for VitePress SPA routing
CI / Tests (push) Successful in 4m23s
CI / Format (push) Successful in 3s
CI / Clippy (push) Successful in 3m17s
CI / Security Audit (push) Successful in 1m37s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:09:42 +01:00
sharangandSharang Parnerkar 7e12d1433a docs: added vite-press docs (#4)
CI / Clippy (push) Successful in 3m17s
CI / Security Audit (push) Successful in 1m36s
CI / Format (push) Successful in 2s
CI / Tests (push) Successful in 4m38s
Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com>
Reviewed-on: https://gitea.meghsakha.com/sharang/compliance-scanner-agent/pulls/4
2026-03-08 13:59:50 +00:00