Repository: google/go-github
Pull request #3020 (2023-12-05 23:10:04)

Add GetAllCustomPropertyValues for repositories
Closes https://github.com/google/go-github/issues/3014.

Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/google/go-github/pull/3020?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Comparison is base [(`1e66201`)](https://app.codecov.io/gh/google/go-github/commit/1e66201027e8c106a1915fdaf44a63513f317409?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) 97.91% compared to head [(`e555328`)](https://app.codecov.io/gh/google/go-github/pull/3020?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) 97.92%.


<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##           master    #3020   +/-   ##
=======================================
  Coverage   97.91%   97.92%           
=======================================
  Files         150      151    +1     
  Lines       12980    12993   +13     
=======================================
+ Hits        12710    12723   +13     
  Misses        192      192           
  Partials       78       78           
```



</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/google/go-github/pull/3020?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google).

liaodaniel: Thank you @gmlewis, need to pay more attention to copying and pasting 😅 

Patch:
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index f9d6d7e4..24f3d909 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -9,7 +9,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v4
-    - uses: actions/setup-go@v4
+    - uses: actions/setup-go@v5
       with:
         go-version: 1.x
         cache-dependency-path: "**/go.sum"
diff --git a/github/enterprise_code_security_and_analysis.go b/github/enterprise_code_security_and_analysis.go
index af8eb0ff..159aeae4 100644
--- a/github/enterprise_code_security_and_analysis.go
+++ b/github/enterprise_code_security_and_analysis.go
@@ -16,6 +16,7 @@ type EnterpriseSecurityAnalysisSettings struct {
 	SecretScanningEnabledForNewRepositories               *bool   `json:"secret_scanning_enabled_for_new_repositories,omitempty"`
 	SecretScanningPushProtectionEnabledForNewRepositories *bool   `json:"secret_scanning_push_protection_enabled_for_new_repositories,omitempty"`
 	SecretScanningPushProtectionCustomLink                *string `json:"secret_scanning_push_protection_custom_link,omitempty"`
+	SecretScanningValidityChecksEnabled                   *bool   `json:"secret_scanning_validity_checks_enabled,omitempty"`
 }
 
 // GetCodeSecurityAndAnalysis gets code security and analysis features for an enterprise.
diff --git a/github/github-accessors.go b/github/github-accessors.go
index e15eb102..02d1212c 100644
--- a/github/github-accessors.go
+++ b/github/github-accessors.go
@@ -1454,6 +1454,14 @@ func (a *AuditEntry) GetReadOnly() string {
 	return *a.ReadOnly
 }
 
+// GetReferrer returns the Referrer field if it's non-nil, zero value otherwise.
+func (a *AuditEntry) GetReferrer() string {
+	if a == nil || a.Referrer == nil {
+		return ""
+	}
+	return *a.Referrer
+}
+
 // GetRepo returns the Repo field if it's non-nil, zero value otherwise.
 func (a *AuditEntry) GetRepo() string {
 	if a == nil || a.Repo == nil {
@@ -6974,6 +6982,14 @@ func (e *EnterpriseSecurityAnalysisSettings) GetSecretScanningPushProtectionEnab
 	return *e.SecretScanningPushProtectionEnabledForNewRepositories
 }
 
+// GetSecretScanningValidityChecksEnabled returns the SecretScanningValidityChecksEnabled field if it's non-nil, zero value otherwise.
+func (e *EnterpriseSecurityAnalysisSettings) GetSecretScanningValidityChecksEnabled() bool {
+	if e == nil || e.SecretScanningValidityChecksEnabled == nil {
+		return false
+	}
+	return *e.SecretScanningValidityChecksEnabled
+}
+
 // GetCanAdminsBypass returns the CanAdminsBypass field if it's non-nil, zero value otherwise.
 func (e *Environment) GetCanAdminsBypass() bool {
 	if e == nil || e.CanAdminsBypass == nil {
@@ -12734,6 +12750,14 @@ func (o *Organization) GetSecretScanningPushProtectionEnabledForNewRepos() bool
 	return *o.SecretScanningPushProtectionEnabledForNewRepos
 }
 
+// GetSecretScanningValidityChecksEnabled returns the SecretScanningValidityChecksEnabled field if it's non-nil, zero value otherwise.
+func (o *Organization) GetSecretScanningValidityChecksEnabled() bool {
+	if o == nil || o.SecretScanningValidityChecksEnabled == nil {
+		return false
+	}
+	return *o.SecretScanningValidityChecksEnabled
+}
+
 // GetTotalPrivateRepos returns the TotalPrivateRepos field if it's non-nil, zero value otherwise.
 func (o *Organization) GetTotalPrivateRepos() int64 {
 	if o == nil || o.TotalPrivateRepos == nil {
@@ -17766,6 +17790,14 @@ func (r *RateLimits) GetCodeScanningUpload() *Rate {
 	return r.CodeScanningUpload
 }
 
+// GetCodeSearch returns the CodeSearch field.
+func (r *RateLimits) GetCodeSearch() *Rate {
+	if r == nil {
+		return nil
+	}
+	return r.CodeSearch
+}
+
 // GetCore returns the Core field.
 func (r *RateLimits) GetCore() *Rate {
 	if r == nil {
@@ -17774,6 +17806,14 @@ func (r *RateLimits) GetCore() *Rate {
 	return r.Core
 }
 
+// GetDependencySnapshots returns the DependencySnapshots field.
+func (r *RateLimits) GetDependencySnapshots() *Rate {
+	if r == nil {
+		return nil
+	}
+	return r.DependencySnapshots
+}
+
 // GetGraphQL returns the GraphQL field.
 func (r *RateLimits) GetGraphQL() *Rate {
 	if r == nil {
@@ -21590,6 +21630,14 @@ func (s *SecretScanningPushProtection) GetStatus() string {
 	return *s.Status
 }
 
+// GetStatus returns the Status field if it's non-nil, zero value otherwise.
+func (s *SecretScanningValidityChecks) GetStatus() string {
+	if s == nil || s.Status == nil {
+		return ""
+	}
+	return *s.Status
+}
+
 // GetAuthor returns the Author field.
 func (s *SecurityAdvisory) GetAuthor() *User {
 	if s == nil {
@@ -21830,6 +21878,14 @@ func (s *SecurityAndAnalysis) GetSecretScanningPushProtection() *SecretScanningP
 	return s.SecretScanningPushProtection
 }
 
+// GetSecretScanningValidityChecks returns the SecretScanningValidityChecks field.
+func (s *SecurityAndAnalysis) GetSecretScanningValidityChecks() *SecretScanningValidityChecks {
+	if s == nil {
+		return nil
+	}
+	return s.SecretScanningValidityChecks
+}
+
 // GetFrom returns the From field.
 func (s *SecurityAndAnalysisChange) GetFrom() *SecurityAndAnalysisChangeFrom {
 	if s == nil {
diff --git a/github/github.go b/github/github.go
index c248b256..da4f2d06 100644
--- a/github/github.go
+++ b/github/github.go
@@ -220,6 +220,8 @@ type service struct {
 }
 
 // Client returns the http.Client used by this GitHub client.
+// This should only be used for requests to the GitHub API because
+// request headers will contain an authorization token.
 func (c *Client) Client() *http.Client {
 	c.clientMu.Lock()
 	defer c.clientMu.Unlock()
@@ -315,7 +317,11 @@ func addOptions(s string, opts interface{}) (string, error) {
 // an http.Client that will perform the authentication for you (such as that
 // provided by the golang.org/x/oauth2 library).
 func NewClient(httpClient *http.Client) *Client {
-	c := &Client{client: httpClient}
+	if httpClient == nil {
+		httpClient = &http.Client{}
+	}
+	httpClient2 := *httpClient
+	c := &Client{client: &httpClient2}
 	c.initialize()
 	return c
 }
@@ -1303,6 +1309,8 @@ const (
 	codeScanningUploadCategory
 	actionsRunnerRegistrationCategory
 	scimCategory
+	dependencySnapshotsCategory
+	codeSearchCategory
 
 	categories // An array of this length will be able to contain all rate limit categories.
 )
@@ -1315,6 +1323,12 @@ func category(method, path string) rateLimitCategory {
 		// NOTE: coreCategory is returned for actionsRunnerRegistrationCategory too,
 		// because no API found for this category.
 		return coreCategory
+
+	// https://docs.github.com/en/rest/search/search#search-code
+	case strings.HasPrefix(path, "/search/code") &&
+		method == http.MethodGet:
+		return codeSearchCategory
+
 	case strings.HasPrefix(path, "/search/"):
 		return searchCategory
 	case path == "/graphql":
@@ -1337,6 +1351,12 @@ func category(method, path string) rateLimitCategory {
 	// https://docs.github.com/enterprise-cloud@latest/rest/scim
 	case strings.HasPrefix(path, "/scim/"):
 		return scimCategory
+
+	// https://docs.github.com/en/rest/dependency-graph/dependency-submission#create-a-snapshot-of-dependencies-for-a-repository
+	case strings.HasPrefix(path, "/repos/") &&
+		strings.HasSuffix(path, "/dependency-graph/snapshots") &&
+		method == http.MethodPost:
+		return dependencySnapshotsCategory
 	}
 }
 
diff --git a/github/orgs.go b/github/orgs.go
index 4d346527..27c0f102 100644
--- a/github/orgs.go
+++ b/github/orgs.go
@@ -95,6 +95,8 @@ type Organization struct {
 	SecretScanningEnabledForNewRepos *bool `json:"secret_scanning_enabled_for_new_repositories,omitempty"`
 	// SecretScanningPushProtectionEnabledForNewRepos toggles whether secret scanning push protection is enabled on new repositories.
 	SecretScanningPushProtectionEnabledForNewRepos *bool `json:"secret_scanning_push_protection_enabled_for_new_repositories,omitempty"`
+	// SecretScanningValidityChecksEnabled toggles whether secret scanning validity check is enabled.
+	SecretScanningValidityChecksEnabled *bool `json:"secret_scanning_validity_checks_enabled,omitempty"`
 
 	// API URLs
 	URL              *string `json:"url,omitempty"`
diff --git a/github/orgs_audit_log.go b/github/orgs_audit_log.go
index e3afd311..aa359135 100644
--- a/github/orgs_audit_log.go
+++ b/github/orgs_audit_log.go
@@ -95,6 +95,7 @@ type AuditEntry struct {
 	PullRequestURL           *string                 `json:"pull_request_url,omitempty"`
 	ReadOnly                 *string                 `json:"read_only,omitempty"`
 	Reasons                  []*PolicyOverrideReason `json:"reasons,omitempty"`
+	Referrer                 *string                 `json:"referrer,omitempty"`
 	Repo                     *string                 `json:"repo,omitempty"`
 	Repository               *string                 `json:"repository,omitempty"`
 	RepositoryPublic         *bool                   `json:"repository_public,omitempty"`
diff --git a/github/orgs_packages.go b/github/orgs_packages.go
index 4fb9a63b..edd8e508 100644
--- a/github/orgs_packages.go
+++ b/github/orgs_packages.go
@@ -8,6 +8,7 @@ package github
 import (
 	"context"
 	"fmt"
+	"net/url"
 )
 
 // ListPackages lists the packages for an organization.
@@ -38,11 +39,13 @@ func (s *OrganizationsService) ListPackages(ctx context.Context, org string, opt
 
 // GetPackage gets a package by name from an organization.
 //
+// Note that packageName is escaped for the URL path so that you don't need to.
+//
 // GitHub API docs: https://docs.github.com/rest/packages/packages#get-a-package-for-an-organization
 //
 //meta:operation GET /orgs/{org}/packages/{package_type}/{package_name}
 func (s *OrganizationsService) GetPackage(ctx context.Context, org, packageType, packageName string) (*Package, *Response, error) {
-	u := fmt.Sprintf("orgs/%v/packages/%v/%v", org, packageType, packageName)
+	u := fmt.Sprintf("orgs/%v/packages/%v/%v", org, packageType, url.PathEscape(packageName))
 	req, err := s.client.NewRequest("GET", u, nil)
 	if err != nil {
 		return nil, nil, err
@@ -59,11 +62,13 @@ func (s *OrganizationsService) GetPackage(ctx context.Context, org, packageType,
 
 // DeletePackage deletes a package from an organization.
 //
+// Note that packageName is escaped for the URL path so that you don't need to.
+//
 // GitHub API docs: https://docs.github.com/rest/packages/packages#delete-a-package-for-an-organization
 //
 //meta:operation DELETE /orgs/{org}/packages/{package_type}/{package_name}
 func (s *OrganizationsService) DeletePackage(ctx context.Context, org, packageType, packageName string) (*Response, error) {
-	u := fmt.Sprintf("orgs/%v/packages/%v/%v", org, packageType, packageName)
+	u := fmt.Sprintf("orgs/%v/packages/%v/%v", org, packageType, url.PathEscape(packageName))
 	req, err := s.client.NewRequest("DELETE", u, nil)
 	if err != nil {
 		return nil, err
@@ -74,11 +79,13 @@ func (s *OrganizationsService) DeletePackage(ctx context.Context, org, packageTy
 
 // RestorePackage restores a package to an organization.
 //
+// Note that packageName is escaped for the URL path so that you don't need to.
+//
 // GitHub API docs: https://docs.github.com/rest/packages/packages#restore-a-package-for-an-organization
 //
 //meta:operation POST /orgs/{org}/packages/{package_type}/{package_name}/restore
 func (s *OrganizationsService) RestorePackage(ctx context.Context, org, packageType, packageName string) (*Response, error) {
-	u := fmt.Sprintf("orgs/%v/packages/%v/%v/restore", org, packageType, packageName)
+	u := fmt.Sprintf("orgs/%v/packages/%v/%v/restore", org, packageType, url.PathEscape(packageName))
 	req, err := s.client.NewRequest("POST", u, nil)
 	if err != nil {
 		return nil, err
@@ -89,11 +96,13 @@ func (s *OrganizationsService) RestorePackage(ctx context.Context, org, packageT
 
 // PackageGetAllVersions gets all versions of a package in an organization.
 //
+// Note that packageName is escaped for the URL path so that you don't need to.
+//
 // GitHub API docs: https://docs.github.com/rest/packages/packages#list-package-versions-for-a-package-owned-by-an-organization
 //
 //meta:operation GET /orgs/{org}/packages/{package_type}/{package_name}/versions
 func (s *OrganizationsService) PackageGetAllVersions(ctx context.Context, org, packageType, packageName string, opts *PackageListOptions) ([]*PackageVersion, *Response, error) {
-	u := fmt.Sprintf("orgs/%v/packages/%v/%v/versions", org, packageType, packageName)
+	u := fmt.Sprintf("orgs/%v/packages/%v/%v/versions", org, packageType, url.PathEscape(packageName))
 	u, err := addOptions(u, opts)
 	if err != nil {
 		return nil, nil, err
@@ -115,11 +124,13 @@ func (s *OrganizationsService) PackageGetAllVersions(ctx context.Context, org, p
 
 // PackageGetVersion gets a specific version of a package in an organization.
 //
+// Note that packageName is escaped for the URL path so that you don't need to.
+//
 // GitHub API docs: https://docs.github.com/rest/packages/packages#get-a-package-version-for-an-organization
 //
 //meta:operation GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}
 func (s *OrganizationsService) PackageGetVersion(ctx context.Context, org, packageType, packageName string, packageVersionID int64) (*PackageVersion, *Response, error) {
-	u := fmt.Sprintf("orgs/%v/packages/%v/%v/versions/%v", org, packageType, packageName, packageVersionID)
+	u := fmt.Sprintf("orgs/%v/packages/%v/%v/versions/%v", org, packageType, url.PathEscape(packageName), packageVersionID)
 	req, err := s.client.NewRequest("GET", u, nil)
 	if err != nil {
 		return nil, nil, err
@@ -136,11 +147,13 @@ func (s *OrganizationsService) PackageGetVersion(ctx context.Context, org, packa
 
 // PackageDeleteVersion deletes a package version from an organization.
 //
+// Note that packageName is escaped for the URL path so that you don't need to.
+//
 // GitHub API docs: https://docs.github.com/rest/packages/packages#delete-package-version-for-an-organization
 //
 //meta:operation DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}
 func (s *OrganizationsService) PackageDeleteVersion(ctx context.Context, org, packageType, packageName string, packageVersionID int64) (*Response, error) {
-	u := fmt.Sprintf("orgs/%v/packages/%v/%v/versions/%v", org, packageType, packageName, packageVersionID)
+	u := fmt.Sprintf("orgs/%v/packages/%v/%v/versions/%v", org, packageType, url.PathEscape(packageName), packageVersionID)
 	req, err := s.client.NewRequest("DELETE", u, nil)
 	if err != nil {
 		return nil, err
@@ -151,11 +164,13 @@ func (s *OrganizationsService) PackageDeleteVersion(ctx context.Context, org, pa
 
 // PackageRestoreVersion restores a package version to an organization.
 //
+// Note that packageName is escaped for the URL path so that you don't need to.
+//
 // GitHub API docs: https://docs.github.com/rest/packages/packages#restore-package-version-for-an-organization
 //
 //meta:operation POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore
 func (s *OrganizationsService) PackageRestoreVersion(ctx context.Context, org, packageType, packageName string, packageVersionID int64) (*Response, error) {
-	u := fmt.Sprintf("orgs/%v/packages/%v/%v/versions/%v/restore", org, packageType, packageName, packageVersionID)
+	u := fmt.Sprintf("orgs/%v/packages/%v/%v/versions/%v/restore", org, packageType, url.PathEscape(packageName), packageVersionID)
 	req, err := s.client.NewRequest("POST", u, nil)
 	if err != nil {
 		return nil, err
diff --git a/github/orgs_properties.go b/github/orgs_properties.go
index 45e3f1f9..2e88b7f4 100644
--- a/github/orgs_properties.go
+++ b/github/orgs_properties.go
@@ -178,12 +178,12 @@ func (s *OrganizationsService) ListCustomPropertyValues(ctx context.Context, org
 // GitHub API docs: https://docs.github.com/rest/orgs/custom-properties#create-or-update-custom-property-values-for-organization-repositories
 //
 //meta:operation PATCH /orgs/{org}/properties/values
-func (s *OrganizationsService) CreateOrUpdateRepoCustomPropertyValues(ctx context.Context, org string, repoNames []string, properties []*CustomProperty) (*Response, error) {
+func (s *OrganizationsService) CreateOrUpdateRepoCustomPropertyValues(ctx context.Context, org string, repoNames []string, properties []*CustomPropertyValue) (*Response, error) {
 	u := fmt.Sprintf("orgs/%v/properties/values", org)
 
 	params := struct {
-		RepositoryNames []string          `json:"repository_names"`
-		Properties      []*CustomProperty `json:"properties"`
+		RepositoryNames []string               `json:"repository_names"`
+		Properties      []*CustomPropertyValue `json:"properties"`
 	}{
 		RepositoryNames: repoNames,
 		Properties:      properties,
diff --git a/github/rate_limit.go b/github/rate_limit.go
index 0fc15f81..febe5edc 100644
--- a/github/rate_limit.go
+++ b/github/rate_limit.go
@@ -52,6 +52,8 @@ type RateLimits struct {
 	CodeScanningUpload        *Rate `json:"code_scanning_upload"`
 	ActionsRunnerRegistration *Rate `json:"actions_runner_registration"`
 	SCIM                      *Rate `json:"scim"`
+	DependencySnapshots       *Rate `json:"dependency_snapshots"`
+	CodeSearch                *Rate `json:"code_search"`
 }
 
 func (r RateLimits) String() string {
@@ -106,6 +108,12 @@ func (s *RateLimitService) Get(ctx context.Context) (*RateLimits, *Response, err
 		if response.Resources.SCIM != nil {
 			s.client.rateLimits[scimCategory] = *response.Resources.SCIM
 		}
+		if response.Resources.DependencySnapshots != nil {
+			s.client.rateLimits[dependencySnapshotsCategory] = *response.Resources.DependencySnapshots
+		}
+		if response.Resources.CodeSearch != nil {
+			s.client.rateLimits[codeSearchCategory] = *response.Resources.CodeSearch
+		}
 		s.client.rateMu.Unlock()
 	}
 
diff --git a/github/repos.go b/github/repos.go
index 5fcf219b..a7574d72 100644
--- a/github/repos.go
+++ b/github/repos.go
@@ -198,6 +198,7 @@ type SecurityAndAnalysis struct {
 	SecretScanning               *SecretScanning               `json:"secret_scanning,omitempty"`
 	SecretScanningPushProtection *SecretScanningPushProtection `json:"secret_scanning_push_protection,omitempty"`
 	DependabotSecurityUpdates    *DependabotSecurityUpdates    `json:"dependabot_security_updates,omitempty"`
+	SecretScanningValidityChecks *SecretScanningValidityChecks `json:"secret_scanning_validity_checks,omitempty"`
 }
 
 func (s SecurityAndAnalysis) String() string {
@@ -248,6 +249,13 @@ func (d DependabotSecurityUpdates) String() string {
 	return Stringify(d)
 }
 
+// SecretScanningValidityChecks represents the state of secret scanning validity checks on a repository.
+//
+// GitHub API docs: https://docs.github.com/en/enterprise-cloud@latest/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#allowing-validity-checks-for-partner-patterns-in-a-repository
+type SecretScanningValidityChecks struct {
+	Status *string `json:"status,omitempty"`
+}
+
 // List calls either RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser
 // depending on whether user is empty.
 //
diff --git a/github/repos_properties.go b/github/repos_properties.go
new file mode 100644
index 00000000..5a8626c4
--- /dev/null
+++ b/github/repos_properties.go
@@ -0,0 +1,33 @@
+// Copyright 2023 The go-github AUTHORS. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package github
+
+import (
+	"context"
+	"fmt"
+)
+
+// GetAllCustomPropertyValues gets all custom property values that are set for a repository.
+//
+// GitHub API docs: https://docs.github.com/rest/repos/custom-properties#get-all-custom-property-values-for-a-repository
+//
+//meta:operation GET /repos/{owner}/{repo}/properties/values
+func (s *RepositoriesService) GetAllCustomPropertyValues(ctx context.Context, org, repo string) ([]*CustomPropertyValue, *Response, error) {
+	u := fmt.Sprintf("repos/%v/%v/properties/values", org, repo)
+
+	req, err := s.client.NewRequest("GET", u, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	var customPropertyValues []*CustomPropertyValue
+	resp, err := s.client.Do(ctx, req, &customPropertyValues)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return customPropertyValues, resp, nil
+}
diff --git a/github/security_advisories.go b/github/security_advisories.go
index 63526374..b5a43f1a 100644
--- a/github/security_advisories.go
+++ b/github/security_advisories.go
@@ -7,6 +7,7 @@ package github
 
 import (
 	"context"
+	"encoding/json"
 	"fmt"
 )
 
@@ -148,6 +149,36 @@ func (s *SecurityAdvisoriesService) RequestCVE(ctx context.Context, owner, repo,
 	return resp, nil
 }
 
+// CreateTemporaryPrivateFork creates a temporary private fork to collaborate on fixing a security vulnerability in your repository.
+// The ghsaID is the GitHub Security Advisory identifier of the advisory.
+//
+// GitHub API docs: https://docs.github.com/rest/security-advisories/repository-advisories#create-a-temporary-private-fork
+//
+//meta:operation POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks
+func (s *SecurityAdvisoriesService) CreateTemporaryPrivateFork(ctx context.Context, owner, repo, ghsaID string) (*Repository, *Response, error) {
+	url := fmt.Sprintf("repos/%v/%v/security-advisories/%v/forks", owner, repo, ghsaID)
+
+	req, err := s.client.NewRequest("POST", url, nil)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	fork := new(Repository)
+	resp, err := s.client.Do(ctx, req, fork)
+	if err != nil {
+		if aerr, ok := err.(*AcceptedError); ok {
+			if err := json.Unmarshal(aerr.Raw, fork); err != nil {
+				return fork, resp, err
+			}
+
+			return fork, resp, err
+		}
+		return nil, resp, err
+	}
+
+	return fork, resp, nil
+}
+
 // ListRepositorySecurityAdvisoriesForOrg lists the repository security advisories for an organization.
 //
 // GitHub API docs: https://docs.github.com/rest/security-advisories/repository-advisories#list-repository-security-advisories-for-an-organization


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index b3abd8b6..3067b1b0 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -39,7 +39,7 @@ jobs:
     runs-on: ${{ matrix.platform }}
 
     steps:
-    - uses: actions/setup-go@v4
+    - uses: actions/setup-go@v5
       with:
         go-version: ${{ matrix.go-version }}
     - uses: actions/checkout@v4
diff --git a/github/enterprise_code_security_and_analysis_test.go b/github/enterprise_code_security_and_analysis_test.go
index 25dbd941..17bbe18b 100644
--- a/github/enterprise_code_security_and_analysis_test.go
+++ b/github/enterprise_code_security_and_analysis_test.go
@@ -27,7 +27,8 @@ func TestEnterpriseService_GetCodeSecurityAndAnalysis(t *testing.T) {
 		  "advanced_security_enabled_for_new_repositories": true,
 		  "secret_scanning_enabled_for_new_repositories": true,
 		  "secret_scanning_push_protection_enabled_for_new_repositories": true,
-		  "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md"
+		  "secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md",
+		  "secret_scanning_validity_checks_enabled": true
 		}`)
 	})
 
