This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
generated from ossf/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
49 lines (45 loc) · 1.62 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package main
// ScorecardResult is the result of running scorecard.
type ScorecardResult struct { //nolint:govet
Date string `json:"date"`
Repo struct {
Name string `json:"name"`
Commit string `json:"commit"`
} `json:"repo"`
Scorecard struct {
Version string `json:"version"`
Commit string `json:"commit"`
} `json:"scorecard"`
Score float64 `json:"score"`
Checks []Check `json:"checks"`
Vulnerabilities []Vulnerability
}
// Check is a single check result.
type Check struct { //nolint:govet
Name string `json:"name"`
Score int `json:"score,omitempty"`
Reason string `json:"reason"`
Details []string `json:"details"`
Documentation struct {
Short string `json:"short"`
} `json:"documentation"`
}
// DependencyDiff is the result of running dependency-analysis.
type DependencyDiff struct {
ChangeType string `json:"change_type"`
Manifest string `json:"manifest"`
Ecosystem string `json:"ecosystem"`
Name string `json:"name"`
Version string `json:"version"`
PackageURL string `json:"package_url"`
License string `json:"license"`
SourceRepositoryURL string `json:"source_repository_url"`
Vulnerabilities []Vulnerability `json:"vulnerabilities"`
}
// Vulnerability is a single vulnerability.
type Vulnerability struct {
Severity string `json:"severity"`
AdvisoryGHSAId string `json:"advisory_ghsa_id"`
AdvisorySummary string `json:"advisory_summary"`
AdvisoryURL string `json:"advisory_url"`
}