Files
pruefwerk/docs/guide/getting-started-en.md
T
sharang d96509db8c
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Agent (push) Successful in 6m54s
feat(secrets): Betterleaks instead of gitleaks, findings carry over (#516) (#517)
2026-10-06 15:59:10 +00:00

110 lines
5.3 KiB
Markdown

# Getting Started (English)
Prüfwerk scans the source code of your products (firmware, PLC programs and
applications) for security weaknesses, builds their software bill of materials
(SBOM), matches the components against known vulnerabilities, and shows where
each product stands against the essential requirements of the Cyber Resilience
Act (CRA, Annex I). The interface is in German by default; the language toggle
in the sidebar switches it to English.
## What a scan covers
- **Static analysis (SAST)** -- Semgrep, and cppcheck for C and C++
- **Secrets** -- credentials committed to the code (Betterleaks)
- **SBOM** -- the components, their versions and licenses, including libraries
copied into a firmware tree and the libraries of a CODESYS project
- **Known vulnerabilities (CVE)** -- the components matched against OSV.dev and NVD
- **PLC control logic** -- security rules for IEC 61131-3 programs
- **AI triage** -- an LLM reviews each new finding and gives a confidence,
a rationale and a remediation; findings it doubts are marked for review
- **CRA mapping** -- findings are assigned to the CRA Annex I requirements they
are evidence for
## The Overview
After signing in you land on **Übersicht** (Overview): the number of targets,
open findings (with how many are critical and high), components and known
vulnerabilities; **CRA-Stand je Prüfobjekt** (CRA status by target); and
**Als Nächstes** (Next up), the most severe open findings. See
[Dashboard Overview](/features/overview).
## Roles
What you can do in Prüfwerk depends on your role in the workspace:
| Role | Prüfwerk |
| --- | --- |
| `IT_ADMIN`, `USER` | everything: add targets, run scans, triage findings |
| `CXO`, `LEGAL` | read only: view and export findings, reports, SBOM, evidence |
| `FINANCE`, or none of these | no access |
Only `IT_ADMIN` can add or import findings by hand.
## Quick Walkthrough
### 0. Or start with the demo targets
**Demo-Prüfobjekte hinzufügen** (Add demo targets) is offered on the
**Prüfobjekte** page while it is empty, and in the first step of the wizard. It creates a small
curated set — two PLC projects, a deliberately vulnerable web service and a
Zephyr firmware sample — and queues their first scans, so there are real
findings to look at within minutes. See [Demo targets](/guide/demo-targets).
### 1. Add a target
Click **Neues Prüfobjekt** (Onboard) in the sidebar. Give the target a name,
choose its type, then attach its code: a git repository (HTTPS address, plus an
access token for a private one) or an archive (zip, tar, tar.gz). Click
**Anlegen und prüfen** (Create and scan). See [Adding Targets](/guide/repositories).
### 2. The first scan
The first scan starts on its own, and the wizard shows its progress. To scan
again later, click **Prüfung starten** (Run scan) in the target's row on the
**Prüfobjekte** page or on the target's page.
### 3. View findings
Open **Befunde** (Findings) in the sidebar. Each finding has a severity, a
description, the code where it was found, the CRA requirements it concerns and,
where available, a remediation. Record your decision with the status buttons.
## Next Steps
- [Add and configure targets](/guide/repositories) -- private repositories, archives, submodules
- [Understand how scans work](/guide/scanning) -- steps, triggers, and why a step did not run
- [Work with findings](/guide/findings) -- statuses, the two kinds of false alarm, history
- [Explore your SBOM](/guide/sbom) -- components, licenses, and exports
- [Connect an LLM client](/features/mcp-server) -- query findings over MCP
## Deployment modes (`APP_ENV`)
`APP_ENV` decides how strict the deployment is about authentication.
| `APP_ENV` | Behaviour |
|---|---|
| `dev` (default) | Auth may be absent. Without Keycloak the API serves unauthenticated against a synthetic `dev` tenant, CORS is permissive, entitlements are not checked. For a laptop and CI only. |
| `staging`, `production` | *Hardened.* The agent, dashboard and MCP server refuse to start unless authentication is fully configured, and the dev-tenant, permissive-CORS and skip-entitlement paths are unreachable. |
A hardened deployment requires `KEYCLOAK_URL`, `KEYCLOAK_REALM`,
`KEYCLOAK_AUDIENCE`, `CORS_ALLOWED_ORIGINS`, `TENANT_REGISTRY_URL`,
`TENANT_REGISTRY_CLIENT_ID`, `TENANT_REGISTRY_CLIENT_SECRET` and
`PLATFORM_ALLOWED_CLIENTS`; the MCP server additionally requires `MCP_PORT`,
since its stdio transport has no tenant authentication. Startup lists every
missing variable at once, so one corrected deploy is enough.
The scheduler follows the same rule: where a tenant registry is configured, its
tenant list is authoritative, and a registry outage skips the tick instead of
falling back to the `dev` tenant.
## Static-analysis-only environments
Some deployments run with `PW_FEATURES=source_only` — the shared staging
environment does. Dynamic testing needs infrastructure (a browser, a soft-PLC,
network access to a running target) that is not deployed there, so dynamic
application testing, pentest sessions, the ICS probe and the ephemeral PLC
runtime are unavailable: **DAST** and **Pentest** are greyed out in the sidebar
(**n. v.**), and a scan lists those stages under **Nicht ausgeführt** (Not run)
rather than failing. Everything static — SAST, SBOM, CVE, the graph,
AI triage, control mapping — works as documented.