Repository: google/go-github
Pull request #2900 (2023-08-26 09:50:56)

Add missing CodeScanning endpoints
Fixes https://github.com/google/go-github/issues/2899

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/google/go-github/pull/2900?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) Report
> Merging [#2900](https://app.codecov.io/gh/google/go-github/pull/2900?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) (916bae7) into [master](https://app.codecov.io/gh/google/go-github/commit/38ca69f37f8597421ceb02e08f2dd225cfaeb1a9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) (38ca69f) will **increase** coverage by `0.01%`.
> The diff coverage is `100.00%`.

```diff
@@            Coverage Diff             @@
##           master    #2900      +/-   ##
==========================================
+ Coverage   98.10%   98.11%   +0.01%     
==========================================
  Files         142      142              
  Lines       12340    12408      +68     
==========================================
+ Hits        12106    12174      +68     
  Misses        159      159              
  Partials       75       75              
```


| [Files Changed](https://app.codecov.io/gh/google/go-github/pull/2900?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) | Coverage Δ | |
|---|---|---|
| [github/code-scanning.go](https://app.codecov.io/gh/google/go-github/pull/2900?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2NvZGUtc2Nhbm5pbmcuZ28=) | `100.00% <100.00%> (ø)` | |



Patch:
diff --git a/github/code-scanning.go b/github/code-scanning.go
index 09c03647..0ae269be 100644
--- a/github/code-scanning.go
+++ b/github/code-scanning.go
@@ -48,11 +48,13 @@ type Message struct {
 type MostRecentInstance struct {
 	Ref             *string   `json:"ref,omitempty"`
 	AnalysisKey     *string   `json:"analysis_key,omitempty"`
+	Category        *string   `json:"category,omitempty"`
 	Environment     *string   `json:"environment,omitempty"`
 	State           *string   `json:"state,omitempty"`
 	CommitSHA       *string   `json:"commit_sha,omitempty"`
 	Message         *Message  `json:"message,omitempty"`
 	Location        *Location `json:"location,omitempty"`
+	HTMLURL         *string   `json:"html_url,omitempty"`
 	Classifications []string  `json:"classifications,omitempty"`
 }
 
@@ -113,13 +115,22 @@ func (a *Alert) ID() int64 {
 	return id
 }
 
-// AlertListOptions specifies optional parameters to the CodeScanningService.ListAlerts
-// method.
+// AlertInstancesListOptions specifies optional parameters to the CodeScanningService.ListAlertInstances method.
+type AlertInstancesListOptions struct {
+	// Return code scanning alert instances for a specific branch reference.
+	// The ref can be formatted as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge
+	Ref string `url:"ref,omitempty"`
+
+	ListOptions
+}
+
+// AlertListOptions specifies optional parameters to the CodeScanningService.ListAlerts method.
 type AlertListOptions struct {
 	// State of the code scanning alerts to list. Set to closed to list only closed code scanning alerts. Default: open
 	State string `url:"state,omitempty"`
 
-	// Return code scanning alerts for a specific branch reference. The ref must be formatted as heads/<branch name>.
+	// Return code scanning alerts for a specific branch reference.
+	// The ref can be formatted as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge
 	Ref string `url:"ref,omitempty"`
 
 	// If specified, only code scanning alerts with this severity will be returned. Possible values are: critical, high, medium, low, warning, note, error.
@@ -140,12 +151,28 @@ type AnalysesListOptions struct {
 	// Return code scanning analyses belonging to the same SARIF upload.
 	SarifID *string `url:"sarif_id,omitempty"`
 
-	// Return code scanning analyses for a specific branch reference. The ref can be formatted as refs/heads/<branch name> or simply <branch name>.
+	// Return code scanning analyses for a specific branch reference.
+	// The ref can be formatted as refs/heads/<branch name> or simply <branch name>. To reference a pull request use refs/pull/<number>/merge
 	Ref *string `url:"ref,omitempty"`
 
 	ListOptions
 }
 
+// CodeQLDatabase represents a metadata about the CodeQL database.
+//
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning
+type CodeQLDatabase struct {
+	ID          *int64     `json:"id,omitempty"`
+	Name        *string    `json:"name,omitempty"`
+	Language    *string    `json:"language,omitempty"`
+	Uploader    *User      `json:"uploader,omitempty"`
+	ContentType *string    `json:"content_type,omitempty"`
+	Size        *int64     `json:"size,omitempty"`
+	CreatedAt   *Timestamp `json:"created_at,omitempty"`
+	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
+	URL         *string    `json:"url,omitempty"`
+}
+
 // ScanningAnalysis represents an individual GitHub Code Scanning ScanningAnalysis on a single repository.
 //
 // GitHub API docs: https://docs.github.com/en/rest/code-scanning
@@ -208,7 +235,7 @@ type SarifID struct {
 // You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events
 // read permission to use this endpoint.
 //
-// GitHub API docs: https://docs.github.com/en/rest/code-scanning#list-code-scanning-alerts-for-an-organization
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization
 func (s *CodeScanningService) ListAlertsForOrg(ctx context.Context, org string, opts *AlertListOptions) ([]*Alert, *Response, error) {
 	u := fmt.Sprintf("orgs/%v/code-scanning/alerts", org)
 	u, err := addOptions(u, opts)
@@ -236,7 +263,7 @@ func (s *CodeScanningService) ListAlertsForOrg(ctx context.Context, org string,
 // You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events
 // read permission to use this endpoint.
 //
-// GitHub API docs: https://docs.github.com/en/rest/code-scanning#list-code-scanning-alerts-for-a-repository
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-a-repository
 func (s *CodeScanningService) ListAlertsForRepo(ctx context.Context, owner, repo string, opts *AlertListOptions) ([]*Alert, *Response, error) {
 	u := fmt.Sprintf("repos/%v/%v/code-scanning/alerts", owner, repo)
 	u, err := addOptions(u, opts)
@@ -265,7 +292,7 @@ func (s *CodeScanningService) ListAlertsForRepo(ctx context.Context, owner, repo
 //
 // The security alert_id is the number at the end of the security alert's URL.
 //
-// GitHub API docs: https://docs.github.com/en/rest/code-scanning#get-a-code-scanning-alert
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-alert
 func (s *CodeScanningService) GetAlert(ctx context.Context, owner, repo string, id int64) (*Alert, *Response, error) {
 	u := fmt.Sprintf("repos/%v/%v/code-scanning/alerts/%v", owner, repo, id)
 
@@ -308,13 +335,40 @@ func (s *CodeScanningService) UpdateAlert(ctx context.Context, owner, repo strin
 	return a, resp, nil
 }
 
+// ListAlertInstances lists instances of a code scanning alert.
+//
+// You must use an access token with the security_events scope to use this endpoint.
+// GitHub Apps must have the security_events read permission to use this endpoint.
+//
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#list-instances-of-a-code-scanning-alert
+func (s *CodeScanningService) ListAlertInstances(ctx context.Context, owner, repo string, id int64, opts *AlertInstancesListOptions) ([]*MostRecentInstance, *Response, error) {
+	u := fmt.Sprintf("repos/%v/%v/code-scanning/alerts/%v/instances", owner, repo, id)
+	u, err := addOptions(u, opts)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	req, err := s.client.NewRequest("GET", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	var alertInstances []*MostRecentInstance
+	resp, err := s.client.Do(ctx, req, &alertInstances)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return alertInstances, resp, nil
+}
+
 // UploadSarif uploads the result of code scanning job to GitHub.
 //
 // For the parameter sarif, you must first compress your SARIF file using gzip and then translate the contents of the file into a Base64 encoding string.
 // You must use an access token with the security_events scope to use this endpoint. GitHub Apps must have the security_events
 // write permission to use this endpoint.
 //
-// GitHub API docs: https://docs.github.com/en/rest/code-scanning#upload-an-analysis-as-sarif-data
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#upload-an-analysis-as-sarif-data
 func (s *CodeScanningService) UploadSarif(ctx context.Context, owner, repo string, sarif *SarifAnalysis) (*SarifID, *Response, error) {
 	u := fmt.Sprintf("repos/%v/%v/code-scanning/sarifs", owner, repo)
 
@@ -332,13 +386,45 @@ func (s *CodeScanningService) UploadSarif(ctx context.Context, owner, repo strin
 	return sarifID, resp, nil
 }
 
+// SARIFUpload represents information about a SARIF upload.
+type SARIFUpload struct {
+	// `pending` files have not yet been processed, while `complete` means results from the SARIF have been stored.
+	// `failed` files have either not been processed at all, or could only be partially processed.
+	ProcessingStatus *string `json:"processing_status,omitempty"`
+	// The REST API URL for getting the analyses associated with the upload.
+	AnalysesURL *string `json:"analyses_url,omitempty"`
+}
+
+// GetSARIF gets information about a SARIF upload.
+//
+// You must use an access token with the security_events scope to use this endpoint.
+// GitHub Apps must have the security_events read permission to use this endpoint.
+//
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload
+func (s *CodeScanningService) GetSARIF(ctx context.Context, owner, repo, sarifID string) (*SARIFUpload, *Response, error) {
+	u := fmt.Sprintf("repos/%v/%v/code-scanning/sarifs/%v", owner, repo, sarifID)
+
+	req, err := s.client.NewRequest("GET", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	sarifUpload := new(SARIFUpload)
+	resp, err := s.client.Do(ctx, req, sarifUpload)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return sarifUpload, resp, nil
+}
+
 // ListAnalysesForRepo lists code scanning analyses for a repository.
 //
 // Lists the details of all code scanning analyses for a repository, starting with the most recent.
 // You must use an access token with the security_events scope to use this endpoint.
 // GitHub Apps must have the security_events read permission to use this endpoint.
 //
-// GitHub API docs: https://docs.github.com/en/rest/code-scanning#list-code-scanning-analyses-for-a-repository
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#list-code-scanning-analyses-for-a-repository
 func (s *CodeScanningService) ListAnalysesForRepo(ctx context.Context, owner, repo string, opts *AnalysesListOptions) ([]*ScanningAnalysis, *Response, error) {
 	u := fmt.Sprintf("repos/%v/%v/code-scanning/analyses", owner, repo)
 	u, err := addOptions(u, opts)
@@ -367,7 +453,7 @@ func (s *CodeScanningService) ListAnalysesForRepo(ctx context.Context, owner, re
 //
 // The security analysis_id is the ID of the analysis, as returned from the ListAnalysesForRepo operation.
 //
-// GitHub API docs: https://docs.github.com/en/rest/code-scanning#get-a-code-scanning-analysis-for-a-repository
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository
 func (s *CodeScanningService) GetAnalysis(ctx context.Context, owner, repo string, id int64) (*ScanningAnalysis, *Response, error) {
 	u := fmt.Sprintf("repos/%v/%v/code-scanning/analyses/%v", owner, repo, id)
 
@@ -385,6 +471,85 @@ func (s *CodeScanningService) GetAnalysis(ctx context.Context, owner, repo strin
 	return analysis, resp, nil
 }
 
+// DeleteAnalysis represents a successful deletion of a code scanning analysis.
+type DeleteAnalysis struct {
+	// Next deletable analysis in chain, without last analysis deletion confirmation
+	NextAnalysisURL *string `json:"next_analysis_url,omitempty"`
+	// Next deletable analysis in chain, with last analysis deletion confirmation
+	ConfirmDeleteURL *string `json:"confirm_delete_url,omitempty"`
+}
+
+// DeleteAnalysis deletes a single code scanning analysis from a repository.
+//
+// You must use an access token with the repo scope to use this endpoint.
+// GitHub Apps must have the security_events read permission to use this endpoint.
+//
+// The security analysis_id is the ID of the analysis, as returned from the ListAnalysesForRepo operation.
+//
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#delete-a-code-scanning-analysis-from-a-repository
+func (s *CodeScanningService) DeleteAnalysis(ctx context.Context, owner, repo string, id int64) (*DeleteAnalysis, *Response, error) {
+	u := fmt.Sprintf("repos/%v/%v/code-scanning/analyses/%v", owner, repo, id)
+
+	req, err := s.client.NewRequest("DELETE", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	deleteAnalysis := new(DeleteAnalysis)
+	resp, err := s.client.Do(ctx, req, deleteAnalysis)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return deleteAnalysis, resp, nil
+}
+
+// ListCodeQLDatabases lists the CodeQL databases that are available in a repository.
+//
+// You must use an access token with the security_events scope to use this endpoint.
+// GitHub Apps must have the contents read permission to use this endpoint.
+//
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#list-codeql-databases-for-a-repository
+func (s *CodeScanningService) ListCodeQLDatabases(ctx context.Context, owner, repo string) ([]*CodeQLDatabase, *Response, error) {
+	u := fmt.Sprintf("repos/%v/%v/code-scanning/codeql/databases", owner, repo)
+
+	req, err := s.client.NewRequest("GET", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	var codeqlDatabases []*CodeQLDatabase
+	resp, err := s.client.Do(ctx, req, &codeqlDatabases)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return codeqlDatabases, resp, nil
+}
+
+// GetCodeQLDatabase gets a CodeQL database for a language in a repository.
+//
+// You must use an access token with the security_events scope to use this endpoint.
+// GitHub Apps must have the contents read permission to use this endpoint.
+//
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-codeql-database-for-a-repository
+func (s *CodeScanningService) GetCodeQLDatabase(ctx context.Context, owner, repo, language string) (*CodeQLDatabase, *Response, error) {
+	u := fmt.Sprintf("repos/%v/%v/code-scanning/codeql/databases/%v", owner, repo, language)
+
+	req, err := s.client.NewRequest("GET", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	codeqlDatabase := new(CodeQLDatabase)
+	resp, err := s.client.Do(ctx, req, codeqlDatabase)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return codeqlDatabase, resp, nil
+}
+
 // DefaultSetupConfiguration represents a code scanning default setup configuration.
 type DefaultSetupConfiguration struct {
 	State      *string    `json:"state,omitempty"`
@@ -399,7 +564,7 @@ type DefaultSetupConfiguration struct {
 // endpoint with private repos or the public_repo scope for public repos. GitHub Apps must have the repo write
 // permission to use this endpoint.
 //
-// GitHub API docs: https://docs.github.com/en/rest/code-scanning#get-a-code-scanning-default-setup-configuration
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-default-setup-configuration
 func (s *CodeScanningService) GetDefaultSetupConfiguration(ctx context.Context, owner, repo string) (*DefaultSetupConfiguration, *Response, error) {
 	u := fmt.Sprintf("repos/%s/%s/code-scanning/default-setup", owner, repo)
 
@@ -440,7 +605,7 @@ type UpdateDefaultSetupConfigurationResponse struct {
 // This method might return an AcceptedError and a status code of 202. This is because this is the status that GitHub
 // returns to signify that it has now scheduled the update of the pull request branch in a background task.
 //
-// GitHub API docs: https://docs.github.com/en/rest/code-scanning#update-a-code-scanning-default-setup-configuration
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning/code-scanning#update-a-code-scanning-default-setup-configuration
 func (s *CodeScanningService) UpdateDefaultSetupConfiguration(ctx context.Context, owner, repo string, options *UpdateDefaultSetupConfigurationOptions) (*UpdateDefaultSetupConfigurationResponse, *Response, error) {
 	u := fmt.Sprintf("repos/%s/%s/code-scanning/default-setup", owner, repo)
 
diff --git a/github/dependabot_alerts.go b/github/dependabot_alerts.go
index a55f540f..177316b1 100644
--- a/github/dependabot_alerts.go
+++ b/github/dependabot_alerts.go
@@ -17,8 +17,8 @@ type Dependency struct {
 	Scope        *string               `json:"scope,omitempty"`
 }
 
-// AdvisoryCVSs represents the advisory pertaining to the Common Vulnerability Scoring System.
-type AdvisoryCVSs struct {
+// AdvisoryCVSS represents the advisory pertaining to the Common Vulnerability Scoring System.
+type AdvisoryCVSS struct {
 	Score        *float64 `json:"score,omitempty"`
 	VectorString *string  `json:"vector_string,omitempty"`
 }
@@ -37,7 +37,7 @@ type DependabotSecurityAdvisory struct {
 	Description     *string                  `json:"description,omitempty"`
 	Vulnerabilities []*AdvisoryVulnerability `json:"vulnerabilities,omitempty"`
 	Severity        *string                  `json:"severity,omitempty"`
-	CVSs            *AdvisoryCVSs            `json:"cvss,omitempty"`
+	CVSS            *AdvisoryCVSS            `json:"cvss,omitempty"`
 	CWEs            []*AdvisoryCWEs          `json:"cwes,omitempty"`
 	Identifiers     []*AdvisoryIdentifier    `json:"identifiers,omitempty"`
 	References      []*AdvisoryReference     `json:"references,omitempty"`
@@ -62,7 +62,9 @@ type DependabotAlert struct {
 	DismissedReason       *string                     `json:"dismissed_reason,omitempty"`
 	DismissedComment      *string                     `json:"dismissed_comment,omitempty"`
 	FixedAt               *Timestamp                  `json:"fixed_at,omitempty"`
-	Repository            *Repository                 `json:"repository,omitempty"`
+	AutoDismissedAt       *Timestamp                  `json:"auto_dismissed_at,omitempty"`
+	// The repository is always empty for events
+	Repository *Repository `json:"repository,omitempty"`
 }
 
 // ListAlertsOptions specifies the optional parameters to the DependabotService.ListRepoAlerts
diff --git a/github/event_types.go b/github/event_types.go
index 64bbde12..1a403da9 100644
--- a/github/event_types.go
+++ b/github/event_types.go
@@ -134,6 +134,25 @@ type DeleteEvent struct {
 	Installation *Installation `json:"installation,omitempty"`
 }
 
+// DependabotAlertEvent is triggered when there is activity relating to Dependabot alerts.
+// The Webhook event name is "dependabot_alert".
+//
+// GitHub API docs: https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#dependabot_alert
+type DependabotAlertEvent struct {
+	Action *string          `json:"action,omitempty"`
+	Alert  *DependabotAlert `json:"alert,omitempty"`
+
+	// The following fields are only populated by Webhook events.
+	Installation *Installation `json:"installation,omitempty"`
+	Enterprise   *Enterprise   `json:"enterprise,omitempty"`
+	Repo         *Repository   `json:"repository,omitempty"`
+	Sender       *User         `json:"sender,omitempty"`
+
+	// The following field is only present when the webhook is triggered on
+	// a repository belonging to an organization.
+	Organization *Organization `json:"organization,omitempty"`
+}
+
 // DeployKeyEvent is triggered when a deploy key is added or removed from a repository.
 // The Webhook event name is "deploy_key".
 //
@@ -1591,6 +1610,8 @@ type WorkflowRunEvent struct {
 //
 // GitHub API docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#security_advisory
 type SecurityAdvisory struct {
+	CVSS            *AdvisoryCVSS            `json:"cvss,omitempty"`
+	CWEs            []*AdvisoryCWEs          `json:"cwes,omitempty"`
 	GHSAID          *string                  `json:"ghsa_id,omitempty"`
 	Summary         *string                  `json:"summary,omitempty"`
 	Description     *string                  `json:"description,omitempty"`
@@ -1639,6 +1660,13 @@ type FirstPatchedVersion struct {
 type SecurityAdvisoryEvent struct {
 	Action           *string           `json:"action,omitempty"`
 	SecurityAdvisory *SecurityAdvisory `json:"security_advisory,omitempty"`
+
+	// The following fields are only populated by Webhook events.
+	Enterprise   *Enterprise   `json:"enterprise,omitempty"`
+	Installation *Installation `json:"installation,omitempty"`
+	Organization *Organization `json:"organization,omitempty"`
+	Repository   *Repository   `json:"repository,omitempty"`
+	Sender       *User         `json:"sender,omitempty"`
 }
 
 // CodeScanningAlertEvent is triggered when a code scanning finds a potential vulnerability or error in your code.
diff --git a/github/github-accessors.go b/github/github-accessors.go
index 562ad734..560e0892 100644
--- a/github/github-accessors.go
+++ b/github/github-accessors.go
@@ -343,7 +343,7 @@ func (a *AdvancedSecurityCommittersBreakdown) GetUserLogin() string {
 }
 
 // GetScore returns the Score field.
-func (a *AdvisoryCVSs) GetScore() *float64 {
+func (a *AdvisoryCVSS) GetScore() *float64 {
 	if a == nil {
 		return nil
 	}
@@ -351,7 +351,7 @@ func (a *AdvisoryCVSs) GetScore() *float64 {
 }
 
 // GetVectorString returns the VectorString field if it's non-nil, zero value otherwise.
-func (a *AdvisoryCVSs) GetVectorString() string {
+func (a *AdvisoryCVSS) GetVectorString() string {
 	if a == nil || a.VectorString == nil {
 		return ""
 	}
@@ -2830,6 +2830,78 @@ func (c *CodeownersError) GetSuggestion() string {
 	return *c.Suggestion
 }
 
+// GetContentType returns the ContentType field if it's non-nil, zero value otherwise.
+func (c *CodeQLDatabase) GetContentType() string {
+	if c == nil || c.ContentType == nil {
+		return ""
+	}
+	return *c.ContentType
+}
+
+// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
+func (c *CodeQLDatabase) GetCreatedAt() Timestamp {
+	if c == nil || c.CreatedAt == nil {
+		return Timestamp{}
+	}
+	return *c.CreatedAt
+}
+
+// GetID returns the ID field if it's non-nil, zero value otherwise.
+func (c *CodeQLDatabase) GetID() int64 {
+	if c == nil || c.ID == nil {
+		return 0
+	}
+	return *c.ID
+}
+
+// GetLanguage returns the Language field if it's non-nil, zero value otherwise.
+func (c *CodeQLDatabase) GetLanguage() string {
+	if c == nil || c.Language == nil {
+		return ""
+	}
+	return *c.Language
+}
+
+// GetName returns the Name field if it's non-nil, zero value otherwise.
+func (c *CodeQLDatabase) GetName() string {
+	if c == nil || c.Name == nil {
+		return ""
+	}
+	return *c.Name
+}
+
+// GetSize returns the Size field if it's non-nil, zero value otherwise.
+func (c *CodeQLDatabase) GetSize() int64 {
+	if c == nil || c.Size == nil {
+		return 0
+	}
+	return *c.Size
+}
+
+// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
+func (c *CodeQLDatabase) GetUpdatedAt() Timestamp {
+	if c == nil || c.UpdatedAt == nil {
+		return Timestamp{}
+	}
+	return *c.UpdatedAt
+}
+
+// GetUploader returns the Uploader field.
+func (c *CodeQLDatabase) GetUploader() *User {
+	if c == nil {
+		return nil
+	}
+	return c.Uploader
+}
+
+// GetURL returns the URL field if it's non-nil, zero value otherwise.
+func (c *CodeQLDatabase) GetURL() string {
+	if c == nil || c.URL == nil {
+		return ""
+	}
+	return *c.URL
+}
+
 // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise.
 func (c *CodeResult) GetHTMLURL() string {
 	if c == nil || c.HTMLURL == nil {
@@ -4878,6 +4950,22 @@ func (d *DefaultSetupConfiguration) GetUpdatedAt() Timestamp {
 	return *d.UpdatedAt
 }
 
+// GetConfirmDeleteURL returns the ConfirmDeleteURL field if it's non-nil, zero value otherwise.
+func (d *DeleteAnalysis) GetConfirmDeleteURL() string {
+	if d == nil || d.ConfirmDeleteURL == nil {
+		return ""
+	}
+	return *d.ConfirmDeleteURL
+}
+
+// GetNextAnalysisURL returns the NextAnalysisURL field if it's non-nil, zero value otherwise.
+func (d *DeleteAnalysis) GetNextAnalysisURL() string {
+	if d == nil || d.NextAnalysisURL == nil {
+		return ""
+	}
+	return *d.NextAnalysisURL
+}
+
 // GetInstallation returns the Installation field.
 func (d *DeleteEvent) GetInstallation() *Installation {
 	if d == nil {
@@ -4926,6 +5014,14 @@ func (d *DeleteEvent) GetSender() *User {
 	return d.Sender
 }
 
+// GetAutoDismissedAt returns the AutoDismissedAt field if it's non-nil, zero value otherwise.
+func (d *DependabotAlert) GetAutoDismissedAt() Timestamp {
+	if d == nil || d.AutoDismissedAt == nil {
+		return Timestamp{}
+	}
+	return *d.AutoDismissedAt
+}
+
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
 func (d *DependabotAlert) GetCreatedAt() Timestamp {
 	if d == nil || d.CreatedAt == nil {
@@ -5046,6 +5142,62 @@ func (d *DependabotAlert) GetURL() string {
 	return *d.URL
 }
 
+// GetAction returns the Action field if it's non-nil, zero value otherwise.
+func (d *DependabotAlertEvent) GetAction() string {
+	if d == nil || d.Action == nil {
+		return ""
+	}
+	return *d.Action
+}
+
+// GetAlert returns the Alert field.
+func (d *DependabotAlertEvent) GetAlert() *DependabotAlert {
+	if d == nil {
+		return nil
+	}
+	return d.Alert
+}
+
+// GetEnterprise returns the Enterprise field.
+func (d *DependabotAlertEvent) GetEnterprise() *Enterprise {
+	if d == nil {
+		return nil
+	}
+	return d.Enterprise
+}
+
+// GetInstallation returns the Installation field.
+func (d *DependabotAlertEvent) GetInstallation() *Installation {
+	if d == nil {
+		return nil
+	}
+	return d.Installation
+}
+
+// GetOrganization returns the Organization field.
+func (d *DependabotAlertEvent) GetOrganization() *Organization {
+	if d == nil {
+		return nil
+	}
+	return d.Organization
+}
+
+// GetRepo returns the Repo field.
+func (d *DependabotAlertEvent) GetRepo() *Repository {
+	if d == nil {
+		return nil
+	}
+	return d.Repo
+}
+
+// GetSender returns the Sender field.
+func (d *DependabotAlertEvent) GetSender() *User {
+	if d == nil {
+		return nil
+	}
+	return d.Sender
+}
+
 // GetCVEID returns the CVEID field if it's non-nil, zero value otherwise.
 func (d *DependabotSecurityAdvisory) GetCVEID() string {
 	if d == nil || d.CVEID == nil {
@@ -5054,12 +5206,12 @@ func (d *DependabotSecurityAdvisory) GetCVEID() string {
 	return *d.CVEID
 }
 
-// GetCVSs returns the CVSs field.
-func (d *DependabotSecurityAdvisory) GetCVSs() *AdvisoryCVSs {
+// GetCVSS returns the CVSS field.
+func (d *DependabotSecurityAdvisory) GetCVSS() *AdvisoryCVSS {
 	if d == nil {
 		return nil
 	}
-	return d.CVSs
+	return d.CVSS
 }
 
 // GetDescription returns the Description field if it's non-nil, zero value otherwise.
@@ -11318,6 +11470,14 @@ func (m *MostRecentInstance) GetAnalysisKey() string {
 	return *m.AnalysisKey
 }
 
+// GetCategory returns the Category field if it's non-nil, zero value otherwise.
+func (m *MostRecentInstance) GetCategory() string {
+	if m == nil || m.Category == nil {
+		return ""
+	}
+	return *m.Category
+}
+
 // GetCommitSHA returns the CommitSHA field if it's non-nil, zero value otherwise.
 func (m *MostRecentInstance) GetCommitSHA() string {
 	if m == nil || m.CommitSHA == nil {
@@ -11334,6 +11494,14 @@ func (m *MostRecentInstance) GetEnvironment() string {
 	return *m.Environment
 }
 
+// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise.
+func (m *MostRecentInstance) GetHTMLURL() string {
+	if m == nil || m.HTMLURL == nil {
+		return ""
+	}
+	return *m.HTMLURL
+}
+
 // GetLocation returns the Location field.
 func (m *MostRecentInstance) GetLocation() *Location {
 	if m == nil {
@@ -20046,6 +20214,22 @@ func (s *SarifID) GetURL() string {
 	return *s.URL
 }
 
+// GetAnalysesURL returns the AnalysesURL field if it's non-nil, zero value otherwise.
+func (s *SARIFUpload) GetAnalysesURL() string {
+	if s == nil || s.AnalysesURL == nil {
+		return ""
+	}
+	return *s.AnalysesURL
+}
+
+// GetProcessingStatus returns the ProcessingStatus field if it's non-nil, zero value otherwise.
+func (s *SARIFUpload) GetProcessingStatus() string {
+	if s == nil || s.ProcessingStatus == nil {
+		return ""
+	}
+	return *s.ProcessingStatus
+}
+
 // GetSBOM returns the SBOM field.
 func (s *SBOM) GetSBOM() *SBOMInfo {
 	if s == nil {
@@ -20630,6 +20814,14 @@ func (s *SecretScanningPushProtection) GetStatus() string {
 	return *s.Status
 }
 
+// GetCVSS returns the CVSS field.
+func (s *SecurityAdvisory) GetCVSS() *AdvisoryCVSS {
+	if s == nil {
+		return nil
+	}
+	return s.CVSS
+}
+
 // GetDescription returns the Description field if it's non-nil, zero value otherwise.
 func (s *SecurityAdvisory) GetDescription() string {
 	if s == nil || s.Description == nil {
@@ -20694,6 +20886,38 @@ func (s *SecurityAdvisoryEvent) GetAction() string {
 	return *s.Action
 }
 
+// GetEnterprise returns the Enterprise field.
+func (s *SecurityAdvisoryEvent) GetEnterprise() *Enterprise {
+	if s == nil {
+		return nil
+	}
+	return s.Enterprise
+}
+
+// GetInstallation returns the Installation field.
+func (s *SecurityAdvisoryEvent) GetInstallation() *Installation {
+	if s == nil {
+		return nil
+	}
+	return s.Installation
+}
+
+// GetOrganization returns the Organization field.
+func (s *SecurityAdvisoryEvent) GetOrganization() *Organization {
+	if s == nil {
+		return nil
+	}
+	return s.Organization
+}
+
+// GetRepository returns the Repository field.
+func (s *SecurityAdvisoryEvent) GetRepository() *Repository {
+	if s == nil {
+		return nil
+	}
+	return s.Repository
+}
+
 // GetSecurityAdvisory returns the SecurityAdvisory field.
 func (s *SecurityAdvisoryEvent) GetSecurityAdvisory() *SecurityAdvisory {
 	if s == nil {
@@ -20702,6 +20926,14 @@ func (s *SecurityAdvisoryEvent) GetSecurityAdvisory() *SecurityAdvisory {
 	return s.SecurityAdvisory
 }
 
+// GetSender returns the Sender field.
+func (s *SecurityAdvisoryEvent) GetSender() *User {
+	if s == nil {
+		return nil
+	}
+	return s.Sender
+}
+
 // GetAdvancedSecurity returns the AdvancedSecurity field.
 func (s *SecurityAndAnalysis) GetAdvancedSecurity() *AdvancedSecurity {
 	if s == nil {
diff --git a/github/messages.go b/github/messages.go
index e4fa6f6a..c16b6015 100644
--- a/github/messages.go
+++ b/github/messages.go
@@ -54,6 +54,7 @@ var (
 		"content_reference":              &ContentReferenceEvent{},
 		"create":                         &CreateEvent{},
 		"delete":                         &DeleteEvent{},
+		"dependabot_alert":               &DependabotAlertEvent{},
 		"deploy_key":                     &DeployKeyEvent{},
 		"deployment":                     &DeploymentEvent{},
 		"deployment_status":              &DeploymentStatusEvent{},
diff --git a/go.sum b/go.sum
index 68e49aed..3317d0c6 100644
--- a/go.sum
+++ b/go.sum
@@ -1,7 +1,6 @@
 github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA=
 github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
 github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
-github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
 github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
 github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
 github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
@@ -10,51 +9,16 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
 github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
 github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
-github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
 golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
 golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
-golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
 golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
-golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
-golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
-golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
-golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
-golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
-golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=


Test patch:
diff --git a/github/code-scanning_test.go b/github/code-scanning_test.go
index 20d4817d..e42f1d8b 100644
--- a/github/code-scanning_test.go
+++ b/github/code-scanning_test.go
@@ -89,6 +89,47 @@ func TestCodeScanningService_UploadSarif(t *testing.T) {
 	})
 }
 
+func TestCodeScanningService_GetSARIF(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/code-scanning/sarifs/abc", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "GET")
+		fmt.Fprint(w, `{
+			"processing_status": "s",
+			"analyses_url": "u"
+		}`)
+	})
+
+	ctx := context.Background()
+	sarifUpload, _, err := client.CodeScanning.GetSARIF(ctx, "o", "r", "abc")
+	if err != nil {
+		t.Errorf("CodeScanning.GetSARIF returned error: %v", err)
+	}
+
+	want := &SARIFUpload{
+		ProcessingStatus: String("s"),
+		AnalysesURL:      String("u"),
+	}
+	if !cmp.Equal(sarifUpload, want) {
+		t.Errorf("CodeScanning.GetSARIF returned %+v, want %+v", sarifUpload, want)
+	}
+
+	const methodName = "GetSARIF"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.CodeScanning.GetSARIF(ctx, "\n", "\n", "\n")
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.CodeScanning.GetSARIF(ctx, "o", "r", "abc")
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
 func TestCodeScanningService_ListAlertsForOrg(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
@@ -730,52 +771,133 @@ func TestCodeScanningService_UpdateAlert(t *testing.T) {
 	})
 }
 
+func TestCodeScanningService_ListAlertInstances(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/code-scanning/alerts/88/instances", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "GET")
+		fmt.Fprint(w, `[
+			{
+			  "ref": "refs/heads/main",
+			  "analysis_key": ".github/workflows/codeql-analysis.yml:analyze",
+			  "environment": "",
+			  "category": ".github/workflows/codeql-analysis.yml:analyze",
+			  "state": "open",
+			  "fixed_at": null,
+			  "commit_sha": "abcdefg12345",
+			  "message": {
+				"text": "This path depends on a user-provided value."
+			  },
+			  "location": {
+				"path": "spec-main/api-session-spec.ts",
+				"start_line": 917,
+				"end_line": 917,
+				"start_column": 7,
+				"end_column": 18
+			  },
+			  "classifications": [
+				"test"
+			  ]
+			}
+		  ]`)
+	})
+
+	opts := &AlertInstancesListOptions{Ref: "heads/main", ListOptions: ListOptions{Page: 1}}
+	ctx := context.Background()
+	instances, _, err := client.CodeScanning.ListAlertInstances(ctx, "o", "r", 88, opts)
+	if err != nil {
+		t.Errorf("CodeScanning.ListAlertInstances returned error: %v", err)
+	}
+
+	want := []*MostRecentInstance{
+		{
+			Ref:         String("refs/heads/main"),
+			AnalysisKey: String(".github/workflows/codeql-analysis.yml:analyze"),
+			Category:    String(".github/workflows/codeql-analysis.yml:analyze"),
+			Environment: String(""),
+			State:       String("open"),
+			CommitSHA:   String("abcdefg12345"),
+			Message: &Message{
+				Text: String("This path depends on a user-provided value."),
+			},
+			Location: &Location{
+				Path:        String("spec-main/api-session-spec.ts"),
+				StartLine:   Int(917),
+				EndLine:     Int(917),
+				StartColumn: Int(7),
+				EndColumn:   Int(18),
+			},
+			Classifications: []string{"test"},
+		},
+	}
+	if !cmp.Equal(instances, want) {
+		t.Errorf("CodeScanning.ListAlertInstances returned %+v, want %+v", instances, want)
+	}
+
+	const methodName = "ListAlertInstances"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.CodeScanning.ListAlertInstances(ctx, "\n", "\n", -1, opts)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.CodeScanning.ListAlertInstances(ctx, "o", "r", 88, opts)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
 func TestCodeScanningService_GetAlert(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
 	mux.HandleFunc("/repos/o/r/code-scanning/alerts/88", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "GET")
-		fmt.Fprint(w, `{"rule_id":"js/useless-expression",
-				"rule_severity":"warning",
-				"rule_description":"Expression has no effect",
-				"tool": {
-					"name": "CodeQL",
-					"guid": null,
-					"version": "1.4.0"
-				},
-				"rule": {
-					"id": "useless expression",
-					"severity": "warning",
-					"description": "Expression has no effect",
-					"name": "useless expression",
-					"full_description": "Expression has no effect",
-					"help": "Expression has no effect"
+		fmt.Fprint(w, `{
+			"rule_id":"js/useless-expression",
+			"rule_severity":"warning",
+			"rule_description":"Expression has no effect",
+			"tool": {
+				"name": "CodeQL",
+				"guid": null,
+				"version": "1.4.0"
+			},
+			"rule": {
+				"id": "useless expression",
+				"severity": "warning",
+				"description": "Expression has no effect",
+				"name": "useless expression",
+				"full_description": "Expression has no effect",
+				"help": "Expression has no effect"
+			},
+			"most_recent_instance": {
+				"ref": "refs/heads/main",
+				"state": "open",
+				"commit_sha": "abcdefg12345",
+				"message": {
+					"text": "This path depends on a user-provided value."
 				},
-				"most_recent_instance": {
-					"ref": "refs/heads/main",
-					"state": "open",
-					"commit_sha": "abcdefg12345",
-					"message": {
-						"text": "This path depends on a user-provided value."
-					},
-					"location": {
-						"path": "spec-main/api-session-spec.ts",
-						"start_line": 917,
-						"end_line": 917,
-						"start_column": 7,
-						"end_column": 18
-					},
-					"classifications": [
-						"test"
-					]
+				"location": {
+					"path": "spec-main/api-session-spec.ts",
+					"start_line": 917,
+					"end_line": 917,
+					"start_column": 7,
+					"end_column": 18
 				},
-				"created_at":"2019-01-02T15:04:05Z",
-				"state":"open",
-				"closed_by":null,
-				"closed_at":null,
-				"url":"https://api.github.com/repos/o/r/code-scanning/alerts/88",
-				"html_url":"https://github.com/o/r/security/code-scanning/88"}`)
+				"classifications": [
+					"test"
+				]
+			},
+			"created_at":"2019-01-02T15:04:05Z",
+			"state":"open",
+			"closed_by":null,
+			"closed_at":null,
+			"url":"https://api.github.com/repos/o/r/code-scanning/alerts/88",
+			"html_url":"https://github.com/o/r/security/code-scanning/88"
+		}`)
 	})
 
 	ctx := context.Background()
@@ -1178,6 +1300,241 @@ func TestCodeScanningService_GetAnalysis(t *testing.T) {
 	})
 }
 
+func TestCodeScanningService_DeleteAnalysis(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/code-scanning/analyses/40", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "DELETE")
+		fmt.Fprint(w, `{
+			"next_analysis_url": "a",
+			"confirm_delete_url": "b"
+		}`)
+	})
+
+	ctx := context.Background()
+	analysis, _, err := client.CodeScanning.DeleteAnalysis(ctx, "o", "r", 40)
+	if err != nil {
+		t.Errorf("CodeScanning.DeleteAnalysis returned error: %v", err)
+	}
+
+	want := &DeleteAnalysis{
+		NextAnalysisURL:  String("a"),
+		ConfirmDeleteURL: String("b"),
+	}
+	if !cmp.Equal(analysis, want) {
+		t.Errorf("CodeScanning.DeleteAnalysis returned %+v, want %+v", analysis, want)
+	}
+
+	const methodName = "DeleteAnalysis"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.CodeScanning.DeleteAnalysis(ctx, "\n", "\n", -123)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.CodeScanning.DeleteAnalysis(ctx, "o", "r", 40)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
+func TestCodeScanningService_ListCodeQLDatabases(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/code-scanning/codeql/databases", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "GET")
+		fmt.Fprint(w, `[
+			{
+				"id": 1,
+				"name": "name",
+				"language": "language",
+				"uploader": {
+					"login": "a",
+					"id": 1,
+					"node_id": "b",
+					"avatar_url": "c",
+					"gravatar_id": "d",
+					"url": "e",
+					"html_url": "f",
+					"followers_url": "g",
+					"following_url": "h",
+					"gists_url": "i",
+					"starred_url": "j",
+					"subscriptions_url": "k",
+					"organizations_url": "l",
+					"repos_url": "m",
+					"events_url": "n",
+					"received_events_url": "o",
+					"type": "p",
+					"site_admin": false
+				},
+				"content_type": "r",
+				"size": 1024,
+				"created_at": "2021-01-13T11:55:49Z",
+				"updated_at": "2021-01-13T11:55:49Z",
+				"url": "s"
+			}
+		]`)
+	})
+
+	ctx := context.Background()
+	databases, _, err := client.CodeScanning.ListCodeQLDatabases(ctx, "o", "r")
+	if err != nil {
+		t.Errorf("CodeScanning.ListCodeQLDatabases returned error: %v", err)
+	}
+
+	date := &Timestamp{time.Date(2021, time.January, 13, 11, 55, 49, 0, time.UTC)}
+	want := []*CodeQLDatabase{
+		{
+			ID:       Int64(1),
+			Name:     String("name"),
+			Language: String("language"),
+			Uploader: &User{
+				Login:             String("a"),
+				ID:                Int64(1),
+				NodeID:            String("b"),
+				AvatarURL:         String("c"),
+				GravatarID:        String("d"),
+				URL:               String("e"),
+				HTMLURL:           String("f"),
+				FollowersURL:      String("g"),
+				FollowingURL:      String("h"),
+				GistsURL:          String("i"),
+				StarredURL:        String("j"),
+				SubscriptionsURL:  String("k"),
+				OrganizationsURL:  String("l"),
+				ReposURL:          String("m"),
+				EventsURL:         String("n"),
+				ReceivedEventsURL: String("o"),
+				Type:              String("p"),
+				SiteAdmin:         Bool(false),
+			},
+			ContentType: String("r"),
+			Size:        Int64(1024),
+			CreatedAt:   date,
+			UpdatedAt:   date,
+			URL:         String("s"),
+		},
+	}
+
+	if !cmp.Equal(databases, want) {
+		t.Errorf("CodeScanning.ListCodeQLDatabases returned %+v, want %+v", databases, want)
+	}
+
+	const methodName = "ListCodeQLDatabases"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.CodeScanning.ListCodeQLDatabases(ctx, "\n", "\n")
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.CodeScanning.ListCodeQLDatabases(ctx, "o", "r")
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
+func TestCodeScanningService_GetCodeQLDatabase(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/code-scanning/codeql/databases/lang", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "GET")
+		fmt.Fprint(w, `{
+			"id": 1,
+			"name": "name",
+			"language": "language",
+			"uploader": {
+				"login": "a",
+				"id": 1,
+				"node_id": "b",
+				"avatar_url": "c",
+				"gravatar_id": "d",
+				"url": "e",
+				"html_url": "f",
+				"followers_url": "g",
+				"following_url": "h",
+				"gists_url": "i",
+				"starred_url": "j",
+				"subscriptions_url": "k",
+				"organizations_url": "l",
+				"repos_url": "m",
+				"events_url": "n",
+				"received_events_url": "o",
+				"type": "p",
+				"site_admin": false
+			},
+			"content_type": "r",
+			"size": 1024,
+			"created_at": "2021-01-13T11:55:49Z",
+			"updated_at": "2021-01-13T11:55:49Z",
+			"url": "s"
+		}`)
+	})
+
+	ctx := context.Background()
+	database, _, err := client.CodeScanning.GetCodeQLDatabase(ctx, "o", "r", "lang")
+	if err != nil {
+		t.Errorf("CodeScanning.GetCodeQLDatabase returned error: %v", err)
+	}
+
+	date := &Timestamp{time.Date(2021, time.January, 13, 11, 55, 49, 0, time.UTC)}
+	want := &CodeQLDatabase{
+		ID:       Int64(1),
+		Name:     String("name"),
+		Language: String("language"),
+		Uploader: &User{
+			Login:             String("a"),
+			ID:                Int64(1),
+			NodeID:            String("b"),
+			AvatarURL:         String("c"),
+			GravatarID:        String("d"),
+			URL:               String("e"),
+			HTMLURL:           String("f"),
+			FollowersURL:      String("g"),
+			FollowingURL:      String("h"),
+			GistsURL:          String("i"),
+			StarredURL:        String("j"),
+			SubscriptionsURL:  String("k"),
+			OrganizationsURL:  String("l"),
+			ReposURL:          String("m"),
+			EventsURL:         String("n"),
+			ReceivedEventsURL: String("o"),
+			Type:              String("p"),
+			SiteAdmin:         Bool(false),
+		},
+		ContentType: String("r"),
+		Size:        Int64(1024),
+		CreatedAt:   date,
+		UpdatedAt:   date,
+		URL:         String("s"),
+	}
+
+	if !cmp.Equal(database, want) {
+		t.Errorf("CodeScanning.GetCodeQLDatabase returned %+v, want %+v", database, want)
+	}
+
+	const methodName = "GetCodeQLDatabase"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.CodeScanning.GetCodeQLDatabase(ctx, "\n", "\n", "\n")
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.CodeScanning.GetCodeQLDatabase(ctx, "o", "r", "lang")
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
 func TestCodeScanningService_GetDefaultSetupConfiguration(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
diff --git a/github/event_types_test.go b/github/event_types_test.go
index 653671b8..31b94479 100644
--- a/github/event_types_test.go
+++ b/github/event_types_test.go
@@ -12700,20 +12700,131 @@ func TestDeleteEvent_Marshal(t *testing.T) {
 	testJSONMarshal(t, r, want)
 }
 
-func TestForkEvent_Marshal(t *testing.T) {
-	testJSONMarshal(t, &ForkEvent{}, "{}")
+func TestDependabotAlertEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &DependabotAlertEvent{}, "{}")
 
-	u := &ForkEvent{
-		Forkee: &Repository{
-			ID:   Int64(1),
-			URL:  String("s"),
-			Name: String("n"),
+	e := &DependabotAlertEvent{
+		Action: String("a"),
+		Alert: &DependabotAlert{
+			Number: Int(1),
+			State:  String("s"),
+			Dependency: &Dependency{
+				Package: &VulnerabilityPackage{
+					Ecosystem: String("e"),
+					Name:      String("n"),
+				},
+				ManifestPath: String("mp"),
+				Scope:        String("s"),
+			},
+			SecurityAdvisory: &DependabotSecurityAdvisory{
+				GHSAID:      String("ghsaid"),
+				CVEID:       String("cveid"),
+				Summary:     String("s"),
+				Description: String("d"),
+				Vulnerabilities: []*AdvisoryVulnerability{
+					{
+						Package: &VulnerabilityPackage{
+							Ecosystem: String("e"),
+							Name:      String("n"),
+						},
+						Severity: String("s"),
+					},
+				},
+				Severity: String("s"),
+				CVSS: &AdvisoryCVSS{
+					Score:        Float64(1.0),
+					VectorString: String("vs"),
+				},
+				CWEs: []*AdvisoryCWEs{
+					{
+						CWEID: String("cweid"),
+						Name:  String("n"),
+					},
+				},
+				Identifiers: []*AdvisoryIdentifier{
+					{
+						Value: String("v"),
+						Type:  String("t"),
+					},
+				},
+				References: []*AdvisoryReference{
+					{
+						URL: String("u"),
+					},
+				},
+				PublishedAt: &Timestamp{referenceTime},
+				UpdatedAt:   &Timestamp{referenceTime},
+				WithdrawnAt: &Timestamp{referenceTime},
+			},
+			SecurityVulnerability: &AdvisoryVulnerability{
+				Package: &VulnerabilityPackage{
+					Ecosystem: String("e"),
+					Name:      String("n"),
+				},
+				Severity:               String("s"),
+				VulnerableVersionRange: String("vvr"),
+				FirstPatchedVersion: &FirstPatchedVersion{
+					Identifier: String("i"),
+				},
+			},
+			URL:         String("u"),
+			HTMLURL:     String("hu"),
+			CreatedAt:   &Timestamp{referenceTime},
+			UpdatedAt:   &Timestamp{referenceTime},
+			DismissedAt: &Timestamp{referenceTime},
+			DismissedBy: &User{
+				Login:     String("l"),
+				ID:        Int64(1),
+				NodeID:    String("n"),
+				URL:       String("u"),
+				ReposURL:  String("r"),
+				EventsURL: String("e"),
+				AvatarURL: String("a"),
+			},
+			DismissedReason:  String("dr"),
+			DismissedComment: String("dc"),
+			FixedAt:          &Timestamp{referenceTime},
+			AutoDismissedAt:  &Timestamp{referenceTime},
 		},
 		Repo: &Repository{
 			ID:   Int64(1),
 			URL:  String("s"),
 			Name: String("n"),
 		},
+		Organization: &Organization{
+			BillingEmail:                         String("be"),
+			Blog:                                 String("b"),
+			Company:                              String("c"),
+			Email:                                String("e"),
+			TwitterUsername:                      String("tu"),
+			Location:                             String("loc"),
+			Name:                                 String("n"),
+			Description:                          String("d"),
+			IsVerified:                           Bool(true),
+			HasOrganizationProjects:              Bool(true),
+			HasRepositoryProjects:                Bool(true),
+			DefaultRepoPermission:                String("drp"),
+			MembersCanCreateRepos:                Bool(true),
+			MembersCanCreateInternalRepos:        Bool(true),
+			MembersCanCreatePrivateRepos:         Bool(true),
+			MembersCanCreatePublicRepos:          Bool(false),
+			MembersAllowedRepositoryCreationType: String("marct"),
+			MembersCanCreatePages:                Bool(true),
+			MembersCanCreatePublicPages:          Bool(false),
+			MembersCanCreatePrivatePages:         Bool(true),
+		},
+		Enterprise: &Enterprise{
+			ID:          Int(1),
+			Slug:        String("s"),
+			Name:        String("n"),
+			NodeID:      String("nid"),
+			AvatarURL:   String("au"),
+			Description: String("d"),
+			WebsiteURL:  String("wu"),
+			HTMLURL:     String("hu"),
+			CreatedAt:   &Timestamp{referenceTime},
+			UpdatedAt:   &Timestamp{referenceTime},
+		},
 		Sender: &User{
 			Login:     String("l"),
 			ID:        Int64(1),
@@ -12817,17 +12928,127 @@ func TestForkEvent_Marshal(t *testing.T) {
 			SuspendedAt: &Timestamp{referenceTime},
 		},
 	}
-
 	want := `{
-		"forkee": {
+		"action": "a",
+		"alert": {
+			"number": 1,
+			"state": "s",
+			"dependency": {
+				"package": {
+					"ecosystem": "e",
+					"name": "n"
+				},
+				"manifest_path": "mp",
+				"scope": "s"
+			},
+			"security_advisory": {
+				"ghsa_id": "ghsaid",
+				"cve_id": "cveid",
+				"summary": "s",
+				"description": "d",
+				"vulnerabilities": [
+					{
+						"package": {
+							"ecosystem": "e",
+							"name": "n"
+						},
+						"severity": "s"
+					}
+				],
+				"severity": "s",
+				"cvss": {
+					"score": 1.0,
+					"vector_string": "vs"
+				},
+				"cwes": [
+					{
+						"cwe_id": "cweid",
+						"name": "n"
+					}
+				],
+				"identifiers": [
+					{
+						"value": "v",
+						"type": "t"
+					}
+				],
+				"references": [
+					{
+						"url": "u"
+					}
+				],
+				"published_at": ` + referenceTimeStr + `,
+				"updated_at": ` + referenceTimeStr + `,
+				"withdrawn_at": ` + referenceTimeStr + `
+			},
+			"security_vulnerability": {
+				"package": {
+					"ecosystem": "e",
+					"name": "n"
+				},
+				"severity": "s",
+				"vulnerable_version_range": "vvr",
+				"first_patched_version": {
+					"identifier": "i"
+				}
+			},
+			"url": "u",
+			"html_url": "hu",
+			"created_at": ` + referenceTimeStr + `,
+			"updated_at": ` + referenceTimeStr + `,
+			"dismissed_at": ` + referenceTimeStr + `,
+			"dismissed_by": {
+				"login": "l",
+				"id": 1,
+				"node_id": "n",
+				"avatar_url": "a",
+				"url": "u",
+				"events_url": "e",
+				"repos_url": "r"
+			},
+			"dismissed_reason": "dr",
+			"dismissed_comment": "dc",
+			"fixed_at": ` + referenceTimeStr + `,
+			"auto_dismissed_at": ` + referenceTimeStr + `
+		},
+		"repository": {
 			"id": 1,
 			"name": "n",
 			"url": "s"
 		},
-		"repository": {
+		"organization": {
+			"name": "n",
+			"company": "c",
+			"blog": "b",
+			"location": "loc",
+			"email": "e",
+			"twitter_username": "tu",
+			"description": "d",
+			"billing_email": "be",
+			"is_verified": true,
+			"has_organization_projects": true,
+			"has_repository_projects": true,
+			"default_repository_permission": "drp",
+			"members_can_create_repositories": true,
+			"members_can_create_public_repositories": false,
+			"members_can_create_private_repositories": true,
+			"members_can_create_internal_repositories": true,
+			"members_allowed_repository_creation_type": "marct",
+			"members_can_create_pages": true,
+			"members_can_create_public_pages": false,
+			"members_can_create_private_pages": true
+		},
+        "enterprise": {
 			"id": 1,
+			"slug": "s",
 			"name": "n",
-			"url": "s"
+			"node_id": "nid",
+			"avatar_url": "au",
+			"description": "d",
+			"website_url": "wu",
+			"html_url": "hu",
+			"created_at": ` + referenceTimeStr + `,
+			"updated_at": ` + referenceTimeStr + `
 		},
 		"sender": {
 			"login": "l",
@@ -12937,52 +13158,22 @@ func TestForkEvent_Marshal(t *testing.T) {
 		}
 	}`
 
-	testJSONMarshal(t, u, want)
+	testJSONMarshal(t, e, want)
 }
 
-func TestGitHubAppAuthorizationEvent_Marshal(t *testing.T) {
-	testJSONMarshal(t, &GitHubAppAuthorizationEvent{}, "{}")
+func TestForkEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &ForkEvent{}, "{}")
 
-	u := &GitHubAppAuthorizationEvent{
-		Action: String("a"),
-		Sender: &User{
-			Login:     String("l"),
-			ID:        Int64(1),
-			NodeID:    String("n"),
-			URL:       String("u"),
-			ReposURL:  String("r"),
-			EventsURL: String("e"),
-			AvatarURL: String("a"),
+	u := &ForkEvent{
+		Forkee: &Repository{
+			ID:   Int64(1),
+			URL:  String("s"),
+			Name: String("n"),
 		},
-	}
-
-	want := `{
-		"action": "a",
-		"sender": {
-			"login": "l",
-			"id": 1,
-			"node_id": "n",
-			"avatar_url": "a",
-			"url": "u",
-			"events_url": "e",
-			"repos_url": "r"
-		}
-	}`
-
-	testJSONMarshal(t, u, want)
-}
-
-func TestInstallationEvent_Marshal(t *testing.T) {
-	testJSONMarshal(t, &InstallationEvent{}, "{}")
-
-	u := &InstallationEvent{
-		Action: String("a"),
-		Repositories: []*Repository{
-			{
-				ID:   Int64(1),
-				URL:  String("u"),
-				Name: String("n"),
-			},
+		Repo: &Repository{
+			ID:   Int64(1),
+			URL:  String("s"),
+			Name: String("n"),
 		},
 		Sender: &User{
 			Login:     String("l"),
@@ -13089,14 +13280,16 @@ func TestInstallationEvent_Marshal(t *testing.T) {
 	}
 
 	want := `{
-		"action": "a",
-		"repositories": [
-			{
-				"id":1,
-				"name":"n",
-				"url":"u"
-			}
-		],
+		"forkee": {
+			"id": 1,
+			"name": "n",
+			"url": "s"
+		},
+		"repository": {
+			"id": 1,
+			"name": "n",
+			"url": "s"
+		},
 		"sender": {
 			"login": "l",
 			"id": 1,
@@ -13208,26 +13401,294 @@ func TestInstallationEvent_Marshal(t *testing.T) {
 	testJSONMarshal(t, u, want)
 }
 
-func TestHeadCommit_Marshal(t *testing.T) {
-	testJSONMarshal(t, &HeadCommit{}, "{}")
+func TestGitHubAppAuthorizationEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &GitHubAppAuthorizationEvent{}, "{}")
 
-	u := &HeadCommit{
-		Message: String("m"),
-		Author: &CommitAuthor{
-			Date:  &Timestamp{referenceTime},
-			Name:  String("n"),
-			Email: String("e"),
-			Login: String("u"),
+	u := &GitHubAppAuthorizationEvent{
+		Action: String("a"),
+		Sender: &User{
+			Login:     String("l"),
+			ID:        Int64(1),
+			NodeID:    String("n"),
+			URL:       String("u"),
+			ReposURL:  String("r"),
+			EventsURL: String("e"),
+			AvatarURL: String("a"),
 		},
-		URL:       String("u"),
-		Distinct:  Bool(true),
-		SHA:       String("s"),
-		ID:        String("id"),
-		TreeID:    String("tid"),
-		Timestamp: &Timestamp{referenceTime},
-		Committer: &CommitAuthor{
-			Date:  &Timestamp{referenceTime},
-			Name:  String("n"),
+	}
+
+	want := `{
+		"action": "a",
+		"sender": {
+			"login": "l",
+			"id": 1,
+			"node_id": "n",
+			"avatar_url": "a",
+			"url": "u",
+			"events_url": "e",
+			"repos_url": "r"
+		}
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestInstallationEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &InstallationEvent{}, "{}")
+
+	u := &InstallationEvent{
+		Action: String("a"),
+		Repositories: []*Repository{
+			{
+				ID:   Int64(1),
+				URL:  String("u"),
+				Name: String("n"),
+			},
+		},
+		Sender: &User{
+			Login:     String("l"),
+			ID:        Int64(1),
+			NodeID:    String("n"),
+			URL:       String("u"),
+			ReposURL:  String("r"),
+			EventsURL: String("e"),
+			AvatarURL: String("a"),
+		},
+		Installation: &Installation{
+			ID:       Int64(1),
+			NodeID:   String("nid"),
+			AppID:    Int64(1),
+			AppSlug:  String("as"),
+			TargetID: Int64(1),
+			Account: &User{
+				Login:           String("l"),
+				ID:              Int64(1),
+				URL:             String("u"),
+				AvatarURL:       String("a"),
+				GravatarID:      String("g"),
+				Name:            String("n"),
+				Company:         String("c"),
+				Blog:            String("b"),
+				Location:        String("l"),
+				Email:           String("e"),
+				Hireable:        Bool(true),
+				Bio:             String("b"),
+				TwitterUsername: String("t"),
+				PublicRepos:     Int(1),
+				Followers:       Int(1),
+				Following:       Int(1),
+				CreatedAt:       &Timestamp{referenceTime},
+				SuspendedAt:     &Timestamp{referenceTime},
+			},
+			AccessTokensURL:     String("atu"),
+			RepositoriesURL:     String("ru"),
+			HTMLURL:             String("hu"),
+			TargetType:          String("tt"),
+			SingleFileName:      String("sfn"),
+			RepositorySelection: String("rs"),
+			Events:              []string{"e"},
+			SingleFilePaths:     []string{"s"},
+			Permissions: &InstallationPermissions{
+				Actions:                       String("a"),
+				Administration:                String("ad"),
+				Checks:                        String("c"),
+				Contents:                      String("co"),
+				ContentReferences:             String("cr"),
+				Deployments:                   String("d"),
+				Environments:                  String("e"),
+				Issues:                        String("i"),
+				Metadata:                      String("md"),
+				Members:                       String("m"),
+				OrganizationAdministration:    String("oa"),
+				OrganizationHooks:             String("oh"),
+				OrganizationPlan:              String("op"),
+				OrganizationPreReceiveHooks:   String("opr"),
+				OrganizationProjects:          String("op"),
+				OrganizationSecrets:           String("os"),
+				OrganizationSelfHostedRunners: String("osh"),
+				OrganizationUserBlocking:      String("oub"),
+				Packages:                      String("pkg"),
+				Pages:                         String("pg"),
+				PullRequests:                  String("pr"),
+				RepositoryHooks:               String("rh"),
+				RepositoryProjects:            String("rp"),
+				RepositoryPreReceiveHooks:     String("rprh"),
+				Secrets:                       String("s"),
+				SecretScanningAlerts:          String("ssa"),
+				SecurityEvents:                String("se"),
+				SingleFile:                    String("sf"),
+				Statuses:                      String("s"),
+				TeamDiscussions:               String("td"),
+				VulnerabilityAlerts:           String("va"),
+				Workflows:                     String("w"),
+			},
+			CreatedAt:              &Timestamp{referenceTime},
+			UpdatedAt:              &Timestamp{referenceTime},
+			HasMultipleSingleFiles: Bool(false),
+			SuspendedBy: &User{
+				Login:           String("l"),
+				ID:              Int64(1),
+				URL:             String("u"),
+				AvatarURL:       String("a"),
+				GravatarID:      String("g"),
+				Name:            String("n"),
+				Company:         String("c"),
+				Blog:            String("b"),
+				Location:        String("l"),
+				Email:           String("e"),
+				Hireable:        Bool(true),
+				Bio:             String("b"),
+				TwitterUsername: String("t"),
+				PublicRepos:     Int(1),
+				Followers:       Int(1),
+				Following:       Int(1),
+				CreatedAt:       &Timestamp{referenceTime},
+				SuspendedAt:     &Timestamp{referenceTime},
+			},
+			SuspendedAt: &Timestamp{referenceTime},
+		},
+	}
+
+	want := `{
+		"action": "a",
+		"repositories": [
+			{
+				"id":1,
+				"name":"n",
+				"url":"u"
+			}
+		],
+		"sender": {
+			"login": "l",
+			"id": 1,
+			"node_id": "n",
+			"avatar_url": "a",
+			"url": "u",
+			"events_url": "e",
+			"repos_url": "r"
+		},
+		"installation": {
+			"id": 1,
+			"node_id": "nid",
+			"app_id": 1,
+			"app_slug": "as",
+			"target_id": 1,
+			"account": {
+				"login": "l",
+				"id": 1,
+				"avatar_url": "a",
+				"gravatar_id": "g",
+				"name": "n",
+				"company": "c",
+				"blog": "b",
+				"location": "l",
+				"email": "e",
+				"hireable": true,
+				"bio": "b",
+				"twitter_username": "t",
+				"public_repos": 1,
+				"followers": 1,
+				"following": 1,
+				"created_at": ` + referenceTimeStr + `,
+				"suspended_at": ` + referenceTimeStr + `,
+				"url": "u"
+			},
+			"access_tokens_url": "atu",
+			"repositories_url": "ru",
+			"html_url": "hu",
+			"target_type": "tt",
+			"single_file_name": "sfn",
+			"repository_selection": "rs",
+			"events": [
+				"e"
+			],
+			"single_file_paths": [
+				"s"
+			],
+			"permissions": {
+				"actions": "a",
+				"administration": "ad",
+				"checks": "c",
+				"contents": "co",
+				"content_references": "cr",
+				"deployments": "d",
+				"environments": "e",
+				"issues": "i",
+				"metadata": "md",
+				"members": "m",
+				"organization_administration": "oa",
+				"organization_hooks": "oh",
+				"organization_plan": "op",
+				"organization_pre_receive_hooks": "opr",
+				"organization_projects": "op",
+				"organization_secrets": "os",
+				"organization_self_hosted_runners": "osh",
+				"organization_user_blocking": "oub",
+				"packages": "pkg",
+				"pages": "pg",
+				"pull_requests": "pr",
+				"repository_hooks": "rh",
+				"repository_projects": "rp",
+				"repository_pre_receive_hooks": "rprh",
+				"secrets": "s",
+				"secret_scanning_alerts": "ssa",
+				"security_events": "se",
+				"single_file": "sf",
+				"statuses": "s",
+				"team_discussions": "td",
+				"vulnerability_alerts": "va",
+				"workflows": "w"
+			},
+			"created_at": ` + referenceTimeStr + `,
+			"updated_at": ` + referenceTimeStr + `,
+			"has_multiple_single_files": false,
+			"suspended_by": {
+				"login": "l",
+				"id": 1,
+				"avatar_url": "a",
+				"gravatar_id": "g",
+				"name": "n",
+				"company": "c",
+				"blog": "b",
+				"location": "l",
+				"email": "e",
+				"hireable": true,
+				"bio": "b",
+				"twitter_username": "t",
+				"public_repos": 1,
+				"followers": 1,
+				"following": 1,
+				"created_at": ` + referenceTimeStr + `,
+				"suspended_at": ` + referenceTimeStr + `,
+				"url": "u"
+			},
+			"suspended_at": ` + referenceTimeStr + `
+		}
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestHeadCommit_Marshal(t *testing.T) {
+	testJSONMarshal(t, &HeadCommit{}, "{}")
+
+	u := &HeadCommit{
+		Message: String("m"),
+		Author: &CommitAuthor{
+			Date:  &Timestamp{referenceTime},
+			Name:  String("n"),
+			Email: String("e"),
+			Login: String("u"),
+		},
+		URL:       String("u"),
+		Distinct:  Bool(true),
+		SHA:       String("s"),
+		ID:        String("id"),
+		TreeID:    String("tid"),
+		Timestamp: &Timestamp{referenceTime},
+		Committer: &CommitAuthor{
+			Date:  &Timestamp{referenceTime},
+			Name:  String("n"),
 			Email: String("e"),
 			Login: String("u"),
 		},
@@ -15306,14 +15767,321 @@ func TestPullRequestReviewThreadEvent_Marshal(t *testing.T) {
 	u := &PullRequestReviewThreadEvent{
 		Action:      String("a"),
 		PullRequest: &PullRequest{ID: Int64(1)},
-		Thread: &PullRequestThread{
-			Comments: []*PullRequestComment{{ID: Int64(1)}, {ID: Int64(2)}},
+		Thread: &PullRequestThread{
+			Comments: []*PullRequestComment{{ID: Int64(1)}, {ID: Int64(2)}},
+		},
+		Repo: &Repository{
+			ID:   Int64(1),
+			URL:  String("s"),
+			Name: String("n"),
+		},
+		Sender: &User{
+			Login:     String("l"),
+			ID:        Int64(1),
+			NodeID:    String("n"),
+			URL:       String("u"),
+			ReposURL:  String("r"),
+			EventsURL: String("e"),
+			AvatarURL: String("a"),
+		},
+		Installation: &Installation{
+			ID:       Int64(1),
+			NodeID:   String("nid"),
+			AppID:    Int64(1),
+			AppSlug:  String("as"),
+			TargetID: Int64(1),
+			Account: &User{
+				Login:           String("l"),
+				ID:              Int64(1),
+				URL:             String("u"),
+				AvatarURL:       String("a"),
+				GravatarID:      String("g"),
+				Name:            String("n"),
+				Company:         String("c"),
+				Blog:            String("b"),
+				Location:        String("l"),
+				Email:           String("e"),
+				Hireable:        Bool(true),
+				Bio:             String("b"),
+				TwitterUsername: String("t"),
+				PublicRepos:     Int(1),
+				Followers:       Int(1),
+				Following:       Int(1),
+				CreatedAt:       &Timestamp{referenceTime},
+				SuspendedAt:     &Timestamp{referenceTime},
+			},
+			AccessTokensURL:     String("atu"),
+			RepositoriesURL:     String("ru"),
+			HTMLURL:             String("hu"),
+			TargetType:          String("tt"),
+			SingleFileName:      String("sfn"),
+			RepositorySelection: String("rs"),
+			Events:              []string{"e"},
+			SingleFilePaths:     []string{"s"},
+			Permissions: &InstallationPermissions{
+				Actions:                       String("a"),
+				Administration:                String("ad"),
+				Checks:                        String("c"),
+				Contents:                      String("co"),
+				ContentReferences:             String("cr"),
+				Deployments:                   String("d"),
+				Environments:                  String("e"),
+				Issues:                        String("i"),
+				Metadata:                      String("md"),
+				Members:                       String("m"),
+				OrganizationAdministration:    String("oa"),
+				OrganizationHooks:             String("oh"),
+				OrganizationPlan:              String("op"),
+				OrganizationPreReceiveHooks:   String("opr"),
+				OrganizationProjects:          String("op"),
+				OrganizationSecrets:           String("os"),
+				OrganizationSelfHostedRunners: String("osh"),
+				OrganizationUserBlocking:      String("oub"),
+				Packages:                      String("pkg"),
+				Pages:                         String("pg"),
+				PullRequests:                  String("pr"),
+				RepositoryHooks:               String("rh"),
+				RepositoryProjects:            String("rp"),
+				RepositoryPreReceiveHooks:     String("rprh"),
+				Secrets:                       String("s"),
+				SecretScanningAlerts:          String("ssa"),
+				SecurityEvents:                String("se"),
+				SingleFile:                    String("sf"),
+				Statuses:                      String("s"),
+				TeamDiscussions:               String("td"),
+				VulnerabilityAlerts:           String("va"),
+				Workflows:                     String("w"),
+			},
+			CreatedAt:              &Timestamp{referenceTime},
+			UpdatedAt:              &Timestamp{referenceTime},
+			HasMultipleSingleFiles: Bool(false),
+			SuspendedBy: &User{
+				Login:           String("l"),
+				ID:              Int64(1),
+				URL:             String("u"),
+				AvatarURL:       String("a"),
+				GravatarID:      String("g"),
+				Name:            String("n"),
+				Company:         String("c"),
+				Blog:            String("b"),
+				Location:        String("l"),
+				Email:           String("e"),
+				Hireable:        Bool(true),
+				Bio:             String("b"),
+				TwitterUsername: String("t"),
+				PublicRepos:     Int(1),
+				Followers:       Int(1),
+				Following:       Int(1),
+				CreatedAt:       &Timestamp{referenceTime},
+				SuspendedAt:     &Timestamp{referenceTime},
+			},
+			SuspendedAt: &Timestamp{referenceTime},
+		},
+	}
+
+	want := `{
+		"action": "a",
+		"pull_request": {
+			"id": 1
+		},
+		"thread": {
+			"comments": [
+				{
+					"id": 1
+				},
+				{
+					"id": 2
+				}
+			]
+		},
+		"repository": {
+			"id": 1,
+			"name": "n",
+			"url": "s"
+		},
+		"sender": {
+			"login": "l",
+			"id": 1,
+			"node_id": "n",
+			"avatar_url": "a",
+			"url": "u",
+			"events_url": "e",
+			"repos_url": "r"
+		},
+		"installation": {
+			"id": 1,
+			"node_id": "nid",
+			"app_id": 1,
+			"app_slug": "as",
+			"target_id": 1,
+			"account": {
+				"login": "l",
+				"id": 1,
+				"avatar_url": "a",
+				"gravatar_id": "g",
+				"name": "n",
+				"company": "c",
+				"blog": "b",
+				"location": "l",
+				"email": "e",
+				"hireable": true,
+				"bio": "b",
+				"twitter_username": "t",
+				"public_repos": 1,
+				"followers": 1,
+				"following": 1,
+				"created_at": ` + referenceTimeStr + `,
+				"suspended_at": ` + referenceTimeStr + `,
+				"url": "u"
+			},
+			"access_tokens_url": "atu",
+			"repositories_url": "ru",
+			"html_url": "hu",
+			"target_type": "tt",
+			"single_file_name": "sfn",
+			"repository_selection": "rs",
+			"events": [
+				"e"
+			],
+			"single_file_paths": [
+				"s"
+			],
+			"permissions": {
+				"actions": "a",
+				"administration": "ad",
+				"checks": "c",
+				"contents": "co",
+				"content_references": "cr",
+				"deployments": "d",
+				"environments": "e",
+				"issues": "i",
+				"metadata": "md",
+				"members": "m",
+				"organization_administration": "oa",
+				"organization_hooks": "oh",
+				"organization_plan": "op",
+				"organization_pre_receive_hooks": "opr",
+				"organization_projects": "op",
+				"organization_secrets": "os",
+				"organization_self_hosted_runners": "osh",
+				"organization_user_blocking": "oub",
+				"packages": "pkg",
+				"pages": "pg",
+				"pull_requests": "pr",
+				"repository_hooks": "rh",
+				"repository_projects": "rp",
+				"repository_pre_receive_hooks": "rprh",
+				"secrets": "s",
+				"secret_scanning_alerts": "ssa",
+				"security_events": "se",
+				"single_file": "sf",
+				"statuses": "s",
+				"team_discussions": "td",
+				"vulnerability_alerts": "va",
+				"workflows": "w"
+			},
+			"created_at": ` + referenceTimeStr + `,
+			"updated_at": ` + referenceTimeStr + `,
+			"has_multiple_single_files": false,
+			"suspended_by": {
+				"login": "l",
+				"id": 1,
+				"avatar_url": "a",
+				"gravatar_id": "g",
+				"name": "n",
+				"company": "c",
+				"blog": "b",
+				"location": "l",
+				"email": "e",
+				"hireable": true,
+				"bio": "b",
+				"twitter_username": "t",
+				"public_repos": 1,
+				"followers": 1,
+				"following": 1,
+				"created_at": ` + referenceTimeStr + `,
+				"suspended_at": ` + referenceTimeStr + `,
+				"url": "u"
+			},
+			"suspended_at": ` + referenceTimeStr + `
+		}
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestPullRequestTargetEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &PullRequestTargetEvent{}, "{}")
+
+	u := &PullRequestTargetEvent{
+		Action: String("a"),
+		Assignee: &User{
+			Login:     String("l"),
+			ID:        Int64(1),
+			NodeID:    String("n"),
+			URL:       String("u"),
+			ReposURL:  String("r"),
+			EventsURL: String("e"),
+			AvatarURL: String("a"),
+		},
+		Number:      Int(1),
+		PullRequest: &PullRequest{ID: Int64(1)},
+		Changes: &EditChange{
+			Title: &EditTitle{
+				From: String("TitleFrom"),
+			},
+			Body: &EditBody{
+				From: String("BodyFrom"),
+			},
+			Base: &EditBase{
+				Ref: &EditRef{
+					From: String("BaseRefFrom"),
+				},
+				SHA: &EditSHA{
+					From: String("BaseSHAFrom"),
+				},
+			},
+		},
+		RequestedReviewer: &User{
+			Login:     String("l"),
+			ID:        Int64(1),
+			NodeID:    String("n"),
+			URL:       String("u"),
+			ReposURL:  String("r"),
+			EventsURL: String("e"),
+			AvatarURL: String("a"),
 		},
+		RequestedTeam: &Team{ID: Int64(1)},
+		Label:         &Label{ID: Int64(1)},
+		Before:        String("before"),
+		After:         String("after"),
 		Repo: &Repository{
 			ID:   Int64(1),
 			URL:  String("s"),
 			Name: String("n"),
 		},
+		Organization: &Organization{
+			BillingEmail:                         String("be"),
+			Blog:                                 String("b"),
+			Company:                              String("c"),
+			Email:                                String("e"),
+			TwitterUsername:                      String("tu"),
+			Location:                             String("loc"),
+			Name:                                 String("n"),
+			Description:                          String("d"),
+			IsVerified:                           Bool(true),
+			HasOrganizationProjects:              Bool(true),
+			HasRepositoryProjects:                Bool(true),
+			DefaultRepoPermission:                String("drp"),
+			MembersCanCreateRepos:                Bool(true),
+			MembersCanCreateInternalRepos:        Bool(true),
+			MembersCanCreatePrivateRepos:         Bool(true),
+			MembersCanCreatePublicRepos:          Bool(false),
+			MembersAllowedRepositoryCreationType: String("marct"),
+			MembersCanCreatePages:                Bool(true),
+			MembersCanCreatePublicPages:          Bool(false),
+			MembersCanCreatePrivatePages:         Bool(true),
+		},
 		Sender: &User{
 			Login:     String("l"),
 			ID:        Int64(1),
@@ -15420,18 +16188,46 @@ func TestPullRequestReviewThreadEvent_Marshal(t *testing.T) {
 
 	want := `{
 		"action": "a",
+		"assignee": {
+			"login": "l",
+			"id": 1,
+			"node_id": "n",
+			"avatar_url": "a",
+			"url": "u",
+			"events_url": "e",
+			"repos_url": "r"
+		},
+		"number": 1,
 		"pull_request": {
 			"id": 1
 		},
-		"thread": {
-			"comments": [
-				{
-					"id": 1
+		"changes": {
+			"title": {
+				"from": "TitleFrom"
+			},
+			"body": {
+				"from": "BodyFrom"
+			},
+			"base": {
+				"ref": {
+					"from": "BaseRefFrom"
 				},
-				{
-					"id": 2
+				"sha": {
+					"from": "BaseSHAFrom"
 				}
-			]
+			}
+		},
+		"requested_reviewer": {
+			"login": "l",
+			"id": 1,
+			"node_id": "n",
+			"avatar_url": "a",
+			"url": "u",
+			"events_url": "e",
+			"repos_url": "r"
+		},
+		"requested_team": {
+			"id": 1
 		},
 		"repository": {
 			"id": 1,
@@ -15543,57 +16339,121 @@ func TestPullRequestReviewThreadEvent_Marshal(t *testing.T) {
 				"url": "u"
 			},
 			"suspended_at": ` + referenceTimeStr + `
-		}
+		},
+		"label": {
+			"id": 1
+		},
+		"organization": {
+			"name": "n",
+			"company": "c",
+			"blog": "b",
+			"location": "loc",
+			"email": "e",
+			"twitter_username": "tu",
+			"description": "d",
+			"billing_email": "be",
+			"is_verified": true,
+			"has_organization_projects": true,
+			"has_repository_projects": true,
+			"default_repository_permission": "drp",
+			"members_can_create_repositories": true,
+			"members_can_create_public_repositories": false,
+			"members_can_create_private_repositories": true,
+			"members_can_create_internal_repositories": true,
+			"members_allowed_repository_creation_type": "marct",
+			"members_can_create_pages": true,
+			"members_can_create_public_pages": false,
+			"members_can_create_private_pages": true
+		},
+		"before": "before",
+		"after": "after"
 	}`
 
 	testJSONMarshal(t, u, want)
 }
 
-func TestPullRequestTargetEvent_Marshal(t *testing.T) {
-	testJSONMarshal(t, &PullRequestTargetEvent{}, "{}")
+func TestRepositoryVulnerabilityAlertEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &RepositoryVulnerabilityAlertEvent{}, "{}")
 
-	u := &PullRequestTargetEvent{
+	u := &RepositoryVulnerabilityAlertEvent{
 		Action: String("a"),
-		Assignee: &User{
-			Login:     String("l"),
-			ID:        Int64(1),
-			NodeID:    String("n"),
-			URL:       String("u"),
-			ReposURL:  String("r"),
-			EventsURL: String("e"),
-			AvatarURL: String("a"),
-		},
-		Number:      Int(1),
-		PullRequest: &PullRequest{ID: Int64(1)},
-		Changes: &EditChange{
-			Title: &EditTitle{
-				From: String("TitleFrom"),
-			},
-			Body: &EditBody{
-				From: String("BodyFrom"),
+		Alert: &RepositoryVulnerabilityAlert{
+			ID:                  Int64(1),
+			AffectedRange:       String("ar"),
+			AffectedPackageName: String("apn"),
+			ExternalReference:   String("er"),
+			ExternalIdentifier:  String("ei"),
+			FixedIn:             String("fi"),
+			Dismisser: &User{
+				Login:     String("l"),
+				ID:        Int64(1),
+				NodeID:    String("n"),
+				URL:       String("u"),
+				ReposURL:  String("r"),
+				EventsURL: String("e"),
+				AvatarURL: String("a"),
 			},
-			Base: &EditBase{
-				Ref: &EditRef{
-					From: String("BaseRefFrom"),
-				},
-				SHA: &EditSHA{
-					From: String("BaseSHAFrom"),
-				},
+			DismissReason: String("dr"),
+			DismissedAt:   &Timestamp{referenceTime},
+		},
+		Repository: &Repository{
+			ID:   Int64(1),
+			URL:  String("s"),
+			Name: String("n"),
+		},
+	}
+
+	want := `{
+		"action": "a",
+		"alert": {
+			"id": 1,
+			"affected_range": "ar",
+			"affected_package_name": "apn",
+			"external_reference": "er",
+			"external_identifier": "ei",
+			"fixed_in": "fi",
+			"dismisser": {
+				"login": "l",
+				"id": 1,
+				"node_id": "n",
+				"avatar_url": "a",
+				"url": "u",
+				"events_url": "e",
+				"repos_url": "r"
 			},
+			"dismiss_reason": "dr",
+			"dismissed_at": ` + referenceTimeStr + `
 		},
-		RequestedReviewer: &User{
-			Login:     String("l"),
-			ID:        Int64(1),
-			NodeID:    String("n"),
-			URL:       String("u"),
-			ReposURL:  String("r"),
-			EventsURL: String("e"),
-			AvatarURL: String("a"),
+		"repository": {
+			"id": 1,
+			"name": "n",
+			"url": "s"
+		}
+	}`
+
+	testJSONMarshal(t, u, want)
+}
+
+func TestSecretScanningAlertEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &SecretScanningAlertEvent{}, "{}")
+
+	u := &SecretScanningAlertEvent{
+		Action: String("a"),
+		Alert: &SecretScanningAlert{
+			Number:     Int(1),
+			SecretType: String("t"),
+			Resolution: String("r"),
+			ResolvedBy: &User{
+				Login:     String("l"),
+				ID:        Int64(1),
+				NodeID:    String("n"),
+				URL:       String("u"),
+				ReposURL:  String("r"),
+				EventsURL: String("e"),
+				AvatarURL: String("a"),
+			},
+			ResolvedAt: &Timestamp{referenceTime},
 		},
-		RequestedTeam: &Team{ID: Int64(1)},
-		Label:         &Label{ID: Int64(1)},
-		Before:        String("before"),
-		After:         String("after"),
 		Repo: &Repository{
 			ID:   Int64(1),
 			URL:  String("s"),
@@ -15621,6 +16481,18 @@ func TestPullRequestTargetEvent_Marshal(t *testing.T) {
 			MembersCanCreatePublicPages:          Bool(false),
 			MembersCanCreatePrivatePages:         Bool(true),
 		},
+		Enterprise: &Enterprise{
+			ID:          Int(1),
+			Slug:        String("s"),
+			Name:        String("n"),
+			NodeID:      String("nid"),
+			AvatarURL:   String("au"),
+			Description: String("d"),
+			WebsiteURL:  String("wu"),
+			HTMLURL:     String("hu"),
+			CreatedAt:   &Timestamp{referenceTime},
+			UpdatedAt:   &Timestamp{referenceTime},
+		},
 		Sender: &User{
 			Login:     String("l"),
 			ID:        Int64(1),
@@ -15727,51 +16599,59 @@ func TestPullRequestTargetEvent_Marshal(t *testing.T) {
 
 	want := `{
 		"action": "a",
-		"assignee": {
-			"login": "l",
-			"id": 1,
-			"node_id": "n",
-			"avatar_url": "a",
-			"url": "u",
-			"events_url": "e",
-			"repos_url": "r"
-		},
-		"number": 1,
-		"pull_request": {
-			"id": 1
-		},
-		"changes": {
-			"title": {
-				"from": "TitleFrom"
-			},
-			"body": {
-				"from": "BodyFrom"
+		"alert": {
+			"number": 1,
+			"secret_type": "t",
+			"resolution": "r",
+			"resolved_by": {
+				"login": "l",
+				"id": 1,
+				"node_id": "n",
+				"avatar_url": "a",
+				"url": "u",
+				"events_url": "e",
+				"repos_url": "r"
 			},
-			"base": {
-				"ref": {
-					"from": "BaseRefFrom"
-				},
-				"sha": {
-					"from": "BaseSHAFrom"
-				}
-			}
+			"resolved_at": ` + referenceTimeStr + `
 		},
-		"requested_reviewer": {
-			"login": "l",
+		"repository": {
 			"id": 1,
-			"node_id": "n",
-			"avatar_url": "a",
-			"url": "u",
-			"events_url": "e",
-			"repos_url": "r"
+			"name": "n",
+			"url": "s"
 		},
-		"requested_team": {
-			"id": 1
+        "organization": {
+			"name": "n",
+			"company": "c",
+			"blog": "b",
+			"location": "loc",
+			"email": "e",
+			"twitter_username": "tu",
+			"description": "d",
+			"billing_email": "be",
+			"is_verified": true,
+			"has_organization_projects": true,
+			"has_repository_projects": true,
+			"default_repository_permission": "drp",
+			"members_can_create_repositories": true,
+			"members_can_create_public_repositories": false,
+			"members_can_create_private_repositories": true,
+			"members_can_create_internal_repositories": true,
+			"members_allowed_repository_creation_type": "marct",
+			"members_can_create_pages": true,
+			"members_can_create_public_pages": false,
+			"members_can_create_private_pages": true
 		},
-		"repository": {
+        "enterprise": {
 			"id": 1,
+			"slug": "s",
 			"name": "n",
-			"url": "s"
+			"node_id": "nid",
+			"avatar_url": "au",
+			"description": "d",
+			"website_url": "wu",
+			"html_url": "hu",
+			"created_at": ` + referenceTimeStr + `,
+			"updated_at": ` + referenceTimeStr + `
 		},
 		"sender": {
 			"login": "l",
@@ -15782,7 +16662,7 @@ func TestPullRequestTargetEvent_Marshal(t *testing.T) {
 			"events_url": "e",
 			"repos_url": "r"
 		},
-		"installation": {
+        "installation": {
 			"id": 1,
 			"node_id": "nid",
 			"app_id": 1,
@@ -15878,147 +16758,58 @@ func TestPullRequestTargetEvent_Marshal(t *testing.T) {
 				"url": "u"
 			},
 			"suspended_at": ` + referenceTimeStr + `
-		},
-		"label": {
-			"id": 1
-		},
-		"organization": {
-			"name": "n",
-			"company": "c",
-			"blog": "b",
-			"location": "loc",
-			"email": "e",
-			"twitter_username": "tu",
-			"description": "d",
-			"billing_email": "be",
-			"is_verified": true,
-			"has_organization_projects": true,
-			"has_repository_projects": true,
-			"default_repository_permission": "drp",
-			"members_can_create_repositories": true,
-			"members_can_create_public_repositories": false,
-			"members_can_create_private_repositories": true,
-			"members_can_create_internal_repositories": true,
-			"members_allowed_repository_creation_type": "marct",
-			"members_can_create_pages": true,
-			"members_can_create_public_pages": false,
-			"members_can_create_private_pages": true
-		},
-		"before": "before",
-		"after": "after"
+		}
 	}`
 
 	testJSONMarshal(t, u, want)
 }
 
-func TestRepositoryVulnerabilityAlertEvent_Marshal(t *testing.T) {
-	testJSONMarshal(t, &RepositoryVulnerabilityAlertEvent{}, "{}")
-
-	u := &RepositoryVulnerabilityAlertEvent{
-		Action: String("a"),
-		Alert: &RepositoryVulnerabilityAlert{
-			ID:                  Int64(1),
-			AffectedRange:       String("ar"),
-			AffectedPackageName: String("apn"),
-			ExternalReference:   String("er"),
-			ExternalIdentifier:  String("ei"),
-			FixedIn:             String("fi"),
-			Dismisser: &User{
-				Login:     String("l"),
-				ID:        Int64(1),
-				NodeID:    String("n"),
-				URL:       String("u"),
-				ReposURL:  String("r"),
-				EventsURL: String("e"),
-				AvatarURL: String("a"),
+func TestSecurityAdvisoryEvent_Marshal(t *testing.T) {
+	testJSONMarshal(t, &SecurityAdvisoryEvent{}, "{}")
+	u := &SecurityAdvisoryEvent{
+		Action: String("published"),
+		SecurityAdvisory: &SecurityAdvisory{
+			CVSS: &AdvisoryCVSS{
+				Score:        Float64(1.0),
+				VectorString: String("vs"),
 			},
-			DismissReason: String("dr"),
-			DismissedAt:   &Timestamp{referenceTime},
-		},
-		Repository: &Repository{
-			ID:   Int64(1),
-			URL:  String("s"),
-			Name: String("n"),
-		},
-	}
-
-	want := `{
-		"action": "a",
-		"alert": {
-			"id": 1,
-			"affected_range": "ar",
-			"affected_package_name": "apn",
-			"external_reference": "er",
-			"external_identifier": "ei",
-			"fixed_in": "fi",
-			"dismisser": {
-				"login": "l",
-				"id": 1,
-				"node_id": "n",
-				"avatar_url": "a",
-				"url": "u",
-				"events_url": "e",
-				"repos_url": "r"
+			CWEs: []*AdvisoryCWEs{
+				{
+					CWEID: String("cweid"),
+					Name:  String("n"),
+				},
 			},
-			"dismiss_reason": "dr",
-			"dismissed_at": ` + referenceTimeStr + `
-		},
-		"repository": {
-			"id": 1,
-			"name": "n",
-			"url": "s"
-		}
-	}`
-
-	testJSONMarshal(t, u, want)
-}
-
-func TestSecretScanningAlertEvent_Marshal(t *testing.T) {
-	testJSONMarshal(t, &SecretScanningAlertEvent{}, "{}")
-
-	u := &SecretScanningAlertEvent{
-		Action: String("a"),
-		Alert: &SecretScanningAlert{
-			Number:     Int(1),
-			SecretType: String("t"),
-			Resolution: String("r"),
-			ResolvedBy: &User{
-				Login:     String("l"),
-				ID:        Int64(1),
-				NodeID:    String("n"),
-				URL:       String("u"),
-				ReposURL:  String("r"),
-				EventsURL: String("e"),
-				AvatarURL: String("a"),
+			GHSAID:      String("GHSA-rf4j-j272-some"),
+			Summary:     String("Siuuuuuuuuu"),
+			Description: String("desc"),
+			Severity:    String("moderate"),
+			Identifiers: []*AdvisoryIdentifier{
+				{
+					Value: String("GHSA-rf4j-j272-some"),
+					Type:  String("GHSA"),
+				},
+			},
+			References: []*AdvisoryReference{
+				{
+					URL: String("https://some-url"),
+				},
+			},
+			PublishedAt: &Timestamp{referenceTime},
+			UpdatedAt:   &Timestamp{referenceTime},
+			WithdrawnAt: nil,
+			Vulnerabilities: []*AdvisoryVulnerability{
+				{
+					Package: &VulnerabilityPackage{
+						Ecosystem: String("ucl"),
+						Name:      String("penaldo"),
+					},
+					Severity:               String("moderate"),
+					VulnerableVersionRange: String(">= 2.0.0, < 2.0.2"),
+					FirstPatchedVersion: &FirstPatchedVersion{
+						Identifier: String("2.0.2"),
+					},
+				},
 			},
-			ResolvedAt: &Timestamp{referenceTime},
-		},
-		Repo: &Repository{
-			ID:   Int64(1),
-			URL:  String("s"),
-			Name: String("n"),
-		},
-		Organization: &Organization{
-			BillingEmail:                         String("be"),
-			Blog:                                 String("b"),
-			Company:                              String("c"),
-			Email:                                String("e"),
-			TwitterUsername:                      String("tu"),
-			Location:                             String("loc"),
-			Name:                                 String("n"),
-			Description:                          String("d"),
-			IsVerified:                           Bool(true),
-			HasOrganizationProjects:              Bool(true),
-			HasRepositoryProjects:                Bool(true),
-			DefaultRepoPermission:                String("drp"),
-			MembersCanCreateRepos:                Bool(true),
-			MembersCanCreateInternalRepos:        Bool(true),
-			MembersCanCreatePrivateRepos:         Bool(true),
-			MembersCanCreatePublicRepos:          Bool(false),
-			MembersAllowedRepositoryCreationType: String("marct"),
-			MembersCanCreatePages:                Bool(true),
-			MembersCanCreatePublicPages:          Bool(false),
-			MembersCanCreatePrivatePages:         Bool(true),
 		},
 		Enterprise: &Enterprise{
 			ID:          Int(1),
@@ -16032,15 +16823,6 @@ func TestSecretScanningAlertEvent_Marshal(t *testing.T) {
 			CreatedAt:   &Timestamp{referenceTime},
 			UpdatedAt:   &Timestamp{referenceTime},
 		},
-		Sender: &User{
-			Login:     String("l"),
-			ID:        Int64(1),
-			NodeID:    String("n"),
-			URL:       String("u"),
-			ReposURL:  String("r"),
-			EventsURL: String("e"),
-			AvatarURL: String("a"),
-		},
 		Installation: &Installation{
 			ID:       Int64(1),
 			NodeID:   String("nid"),
@@ -16134,53 +16916,90 @@ func TestSecretScanningAlertEvent_Marshal(t *testing.T) {
 			},
 			SuspendedAt: &Timestamp{referenceTime},
 		},
+		Organization: &Organization{
+			BillingEmail:                         String("be"),
+			Blog:                                 String("b"),
+			Company:                              String("c"),
+			Email:                                String("e"),
+			TwitterUsername:                      String("tu"),
+			Location:                             String("loc"),
+			Name:                                 String("n"),
+			Description:                          String("d"),
+			IsVerified:                           Bool(true),
+			HasOrganizationProjects:              Bool(true),
+			HasRepositoryProjects:                Bool(true),
+			DefaultRepoPermission:                String("drp"),
+			MembersCanCreateRepos:                Bool(true),
+			MembersCanCreateInternalRepos:        Bool(true),
+			MembersCanCreatePrivateRepos:         Bool(true),
+			MembersCanCreatePublicRepos:          Bool(false),
+			MembersAllowedRepositoryCreationType: String("marct"),
+			MembersCanCreatePages:                Bool(true),
+			MembersCanCreatePublicPages:          Bool(false),
+			MembersCanCreatePrivatePages:         Bool(true),
+		},
+		Repository: &Repository{
+			ID:   Int64(1),
+			URL:  String("s"),
+			Name: String("n"),
+		},
+		Sender: &User{
+			Login:     String("l"),
+			ID:        Int64(1),
+			NodeID:    String("n"),
+			URL:       String("u"),
+			ReposURL:  String("r"),
+			EventsURL: String("e"),
+			AvatarURL: String("a"),
+		},
 	}
 
 	want := `{
-		"action": "a",
-		"alert": {
-			"number": 1,
-			"secret_type": "t",
-			"resolution": "r",
-			"resolved_by": {
-				"login": "l",
-				"id": 1,
-				"node_id": "n",
-				"avatar_url": "a",
-				"url": "u",
-				"events_url": "e",
-				"repos_url": "r"
-			},
-			"resolved_at": ` + referenceTimeStr + `
-		},
-		"repository": {
-			"id": 1,
-			"name": "n",
-			"url": "s"
-		},
-        "organization": {
-			"name": "n",
-			"company": "c",
-			"blog": "b",
-			"location": "loc",
-			"email": "e",
-			"twitter_username": "tu",
-			"description": "d",
-			"billing_email": "be",
-			"is_verified": true,
-			"has_organization_projects": true,
-			"has_repository_projects": true,
-			"default_repository_permission": "drp",
-			"members_can_create_repositories": true,
-			"members_can_create_public_repositories": false,
-			"members_can_create_private_repositories": true,
-			"members_can_create_internal_repositories": true,
-			"members_allowed_repository_creation_type": "marct",
-			"members_can_create_pages": true,
-			"members_can_create_public_pages": false,
-			"members_can_create_private_pages": true
+		"action": "published",
+		"security_advisory": {
+		  "ghsa_id": "GHSA-rf4j-j272-some",
+		  "summary": "Siuuuuuuuuu",
+		  "cvss": {
+			"score": 1.0,
+			"vector_string": "vs"
+		  },
+		  "cwes": [
+			{
+				"cwe_id": "cweid",
+				"name": "n"
+			}
+		  ],
+		  "description": "desc",
+		  "severity": "moderate",
+		  "identifiers": [
+			{
+			  "value": "GHSA-rf4j-j272-some",
+			  "type": "GHSA"
+			}
+		  ],
+		  "references": [
+			{
+			  "url": "https://some-url"
+			}
+		  ],
+		  "published_at": ` + referenceTimeStr + `,
+		  "updated_at": ` + referenceTimeStr + `,
+		  "withdrawn_at": null,
+		  "vulnerabilities": [
+			{
+			  "package": {
+				"ecosystem": "ucl",
+				"name": "penaldo"
+			  },
+			  "severity": "moderate",
+			  "vulnerable_version_range": ">= 2.0.0, < 2.0.2",
+			  "first_patched_version": {
+				"identifier": "2.0.2"
+			  }
+			}
+		  ]
 		},
-        "enterprise": {
+		"enterprise": {
 			"id": 1,
 			"slug": "s",
 			"name": "n",
@@ -16192,16 +17011,7 @@ func TestSecretScanningAlertEvent_Marshal(t *testing.T) {
 			"created_at": ` + referenceTimeStr + `,
 			"updated_at": ` + referenceTimeStr + `
 		},
-		"sender": {
-			"login": "l",
-			"id": 1,
-			"node_id": "n",
-			"avatar_url": "a",
-			"url": "u",
-			"events_url": "e",
-			"repos_url": "r"
-		},
-        "installation": {
+		"installation": {
 			"id": 1,
 			"node_id": "nid",
 			"app_id": 1,
@@ -16297,85 +17107,42 @@ func TestSecretScanningAlertEvent_Marshal(t *testing.T) {
 				"url": "u"
 			},
 			"suspended_at": ` + referenceTimeStr + `
-		}
-	}`
-
-	testJSONMarshal(t, u, want)
-}
-
-func TestSecurityAdvisoryEvent_Marshal(t *testing.T) {
-	testJSONMarshal(t, &SecurityAdvisoryEvent{}, "{}")
-	u := &SecurityAdvisoryEvent{
-		Action: String("published"),
-		SecurityAdvisory: &SecurityAdvisory{
-			GHSAID:      String("GHSA-rf4j-j272-some"),
-			Summary:     String("Siuuuuuuuuu"),
-			Description: String("desc"),
-			Severity:    String("moderate"),
-			Identifiers: []*AdvisoryIdentifier{
-				{
-					Value: String("GHSA-rf4j-j272-some"),
-					Type:  String("GHSA"),
-				},
-			},
-			References: []*AdvisoryReference{
-				{
-					URL: String("https://some-url"),
-				},
-			},
-			PublishedAt: &Timestamp{referenceTime},
-			UpdatedAt:   &Timestamp{referenceTime},
-			WithdrawnAt: nil,
-			Vulnerabilities: []*AdvisoryVulnerability{
-				{
-					Package: &VulnerabilityPackage{
-						Ecosystem: String("ucl"),
-						Name:      String("penaldo"),
-					},
-					Severity:               String("moderate"),
-					VulnerableVersionRange: String(">= 2.0.0, < 2.0.2"),
-					FirstPatchedVersion: &FirstPatchedVersion{
-						Identifier: String("2.0.2"),
-					},
-				},
-			},
 		},
-	}
-
-	want := `{
-		"action": "published",
-		"security_advisory": {
-		  "ghsa_id": "GHSA-rf4j-j272-some",
-		  "summary": "Siuuuuuuuuu",
-		  "description": "desc",
-		  "severity": "moderate",
-		  "identifiers": [
-			{
-			  "value": "GHSA-rf4j-j272-some",
-			  "type": "GHSA"
-			}
-		  ],
-		  "references": [
-			{
-			  "url": "https://some-url"
-			}
-		  ],
-		  "published_at": ` + referenceTimeStr + `,
-		  "updated_at": ` + referenceTimeStr + `,
-		  "withdrawn_at": null,
-		  "vulnerabilities": [
-			{
-			  "package": {
-				"ecosystem": "ucl",
-				"name": "penaldo"
-			  },
-			  "severity": "moderate",
-			  "vulnerable_version_range": ">= 2.0.0, < 2.0.2",
-			  "first_patched_version": {
-				"identifier": "2.0.2"
-			  }
-			}
-		  ]
+		"organization": {
+			"name": "n",
+			"company": "c",
+			"blog": "b",
+			"location": "loc",
+			"email": "e",
+			"twitter_username": "tu",
+			"description": "d",
+			"billing_email": "be",
+			"is_verified": true,
+			"has_organization_projects": true,
+			"has_repository_projects": true,
+			"default_repository_permission": "drp",
+			"members_can_create_repositories": true,
+			"members_can_create_public_repositories": false,
+			"members_can_create_private_repositories": true,
+			"members_can_create_internal_repositories": true,
+			"members_allowed_repository_creation_type": "marct",
+			"members_can_create_pages": true,
+			"members_can_create_public_pages": false,
+			"members_can_create_private_pages": true
+		},
+		"repository": {
+			"id": 1,
+			"url": "s",
+			"name": "n"
+		},
+		"sender": {
+			"login": "l",
+			"id": 1,
+			"node_id": "n",
+			"avatar_url": "a",
+			"url": "u",
+			"events_url": "e",
+			"repos_url": "r"
 		}
 	  }`
 
diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go
index 0a6b5271..262cdd5a 100644
--- a/github/github-accessors_test.go
+++ b/github/github-accessors_test.go
@@ -392,18 +392,18 @@ func TestAdvancedSecurityCommittersBreakdown_GetUserLogin(tt *testing.T) {
 	a.GetUserLogin()
 }
 
-func TestAdvisoryCVSs_GetScore(tt *testing.T) {
-	a := &AdvisoryCVSs{}
+func TestAdvisoryCVSS_GetScore(tt *testing.T) {
+	a := &AdvisoryCVSS{}
 	a.GetScore()
 	a = nil
 	a.GetScore()
 }
 
-func TestAdvisoryCVSs_GetVectorString(tt *testing.T) {
+func TestAdvisoryCVSS_GetVectorString(tt *testing.T) {
 	var zeroValue string
-	a := &AdvisoryCVSs{VectorString: &zeroValue}
+	a := &AdvisoryCVSS{VectorString: &zeroValue}
 	a.GetVectorString()
-	a = &AdvisoryCVSs{}
+	a = &AdvisoryCVSS{}
 	a.GetVectorString()
 	a = nil
 	a.GetVectorString()
@@ -3364,6 +3364,93 @@ func TestCodeownersError_GetSuggestion(tt *testing.T) {
 	c.GetSuggestion()
 }
 
+func TestCodeQLDatabase_GetContentType(tt *testing.T) {
+	var zeroValue string
+	c := &CodeQLDatabase{ContentType: &zeroValue}
+	c.GetContentType()
+	c = &CodeQLDatabase{}
+	c.GetContentType()
+	c = nil
+	c.GetContentType()
+}
+
+func TestCodeQLDatabase_GetCreatedAt(tt *testing.T) {
+	var zeroValue Timestamp
+	c := &CodeQLDatabase{CreatedAt: &zeroValue}
+	c.GetCreatedAt()
+	c = &CodeQLDatabase{}
+	c.GetCreatedAt()
+	c = nil
+	c.GetCreatedAt()
+}
+
+func TestCodeQLDatabase_GetID(tt *testing.T) {
+	var zeroValue int64
+	c := &CodeQLDatabase{ID: &zeroValue}
+	c.GetID()
+	c = &CodeQLDatabase{}
+	c.GetID()
+	c = nil
+	c.GetID()
+}
+
+func TestCodeQLDatabase_GetLanguage(tt *testing.T) {
+	var zeroValue string
+	c := &CodeQLDatabase{Language: &zeroValue}
+	c.GetLanguage()
+	c = &CodeQLDatabase{}
+	c.GetLanguage()
+	c = nil
+	c.GetLanguage()
+}
+
+func TestCodeQLDatabase_GetName(tt *testing.T) {
+	var zeroValue string
+	c := &CodeQLDatabase{Name: &zeroValue}
+	c.GetName()
+	c = &CodeQLDatabase{}
+	c.GetName()
+	c = nil
+	c.GetName()
+}
+
+func TestCodeQLDatabase_GetSize(tt *testing.T) {
+	var zeroValue int64
+	c := &CodeQLDatabase{Size: &zeroValue}
+	c.GetSize()
+	c = &CodeQLDatabase{}
+	c.GetSize()
+	c = nil
+	c.GetSize()
+}
+
+func TestCodeQLDatabase_GetUpdatedAt(tt *testing.T) {
+	var zeroValue Timestamp
+	c := &CodeQLDatabase{UpdatedAt: &zeroValue}
+	c.GetUpdatedAt()
+	c = &CodeQLDatabase{}
+	c.GetUpdatedAt()
+	c = nil
+	c.GetUpdatedAt()
+}
+
+func TestCodeQLDatabase_GetUploader(tt *testing.T) {
+	c := &CodeQLDatabase{}
+	c.GetUploader()
+	c = nil
+	c.GetUploader()
+}
+
+func TestCodeQLDatabase_GetURL(tt *testing.T) {
+	var zeroValue string
+	c := &CodeQLDatabase{URL: &zeroValue}
+	c.GetURL()
+	c = &CodeQLDatabase{}
+	c.GetURL()
+	c = nil
+	c.GetURL()
+}
+
 func TestCodeResult_GetHTMLURL(tt *testing.T) {
 	var zeroValue string
 	c := &CodeResult{HTMLURL: &zeroValue}
@@ -5765,6 +5852,26 @@ func TestDefaultSetupConfiguration_GetUpdatedAt(tt *testing.T) {
 	d.GetUpdatedAt()
 }
 
+func TestDeleteAnalysis_GetConfirmDeleteURL(tt *testing.T) {
+	var zeroValue string
+	d := &DeleteAnalysis{ConfirmDeleteURL: &zeroValue}
+	d.GetConfirmDeleteURL()
+	d = &DeleteAnalysis{}
+	d.GetConfirmDeleteURL()
+	d = nil
+	d.GetConfirmDeleteURL()
+}
+
+func TestDeleteAnalysis_GetNextAnalysisURL(tt *testing.T) {
+	var zeroValue string
+	d := &DeleteAnalysis{NextAnalysisURL: &zeroValue}
+	d.GetNextAnalysisURL()
+	d = &DeleteAnalysis{}
+	d.GetNextAnalysisURL()
+	d = nil
+	d.GetNextAnalysisURL()
+}
+
 func TestDeleteEvent_GetInstallation(tt *testing.T) {
 	d := &DeleteEvent{}
 	d.GetInstallation()
@@ -5816,6 +5923,16 @@ func TestDeleteEvent_GetSender(tt *testing.T) {
 	d.GetSender()
 }
 
+func TestDependabotAlert_GetAutoDismissedAt(tt *testing.T) {
+	var zeroValue Timestamp
+	d := &DependabotAlert{AutoDismissedAt: &zeroValue}
+	d.GetAutoDismissedAt()
+	d = &DependabotAlert{}
+	d.GetAutoDismissedAt()
+	d = nil
+	d.GetAutoDismissedAt()
+}
+
 func TestDependabotAlert_GetCreatedAt(tt *testing.T) {
 	var zeroValue Timestamp
 	d := &DependabotAlert{CreatedAt: &zeroValue}
@@ -5951,6 +6068,58 @@ func TestDependabotAlert_GetURL(tt *testing.T) {
 	d.GetURL()
 }
 
+func TestDependabotAlertEvent_GetAction(tt *testing.T) {
+	var zeroValue string
+	d := &DependabotAlertEvent{Action: &zeroValue}
+	d.GetAction()
+	d = &DependabotAlertEvent{}
+	d.GetAction()
+	d = nil
+	d.GetAction()
+}
+
+func TestDependabotAlertEvent_GetAlert(tt *testing.T) {
+	d := &DependabotAlertEvent{}
+	d.GetAlert()
+	d = nil
+	d.GetAlert()
+}
+
+func TestDependabotAlertEvent_GetEnterprise(tt *testing.T) {
+	d := &DependabotAlertEvent{}
+	d.GetEnterprise()
+	d = nil
+	d.GetEnterprise()
+}
+
+func TestDependabotAlertEvent_GetInstallation(tt *testing.T) {
+	d := &DependabotAlertEvent{}
+	d.GetInstallation()
+	d = nil
+	d.GetInstallation()
+}
+
+func TestDependabotAlertEvent_GetOrganization(tt *testing.T) {
+	d := &DependabotAlertEvent{}
+	d.GetOrganization()
+	d = nil
+	d.GetOrganization()
+}
+
+func TestDependabotAlertEvent_GetRepo(tt *testing.T) {
+	d := &DependabotAlertEvent{}
+	d.GetRepo()
+	d = nil
+	d.GetRepo()
+}
+
+func TestDependabotAlertEvent_GetSender(tt *testing.T) {
+	d := &DependabotAlertEvent{}
+	d.GetSender()
+	d = nil
+	d.GetSender()
+}
+
 func TestDependabotSecurityAdvisory_GetCVEID(tt *testing.T) {
 	var zeroValue string
 	d := &DependabotSecurityAdvisory{CVEID: &zeroValue}
@@ -5961,11 +6130,11 @@ func TestDependabotSecurityAdvisory_GetCVEID(tt *testing.T) {
 	d.GetCVEID()
 }
 
-func TestDependabotSecurityAdvisory_GetCVSs(tt *testing.T) {
+func TestDependabotSecurityAdvisory_GetCVSS(tt *testing.T) {
 	d := &DependabotSecurityAdvisory{}
-	d.GetCVSs()
+	d.GetCVSS()
 	d = nil
-	d.GetCVSs()
+	d.GetCVSS()
 }
 
 func TestDependabotSecurityAdvisory_GetDescription(tt *testing.T) {
@@ -13245,6 +13414,16 @@ func TestMostRecentInstance_GetAnalysisKey(tt *testing.T) {
 	m.GetAnalysisKey()
 }
 
+func TestMostRecentInstance_GetCategory(tt *testing.T) {
+	var zeroValue string
+	m := &MostRecentInstance{Category: &zeroValue}
+	m.GetCategory()
+	m = &MostRecentInstance{}
+	m.GetCategory()
+	m = nil
+	m.GetCategory()
+}
+
 func TestMostRecentInstance_GetCommitSHA(tt *testing.T) {
 	var zeroValue string
 	m := &MostRecentInstance{CommitSHA: &zeroValue}
@@ -13265,6 +13444,16 @@ func TestMostRecentInstance_GetEnvironment(tt *testing.T) {
 	m.GetEnvironment()
 }
 
+func TestMostRecentInstance_GetHTMLURL(tt *testing.T) {
+	var zeroValue string
+	m := &MostRecentInstance{HTMLURL: &zeroValue}
+	m.GetHTMLURL()
+	m = &MostRecentInstance{}
+	m.GetHTMLURL()
+	m = nil
+	m.GetHTMLURL()
+}
+
 func TestMostRecentInstance_GetLocation(tt *testing.T) {
 	m := &MostRecentInstance{}
 	m.GetLocation()
@@ -23363,6 +23552,26 @@ func TestSarifID_GetURL(tt *testing.T) {
 	s.GetURL()
 }
 
+func TestSARIFUpload_GetAnalysesURL(tt *testing.T) {
+	var zeroValue string
+	s := &SARIFUpload{AnalysesURL: &zeroValue}
+	s.GetAnalysesURL()
+	s = &SARIFUpload{}
+	s.GetAnalysesURL()
+	s = nil
+	s.GetAnalysesURL()
+}
+
+func TestSARIFUpload_GetProcessingStatus(tt *testing.T) {
+	var zeroValue string
+	s := &SARIFUpload{ProcessingStatus: &zeroValue}
+	s.GetProcessingStatus()
+	s = &SARIFUpload{}
+	s.GetProcessingStatus()
+	s = nil
+	s.GetProcessingStatus()
+}
+
 func TestSBOM_GetSBOM(tt *testing.T) {
 	s := &SBOM{}
 	s.GetSBOM()
@@ -24054,6 +24263,13 @@ func TestSecretScanningPushProtection_GetStatus(tt *testing.T) {
 	s.GetStatus()
 }
 
+func TestSecurityAdvisory_GetCVSS(tt *testing.T) {
+	s := &SecurityAdvisory{}
+	s.GetCVSS()
+	s = nil
+	s.GetCVSS()
+}
+
 func TestSecurityAdvisory_GetDescription(tt *testing.T) {
 	var zeroValue string
 	s := &SecurityAdvisory{Description: &zeroValue}
@@ -24134,6 +24350,34 @@ func TestSecurityAdvisoryEvent_GetAction(tt *testing.T) {
 	s.GetAction()
 }
 
+func TestSecurityAdvisoryEvent_GetEnterprise(tt *testing.T) {
+	s := &SecurityAdvisoryEvent{}
+	s.GetEnterprise()
+	s = nil
+	s.GetEnterprise()
+}
+
+func TestSecurityAdvisoryEvent_GetInstallation(tt *testing.T) {
+	s := &SecurityAdvisoryEvent{}
+	s.GetInstallation()
+	s = nil
+	s.GetInstallation()
+}
+
+func TestSecurityAdvisoryEvent_GetOrganization(tt *testing.T) {
+	s := &SecurityAdvisoryEvent{}
+	s.GetOrganization()
+	s = nil
+	s.GetOrganization()
+}
+
+func TestSecurityAdvisoryEvent_GetRepository(tt *testing.T) {
+	s := &SecurityAdvisoryEvent{}
+	s.GetRepository()
+	s = nil
+	s.GetRepository()
+}
+
 func TestSecurityAdvisoryEvent_GetSecurityAdvisory(tt *testing.T) {
 	s := &SecurityAdvisoryEvent{}
 	s.GetSecurityAdvisory()
@@ -24141,6 +24385,13 @@ func TestSecurityAdvisoryEvent_GetSecurityAdvisory(tt *testing.T) {
 	s.GetSecurityAdvisory()
 }
 
+func TestSecurityAdvisoryEvent_GetSender(tt *testing.T) {
+	s := &SecurityAdvisoryEvent{}
+	s.GetSender()
+	s = nil
+	s.GetSender()
+}
+
 func TestSecurityAndAnalysis_GetAdvancedSecurity(tt *testing.T) {
 	s := &SecurityAndAnalysis{}
 	s.GetAdvancedSecurity()
diff --git a/github/messages_test.go b/github/messages_test.go
index 193501f9..1243d755 100644
--- a/github/messages_test.go
+++ b/github/messages_test.go
@@ -284,6 +284,10 @@ func TestParseWebHook(t *testing.T) {
 			payload:     &DeleteEvent{},
 			messageType: "delete",
 		},
+		{
+			payload:     &DependabotAlertEvent{},
+			messageType: "dependabot_alert",
+		},
 		{
 			payload:     &DeployKeyEvent{},
 			messageType: "deploy_key",
diff --git a/github/repos_hooks_deliveries_test.go b/github/repos_hooks_deliveries_test.go
index d5e1a383..057d7121 100644
--- a/github/repos_hooks_deliveries_test.go
+++ b/github/repos_hooks_deliveries_test.go
@@ -150,6 +150,7 @@ var hookDeliveryPayloadTypeToStruct = map[string]interface{}{
 	"content_reference":              &ContentReferenceEvent{},
 	"create":                         &CreateEvent{},
 	"delete":                         &DeleteEvent{},
+	"dependabot_alert":               &DependabotAlertEvent{},
 	"deploy_key":                     &DeployKeyEvent{},
 	"deployment":                     &DeploymentEvent{},
 	"deployment_status":              &DeploymentStatusEvent{},