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
1.5 KiB
1.5 KiB
Data and Retention
What Prüfwerk keeps about a target, where, and when it is removed.
| Data | Where | Removed when |
|---|---|---|
| Target, findings, SBOM, CVE alerts, scan runs, code graph | the tenant's MongoDB database | the target is deleted (its records), or the tenant is erased (the whole database) |
| Uploaded files (archives, firmware images, PLC projects) | ARTIFACT_STORE_BASE_PATH/uploads/<target>/ |
the target is deleted, or the tenant is erased |
| Unpacked upload trees | ARTIFACT_STORE_BASE_PATH/work/<target>/ |
the target is deleted, or the tenant is erased |
| Content-addressed copies of uploads | ARTIFACT_STORE_BASE_PATH/blobs/<sha> |
the target is deleted, or the tenant is erased (a cache: a scan recreates it from the upload) |
| Git clones (scan and ingest) | GIT_CLONE_BASE_PATH/<tenant>/ |
the target is deleted (its clones), or the tenant is erased (all of them) |
| Werkbank runner artifacts | ARTIFACT_STORE_BASE_PATH/tenants/<tenant>/ |
the tenant is erased |
Deleting a target (DELETE /api/v1/targets/{id}, or Delete on the
targets page) removes its records and its files. Erasing a tenant
(DELETE /api/v1/platform/tenants/{id}/data, confirmed) drops its database
and removes every file listed above; the response says how many paths were
removed and how many could not be. Only paths inside the two configured base
directories are ever removed.
Evidence packs are built on request and not stored.
Not yet in place: a time-based sweep of files left behind by an interrupted deletion.