Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.5k
Add security-advisory and code-scanning-alert event types#2311
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 statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
gmlewis
merged 5 commits into
google:master
from
sourikghosh:feat/2306-event-types-uint-testMar 4, 2022
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b7e1025
security-advisory and code-scanning-alert event types with uint tests…
sourikghosh 41aa350
minor refactoring changes
sourikghosh f53ab65
relevant comments added to newly created structs
sourikghosh 39125f9
struct comment modified
sourikghosh 3b9f271
Update github/event_types.go
gmlewis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1248,3 +1248,71 @@ type WorkflowRunEvent struct { | ||
| Sender *User `json:"sender,omitempty"` | ||
| Installation *Installation `json:"installation,omitempty"` | ||
| } | ||
| // SecurityAdvisory represents the advisory object in SecurityAdvisoryEvent payload. | ||
| // | ||
| // GitHub API docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#security_advisory | ||
| type SecurityAdvisory struct { | ||
gmlewis marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| GHSAID *string `json:"ghsa_id,omitempty"` | ||
| Summary *string `json:"summary,omitempty"` | ||
| Description *string `json:"description,omitempty"` | ||
| Severity *string `json:"severity,omitempty"` | ||
| Identifiers []*AdvisoryIdentifier `json:"identifiers,omitempty"` | ||
| References []*AdvisoryReference `json:"references,omitempty"` | ||
| PublishedAt *Timestamp `json:"published_at,omitempty"` | ||
| UpdatedAt *Timestamp `json:"updated_at,omitempty"` | ||
| WithdrawnAt *Timestamp `json:"withdrawn_at,omitempty"` | ||
| Vulnerabilities []*AdvisoryVulnerability `json:"vulnerabilities,omitempty"` | ||
| } | ||
| // AdvisoryIdentifier represents the identifier for a Security Advisory. | ||
| type AdvisoryIdentifier struct { | ||
| Value *string `json:"value,omitempty"` | ||
| Type *string `json:"type,omitempty"` | ||
| } | ||
| // AdvisoryReference represents the reference url for the security advisory. | ||
| type AdvisoryReference struct { | ||
| URL *string `json:"url,omitempty"` | ||
| } | ||
| // AdvisoryVulnerability represents the vulnerability object for a Security Advisory. | ||
| type AdvisoryVulnerability struct { | ||
| Package *VulnerabilityPackage `json:"package,omitempty"` | ||
| Severity *string `json:"severity,omitempty"` | ||
| VulnerableVersionRange *string `json:"vulnerable_version_range,omitempty"` | ||
| FirstPatchedVersion *FirstPatchedVersion `json:"first_patched_version,omitempty"` | ||
| } | ||
| // VulnerabilityPackage represents the package object for an Advisory Vulnerability. | ||
| type VulnerabilityPackage struct { | ||
| Ecosystem *string `json:"ecosystem,omitempty"` | ||
| Name *string `json:"name,omitempty"` | ||
| } | ||
| // FirstPatchedVersion represents the identifier for the first patched version of that vulnerability. | ||
| type FirstPatchedVersion struct { | ||
| Identifier *string `json:"identifier,omitempty"` | ||
| } | ||
| // SecurityAdvisoryEvent is triggered when a security-related vulnerability is found in software on GitHub. | ||
| // | ||
| // GitHub API docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#security_advisory | ||
| type SecurityAdvisoryEvent struct { | ||
| Action *string `json:"action,omitempty"` | ||
| SecurityAdvisory *SecurityAdvisory `json:"security_advisory,omitempty"` | ||
| } | ||
| // CodeScanningAlertEvent is triggered when a code scanning finds a potential vulnerability or error in your code. | ||
| // | ||
| // GitHub API docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#code_scanning_alert | ||
| type CodeScanningAlertEvent struct { | ||
| Action *string `json:"action,omitempty"` | ||
| Alert *Alert `json:"alert,omitempty"` | ||
| Ref *string `json:"ref,omitempty"` | ||
| // CommitOID is the commit SHA of the code scanning alert | ||
| CommitOID *string `json:"commit_oid,omitempty"` | ||
| Repo *Repository `json:"repository,omitempty"` | ||
| Org *Organization `json:"organization,omitempty"` | ||
| Sender *User `json:"sender,omitempty"` | ||
| } | ||
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.