Files
pruefwerk/docs/guide/repositories.md
T
Sharang ParnerkarandClaude Opus 5 b89f31e2d3
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) Canceled after 6m28s
feat(security): seal tenant credentials at rest, never return them (#260)
Git tokens, tracker tokens, webhook secrets and pentest passwords were stored
in plain text and returned by the API. The old crypto helper fell back to
plain text when no key was set.

- `secrets::SecretBox`: AES-256-GCM under `SECRETS_ENCRYPTION_KEY`, with sealed
  values stored as `enc:v1:…`. With no key it refuses to seal instead of
  storing plain text. The key is required when APP_ENV is hardened, and a
  malformed key stops startup in every environment. It replaces
  `pentest/crypto.rs`.
- `compliance_core::models::Credentials` lists each record's credential fields
  once. The agent seals them before a write and redacts them from every target,
  DAST target and pentest-session response, including the MCP pentest tools.
- `PATCH /targets/{id}`: a credential left out keeps its stored value, an
  empty string clears it, and a new one is sealed. A client echoing a redacted
  record back therefore cannot erase a token.
- Pentest sessions are sealed before the first insert. Previously they were
  inserted in plain text and encrypted afterwards.
- On startup the agent seals credentials that were stored in plain text.
- Webhook receivers fail closed: a target without a usable secret gets 401
  instead of unsigned acceptance. GitLab tokens are compared in constant time.
  New targets no longer get a webhook secret at creation; issuing one comes
  back with the webhook work.

Part 1 of #260 (agent). Dashboard session hardening, the open redirect and
the webhook proxy follow in a separate PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-21 18:03:00 +02:00

4.2 KiB

Adding Repositories

Repositories are the core resource in Prüfwerk. Each tracked repository is scanned on a schedule, and its results are available across all features -- findings, SBOM, code graph, AI chat, and issue tracking.

Adding a Repository

  1. Navigate to Repositories in the sidebar
  2. Click Add Repository
  3. Fill in the form:
    • Name -- a display name for the repository
    • Git URL -- the HTTPS clone URL, e.g. https://github.com/org/repo.git
    • Default Branch -- the branch to scan, e.g. main or master
  4. Click Add

Add repository dialog

The repository appears in the list immediately. It will not be scanned until you trigger a scan manually or the next scheduled scan runs.

Public vs Private Repositories

Public repositories can be cloned using an HTTPS URL with no additional setup.

Private repositories are cloned over HTTPS with a token you supply. Add the repository's HTTPS URL and, in the credentials section, a read-only access token for it.

Creating a Token

  1. Create a read-only token in your Git hosting provider, scoped to the repository you are onboarding:
    • GitHub: Settings > Developer settings > Personal access tokens (fine-grained), repository access limited to that repository, Contents: Read-only
    • GitLab: Repository Settings > Repository > Deploy tokens, scope read_repository
    • Gitea: Settings > Applications > Access tokens, scope read:repository
  2. Add the repository in Prüfwerk with its HTTPS URL
  3. Paste the token into the repository's credentials

::: warning SSH URLs are not supported ssh://… and git@host:org/repo.git URLs are rejected. Each tenant's token belongs to that tenant only; there is no shared platform deploy key, and adding one would mean every tenant's clones authenticating as the same identity. Per-tenant SSH keys are planned for a later release. :::

::: tip Scope the token to a single repository and to read-only access. That is the smallest credential that lets Prüfwerk clone your code. :::

Configuring an Issue Tracker

You can connect an issue tracker so that new findings are automatically created as issues in your existing workflow.

When adding or editing a repository, expand the Issue Tracker section to configure:

Add repository dialog with issue tracker options

Supported Trackers

Tracker Required Fields
GitHub Issues Repository owner, repository name, API token
GitLab Issues Project ID, GitLab URL, API token
Gitea Issues Repository owner, repository name, Gitea URL, API token
Jira Project key, Jira URL, email, API token

Each tracker is configured per-repository, so different repositories can use different trackers.

Editing Repository Settings

Click the Edit button on any repository row to modify its settings, including the issue tracker configuration.

Edit repository modal with tracker configuration

From the edit modal you can:

  • Change the repository name, Git URL, or default branch
  • Add, modify, or remove issue tracker configuration

Repository List

The repositories page shows all tracked repositories in a table.

Repository list table

Column Description
Name Repository display name
Git URL Clone URL
Branch Default branch being scanned
Findings Total number of security findings
Last Scanned Relative timestamp of the most recent scan

Triggering a Scan

Click the Scan button on any repository row to trigger an immediate scan. The scan runs in the background through all phases (clone, SAST, SBOM, CVE, graph, issue sync). You can monitor progress on the Overview page under recent scan runs.

Deleting a Repository

Click the Delete button on a repository row. A confirmation dialog appears warning that this action permanently removes:

  • All security findings
  • SBOM entries and vulnerability data
  • Scan run history
  • Code graph data
  • Embedding vectors (for AI chat)
  • CVE alerts
  • Tracker issues

This action cannot be undone.