Commit Graph
25 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 7c447f0447 feat(retention): deleting a target or erasing a tenant removes its files (#289)
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 / Check (pull_request) Successful in 8m24s
Customer code stayed on disk forever: deleting a target removed its
records, and tenant erasure dropped its database, but clones, uploads,
unpacked trees and blobs remained. On a small node that is disk; for
customer code it is an incomplete GDPR erasure.

- retention: every path of a target (uploads, work trees, the scan and
  ingest clones, its blobs) and of a tenant (its clone and runner-artifact
  directories). Removal refuses anything outside the two configured base
  directories and treats an already-missing path as done.
- DELETE /api/v1/targets/{id} reads the target first and removes its
  files after its records.
- DELETE /api/v1/platform/tenants/{id}/data collects every target's paths
  before dropping the database, then removes them; the response counts
  removed and unremovable paths.
- Guide: docs/guide/data-retention.md, the retention table.

Not yet: a time-based sweep for files left by an interrupted deletion, and
the slug check on tenant erasure (#265).

Tests: a target's files go and another target's stay; nothing outside the
data directories is touched; tenant paths; and an integration test
(MongoDB) that uploads a file, deletes the target and finds it gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-23 18:03:26 +02:00
sharang a5fb0aa947 feat(findings): add pentest and DAST findings by hand or from a report (#337) (#349)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 5m54s
CI / Deploy Docs (push) Successful in 1m3s
CI / Deploy MCP (push) Successful in 1m57s
CI / Deploy Agent (push) Successful in 7m41s
2026-09-23 14:46:34 +00:00
sharang c6d2d07999 fix(sbom): stop resolving tenant manifests in shared deployments (#330) (#333)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 57s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m41s
CI / Deploy Dashboard (push) Successful in 5m26s
CI / Deploy Agent (push) Successful in 6m48s
2026-09-23 08:59:35 +00:00
sharang f90bfcc5c6 fix(scans): stop offering scans nothing runs, and record them (#319) (#328)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 53s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m39s
CI / Deploy Dashboard (push) Successful in 5m21s
CI / Deploy Agent (push) Successful in 6m43s
2026-09-22 21:05:31 +00:00
sharang 40c7557349 feat(security): pin resolved addresses and check every redirect hop (#294) (#322)
CI / Deploy Docs (push) Successful in 54s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 6m41s
CI / Deploy MCP (push) Successful in 3m41s
CI / Deploy Dashboard (push) Successful in 5m20s
2026-09-21 20:26:43 +00:00
sharang 0444f18a8e feat(platform): harden the container images (#261) (#307)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy MCP (push) Successful in 4m0s
CI / Deploy Dashboard (push) Successful in 6m25s
CI / Deploy Agent (push) Successful in 9m12s
2026-09-21 17:28:23 +00:00
sharang 6611c5b691 feat(security): seal tenant credentials at rest, never return them (#260) (#302)
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m52s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy Dashboard (push) Successful in 5m38s
CI / Deploy Agent (push) Successful in 7m6s
2026-09-21 16:28:54 +00:00
sharang 85959907b7 feat(platform): graceful shutdown and restart recovery (#259) (#301)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m9s
CI / Deploy MCP (push) Successful in 3m51s
CI / Deploy Dashboard (push) Successful in 5m35s
CI / Deploy Agent (push) Successful in 6m53s
2026-09-21 15:35:54 +00: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
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 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 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
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