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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user