NuGet SBOM entries carried no license: none of the files they come from
names one. Fill it in after the NuGet components are merged (#467):
- local first: the .nuspec of a restored package; <license
type="expression"> as SPDX, type="file" as LicenseRef-file, an old
<licenseUrl> mapped to SPDX for well-known license pages, else kept
- then nuget.org: registration leaf (gzip) -> catalogEntry (inline or
linked on api.nuget.org) -> licenseExpression / licenseFile / licenseUrl
- only real ids at exact versions (no ranges, no DLL-metadata names);
versions normalised as nuget.org files them (6.2.0.0 -> 6.2.0, 2.0 ->
2.0.0)
- ids a nuget.config maps to another feed are never sent; a tree whose
nuget.config lists another feed without a mapping is not looked up
- through guarded_net, 8 at once, 10 s per request, 60 s and 300
uncached packages per scan; failures stay empty, one warning per scan
- cached across tenants in the admin database (nuget_licenses, TTL: a
year for a license, a week for none)
- NUGET_LICENSE_LOOKUP=false turns the nuget.org step off
Closes#467
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Minimal .NET/C# support for epic #445 (N1-N5): detection of solutions/projects and target frameworks, NuGet SBOM without build or restore (pkg:nuget purls for OSV, unresolved-dependency warning, end-of-support frameworks), own C# semgrep rule pack, .NET configuration and key-file checks, .NET build output and restored packages not counted as own code. Fixture fixtures/dotnet/framework48, docs .NET-Projekte (DE/EN).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Every member of a tenant could use Prüfwerk fully, whatever their org
role: nothing but manual findings checked org_roles. A FINANCE user
could create and delete targets, start scans and triage findings.
Now, as decided on 30.09.2026:
- IT_ADMIN, USER: read and write.
- CXO, LEGAL: read only. GET/HEAD/OPTIONS plus the POSTs that only
read (OSCAL assess, pentest report export, code chat, help chat).
- FINANCE or no role: no access.
- Agent: one middleware (api::role_gate) right after the JWT one
refuses with 403 {"error":"forbidden_role","access":...}. It is
classified by route template, so ids do not matter. Support sessions
(TenantContext.staff) and requests without a tenant context
(platform service API, Werkbank runner and admin APIs, health) are
unchanged. Manual findings stay IT_ADMIN-only.
- Core: ProductAccess and TenantContext::product_access.
- Dashboard: a role without access sees a "no access" page (DE/EN)
with a link back to the portal, and no server function runs for it.
Read-only roles get a read-only note, and write actions (add target,
scan, edit, delete, triage, tokens, MCP servers, pentest control,
graph/embedding builds, notification dismiss) are hidden. The direct
MCP server functions check the role, and access tokens are withheld
from read-only roles.
- MCP server: unchanged. Its tokens are tenant-bound and carry no
roles, its tools only read, and creating a token now needs write
access.
- Docs: the roles table in Getting Started.
- The crates are at version 0.4.4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
The dashboard, the docs site and the pentest report no longer load
Google Fonts, so no visitor's IP goes to Google (platform/portal#65,
privacy release gate 4).
- Dashboard: Geist and Geist Mono (variable woff2, SIL OFL 1.1) are
embedded and served at /fonts/geist.woff2 and /fonts/geist-mono.woff2;
main.css declares them with @font-face under the same family names.
- Docs: the same woff2 files are bundled by Vite from the theme; the
Google Fonts links in config.mts are gone.
- Pentest report: preconnects and the Google Fonts stylesheet removed;
a system font stack instead, with a test that the report references
no external resource.
- The crates are at version 0.4.3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
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
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
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