Files
pruefwerk/docs/guide/repositories.md
T
sharang 6611c5b691
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy MCP (push) Successful in 3m52s
CI / Deploy Dashboard (push) Successful in 5m38s
CI / Deploy Agent (push) Successful in 7m6s
feat(security): seal tenant credentials at rest, never return them (#260) (#302)
2026-09-21 16:28:54 +00:00

103 lines
4.2 KiB
Markdown

# 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](/screenshots/add-repository.png)
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](/screenshots/add-repository-tracker.png)
### 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](/screenshots/edit-repository.png)
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](/screenshots/repositories-list.png)
| 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.