feat(issues): a tracker issue follows its finding's status
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 10m44s

#444 opens an issue per finding in the managed repository, but nothing
updated it afterwards. Now, when a finding's status changes, by a person
(single or bulk) or by the scan (#443 closes and reopens), its issue
follows, in the background:
- resolved, false positive (rule or mapping) or ignored: a comment with
  the reason, then closed;
- accepted risk: the comment (with the person's reason) and, on Gitea,
  the new `risk:accepted` label, then closed;
- open, triaged or needs review again: reopened with a comment.

The sync reads the finding's current status when it runs, so a change in
between wins, and does nothing when the issue already matches. Comments
are German then English, like the labels. build_tracker is now a free
function the API can use; TrackerDispatch gains update_issue_status and
add_comment; GiteaTracker gains add_labels.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-10-05 16:02:34 +02:00
1 parent 04d0ad5113
commit 8fff28b2db
11 files changed
+712 -79

No files matched your search

+8 -2
View File
@@ -17,8 +17,14 @@ of an organisation in that instance automatically:
- **Findings as issues.** Findings of severity medium and above become issues
in the repository, with location, CWE, the CRA requirement concerned, the
remediation and a link into Prüfwerk. Prüfwerk creates the labels
`pruefwerk`, `cra:annex-i` and `severity:critical|high|medium|low` in the
repository for them.
`pruefwerk`, `cra:annex-i`, `severity:critical|high|medium|low` and
`risk:accepted` in the repository for them.
- **The issue follows the finding.** When the finding is closed in Prüfwerk —
the scan no longer finds it, or someone marks it resolved, a false alarm or
ignored — Prüfwerk comments on the issue why and closes it. An accepted risk
also gets the label `risk:accepted`, with the reason in the comment. When
the finding comes back (the scan finds it again, or it is reopened), the
issue is reopened.
- **Sync.** Every 30 minutes Prüfwerk compares the organisation's repositories
with its targets, in case a webhook delivery was lost.
+9 -2
View File
@@ -18,8 +18,15 @@ Repository-Organisation dieser Instanz automatisch prüfen:
- **Befunde als Issues.** Befunde ab Schweregrad „mittel“ erscheinen als Issue
im Repository, mit Fundstelle, CWE, der betroffenen CRA-Anforderung, der
Maßnahme und einem Link ins Prüfwerk. Prüfwerk legt dazu die Labels
`pruefwerk`, `cra:annex-i` und `severity:critical|high|medium|low` im
Repository an.
`pruefwerk`, `cra:annex-i`, `severity:critical|high|medium|low` und
`risk:accepted` im Repository an.
- **Das Issue folgt dem Befund.** Wird der Befund im Prüfwerk geschlossen –
die Prüfung findet ihn nicht mehr, oder jemand setzt ihn auf behoben,
Fehlalarm oder ignoriert –, kommentiert Prüfwerk im Issue den Grund und
schließt es. Ein akzeptiertes Risiko bekommt zusätzlich das Label
`risk:accepted`, mit der Begründung im Kommentar. Kommt der Befund wieder
(die Prüfung findet ihn erneut, oder er wird wieder geöffnet), wird das
Issue wieder geöffnet.
- **Abgleich.** Alle 30 Minuten gleicht Prüfwerk die Repository-Liste der
Organisation mit den Prüfobjekten ab, falls ein Webhook verloren ging.