Files
pruefwerk/docs/guide/issues.md
T
Sharang ParnerkarandClaude Opus 5.5 2e6d422e46
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 5m16s
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 20m17s
feat(issues): poll Gitea for issues a person closed or reopened (#953)
The back-sync of #960 only listened to the managed git source's
organisation webhook, which most targets do not have: repositories with a
Gitea issue tracker get no webhook at all. Every GIT_SOURCE_SYNC_MINUTES
(30 by default) the agent now lists the issues of each target that has
Prüfwerk issues, one listing per repository, and compares their state with
its records. For an issue whose state differs it reads the timeline to see
who closed or reopened it; a person's change is carried back exactly as a
webhook delivery is (same rules: an undecided finding is resolved as
"closed in the ticket", a decision already made stays, a CVE issue only
records the close). Changes by the bot user that opened the issue are left
alone. Targets are polled one after the other, so a small Gitea sees one
listing at a time; tenants go through the same entitlement check as the
webhook. Where the webhook delivered a change already, the records match
and the poll does nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 22:08:50 +01:00

83 lines
6.1 KiB
Markdown

# Issues & Tracking
Prüfwerk automatically creates issues in your existing issue trackers when new security findings are discovered. This integrates security into your development workflow without requiring teams to check a separate tool.
## How Issues Are Created
When a scan discovers new findings, the following happens automatically:
1. Each new finding is checked against existing issues using its fingerprint
2. If no matching issue exists, a new issue is created in the configured tracker
3. The issue includes the finding title, severity, vulnerability details, file location, and a link back to the finding in Prüfwerk
4. The finding is updated with a link to the external issue
This means every actionable finding gets tracked in the same system your developers already use.
### Catch-up for findings without an issue (Gitea)
A scan opens issues only for the findings it finds new, so a finding whose issue could not be opened at the time (Gitea unreachable, the issue refused) stays without one. With `ISSUE_CATCHUP=on`, every scan of a Gitea target then also goes through its open, triaged and to-review findings of severity medium or above that have no issue: one whose issue exists (found by the fingerprint in its body, then by title; a grouped finding by fingerprint only) is linked to it, the others get a new issue. At most 20 new issues per target and scan, highest severity and oldest first; the rest follow in the next scans. A scheduled scan that is skipped because the repository has no new commits still runs the catch-up when findings are waiting for an issue, so the rest follow every scan interval, not only after the next push. `ISSUE_CATCHUP=dry_run` only logs how many issues it would open and link, per severity, and changes nothing. The default is `off`; GitHub, GitLab and Jira are not caught up.
### CVE issues (managed repositories)
For a repository from a managed git source, known vulnerabilities in its dependencies become issues too: one per package and CVE, labelled `cve`. A critical or high CVE opens one, and so does any CVE in CISA's Known Exploited Vulnerabilities catalog (rated at least high). A CVE whose EPSS percentile reaches `CVE_ISSUE_EPSS_PERCENTILE` (default `0.95`) is rated one step higher, so a medium one opens an issue as high. The issue names the KEV entry, the EPSS score with its attribution, and CISA's SSVC exploitation where known. When a complete scan no longer finds the CVE, the issue is closed; when it comes back, it is reopened. A CVE with the VEX status `not_affected` or `fixed` gets no new issue. Its issue that is already open is closed only with `ISSUE_AUTOCLOSE=on`: with a comment naming the status and the justification, at most 20 per target and scan (the rest follow in the next scans). `ISSUE_AUTOCLOSE=dry_run` only logs, per target, how many issues it would close per VEX status, and changes nothing; the default is `off`. When the statement is withdrawn, a closed issue is reopened.
### Closing an issue in Gitea
Closing a Prüfwerk issue in Gitea resolves its finding, if no one has decided
on the finding yet; its history reads "Im Ticket geschlossen von *Gitea
user*" (closed in the ticket by). Reopening the issue reopens the finding. A
decision already made in Prüfwerk (an accepted risk, say) stays. A CVE issue
someone closes stays closed while the scan finds the vulnerability unchanged;
it does not set a VEX status. The next scan confirms a resolved finding or
finds it again and reopens it and its issue.
Prüfwerk checks the state of its Gitea issues every 30 minutes
(`GIT_SOURCE_SYNC_MINUTES`): one listing per repository, and for an issue whose
state changed, its timeline, to see who changed it. Changes Prüfwerk's own bot
user made are left alone. A managed repository whose webhook sends the
**Issues** event gets the change at once. GitHub, GitLab and Jira issues are
not read back.
## Issues List
Open **Tickets** (Issues) in the sidebar to see all tracker issues across your targets.
Above the table:
- **Search** finds a ticket by a word of its title or by its number: `913` and `#913` both find ticket 913, and `913` also finds the Jira key `PROJ-913`.
- **Target** shows only one target's tickets: those of its findings and its CVE issues.
- **Status** shows only open tickets (open or in progress) or only closed ones (closed or resolved).
The issues table shows:
| Column | Description |
|--------|-------------|
| Tracker | GitHub, GitLab, Gitea, or Jira |
| Nr. (No.) | Issue number in the external system |
| Titel (Title) | Issue title |
| Status | Offen / In Bearbeitung / Geschlossen / Erledigt (Open / In progress / Closed / Resolved) |
| Erstellt (Created) | When the issue was created |
| Öffnen (Open) | **Befund** (Finding) opens the finding the ticket is about, where you set its status; for a CVE issue, **CVEs des Prüfobjekts** (Target's CVEs) opens the target's components and their CVEs. **Im Tracker** (In the tracker) opens the issue in your tracker. |
The API takes the same filters: `GET /api/v1/issues?q=913&status=open&repo_id=<target id>` (`status` is `open` or `closed`).
## Supported Trackers
GitHub Issues, GitLab Issues, Gitea Issues and Jira.
The tracker is configured per target. The dashboard has no settings for it yet;
it is set through the API. See
[Connecting an Issue Tracker](/guide/repositories#connecting-an-issue-tracker).
## Deduplication
Issues are deduplicated using the same fingerprint hash that deduplicates findings. This means:
- If the same vulnerability appears in consecutive scans, only one issue is created: issues are created only for new findings
- Before creating an issue, Prüfwerk searches the tracker by fingerprint and then by title, and does not create a second one
- Different findings (even if similar) get separate issues because their fingerprints differ based on rule, file path and line
## Linked Issues in Finding Detail
When viewing a [finding's detail page](/guide/findings#finding-detail), you will see a **Verknüpftes Ticket** (Linked issue) section if an issue was created for that finding. This provides a direct link to the external tracker issue, making it easy to jump between the security context in Prüfwerk and the development workflow in your tracker.