@@ -44,6 +45,7 @@ func TestEnterpriseService_GetCodeSecurityAndAnalysis(t *testing.T) {
 		SecretScanningEnabledForNewRepositories:               Bool(true),
 		SecretScanningPushProtectionEnabledForNewRepositories: Bool(true),
 		SecretScanningPushProtectionCustomLink:                String("https://github.com/test-org/test-repo/blob/main/README.md"),
+		SecretScanningValidityChecksEnabled:                   Bool(true),
 	}
 
 	if !cmp.Equal(settings, want) {
@@ -73,6 +75,7 @@ func TestEnterpriseService_UpdateCodeSecurityAndAnalysis(t *testing.T) {
 		SecretScanningEnabledForNewRepositories:               Bool(true),
 		SecretScanningPushProtectionEnabledForNewRepositories: Bool(true),
 		SecretScanningPushProtectionCustomLink:                String("https://github.com/test-org/test-repo/blob/main/README.md"),
+		SecretScanningValidityChecksEnabled:                   Bool(true),
 	}
 
 	mux.HandleFunc("/enterprises/e/code_security_and_analysis", func(w http.ResponseWriter, r *http.Request) {
diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go
index 84d104f1..6ae89e45 100644
--- a/github/github-accessors_test.go
+++ b/github/github-accessors_test.go
@@ -1731,6 +1731,16 @@ func TestAuditEntry_GetReadOnly(tt *testing.T) {
 	a.GetReadOnly()
 }
 
+func TestAuditEntry_GetReferrer(tt *testing.T) {
+	var zeroValue string
+	a := &AuditEntry{Referrer: &zeroValue}
+	a.GetReferrer()
+	a = &AuditEntry{}
+	a.GetReferrer()
+	a = nil
+	a.GetReferrer()
+}
+
 func TestAuditEntry_GetRepo(tt *testing.T) {
 	var zeroValue string
 	a := &AuditEntry{Repo: &zeroValue}
@@ -8175,6 +8185,16 @@ func TestEnterpriseSecurityAnalysisSettings_GetSecretScanningPushProtectionEnabl
 	e.GetSecretScanningPushProtectionEnabledForNewRepositories()
 }
 
+func TestEnterpriseSecurityAnalysisSettings_GetSecretScanningValidityChecksEnabled(tt *testing.T) {
+	var zeroValue bool
+	e := &EnterpriseSecurityAnalysisSettings{SecretScanningValidityChecksEnabled: &zeroValue}
+	e.GetSecretScanningValidityChecksEnabled()
+	e = &EnterpriseSecurityAnalysisSettings{}
+	e.GetSecretScanningValidityChecksEnabled()
+	e = nil
+	e.GetSecretScanningValidityChecksEnabled()
+}
+
 func TestEnvironment_GetCanAdminsBypass(tt *testing.T) {
 	var zeroValue bool
 	e := &Environment{CanAdminsBypass: &zeroValue}
@@ -14928,6 +14948,16 @@ func TestOrganization_GetSecretScanningPushProtectionEnabledForNewRepos(tt *test
 	o.GetSecretScanningPushProtectionEnabledForNewRepos()
 }
 
+func TestOrganization_GetSecretScanningValidityChecksEnabled(tt *testing.T) {
+	var zeroValue bool
+	o := &Organization{SecretScanningValidityChecksEnabled: &zeroValue}
+	o.GetSecretScanningValidityChecksEnabled()
+	o = &Organization{}
+	o.GetSecretScanningValidityChecksEnabled()
+	o = nil
+	o.GetSecretScanningValidityChecksEnabled()
+}
+
 func TestOrganization_GetTotalPrivateRepos(tt *testing.T) {
 	var zeroValue int64
 	o := &Organization{TotalPrivateRepos: &zeroValue}
@@ -20606,6 +20636,13 @@ func TestRateLimits_GetCodeScanningUpload(tt *testing.T) {
 	r.GetCodeScanningUpload()
 }
 
+func TestRateLimits_GetCodeSearch(tt *testing.T) {
+	r := &RateLimits{}
+	r.GetCodeSearch()
+	r = nil
+	r.GetCodeSearch()
+}
+
 func TestRateLimits_GetCore(tt *testing.T) {
 	r := &RateLimits{}
 	r.GetCore()
@@ -20613,6 +20650,13 @@ func TestRateLimits_GetCore(tt *testing.T) {
 	r.GetCore()
 }
 
+func TestRateLimits_GetDependencySnapshots(tt *testing.T) {
+	r := &RateLimits{}
+	r.GetDependencySnapshots()
+	r = nil
+	r.GetDependencySnapshots()
+}
+
 func TestRateLimits_GetGraphQL(tt *testing.T) {
 	r := &RateLimits{}
 	r.GetGraphQL()
@@ -25149,6 +25193,16 @@ func TestSecretScanningPushProtection_GetStatus(tt *testing.T) {
 	s.GetStatus()
 }
 
+func TestSecretScanningValidityChecks_GetStatus(tt *testing.T) {
+	var zeroValue string
+	s := &SecretScanningValidityChecks{Status: &zeroValue}
+	s.GetStatus()
+	s = &SecretScanningValidityChecks{}
+	s.GetStatus()
+	s = nil
+	s.GetStatus()
+}
+
 func TestSecurityAdvisory_GetAuthor(tt *testing.T) {
 	s := &SecurityAdvisory{}
 	s.GetAuthor()
@@ -25404,6 +25458,13 @@ func TestSecurityAndAnalysis_GetSecretScanningPushProtection(tt *testing.T) {
 	s.GetSecretScanningPushProtection()
 }
 
+func TestSecurityAndAnalysis_GetSecretScanningValidityChecks(tt *testing.T) {
+	s := &SecurityAndAnalysis{}
+	s.GetSecretScanningValidityChecks()
+	s = nil
+	s.GetSecretScanningValidityChecks()
+}
+
 func TestSecurityAndAnalysisChange_GetFrom(tt *testing.T) {
 	s := &SecurityAndAnalysisChange{}
 	s.GetFrom()
diff --git a/github/github-stringify_test.go b/github/github-stringify_test.go
index 7472edfd..bb69ce1a 100644
--- a/github/github-stringify_test.go
+++ b/github/github-stringify_test.go
@@ -1051,15 +1051,16 @@ func TestOrganization_String(t *testing.T) {
 		DependencyGraphEnabledForNewRepos:              Bool(false),
 		SecretScanningEnabledForNewRepos:               Bool(false),
 		SecretScanningPushProtectionEnabledForNewRepos: Bool(false),
-		URL:              String(""),
-		EventsURL:        String(""),
-		HooksURL:         String(""),
-		IssuesURL:        String(""),
-		MembersURL:       String(""),
-		PublicMembersURL: String(""),
-		ReposURL:         String(""),
+		SecretScanningValidityChecksEnabled:            Bool(false),
+		URL:                                            String(""),
+		EventsURL:                                      String(""),
+		HooksURL:                                       String(""),
+		IssuesURL:                                      String(""),
+		MembersURL:                                     String(""),
+		PublicMembersURL:                               String(""),
+		ReposURL:                                       String(""),
 	}
-	want := `github.Organization{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", Name:"", Company:"", Blog:"", Location:"", Email:"", TwitterUsername:"", Description:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, BillingEmail:"", Type:"", Plan:github.Plan{}, TwoFactorRequirementEnabled:false, IsVerified:false, HasOrganizationProjects:false, HasRepositoryProjects:false, DefaultRepoPermission:"", DefaultRepoSettings:"", MembersCanCreateRepos:false, MembersCanCreatePublicRepos:false, MembersCanCreatePrivateRepos:false, MembersCanCreateInternalRepos:false, MembersCanForkPrivateRepos:false, MembersAllowedRepositoryCreationType:"", MembersCanCreatePages:false, MembersCanCreatePublicPages:false, MembersCanCreatePrivatePages:false, WebCommitSignoffRequired:false, AdvancedSecurityEnabledForNewRepos:false, DependabotAlertsEnabledForNewRepos:false, DependabotSecurityUpdatesEnabledForNewRepos:false, DependencyGraphEnabledForNewRepos:false, SecretScanningEnabledForNewRepos:false, SecretScanningPushProtectionEnabledForNewRepos:false, URL:"", EventsURL:"", HooksURL:"", IssuesURL:"", MembersURL:"", PublicMembersURL:"", ReposURL:""}`
+	want := `github.Organization{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", Name:"", Company:"", Blog:"", Location:"", Email:"", TwitterUsername:"", Description:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, BillingEmail:"", Type:"", Plan:github.Plan{}, TwoFactorRequirementEnabled:false, IsVerified:false, HasOrganizationProjects:false, HasRepositoryProjects:false, DefaultRepoPermission:"", DefaultRepoSettings:"", MembersCanCreateRepos:false, MembersCanCreatePublicRepos:false, MembersCanCreatePrivateRepos:false, MembersCanCreateInternalRepos:false, MembersCanForkPrivateRepos:false, MembersAllowedRepositoryCreationType:"", MembersCanCreatePages:false, MembersCanCreatePublicPages:false, MembersCanCreatePrivatePages:false, WebCommitSignoffRequired:false, AdvancedSecurityEnabledForNewRepos:false, DependabotAlertsEnabledForNewRepos:false, DependabotSecurityUpdatesEnabledForNewRepos:false, DependencyGraphEnabledForNewRepos:false, SecretScanningEnabledForNewRepos:false, SecretScanningPushProtectionEnabledForNewRepos:false, SecretScanningValidityChecksEnabled:false, URL:"", EventsURL:"", HooksURL:"", IssuesURL:"", MembersURL:"", PublicMembersURL:"", ReposURL:""}`
 	if got := v.String(); got != want {
 		t.Errorf("Organization.String = %v, want %v", got, want)
 	}
@@ -1826,8 +1827,9 @@ func TestSecurityAndAnalysis_String(t *testing.T) {
 		SecretScanning:               &SecretScanning{},
 		SecretScanningPushProtection: &SecretScanningPushProtection{},
 		DependabotSecurityUpdates:    &DependabotSecurityUpdates{},
+		SecretScanningValidityChecks: &SecretScanningValidityChecks{},
 	}
-	want := `github.SecurityAndAnalysis{AdvancedSecurity:github.AdvancedSecurity{}, SecretScanning:github.SecretScanning{}, SecretScanningPushProtection:github.SecretScanningPushProtection{}, DependabotSecurityUpdates:github.DependabotSecurityUpdates{}}`
+	want := `github.SecurityAndAnalysis{AdvancedSecurity:github.AdvancedSecurity{}, SecretScanning:github.SecretScanning{}, SecretScanningPushProtection:github.SecretScanningPushProtection{}, DependabotSecurityUpdates:github.DependabotSecurityUpdates{}, SecretScanningValidityChecks:github.SecretScanningValidityChecks{}}`
 	if got := v.String(); got != want {
 		t.Errorf("SecurityAndAnalysis.String = %v, want %v", got, want)
 	}
diff --git a/github/github_test.go b/github/github_test.go
index b994496c..4d672f60 100644
--- a/github/github_test.go
+++ b/github/github_test.go
@@ -321,26 +321,45 @@ func TestClient(t *testing.T) {
 
 func TestWithAuthToken(t *testing.T) {
 	token := "gh_test_token"
-	var gotAuthHeaderVals []string
-	wantAuthHeaderVals := []string{"Bearer " + token}
-	srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		gotAuthHeaderVals = r.Header["Authorization"]
-	}))
-	validate := func(c *Client) {
+
+	validate := func(t *testing.T, c *http.Client, token string) {
 		t.Helper()
-		gotAuthHeaderVals = nil
-		_, err := c.Client().Get(srv.URL)
-		if err != nil {
-			t.Fatalf("Get returned unexpected error: %v", err)
+		want := token
+		if want != "" {
+			want = "Bearer " + want
 		}
-		diff := cmp.Diff(wantAuthHeaderVals, gotAuthHeaderVals)
-		if diff != "" {
-			t.Errorf("Authorization header values mismatch (-want +got):\n%s", diff)
+		gotReq := false
+		headerVal := ""
+		srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+			gotReq = true
+			headerVal = r.Header.Get("Authorization")
+		}))
+		_, err := c.Get(srv.URL)
+		assertNilError(t, err)
+		if !gotReq {
+			t.Error("request not sent")
+		}
+		if headerVal != want {
+			t.Errorf("Authorization header is %v, want %v", headerVal, want)
 		}
 	}
-	validate(NewClient(nil).WithAuthToken(token))
-	validate(new(Client).WithAuthToken(token))
-	validate(NewTokenClient(context.Background(), token))
+
+	t.Run("zero-value Client", func(t *testing.T) {
+		c := new(Client).WithAuthToken(token)
+		validate(t, c.Client(), token)
+	})
+
+	t.Run("NewClient", func(t *testing.T) {
+		httpClient := &http.Client{}
+		client := NewClient(httpClient).WithAuthToken(token)
+		validate(t, client.Client(), token)
+		// make sure the original client isn't setting auth headers now
+		validate(t, httpClient, "")
+	})
+
+	t.Run("NewTokenClient", func(t *testing.T) {
+		validate(t, NewTokenClient(context.Background(), token).Client(), token)
+	})
 }
 
 func TestWithEnterpriseURLs(t *testing.T) {
@@ -1153,6 +1172,16 @@ func TestDo_rateLimitCategory(t *testing.T) {
 			url:      "/scim/v2/organizations/ORG/Users",
 			category: scimCategory,
 		},
+		{
+			method:   http.MethodPost,
+			url:      "/repos/google/go-github/dependency-graph/snapshots",
+			category: dependencySnapshotsCategory,
+		},
+		{
+			method:   http.MethodGet,
+			url:      "/search/code?q=rate",
+			category: codeSearchCategory,
+		},
 		// missing a check for actionsRunnerRegistrationCategory: API not found
 	}
 
diff --git a/github/orgs_packages_test.go b/github/orgs_packages_test.go
index f8c8701d..097cae76 100644
--- a/github/orgs_packages_test.go
+++ b/github/orgs_packages_test.go
@@ -7,7 +7,7 @@ package github
 
 import (
 	"context"
-	"fmt"
+	"io"
 	"net/http"
 	"testing"
 
@@ -20,7 +20,7 @@ func TestOrganizationsService_ListPackages(t *testing.T) {
 
 	mux.HandleFunc("/orgs/o/packages", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "GET")
-		fmt.Fprint(w, `[{
+		_, err := io.WriteString(w, `[{
 			"id": 197,
 			"name": "hello_docker",
 			"package_type": "container",
@@ -52,6 +52,9 @@ func TestOrganizationsService_ListPackages(t *testing.T) {
 			"html_url": "https://github.com/orgs/github/packages/container/package/hello_docker"
 		  }
 		  ]`)
+		if err != nil {
+			t.Fatal("Failed to write test response: ", err)
+		}
 	})
 
 	ctx := context.Background()
@@ -114,35 +117,39 @@ func TestOrganizationsService_GetPackage(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
-	mux.HandleFunc("/orgs/o/packages/container/hello_docker", func(w http.ResponseWriter, r *http.Request) {
+	// don't url escape the package name here since mux will convert it to a slash automatically
+	mux.HandleFunc("/orgs/o/packages/container/hello/hello_docker", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "GET")
-		fmt.Fprint(w, `{
+		_, err := io.WriteString(w, `{
 			"id": 197,
-			"name": "hello_docker",
+			"name": "hello/hello_docker",
 			"package_type": "container",
 			"version_count": 1,
 			"visibility": "private",
-			"url": "https://api.github.com/orgs/github/packages/container/hello_docker",
+			"url": "https://api.github.com/orgs/github/packages/container/hello%2Fhello_docker",
 			"created_at": `+referenceTimeStr+`,
 			"updated_at": `+referenceTimeStr+`,
-			"html_url": "https://github.com/orgs/github/packages/container/package/hello_docker"
+			"html_url": "https://github.com/orgs/github/packages/container/package/hello%2Fhello_docker"
 		  }`)
+		if err != nil {
+			t.Fatal("Failed to write test response: ", err)
+		}
 	})
 
 	ctx := context.Background()
-	packages, _, err := client.Organizations.GetPackage(ctx, "o", "container", "hello_docker")
+	packages, _, err := client.Organizations.GetPackage(ctx, "o", "container", "hello/hello_docker")
 	if err != nil {
 		t.Errorf("Organizations.GetPackage returned error: %v", err)
 	}
 
 	want := &Package{
 		ID:           Int64(197),
-		Name:         String("hello_docker"),
+		Name:         String("hello/hello_docker"),
 		PackageType:  String("container"),
 		VersionCount: Int64(1),
 		Visibility:   String("private"),
-		URL:          String("https://api.github.com/orgs/github/packages/container/hello_docker"),
-		HTMLURL:      String("https://github.com/orgs/github/packages/container/package/hello_docker"),
+		URL:          String("https://api.github.com/orgs/github/packages/container/hello%2Fhello_docker"),
+		HTMLURL:      String("https://github.com/orgs/github/packages/container/package/hello%2Fhello_docker"),
 		CreatedAt:    &Timestamp{referenceTime},
 		UpdatedAt:    &Timestamp{referenceTime},
 	}
@@ -169,12 +176,13 @@ func TestOrganizationsService_DeletePackage(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
-	mux.HandleFunc("/orgs/o/packages/container/hello_docker", func(w http.ResponseWriter, r *http.Request) {
+	// don't url escape the package name here since mux will convert it to a slash automatically
+	mux.HandleFunc("/orgs/o/packages/container/hello/hello_docker", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "DELETE")
 	})
 
 	ctx := context.Background()
-	_, err := client.Organizations.DeletePackage(ctx, "o", "container", "hello_docker")
+	_, err := client.Organizations.DeletePackage(ctx, "o", "container", "hello/hello_docker")
 	if err != nil {
 		t.Errorf("Organizations.DeletePackage returned error: %v", err)
 	}
@@ -198,12 +206,13 @@ func TestOrganizationsService_RestorePackage(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
-	mux.HandleFunc("/orgs/o/packages/container/hello_docker/restore", func(w http.ResponseWriter, r *http.Request) {
+	// don't url escape the package name here since mux will convert it to a slash automatically
+	mux.HandleFunc("/orgs/o/packages/container/hello/hello_docker/restore", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "POST")
 	})
 
 	ctx := context.Background()
-	_, err := client.Organizations.RestorePackage(ctx, "o", "container", "hello_docker")
+	_, err := client.Organizations.RestorePackage(ctx, "o", "container", "hello/hello_docker")
 	if err != nil {
 		t.Errorf("Organizations.RestorePackage returned error: %v", err)
 	}
@@ -215,7 +224,7 @@ func TestOrganizationsService_RestorePackage(t *testing.T) {
 	})
 
 	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
-		return client.Organizations.RestorePackage(ctx, "", "container", "hello_docker")
+		return client.Organizations.RestorePackage(ctx, "", "container", "hello/hello_docker")
 	})
 }
 
@@ -223,18 +232,19 @@ func TestOrganizationsService_ListPackagesVersions(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
-	mux.HandleFunc("/orgs/o/packages/container/hello_docker/versions", func(w http.ResponseWriter, r *http.Request) {
+	// don't url escape the package name here since mux will convert it to a slash automatically
+	mux.HandleFunc("/orgs/o/packages/container/hello/hello_docker/versions", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "GET")
 		testFormValues(t, r, values{"per_page": "2", "page": "1", "state": "deleted", "visibility": "internal", "package_type": "container"})
-		fmt.Fprint(w, `[
+		_, err := io.WriteString(w, `[
 			{
 			  "id": 45763,
 			  "name": "sha256:08a44bab0bddaddd8837a8b381aebc2e4b933768b981685a9e088360af0d3dd9",
-			  "url": "https://api.github.com/users/octocat/packages/container/hello_docker/versions/45763",
-			  "package_html_url": "https://github.com/users/octocat/packages/container/package/hello_docker",
+			  "url": "https://api.github.com/users/octocat/packages/container/hello%2Fhello_docker/versions/45763",
+			  "package_html_url": "https://github.com/users/octocat/packages/container/package/hello%2Fhello_docker",
 			  "created_at": `+referenceTimeStr+`,
 			  "updated_at": `+referenceTimeStr+`,
-			  "html_url": "https://github.com/users/octocat/packages/container/hello_docker/45763",
+			  "html_url": "https://github.com/users/octocat/packages/container/hello%2Fhello_docker/45763",
 			  "metadata": {
 				"package_type": "container",
 				"container": {
@@ -244,13 +254,16 @@ func TestOrganizationsService_ListPackagesVersions(t *testing.T) {
 				}
 			  }
 			}]`)
+		if err != nil {
+			t.Fatal("Failed to write test response: ", err)
+		}
 	})
 
 	ctx := context.Background()
 	opts := &PackageListOptions{
 		String("internal"), String("container"), String("deleted"), ListOptions{Page: 1, PerPage: 2},
 	}
-	packages, _, err := client.Organizations.PackageGetAllVersions(ctx, "o", "container", "hello_docker", opts)
+	packages, _, err := client.Organizations.PackageGetAllVersions(ctx, "o", "container", "hello/hello_docker", opts)
 	if err != nil {
 		t.Errorf("Organizations.PackageGetAllVersions returned error: %v", err)
 	}
@@ -258,11 +271,11 @@ func TestOrganizationsService_ListPackagesVersions(t *testing.T) {
 	want := []*PackageVersion{{
 		ID:             Int64(45763),
 		Name:           String("sha256:08a44bab0bddaddd8837a8b381aebc2e4b933768b981685a9e088360af0d3dd9"),
-		URL:            String("https://api.github.com/users/octocat/packages/container/hello_docker/versions/45763"),
-		PackageHTMLURL: String("https://github.com/users/octocat/packages/container/package/hello_docker"),
+		URL:            String("https://api.github.com/users/octocat/packages/container/hello%2Fhello_docker/versions/45763"),
+		PackageHTMLURL: String("https://github.com/users/octocat/packages/container/package/hello%2Fhello_docker"),
 		CreatedAt:      &Timestamp{referenceTime},
 		UpdatedAt:      &Timestamp{referenceTime},
-		HTMLURL:        String("https://github.com/users/octocat/packages/container/hello_docker/45763"),
+		HTMLURL:        String("https://github.com/users/octocat/packages/container/hello%2Fhello_docker/45763"),
 		Metadata: &PackageMetadata{
 			PackageType: String("container"),
 			Container: &PackageContainerMetadata{
@@ -293,17 +306,18 @@ func TestOrganizationsService_PackageGetVersion(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
-	mux.HandleFunc("/orgs/o/packages/container/hello_docker/versions/45763", func(w http.ResponseWriter, r *http.Request) {
+	// don't url escape the package name here since mux will convert it to a slash automatically
+	mux.HandleFunc("/orgs/o/packages/container/hello/hello_docker/versions/45763", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "GET")
-		fmt.Fprint(w, `
+		_, err := io.WriteString(w, `
 			{
 			  "id": 45763,
 			  "name": "sha256:08a44bab0bddaddd8837a8b381aebc2e4b933768b981685a9e088360af0d3dd9",
-			  "url": "https://api.github.com/users/octocat/packages/container/hello_docker/versions/45763",
-			  "package_html_url": "https://github.com/users/octocat/packages/container/package/hello_docker",
+			  "url": "https://api.github.com/users/octocat/packages/container/hello%2Fhello_docker/versions/45763",
+			  "package_html_url": "https://github.com/users/octocat/packages/container/package/hello%2Fhello_docker",
 			  "created_at": `+referenceTimeStr+`,
 			  "updated_at": `+referenceTimeStr+`,
-			  "html_url": "https://github.com/users/octocat/packages/container/hello_docker/45763",
+			  "html_url": "https://github.com/users/octocat/packages/container/hello%2Fhello_docker/45763",
 			  "metadata": {
 				"package_type": "container",
 				"container": {
@@ -313,10 +327,13 @@ func TestOrganizationsService_PackageGetVersion(t *testing.T) {
 				}
 			  }
 			}`)
+		if err != nil {
+			t.Fatal("Failed to write test response: ", err)
+		}
 	})
 
 	ctx := context.Background()
-	packages, _, err := client.Organizations.PackageGetVersion(ctx, "o", "container", "hello_docker", 45763)
+	packages, _, err := client.Organizations.PackageGetVersion(ctx, "o", "container", "hello/hello_docker", 45763)
 	if err != nil {
 		t.Errorf("Organizations.PackageGetVersion returned error: %v", err)
 	}
@@ -324,11 +341,11 @@ func TestOrganizationsService_PackageGetVersion(t *testing.T) {
 	want := &PackageVersion{
 		ID:             Int64(45763),
 		Name:           String("sha256:08a44bab0bddaddd8837a8b381aebc2e4b933768b981685a9e088360af0d3dd9"),
-		URL:            String("https://api.github.com/users/octocat/packages/container/hello_docker/versions/45763"),
-		PackageHTMLURL: String("https://github.com/users/octocat/packages/container/package/hello_docker"),
+		URL:            String("https://api.github.com/users/octocat/packages/container/hello%2Fhello_docker/versions/45763"),
+		PackageHTMLURL: String("https://github.com/users/octocat/packages/container/package/hello%2Fhello_docker"),
 		CreatedAt:      &Timestamp{referenceTime},
 		UpdatedAt:      &Timestamp{referenceTime},
-		HTMLURL:        String("https://github.com/users/octocat/packages/container/hello_docker/45763"),
+		HTMLURL:        String("https://github.com/users/octocat/packages/container/hello%2Fhello_docker/45763"),
 		Metadata: &PackageMetadata{
 			PackageType: String("container"),
 			Container: &PackageContainerMetadata{
@@ -359,12 +376,13 @@ func TestOrganizationsService_PackageDeleteVersion(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
-	mux.HandleFunc("/orgs/o/packages/container/hello_docker/versions/45763", func(w http.ResponseWriter, r *http.Request) {
+	// don't url escape the package name here since mux will convert it to a slash automatically
+	mux.HandleFunc("/orgs/o/packages/container/hello/hello_docker/versions/45763", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "DELETE")
 	})
 
 	ctx := context.Background()
-	_, err := client.Organizations.PackageDeleteVersion(ctx, "o", "container", "hello_docker", 45763)
+	_, err := client.Organizations.PackageDeleteVersion(ctx, "o", "container", "hello/hello_docker", 45763)
 	if err != nil {
 		t.Errorf("Organizations.PackageDeleteVersion returned error: %v", err)
 	}
@@ -384,12 +402,13 @@ func TestOrganizationsService_PackageRestoreVersion(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
-	mux.HandleFunc("/orgs/o/packages/container/hello_docker/versions/45763/restore", func(w http.ResponseWriter, r *http.Request) {
+	// don't url escape the package name here since mux will convert it to a slash automatically
+	mux.HandleFunc("/orgs/o/packages/container/hello/hello_docker/versions/45763/restore", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "POST")
 	})
 
 	ctx := context.Background()
-	_, err := client.Organizations.PackageRestoreVersion(ctx, "o", "container", "hello_docker", 45763)
+	_, err := client.Organizations.PackageRestoreVersion(ctx, "o", "container", "hello/hello_docker", 45763)
 	if err != nil {
 		t.Errorf("Organizations.PackageRestoreVersion returned error: %v", err)
 	}
diff --git a/github/orgs_properties_test.go b/github/orgs_properties_test.go
index 1a372306..86daedb3 100644
--- a/github/orgs_properties_test.go
+++ b/github/orgs_properties_test.go
@@ -347,14 +347,14 @@ func TestOrganizationsService_CreateOrUpdateRepoCustomPropertyValues(t *testing.
 
 	mux.HandleFunc("/orgs/o/properties/values", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "PATCH")
-		testBody(t, r, `{"repository_names":["repo"],"properties":[{"property_name":"service","value_type":"string"}]}`+"\n")
+		testBody(t, r, `{"repository_names":["repo"],"properties":[{"property_name":"service","value":"string"}]}`+"\n")
 	})
 
 	ctx := context.Background()
-	_, err := client.Organizations.CreateOrUpdateRepoCustomPropertyValues(ctx, "o", []string{"repo"}, []*CustomProperty{
+	_, err := client.Organizations.CreateOrUpdateRepoCustomPropertyValues(ctx, "o", []string{"repo"}, []*CustomPropertyValue{
 		{
-			PropertyName: String("service"),
-			ValueType:    "string",
+			PropertyName: "service",
+			Value:        String("string"),
 		},
 	})
 	if err != nil {
diff --git a/github/rate_limit_test.go b/github/rate_limit_test.go
index 167288bc..da8a68c9 100644
--- a/github/rate_limit_test.go
+++ b/github/rate_limit_test.go
@@ -25,8 +25,10 @@ func TestRateLimits_String(t *testing.T) {
 		CodeScanningUpload:        &Rate{},
 		ActionsRunnerRegistration: &Rate{},
 		SCIM:                      &Rate{},
+		DependencySnapshots:       &Rate{},
+		CodeSearch:                &Rate{},
 	}
-	want := `github.RateLimits{Core:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, Search:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, GraphQL:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, IntegrationManifest:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, SourceImport:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, CodeScanningUpload:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, ActionsRunnerRegistration:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, SCIM:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}}`
+	want := `github.RateLimits{Core:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, Search:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, GraphQL:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, IntegrationManifest:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, SourceImport:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, CodeScanningUpload:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, ActionsRunnerRegistration:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, SCIM:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, DependencySnapshots:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}, CodeSearch:github.Rate{Limit:0, Remaining:0, Reset:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}}`
 	if got := v.String(); got != want {
 		t.Errorf("RateLimits.String = %v, want %v", got, want)
 	}
@@ -46,7 +48,9 @@ func TestRateLimits(t *testing.T) {
 			"source_import": {"limit":6,"remaining":5,"reset":1372700877},
 			"code_scanning_upload": {"limit":7,"remaining":6,"reset":1372700878},
 			"actions_runner_registration": {"limit":8,"remaining":7,"reset":1372700879},
-			"scim": {"limit":9,"remaining":8,"reset":1372700880}
+			"scim": {"limit":9,"remaining":8,"reset":1372700880},
+			"dependency_snapshots": {"limit":10,"remaining":9,"reset":1372700881},
+			"code_search": {"limit":11,"remaining":10,"reset":1372700882}
 		}}`)
 	})
 
@@ -97,6 +101,16 @@ func TestRateLimits(t *testing.T) {
 			Remaining: 8,
 			Reset:     Timestamp{time.Date(2013, time.July, 1, 17, 48, 00, 0, time.UTC).Local()},
 		},
+		DependencySnapshots: &Rate{
+			Limit:     10,
+			Remaining: 9,
+			Reset:     Timestamp{time.Date(2013, time.July, 1, 17, 48, 1, 0, time.UTC).Local()},
+		},
+		CodeSearch: &Rate{
+			Limit:     11,
+			Remaining: 10,
+			Reset:     Timestamp{time.Date(2013, time.July, 1, 17, 48, 2, 0, time.UTC).Local()},
+		},
 	}
 	if !cmp.Equal(rate, want) {
 		t.Errorf("RateLimits returned %+v, want %+v", rate, want)
@@ -137,6 +151,14 @@ func TestRateLimits(t *testing.T) {
 			category: scimCategory,
 			rate:     want.SCIM,
 		},
+		{
+			category: dependencySnapshotsCategory,
+			rate:     want.DependencySnapshots,
+		},
+		{
+			category: codeSearchCategory,
+			rate:     want.CodeSearch,
+		},
 	}
 
 	for _, tt := range tests {
@@ -177,7 +199,9 @@ func TestRateLimits_overQuota(t *testing.T) {
 			"source_import": {"limit":6,"remaining":5,"reset":1372700877},
 			"code_scanning_upload": {"limit":7,"remaining":6,"reset":1372700878},
 			"actions_runner_registration": {"limit":8,"remaining":7,"reset":1372700879},
-			"scim": {"limit":9,"remaining":8,"reset":1372700880}
+			"scim": {"limit":9,"remaining":8,"reset":1372700880},
+			"dependency_snapshots": {"limit":10,"remaining":9,"reset":1372700881},
+			"code_search": {"limit":11,"remaining":10,"reset":1372700882}
 		}}`)
 	})
 
@@ -228,6 +252,16 @@ func TestRateLimits_overQuota(t *testing.T) {
 			Remaining: 8,
 			Reset:     Timestamp{time.Date(2013, time.July, 1, 17, 48, 00, 0, time.UTC).Local()},
 		},
+		DependencySnapshots: &Rate{
+			Limit:     10,
+			Remaining: 9,
+			Reset:     Timestamp{time.Date(2013, time.July, 1, 17, 48, 1, 0, time.UTC).Local()},
+		},
+		CodeSearch: &Rate{
+			Limit:     11,
+			Remaining: 10,
+			Reset:     Timestamp{time.Date(2013, time.July, 1, 17, 48, 2, 0, time.UTC).Local()},
+		},
 	}
 	if !cmp.Equal(rate, want) {
 		t.Errorf("RateLimits returned %+v, want %+v", rate, want)
@@ -269,6 +303,14 @@ func TestRateLimits_overQuota(t *testing.T) {
 			category: scimCategory,
 			rate:     want.SCIM,
 		},
+		{
+			category: dependencySnapshotsCategory,
+			rate:     want.DependencySnapshots,
+		},
+		{
+			category: codeSearchCategory,
+			rate:     want.CodeSearch,
+		},
 	}
 	for _, tt := range tests {
 		if got, want := client.rateLimits[tt.category], *tt.rate; got != want {
@@ -321,6 +363,16 @@ func TestRateLimits_Marshal(t *testing.T) {
 			Remaining: 1,
 			Reset:     Timestamp{referenceTime},
 		},
+		DependencySnapshots: &Rate{
+			Limit:     1,
+			Remaining: 1,
+			Reset:     Timestamp{referenceTime},
+		},
+		CodeSearch: &Rate{
+			Limit:     1,
+			Remaining: 1,
+			Reset:     Timestamp{referenceTime},
+		},
 	}
 
 	want := `{
@@ -363,6 +415,16 @@ func TestRateLimits_Marshal(t *testing.T) {
 			"limit": 1,
 			"remaining": 1,
 			"reset": ` + referenceTimeStr + `
+		},
+		"dependency_snapshots": {
+			"limit": 1,
+			"remaining": 1,
+			"reset": ` + referenceTimeStr + `
+		},
+		"code_search": {
+			"limit": 1,
+			"remaining": 1,
+			"reset": ` + referenceTimeStr + `
 		}
 	}`
 
diff --git a/github/repos_properties_test.go b/github/repos_properties_test.go
new file mode 100644
index 00000000..ee231a13
--- /dev/null
+++ b/github/repos_properties_test.go
@@ -0,0 +1,65 @@
+// Copyright 2023 The go-github AUTHORS. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package github
+
+import (
+	"context"
+	"fmt"
+	"net/http"
+	"testing"
+
+	"github.com/google/go-cmp/cmp"
+)
+
+func TestRepositoriesService_GetAllCustomPropertyValues(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/properties/values", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "GET")
+		fmt.Fprint(w, `[
+		{
+          "property_name": "environment",
+          "value": "production"
+        },
+        {
+          "property_name": "service",
+          "value": "web"
+        }
+		]`)
+	})
+
+	ctx := context.Background()
+	customPropertyValues, _, err := client.Repositories.GetAllCustomPropertyValues(ctx, "o", "r")
+	if err != nil {
+		t.Errorf("Repositories.GetAllCustomPropertyValues returned error: %v", err)
+	}
+
+	want := []*CustomPropertyValue{
+		{
+			PropertyName: "environment",
+			Value:        String("production"),
+		},
+		{
+			PropertyName: "service",
+			Value:        String("web"),
+		},
+	}
+
+	if !cmp.Equal(customPropertyValues, want) {
+		t.Errorf("Repositories.GetAllCustomPropertyValues returned %+v, want %+v", customPropertyValues, want)
+	}
+
+	const methodName = "GetAllCustomPropertyValues"
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.Repositories.GetAllCustomPropertyValues(ctx, "o", "r")
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
diff --git a/github/repos_test.go b/github/repos_test.go
index fa49ddd4..2e61aeb1 100644
--- a/github/repos_test.go
+++ b/github/repos_test.go
@@ -360,7 +360,7 @@ func TestRepositoriesService_Get(t *testing.T) {
 	mux.HandleFunc("/repos/o/r", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "GET")
 		testHeader(t, r, "Accept", strings.Join(wantAcceptHeaders, ", "))
-		fmt.Fprint(w, `{"id":1,"name":"n","description":"d","owner":{"login":"l"},"license":{"key":"mit"},"security_and_analysis":{"advanced_security":{"status":"enabled"},"secret_scanning":{"status":"enabled"},"secret_scanning_push_protection":{"status":"enabled"},"dependabot_security_updates":{"status": "enabled"}}}`)
+		fmt.Fprint(w, `{"id":1,"name":"n","description":"d","owner":{"login":"l"},"license":{"key":"mit"},"security_and_analysis":{"advanced_security":{"status":"enabled"},"secret_scanning":{"status":"enabled"},"secret_scanning_push_protection":{"status":"enabled"},"dependabot_security_updates":{"status": "enabled"}, "secret_scanning_validity_checks":{"status":"enabled"}}}`)
 	})
 
 	ctx := context.Background()
@@ -369,7 +369,7 @@ func TestRepositoriesService_Get(t *testing.T) {
 		t.Errorf("Repositories.Get returned error: %v", err)
 	}
 
-	want := &Repository{ID: Int64(1), Name: String("n"), Description: String("d"), Owner: &User{Login: String("l")}, License: &License{Key: String("mit")}, SecurityAndAnalysis: &SecurityAndAnalysis{AdvancedSecurity: &AdvancedSecurity{Status: String("enabled")}, SecretScanning: &SecretScanning{String("enabled")}, SecretScanningPushProtection: &SecretScanningPushProtection{String("enabled")}, DependabotSecurityUpdates: &DependabotSecurityUpdates{String("enabled")}}}
+	want := &Repository{ID: Int64(1), Name: String("n"), Description: String("d"), Owner: &User{Login: String("l")}, License: &License{Key: String("mit")}, SecurityAndAnalysis: &SecurityAndAnalysis{AdvancedSecurity: &AdvancedSecurity{Status: String("enabled")}, SecretScanning: &SecretScanning{String("enabled")}, SecretScanningPushProtection: &SecretScanningPushProtection{String("enabled")}, DependabotSecurityUpdates: &DependabotSecurityUpdates{String("enabled")}, SecretScanningValidityChecks: &SecretScanningValidityChecks{String("enabled")}}}
 	if !cmp.Equal(got, want) {
 		t.Errorf("Repositories.Get returned %+v, want %+v", got, want)
 	}
diff --git a/github/security_advisories_test.go b/github/security_advisories_test.go
index 918e3e05..eb8e7d31 100644
--- a/github/security_advisories_test.go
+++ b/github/security_advisories_test.go
@@ -56,6 +56,472 @@ func TestSecurityAdvisoriesService_RequestCVE(t *testing.T) {
 	})
 }
 
+func TestSecurityAdvisoriesService_CreateTemporaryPrivateFork(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/security-advisories/ghsa_id/forks", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "POST")
+		fmt.Fprint(w, `{
+			"id": 1,
+			"node_id": "R_kgDPP3c6pQ",
+			"owner": {
+				"login": "owner",
+				"id": 2,
+				"node_id": "MDQ6VXFGcjYyMjcyMTQw",
+				"avatar_url": "https://avatars.githubusercontent.com/u/111111?v=4",
+				"html_url": "https://github.com/xxxxx",
+				"gravatar_id": "",
+				"type": "User",
+				"site_admin": false,
+				"url": "https://api.github.com/users/owner",
+				"events_url": "https://api.github.com/users/owner/events{/privacy}",
+				"following_url": "https://api.github.com/users/owner/following{/other_user}",
+				"followers_url": "https://api.github.com/users/owner/followers",
+				"gists_url": "https://api.github.com/users/owner/gists{/gist_id}",
+				"organizations_url": "https://api.github.com/users/owner/orgs",
+				"received_events_url": "https://api.github.com/users/owner/received_events",
+				"repos_url": "https://api.github.com/users/owner/repos",
+				"starred_url": "https://api.github.com/users/owner/starred{/owner}{/repo}",
+				"subscriptions_url": "https://api.github.com/users/owner/subscriptions"
+			},
+			"name": "repo-ghsa-xxxx-xxxx-xxxx",
+			"full_name": "owner/repo-ghsa-xxxx-xxxx-xxxx",
+			"default_branch": "master",
+			"created_at": "2023-12-08T17:22:41Z",
+			"pushed_at": "2023-12-03T11:27:08Z",
+			"updated_at": "2023-12-08T17:22:42Z",
+			"html_url": "https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx",
+			"clone_url": "https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx.git",
+			"git_url": "git://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx.git",
+			"ssh_url": "git@github.com:owner/repo-ghsa-xxxx-xxxx-xxxx.git",
+			"svn_url": "https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx",
+			"fork": false,
+			"forks_count": 0,
+			"network_count": 0,
+			"open_issues_count": 0,
+			"open_issues": 0,
+			"stargazers_count": 0,
+			"subscribers_count": 0,
+			"watchers_count": 0,
+			"watchers": 0,
+			"size": 0,
+			"permissions": {
+				"admin": true,
+				"maintain": true,
+				"pull": true,
+				"push": true,
+				"triage": true
+			},
+			"allow_forking": true,
+			"web_commit_signoff_required": false,
+			"archived": false,
+			"disabled": false,
+			"private": true,
+			"has_issues": false,
+			"has_wiki": false,
+			"has_pages": false,
+			"has_projects": false,
+			"has_downloads": false,
+			"has_discussions": false,
+			"is_template": false,
+			"url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx",
+			"archive_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/{archive_format}{/ref}",
+			"assignees_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/assignees{/user}",
+			"blobs_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/blobs{/sha}",
+			"branches_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/branches{/branch}",
+			"collaborators_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/collaborators{/collaborator}",
+			"comments_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/comments{/number}",
+			"commits_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/commits{/sha}",
+			"compare_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/compare/{base}...{head}",
+			"contents_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/contents/{+path}",
+			"contributors_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/contributors",
+			"deployments_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/deployments",
+			"downloads_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/downloads",
+			"events_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/events",
+			"forks_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/forks",
+			"git_commits_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/commits{/sha}",
+			"git_refs_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/refs{/sha}",
+			"git_tags_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/tags{/sha}",
+			"hooks_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/hooks",
+			"issue_comment_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues/comments{/number}",
+			"issue_events_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues/events{/number}",
+			"issues_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues{/number}",
+			"keys_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/keys{/key_id}",
+			"labels_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/labels{/name}",
+			"languages_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/languages",
+			"merges_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/merges",
+			"milestones_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/milestones{/number}",
+			"notifications_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/notifications{?since,all,participating}",
+			"pulls_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/pulls{/number}",
+			"releases_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/releases{/id}",
+			"stargazers_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/stargazers",
+			"statuses_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/statuses/{sha}",
+			"subscribers_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/subscribers",
+			"subscription_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/subscription",
+			"tags_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/tags",
+			"teams_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/teams",
+			"visibility": "private"
+		}`)
+	})
+
+	ctx := context.Background()
+	fork, _, err := client.SecurityAdvisories.CreateTemporaryPrivateFork(ctx, "o", "r", "ghsa_id")
+	if err != nil {
+		t.Errorf("SecurityAdvisoriesService.CreateTemporaryPrivateFork returned error: %v", err)
+	}
+
+	want := &Repository{
+		ID:     Int64(1),
+		NodeID: String("R_kgDPP3c6pQ"),
+		Owner: &User{
+			Login:             String("owner"),
+			ID:                Int64(2),
+			NodeID:            String("MDQ6VXFGcjYyMjcyMTQw"),
+			AvatarURL:         String("https://avatars.githubusercontent.com/u/111111?v=4"),
+			HTMLURL:           String("https://github.com/xxxxx"),
+			GravatarID:        String(""),
+			Type:              String("User"),
+			SiteAdmin:         Bool(false),
+			URL:               String("https://api.github.com/users/owner"),
+			EventsURL:         String("https://api.github.com/users/owner/events{/privacy}"),
+			FollowingURL:      String("https://api.github.com/users/owner/following{/other_user}"),
+			FollowersURL:      String("https://api.github.com/users/owner/followers"),
+			GistsURL:          String("https://api.github.com/users/owner/gists{/gist_id}"),
+			OrganizationsURL:  String("https://api.github.com/users/owner/orgs"),
+			ReceivedEventsURL: String("https://api.github.com/users/owner/received_events"),
+			ReposURL:          String("https://api.github.com/users/owner/repos"),
+			StarredURL:        String("https://api.github.com/users/owner/starred{/owner}{/repo}"),
+			SubscriptionsURL:  String("https://api.github.com/users/owner/subscriptions"),
+		},
+		Name:             String("repo-ghsa-xxxx-xxxx-xxxx"),
+		FullName:         String("owner/repo-ghsa-xxxx-xxxx-xxxx"),
+		DefaultBranch:    String("master"),
+		CreatedAt:        &Timestamp{time.Date(2023, time.December, 8, 17, 22, 41, 0, time.UTC)},
+		PushedAt:         &Timestamp{time.Date(2023, time.December, 3, 11, 27, 8, 0, time.UTC)},
+		UpdatedAt:        &Timestamp{time.Date(2023, time.December, 8, 17, 22, 42, 0, time.UTC)},
+		HTMLURL:          String("https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx"),
+		CloneURL:         String("https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx.git"),
+		GitURL:           String("git://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx.git"),
+		SSHURL:           String("git@github.com:owner/repo-ghsa-xxxx-xxxx-xxxx.git"),
+		SVNURL:           String("https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx"),
+		Fork:             Bool(false),
+		ForksCount:       Int(0),
+		NetworkCount:     Int(0),
+		OpenIssuesCount:  Int(0),
+		OpenIssues:       Int(0),
+		StargazersCount:  Int(0),
+		SubscribersCount: Int(0),
+		WatchersCount:    Int(0),
+		Watchers:         Int(0),
+		Size:             Int(0),
+		Permissions: map[string]bool{
+			"admin":    true,
+			"maintain": true,
+			"pull":     true,
+			"push":     true,
+			"triage":   true,
+		},
+		AllowForking:             Bool(true),
+		WebCommitSignoffRequired: Bool(false),
+		Archived:                 Bool(false),
+		Disabled:                 Bool(false),
+		Private:                  Bool(true),
+		HasIssues:                Bool(false),
+		HasWiki:                  Bool(false),
+		HasPages:                 Bool(false),
+		HasProjects:              Bool(false),
+		HasDownloads:             Bool(false),
+		HasDiscussions:           Bool(false),
+		IsTemplate:               Bool(false),
+		URL:                      String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx"),
+		ArchiveURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/{archive_format}{/ref}"),
+		AssigneesURL:             String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/assignees{/user}"),
+		BlobsURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/blobs{/sha}"),
+		BranchesURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/branches{/branch}"),
+		CollaboratorsURL:         String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/collaborators{/collaborator}"),
+		CommentsURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/comments{/number}"),
+		CommitsURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/commits{/sha}"),
+		CompareURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/compare/{base}...{head}"),
+		ContentsURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/contents/{+path}"),
+		ContributorsURL:          String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/contributors"),
+		DeploymentsURL:           String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/deployments"),
+		DownloadsURL:             String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/downloads"),
+		EventsURL:                String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/events"),
+		ForksURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/forks"),
+		GitCommitsURL:            String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/commits{/sha}"),
+		GitRefsURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/refs{/sha}"),
+		GitTagsURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/tags{/sha}"),
+		HooksURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/hooks"),
+		IssueCommentURL:          String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues/comments{/number}"),
+		IssueEventsURL:           String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues/events{/number}"),
+		IssuesURL:                String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues{/number}"),
+		KeysURL:                  String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/keys{/key_id}"),
+		LabelsURL:                String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/labels{/name}"),
+		LanguagesURL:             String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/languages"),
+		MergesURL:                String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/merges"),
+		MilestonesURL:            String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/milestones{/number}"),
+		NotificationsURL:         String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/notifications{?since,all,participating}"),
+		PullsURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/pulls{/number}"),
+		ReleasesURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/releases{/id}"),
+		StargazersURL:            String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/stargazers"),
+		StatusesURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/statuses/{sha}"),
+		SubscribersURL:           String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/subscribers"),
+		SubscriptionURL:          String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/subscription"),
+		TagsURL:                  String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/tags"),
+		TeamsURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/teams"),
+		Visibility:               String("private"),
+	}
+	if !cmp.Equal(fork, want) {
+		t.Errorf("SecurityAdvisoriesService.CreateTemporaryPrivateFork returned %+v, want %+v", fork, want)
+	}
+
+	const methodName = "CreateTemporaryPrivateFork"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.SecurityAdvisories.CreateTemporaryPrivateFork(ctx, "\n", "\n", "\n")
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.SecurityAdvisories.CreateTemporaryPrivateFork(ctx, "o", "r", "ghsa_id")
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
+func TestSecurityAdvisoriesService_CreateTemporaryPrivateFork_deferred(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/security-advisories/ghsa_id/forks", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "POST")
+		w.WriteHeader(http.StatusAccepted)
+		fmt.Fprint(w, `{
+			"id": 1,
+			"node_id": "R_kgDPP3c6pQ",
+			"owner": {
+				"login": "owner",
+				"id": 2,
+				"node_id": "MDQ6VXFGcjYyMjcyMTQw",
+				"avatar_url": "https://avatars.githubusercontent.com/u/111111?v=4",
+				"html_url": "https://github.com/xxxxx",
+				"gravatar_id": "",
+				"type": "User",
+				"site_admin": false,
+				"url": "https://api.github.com/users/owner",
+				"events_url": "https://api.github.com/users/owner/events{/privacy}",
+				"following_url": "https://api.github.com/users/owner/following{/other_user}",
+				"followers_url": "https://api.github.com/users/owner/followers",
+				"gists_url": "https://api.github.com/users/owner/gists{/gist_id}",
+				"organizations_url": "https://api.github.com/users/owner/orgs",
+				"received_events_url": "https://api.github.com/users/owner/received_events",
+				"repos_url": "https://api.github.com/users/owner/repos",
+				"starred_url": "https://api.github.com/users/owner/starred{/owner}{/repo}",
+				"subscriptions_url": "https://api.github.com/users/owner/subscriptions"
+			},
+			"name": "repo-ghsa-xxxx-xxxx-xxxx",
+			"full_name": "owner/repo-ghsa-xxxx-xxxx-xxxx",
+			"default_branch": "master",
+			"created_at": "2023-12-08T17:22:41Z",
+			"pushed_at": "2023-12-03T11:27:08Z",
+			"updated_at": "2023-12-08T17:22:42Z",
+			"html_url": "https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx",
+			"clone_url": "https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx.git",
+			"git_url": "git://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx.git",
+			"ssh_url": "git@github.com:owner/repo-ghsa-xxxx-xxxx-xxxx.git",
+			"svn_url": "https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx",
+			"fork": false,
+			"forks_count": 0,
+			"network_count": 0,
+			"open_issues_count": 0,
+			"open_issues": 0,
+			"stargazers_count": 0,
+			"subscribers_count": 0,
+			"watchers_count": 0,
+			"watchers": 0,
+			"size": 0,
+			"permissions": {
+				"admin": true,
+				"maintain": true,
+				"pull": true,
+				"push": true,
+				"triage": true
+			},
+			"allow_forking": true,
+			"web_commit_signoff_required": false,
+			"archived": false,
+			"disabled": false,
+			"private": true,
+			"has_issues": false,
+			"has_wiki": false,
+			"has_pages": false,
+			"has_projects": false,
+			"has_downloads": false,
+			"has_discussions": false,
+			"is_template": false,
+			"url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx",
+			"archive_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/{archive_format}{/ref}",
+			"assignees_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/assignees{/user}",
+			"blobs_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/blobs{/sha}",
+			"branches_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/branches{/branch}",
+			"collaborators_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/collaborators{/collaborator}",
+			"comments_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/comments{/number}",
+			"commits_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/commits{/sha}",
+			"compare_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/compare/{base}...{head}",
+			"contents_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/contents/{+path}",
+			"contributors_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/contributors",
+			"deployments_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/deployments",
+			"downloads_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/downloads",
+			"events_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/events",
+			"forks_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/forks",
+			"git_commits_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/commits{/sha}",
+			"git_refs_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/refs{/sha}",
+			"git_tags_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/tags{/sha}",
+			"hooks_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/hooks",
+			"issue_comment_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues/comments{/number}",
+			"issue_events_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues/events{/number}",
+			"issues_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues{/number}",
+			"keys_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/keys{/key_id}",
+			"labels_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/labels{/name}",
+			"languages_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/languages",
+			"merges_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/merges",
+			"milestones_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/milestones{/number}",
+			"notifications_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/notifications{?since,all,participating}",
+			"pulls_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/pulls{/number}",
+			"releases_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/releases{/id}",
+			"stargazers_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/stargazers",
+			"statuses_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/statuses/{sha}",
+			"subscribers_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/subscribers",
+			"subscription_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/subscription",
+			"tags_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/tags",
+			"teams_url": "https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/teams",
+			"visibility": "private"
+		}`)
+	})
+
+	ctx := context.Background()
+	fork, _, err := client.SecurityAdvisories.CreateTemporaryPrivateFork(ctx, "o", "r", "ghsa_id")
+	if _, ok := err.(*AcceptedError); !ok {
+		t.Errorf("SecurityAdvisoriesService.CreateTemporaryPrivateFork returned error: %v (want AcceptedError)", err)
+	}
+
+	want := &Repository{
+		ID:     Int64(1),
+		NodeID: String("R_kgDPP3c6pQ"),
+		Owner: &User{
+			Login:             String("owner"),
+			ID:                Int64(2),
+			NodeID:            String("MDQ6VXFGcjYyMjcyMTQw"),
+			AvatarURL:         String("https://avatars.githubusercontent.com/u/111111?v=4"),
+			HTMLURL:           String("https://github.com/xxxxx"),
+			GravatarID:        String(""),
+			Type:              String("User"),
+			SiteAdmin:         Bool(false),
+			URL:               String("https://api.github.com/users/owner"),
+			EventsURL:         String("https://api.github.com/users/owner/events{/privacy}"),
+			FollowingURL:      String("https://api.github.com/users/owner/following{/other_user}"),
+			FollowersURL:      String("https://api.github.com/users/owner/followers"),
+			GistsURL:          String("https://api.github.com/users/owner/gists{/gist_id}"),
+			OrganizationsURL:  String("https://api.github.com/users/owner/orgs"),
+			ReceivedEventsURL: String("https://api.github.com/users/owner/received_events"),
+			ReposURL:          String("https://api.github.com/users/owner/repos"),
+			StarredURL:        String("https://api.github.com/users/owner/starred{/owner}{/repo}"),
+			SubscriptionsURL:  String("https://api.github.com/users/owner/subscriptions"),
+		},
+		Name:             String("repo-ghsa-xxxx-xxxx-xxxx"),
+		FullName:         String("owner/repo-ghsa-xxxx-xxxx-xxxx"),
+		DefaultBranch:    String("master"),
+		CreatedAt:        &Timestamp{time.Date(2023, time.December, 8, 17, 22, 41, 0, time.UTC)},
+		PushedAt:         &Timestamp{time.Date(2023, time.December, 3, 11, 27, 8, 0, time.UTC)},
+		UpdatedAt:        &Timestamp{time.Date(2023, time.December, 8, 17, 22, 42, 0, time.UTC)},
+		HTMLURL:          String("https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx"),
+		CloneURL:         String("https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx.git"),
+		GitURL:           String("git://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx.git"),
+		SSHURL:           String("git@github.com:owner/repo-ghsa-xxxx-xxxx-xxxx.git"),
+		SVNURL:           String("https://github.com/owner/repo-ghsa-xxxx-xxxx-xxxx"),
+		Fork:             Bool(false),
+		ForksCount:       Int(0),
+		NetworkCount:     Int(0),
+		OpenIssuesCount:  Int(0),
+		OpenIssues:       Int(0),
+		StargazersCount:  Int(0),
+		SubscribersCount: Int(0),
+		WatchersCount:    Int(0),
+		Watchers:         Int(0),
+		Size:             Int(0),
+		Permissions: map[string]bool{
+			"admin":    true,
+			"maintain": true,
+			"pull":     true,
+			"push":     true,
+			"triage":   true,
+		},
+		AllowForking:             Bool(true),
+		WebCommitSignoffRequired: Bool(false),
+		Archived:                 Bool(false),
+		Disabled:                 Bool(false),
+		Private:                  Bool(true),
+		HasIssues:                Bool(false),
+		HasWiki:                  Bool(false),
+		HasPages:                 Bool(false),
+		HasProjects:              Bool(false),
+		HasDownloads:             Bool(false),
+		HasDiscussions:           Bool(false),
+		IsTemplate:               Bool(false),
+		URL:                      String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx"),
+		ArchiveURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/{archive_format}{/ref}"),
+		AssigneesURL:             String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/assignees{/user}"),
+		BlobsURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/blobs{/sha}"),
+		BranchesURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/branches{/branch}"),
+		CollaboratorsURL:         String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/collaborators{/collaborator}"),
+		CommentsURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/comments{/number}"),
+		CommitsURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/commits{/sha}"),
+		CompareURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/compare/{base}...{head}"),
+		ContentsURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/contents/{+path}"),
+		ContributorsURL:          String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/contributors"),
+		DeploymentsURL:           String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/deployments"),
+		DownloadsURL:             String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/downloads"),
+		EventsURL:                String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/events"),
+		ForksURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/forks"),
+		GitCommitsURL:            String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/commits{/sha}"),
+		GitRefsURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/refs{/sha}"),
+		GitTagsURL:               String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/git/tags{/sha}"),
+		HooksURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/hooks"),
+		IssueCommentURL:          String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues/comments{/number}"),
+		IssueEventsURL:           String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues/events{/number}"),
+		IssuesURL:                String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/issues{/number}"),
+		KeysURL:                  String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/keys{/key_id}"),
+		LabelsURL:                String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/labels{/name}"),
+		LanguagesURL:             String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/languages"),
+		MergesURL:                String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/merges"),
+		MilestonesURL:            String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/milestones{/number}"),
+		NotificationsURL:         String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/notifications{?since,all,participating}"),
+		PullsURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/pulls{/number}"),
+		ReleasesURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/releases{/id}"),
+		StargazersURL:            String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/stargazers"),
+		StatusesURL:              String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/statuses/{sha}"),
+		SubscribersURL:           String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/subscribers"),
+		SubscriptionURL:          String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/subscription"),
+		TagsURL:                  String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/tags"),
+		TeamsURL:                 String("https://api.github.com/repos/owner/repo-ghsa-xxxx-xxxx-xxxx/teams"),
+		Visibility:               String("private"),
+	}
+	if !cmp.Equal(fork, want) {
+		t.Errorf("SecurityAdvisoriesService.CreateTemporaryPrivateFork returned %+v, want %+v", fork, want)
+	}
+}
+
+func TestSecurityAdvisoriesService_CreateTemporaryPrivateFork_invalidOwner(t *testing.T) {
+	client, _, _, teardown := setup()
+	defer teardown()
+
+	ctx := context.Background()
+	_, _, err := client.SecurityAdvisories.CreateTemporaryPrivateFork(ctx, "%", "r", "ghsa_id")
+	testURLParseError(t, err)
+}
+
 func TestSecurityAdvisoriesService_ListRepositorySecurityAdvisoriesForOrg_BadRequest(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
@@ -146,8 +612,8 @@ func TestSecurityAdvisoriesService_ListRepositorySecurityAdvisoriesForOrg(t *tes
 		assertWrite(t, w, []byte(`[
 			{
 				"ghsa_id": "GHSA-abcd-1234-efgh",
-   				"cve_id": "CVE-2050-00000"
- 			}
+				"cve_id": "CVE-2050-00000"
+			}
 		]`))
 	})
 
@@ -277,8 +743,8 @@ func TestSecurityAdvisoriesService_ListRepositorySecurityAdvisories(t *testing.T
 		assertWrite(t, w, []byte(`[
 			{
 				"ghsa_id": "GHSA-abcd-1234-efgh",
-   				"cve_id": "CVE-2050-00000"
- 			}
+				"cve_id": "CVE-2050-00000"
+			}
 		]`))
 	})