Commit Graph
5 Commits
Author SHA1 Message Date
Sharang Parnerkar f888c41946 Merge remote-tracking branch 'origin/main' into feat/demo-seed
CI / Deploy MCP (pull_request) Skipped
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 / Check (pull_request) Successful in 6m35s
# Conflicts:
#	.env.example
2026-09-14 10:06:39 +02: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 ParnerkarandClaude Opus 5 62e0b6903d feat(demo): seed curated targets from the agent, source-only mode
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 5m49s
A prospect on a fresh trial saw an empty targets page and had to onboard
something by hand before Pruefwerk showed anything. The curated demo set
existed but only as a curl/jq ops script nobody outside the team runs.

The agent now seeds itself:

- GET/POST /api/v1/targets/demo-seed list and create the bundled demo
  targets for the caller's tenant, then start a scan for each. Idempotent
  by display name: an existing target reports `exists` and is left alone
  unless `rescan` is asked for. Unknown keys are a 400 before anything is
  written.
- The work runs through a new shared target lifecycle (create → upload →
  detect), which the onboarding handlers now use too, so seeded targets
  are ordinary targets: same records, same target.added usage events.
- demo/reset takes {"seed": true} and reseeds with a service token, which
  is what the nightly sales-demo reset needs.

The shipped set is source-only (two PLC projects, a CRA-vulnerable repo, a
Zephyr firmware sample); the Juice Shop target, which needed a running
instance for DAST and pentest, is gone.

PW_FEATURES=source_only makes a deployment static-analysis-only: DAST, the
ICS probe and the ephemeral PLC runtime are recorded as skipped stages
instead of failing the scan, starting a DAST run or a pentest session
answers 409, and the flags are published on the /platform/version
handshake so the dashboard reads what the agent enforces.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-09-12 21:16:42 +02: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 116293519d M7.1 smoke harness: lift auth to compliance-core + compliance-smoke service (#83)
CI / Check (push) Has been cancelled
CI / Detect Changes (push) Has been cancelled
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-06-04 14:38:35 +00:00