Serve GitHub code scanning and Dependabot alerts per snapshot

GET /api/snapshots/{id}/alerts fetches open code scanning alerts
(located at the flagged file and line) and open Dependabot alerts
(located at the vulnerable manifest) for the snapshot's repository,
using the viewer's own GitHub token, in parallel and following Link
pagination only while it stays on the API host. Severities are
normalised to critical/high/medium/low. Each set reports ok, forbidden
(permission not granted or feature disabled) or unavailable; signed-out
viewers and local folders get a reason instead. Snapshots now remember
their GitHub repository URL.
This commit is contained in:
Andy Dixon
2026-06-27 15:33:55 +01:00
parent 9bc5ba483c
commit c605e2b61d
4 changed files with 238 additions and 2 deletions
+1
View File
@@ -48,6 +48,7 @@ type Edge struct {
type Snapshot struct {
ID, Name, Source string
Owner string // session that created the snapshot
Repo string // GitHub repository URL, empty for local folders
Files []FileRecord
Edges []Edge
TotalLines int