Add SecurityAdvisoryPayload struct
This commit is contained in:
@@ -5077,6 +5077,38 @@ type RepositoryPayload struct {
|
|||||||
} `json:"sender"`
|
} `json:"sender"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SecurityAdvisoryPayload contains the information for GitHub's security_advisory hook event.
|
||||||
|
type SecurityAdvisoryPayload struct {
|
||||||
|
Action string `json:"action"`
|
||||||
|
SecurityAdvisory struct {
|
||||||
|
GHSAID string `json:"ghsa_id"`
|
||||||
|
Summary string `json:"summary"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
Severity string `json:"string"`
|
||||||
|
Identifiers []struct {
|
||||||
|
Value string `json:"value"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
} `json:"identifiers"`
|
||||||
|
References []struct {
|
||||||
|
URL string `json:"url"`
|
||||||
|
} `json:"references"`
|
||||||
|
PublishedAt time.Time `json:"published_at"`
|
||||||
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
|
WithdrawnAt *time.Time `json:"withdrawn_at"`
|
||||||
|
Vulnerabilities []struct {
|
||||||
|
Package struct {
|
||||||
|
Ecosystem string `json:"ecosystem"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
}
|
||||||
|
Severity string `json:"severity"`
|
||||||
|
VulnerableVersionRange string `json:"vulnerable_version_range"`
|
||||||
|
FirstPatchedVersion *struct {
|
||||||
|
Identifier string `json:"identifier"`
|
||||||
|
} `json:"first_patched_version"`
|
||||||
|
} `json:"vulnerabilities"`
|
||||||
|
} `json:"security_advisory"`
|
||||||
|
}
|
||||||
|
|
||||||
// StatusPayload contains the information for GitHub's status hook event
|
// StatusPayload contains the information for GitHub's status hook event
|
||||||
type StatusPayload struct {
|
type StatusPayload struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
|
|||||||
Reference in New Issue
Block a user