8000 feat: Add EPSS to Dependabot alerts by mdfleury-wbd · Pull Request #3547 · google/go-github · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Add EPSS to Dependabot alerts #3547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy 8000 statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 15, 2025
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
0