A DAST run on the Werkbank or a penetration test is done by hand. Its results had no way into Prüfwerk, so they could not sit next to the scan's findings, carry CRA refs or reach the evidence.
Agent
Endpoints:
POST /api/v1/targets/{id}/findings adds one finding (201). The same finding (tool + title + location) again gives 409.
POST /api/v1/targets/{id}/findings/import?format=sarif|zap&kind=pentest|dast takes the report itself as the body (limit 20 MB) and returns {total, imported, duplicates}. Importing the same report again adds nothing. A document that is not the named format gives 422.
Who: both need IT_ADMIN, otherwise 403. The tester is invited into the customer's organisation with that role. The dev tenant's synthetic user now holds it too.
import module:
ManualFinding becomes an ordinary Finding: scanner is the tool or manual, the location is stored in file_path, and evidence is kept in code_snippet, truncated at 4,000 characters.
SARIF 2.1.0: severity from security-severity, else the level; CWE from external/cwe/cwe-N tags; the rule's short description, full description and help. runs is required, so {} is refused rather than imported as empty.
ZAP JSON (traditional): one finding per alert, not per URL; the first instance is the location and the description gives the count. Risk codes 0–3, HTML stripped, cweid -1 means none.
Model:
new ScanType::Pentest;
Finding.reported_by and Finding.reproduction (serde default, so old rows still read).
CRA refs:ControlMap::controls_for_cwe. A human-verified weakness maps through any tool's binding for its CWE; rule-only bindings are never matched this way.
Dashboard
Target details get a "Befunde aus manuellen Tests" panel: test kind, a form (title, severity, location, CWE, CVSS, tool, description, evidence, reproduction, fix), and an import (format + file, streamed through like uploads).
It shows "N importiert, M bereits vorhanden", or the agent's refusal (for example, 403 for a non-admin).
The finding detail shows the reproduction steps and "Erfasst von".
Pentest is in the type filter and labels. German and English.
Docs
docs/guide/manual-findings.md: fields, both formats, curl examples. Added to the sidebar.
Verification
Unit tests (agent):
SARIF: rule details, security-severity over level, a CWE tag, refusal of non-SARIF;
ZAP: one finding per alert, HTML stripped, -1 means no CWE;
CWE normalisation and score thresholds; fingerprints; the admin check; form parsing.
Integration (MongoDB):tests/manual_findings.rs walks through add → 409 → import ×2 (2 imported, then 2 duplicates) → 422 for non-SARIF → 404 for an unknown target, then checks the stored rows and CRA refs. The credentials, tenant_isolation, tenant_status_middleware and demo_seed suites still pass with the dev user as admin.
clippy with the CI flags (agent, mcp, dashboard server/web); fmt; 40 dashboard lib tests.
Not yet seen in a browser.
Unrelated and pre-existing: compliance-core/tests/models.rs does not compile on main (TrackedRepository). CI only runs core --lib.
Closes #337. Pilot P1, item H. **Stacked on #348.**
## Why
A DAST run on the Werkbank or a penetration test is done by hand. Its results had no way into Prüfwerk, so they could not sit next to the scan's findings, carry CRA refs or reach the evidence.
## Agent
- **Endpoints:**
- `POST /api/v1/targets/{id}/findings` adds one finding (201). The same finding (tool + title + location) again gives **409**.
- `POST /api/v1/targets/{id}/findings/import?format=sarif|zap&kind=pentest|dast` takes the report itself as the body (limit 20 MB) and returns `{total, imported, duplicates}`. Importing the same report again adds nothing. A document that is not the named format gives **422**.
- **Who:** both need `IT_ADMIN`, otherwise 403. The tester is invited into the customer's organisation with that role. The dev tenant's synthetic user now holds it too.
- **`import` module:**
- `ManualFinding` becomes an ordinary `Finding`: `scanner` is the tool or `manual`, the location is stored in `file_path`, and evidence is kept in `code_snippet`, truncated at 4,000 characters.
- **SARIF 2.1.0:** severity from `security-severity`, else the level; CWE from `external/cwe/cwe-N` tags; the rule's short description, full description and help. `runs` is required, so `{}` is refused rather than imported as empty.
- **ZAP JSON (traditional):** one finding per alert, not per URL; the first instance is the location and the description gives the count. Risk codes 0–3, HTML stripped, `cweid -1` means none.
- **Model:**
- new `ScanType::Pentest`;
- `Finding.reported_by` and `Finding.reproduction` (serde default, so old rows still read).
- **CRA refs:** `ControlMap::controls_for_cwe`. A human-verified weakness maps through any tool's binding for its CWE; rule-only bindings are never matched this way.
## Dashboard
- Target details get a **"Befunde aus manuellen Tests"** panel: test kind, a form (title, severity, location, CWE, CVSS, tool, description, evidence, reproduction, fix), and an import (format + file, streamed through like uploads).
- It shows "N importiert, M bereits vorhanden", or the agent's refusal (for example, 403 for a non-admin).
- The finding detail shows the reproduction steps and "Erfasst von".
- `Pentest` is in the type filter and labels. German and English.
## Docs
`docs/guide/manual-findings.md`: fields, both formats, curl examples. Added to the sidebar.
## Verification
- Unit tests (agent):
- SARIF: rule details, `security-severity` over level, a CWE tag, refusal of non-SARIF;
- ZAP: one finding per alert, HTML stripped, `-1` means no CWE;
- CWE normalisation and score thresholds; fingerprints; the admin check; form parsing.
- 392 agent lib tests, control-map tests (`controls_for_cwe`) and 71 core lib tests pass.
- **Integration (MongoDB):** `tests/manual_findings.rs` walks through add → 409 → import ×2 (2 imported, then 2 duplicates) → 422 for non-SARIF → 404 for an unknown target, then checks the stored rows and CRA refs. The credentials, tenant_isolation, tenant_status_middleware and demo_seed suites still pass with the dev user as admin.
- clippy with the CI flags (agent, mcp, dashboard `server`/`web`); fmt; 40 dashboard lib tests.
- Not yet seen in a browser.
- Unrelated and pre-existing: `compliance-core/tests/models.rs` does not compile on `main` (`TrackedRepository`). CI only runs core `--lib`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
A DAST run or penetration test is done by a person. Its results had no
way into Prüfwerk, so they could not sit next to the scan's findings or
go into the evidence.
- POST /api/v1/targets/{id}/findings adds one finding; the same finding
(tool, title, location) twice is a 409.
- POST /api/v1/targets/{id}/findings/import?format=sarif|zap&kind=... reads
a SARIF 2.1.0 or OWASP ZAP JSON report (up to 20 MB); findings already on
the target are counted, not added again. A document that is not the named
format is a 422.
- Both need the organisation's IT_ADMIN role (the dev tenant's user now has
it). The finding records who added it and how to reproduce it.
- New ScanType::Pentest. A finding's CWE maps it to CRA controls through
the control map (controls_for_cwe: any tool's binding for that CWE).
- Dashboard: a panel on each target's details with the form and the
import; the finding detail shows the reproduction steps and who reported
it. German and English.
- Guide: docs/guide/manual-findings.md.
Tests: SARIF and ZAP parsing, CWE and score handling, fingerprints, the
admin check, and an integration test (MongoDB) that adds, re-adds, imports
twice, and refuses a non-SARIF document and an unknown target.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #337. Pilot P1, item H. Stacked on #348.
Why
A DAST run on the Werkbank or a penetration test is done by hand. Its results had no way into Prüfwerk, so they could not sit next to the scan's findings, carry CRA refs or reach the evidence.
Agent
POST /api/v1/targets/{id}/findingsadds one finding (201). The same finding (tool + title + location) again gives 409.POST /api/v1/targets/{id}/findings/import?format=sarif|zap&kind=pentest|dasttakes the report itself as the body (limit 20 MB) and returns{total, imported, duplicates}. Importing the same report again adds nothing. A document that is not the named format gives 422.IT_ADMIN, otherwise 403. The tester is invited into the customer's organisation with that role. The dev tenant's synthetic user now holds it too.importmodule:ManualFindingbecomes an ordinaryFinding:scanneris the tool ormanual, the location is stored infile_path, and evidence is kept incode_snippet, truncated at 4,000 characters.security-severity, else the level; CWE fromexternal/cwe/cwe-Ntags; the rule's short description, full description and help.runsis required, so{}is refused rather than imported as empty.cweid -1means none.ScanType::Pentest;Finding.reported_byandFinding.reproduction(serde default, so old rows still read).ControlMap::controls_for_cwe. A human-verified weakness maps through any tool's binding for its CWE; rule-only bindings are never matched this way.Dashboard
Pentestis in the type filter and labels. German and English.Docs
docs/guide/manual-findings.md: fields, both formats, curl examples. Added to the sidebar.Verification
security-severityover level, a CWE tag, refusal of non-SARIF;-1means no CWE;controls_for_cwe) and 71 core lib tests pass.tests/manual_findings.rswalks through add → 409 → import ×2 (2 imported, then 2 duplicates) → 422 for non-SARIF → 404 for an unknown target, then checks the stored rows and CRA refs. The credentials, tenant_isolation, tenant_status_middleware and demo_seed suites still pass with the dev user as admin.server/web); fmt; 40 dashboard lib tests.compliance-core/tests/models.rsdoes not compile onmain(TrackedRepository). CI only runs core--lib.🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
A DAST run or penetration test is done by a person. Its results had no way into Prüfwerk, so they could not sit next to the scan's findings or go into the evidence. - POST /api/v1/targets/{id}/findings adds one finding; the same finding (tool, title, location) twice is a 409. - POST /api/v1/targets/{id}/findings/import?format=sarif|zap&kind=... reads a SARIF 2.1.0 or OWASP ZAP JSON report (up to 20 MB); findings already on the target are counted, not added again. A document that is not the named format is a 422. - Both need the organisation's IT_ADMIN role (the dev tenant's user now has it). The finding records who added it and how to reproduce it. - New ScanType::Pentest. A finding's CWE maps it to CRA controls through the control map (controls_for_cwe: any tool's binding for that CWE). - Dashboard: a panel on each target's details with the form and the import; the finding detail shows the reproduction steps and who reported it. German and English. - Guide: docs/guide/manual-findings.md. Tests: SARIF and ZAP parsing, CWE and score handling, fingerprints, the admin check, and an integration test (MongoDB) that adds, re-adds, imports twice, and refuses a non-SARIF document and an unknown target. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48peca794cd61to9e7e1b3ebb