Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions github/dependabot_alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ type AdvisoryCWEs struct {
Name *string `json:"name,omitempty"`
}

// AdvisoryEPSS represents the advisory pertaining to the Exploit Prediction Scoring System.
//
// For more information, see:
// https://github.blog/changelog/2024-10-10-epss-scores-in-the-github-advisory-database/
type AdvisoryEPSS struct {
Percentage float64 `json:"percentage"`
Percentile float64 `json:"percentile"`
}

// DependabotSecurityAdvisory represents the GitHub Security Advisory.
type DependabotSecurityAdvisory struct {
GHSAID *string `json:"ghsa_id,omitempty"`
Expand All @@ -39,6 +48,7 @@ type DependabotSecurityAdvisory struct {
Severity *string `json:"severity,omitempty"`
CVSS *AdvisoryCVSS `json:"cvss,omitempty"`
CWEs []*AdvisoryCWEs `json:"cwes,omitempty"`
EPSS *AdvisoryEPSS `json:"epss,omitempty"`
Identifiers []*AdvisoryIdentifier `json:"identifiers,omitempty"`
References []*AdvisoryReference `json:"references,omitempty"`
PublishedAt *Timestamp `json:"published_at,omitempty"`
Expand Down
8 changes: 8 additions & 0 deletions github/dependabot_alerts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ func TestDependabotSecurityAdvisory_Marshal(t *testing.T) {
Name: Ptr("Exposure of Sensitive Information to an Unauthorized Actor"),
},
},
EPSS: &AdvisoryEPSS{
Percentage: 0.05,
Percentile: 0.5,
},
Identifiers: []*AdvisoryIdentifier{
{
Type: Ptr("GHSA"),
Expand Down Expand Up @@ -353,6 +357,10 @@ func TestDependabotSecurityAdvisory_Marshal(t *testing.T) {
"name": "Exposure of Sensitive Information to an Unauthorized Actor"
}
],
"epss": {
"percentage": 0.05,
"percentile": 0.5
},
"identifiers": [
{
"type": "GHSA",
Expand Down
8 changes: 8 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading