feat(cve): closing CVE issues settled by VEX behind ISSUE_AUTOCLOSE (off by default)

No new notification or issue for a not_affected/fixed CVE stays always on.
Closing an issue that is already open now depends on ISSUE_AUTOCLOSE
(off | dry_run | on, unknown -> off with a warning), like ISSUE_CATCHUP:
dry_run logs one line per target with the counts per VEX status and makes
no tracker call; on closes at most 20 per target and scan (every Gitea
request waits for its instance's slot) and logs closed/deferred/failed.

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-09 18:53:52 +02:00
1 parent f15d1e5066
commit f552a6a72a
8 files changed
+347 -53

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ A scan opens issues only for the findings it finds new, so a finding whose issue
### 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 issue, and its open issue is closed with a comment naming the status and the justification; when the statement is withdrawn, the issue is reopened.
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.
## Issues List
+2 -2
View File
@@ -50,8 +50,8 @@ the vulnerability comes back, the scan withdraws its "Fixed".
A vulnerability that is "Not affected" or "Fixed" (stated by a person, by the
scan or in an imported VEX document) raises no notification and gets no issue
in the repository's tracker; an open issue for it is closed with a comment
naming the status and the reason. If the statement is withdrawn, it notifies
in the repository's tracker; with `ISSUE_AUTOCLOSE=on` an open issue for
it is closed with a comment naming the status and the reason. If the statement is withdrawn, it notifies
and its issue is reopened as before. Notifications raised before the
statement stay in the list until they are dismissed.
+3 -3
View File
@@ -52,9 +52,9 @@ wieder auf, nimmt die Prüfung ihr „Behoben“ zurück.
Eine Schwachstelle mit „Nicht betroffen“ oder „Behoben“ (von einer Person,
der Prüfung oder aus einem importierten VEX-Dokument) löst keine
Benachrichtigung aus und bekommt kein Issue im Tracker des Repositorys; ein
offenes Issue dazu wird mit einem Kommentar geschlossen, der Status und
Begründung nennt. Wird die Aussage zurückgenommen, benachrichtigt sie wieder
Benachrichtigung aus und bekommt kein Issue im Tracker des Repositorys; mit
`ISSUE_AUTOCLOSE=on` wird ein offenes Issue dazu mit einem Kommentar
geschlossen, der Status und Begründung nennt. Wird die Aussage zurückgenommen, benachrichtigt sie wieder
und ihr Issue wird wieder geöffnet. Benachrichtigungen von vor der Aussage
bleiben in der Liste, bis sie verworfen werden.