Skip to content

Commit d1d6f45

Browse files
authored
Add location info to SecretScanningAlert (#3645)
1 parent d88d529 commit d1d6f45

File tree

3 files changed

+63
-26
lines changed

3 files changed

+63
-26
lines changed

github/github-accessors.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/secret_scanning.go

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,34 @@ type SecretScanningService service
1616

1717
// SecretScanningAlert represents a GitHub secret scanning alert.
1818
type SecretScanningAlert struct {
19-
Number *int `json:"number,omitempty"`
20-
CreatedAt *Timestamp `json:"created_at,omitempty"`
21-
URL *string `json:"url,omitempty"`
22-
HTMLURL *string `json:"html_url,omitempty"`
23-
LocationsURL *string `json:"locations_url,omitempty"`
24-
State *string `json:"state,omitempty"`
25-
Resolution *string `json:"resolution,omitempty"`
26-
ResolvedAt *Timestamp `json:"resolved_at,omitempty"`
27-
ResolvedBy *User `json:"resolved_by,omitempty"`
28-
SecretType *string `json:"secret_type,omitempty"`
29-
SecretTypeDisplayName *string `json:"secret_type_display_name,omitempty"`
30-
Secret *string `json:"secret,omitempty"`
31-
Repository *Repository `json:"repository,omitempty"`
32-
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
33-
IsBase64Encoded *bool `json:"is_base64_encoded,omitempty"`
34-
MultiRepo *bool `json:"multi_repo,omitempty"`
35-
PubliclyLeaked *bool `json:"publicly_leaked,omitempty"`
36-
PushProtectionBypassed *bool `json:"push_protection_bypassed,omitempty"`
37-
PushProtectionBypassedBy *User `json:"push_protection_bypassed_by,omitempty"`
38-
PushProtectionBypassedAt *Timestamp `json:"push_protection_bypassed_at,omitempty"`
39-
ResolutionComment *string `json:"resolution_comment,omitempty"`
40-
PushProtectionBypassRequestComment *string `json:"push_protection_bypass_request_comment,omitempty"`
41-
PushProtectionBypassRequestHTMLURL *string `json:"push_protection_bypass_request_html_url,omitempty"`
42-
PushProtectionBypassRequestReviewer *User `json:"push_protection_bypass_request_reviewer,omitempty"`
43-
PushProtectionBypassRequestReviewerComment *string `json:"push_protection_bypass_request_reviewer_comment,omitempty"`
44-
Validity *string `json:"validity,omitempty"`
19+
Number *int `json:"number,omitempty"`
20+
CreatedAt *Timestamp `json:"created_at,omitempty"`
21+
URL *string `json:"url,omitempty"`
22+
HTMLURL *string `json:"html_url,omitempty"`
23+
LocationsURL *string `json:"locations_url,omitempty"`
24+
FirstLocationDetected *SecretScanningAlertLocationDetails `json:"first_location_detected,omitempty"`
25+
HasMoreLocations *bool `json:"has_more_locations,omitempty"`
26+
State *string `json:"state,omitempty"`
27+
Resolution *string `json:"resolution,omitempty"`
28+
ResolvedAt *Timestamp `json:"resolved_at,omitempty"`
29+
ResolvedBy *User `json:"resolved_by,omitempty"`
30+
SecretType *string `json:"secret_type,omitempty"`
31+
SecretTypeDisplayName *string `json:"secret_type_display_name,omitempty"`
32+
Secret *string `json:"secret,omitempty"`
33+
Repository *Repository `json:"repository,omitempty"`
34+
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
35+
IsBase64Encoded *bool `json:"is_base64_encoded,omitempty"`
36+
MultiRepo *bool `json:"multi_repo,omitempty"`
37+
PubliclyLeaked *bool `json:"publicly_leaked,omitempty"`
38+
PushProtectionBypassed *bool `json:"push_protection_bypassed,omitempty"`
39+
PushProtectionBypassedBy *User `json:"push_protection_bypassed_by,omitempty"`
40+
PushProtectionBypassedAt *Timestamp `json:"push_protection_bypassed_at,omitempty"`
41+
ResolutionComment *string `json:"resolution_comment,omitempty"`
42+
PushProtectionBypassRequestComment *string `json:"push_protection_bypass_request_comment,omitempty"`
43+
PushProtectionBypassRequestHTMLURL *string `json:"push_protection_bypass_request_html_url,omitempty"`
44+
PushProtectionBypassRequestReviewer *User `json:"push_protection_bypass_request_reviewer,omitempty"`
45+
PushProtectionBypassRequestReviewerComment *string `json:"push_protection_bypass_request_reviewer_comment,omitempty"`
46+
Validity *string `json:"validity,omitempty"`
4547
}
4648

4749
// SecretScanningAlertLocation represents the location for a secret scanning alert.

0 commit comments

Comments
 (0)