Skip to content

Commit d99d3df

Browse files
Add SAML SSO audit log fields (#2941)
1 parent e6f58e6 commit d99d3df

File tree

4 files changed

+164
-122
lines changed

4 files changed

+164
-122
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: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/orgs_audit_log.go

Lines changed: 80 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -43,84 +43,86 @@ type PolicyOverrideReason struct {
4343
// AuditEntry describes the fields that may be represented by various audit-log "action" entries.
4444
// For a list of actions see - https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#audit-log-actions
4545
type AuditEntry struct {
46-
ActorIP *string `json:"actor_ip,omitempty"`
47-
Action *string `json:"action,omitempty"` // The name of the action that was performed, for example `user.login` or `repo.create`.
48-
Active *bool `json:"active,omitempty"`
49-
ActiveWas *bool `json:"active_was,omitempty"`
50-
Actor *string `json:"actor,omitempty"` // The actor who performed the action.
51-
ActorLocation *ActorLocation `json:"actor_location,omitempty"`
52-
BlockedUser *string `json:"blocked_user,omitempty"`
53-
Business *string `json:"business,omitempty"`
54-
CancelledAt *Timestamp `json:"cancelled_at,omitempty"`
55-
CompletedAt *Timestamp `json:"completed_at,omitempty"`
56-
Conclusion *string `json:"conclusion,omitempty"`
57-
Config *HookConfig `json:"config,omitempty"`
58-
ConfigWas *HookConfig `json:"config_was,omitempty"`
59-
ContentType *string `json:"content_type,omitempty"`
60-
CreatedAt *Timestamp `json:"created_at,omitempty"`
61-
DeployKeyFingerprint *string `json:"deploy_key_fingerprint,omitempty"`
62-
DocumentID *string `json:"_document_id,omitempty"`
63-
Emoji *string `json:"emoji,omitempty"`
64-
EnvironmentName *string `json:"environment_name,omitempty"`
65-
Event *string `json:"event,omitempty"`
66-
Events []string `json:"events,omitempty"`
67-
EventsWere []string `json:"events_were,omitempty"`
68-
Explanation *string `json:"explanation,omitempty"`
69-
Fingerprint *string `json:"fingerprint,omitempty"`
70-
HashedToken *string `json:"hashed_token,omitempty"`
71-
HeadBranch *string `json:"head_branch,omitempty"`
72-
HeadSHA *string `json:"head_sha,omitempty"`
73-
HookID *int64 `json:"hook_id,omitempty"`
74-
IsHostedRunner *bool `json:"is_hosted_runner,omitempty"`
75-
JobName *string `json:"job_name,omitempty"`
76-
JobWorkflowRef *string `json:"job_workflow_ref,omitempty"`
77-
LimitedAvailability *bool `json:"limited_availability,omitempty"`
78-
Message *string `json:"message,omitempty"`
79-
Name *string `json:"name,omitempty"`
80-
OAuthApplicationID *int64 `json:"oauth_application_id,omitempty"`
81-
OldUser *string `json:"old_user,omitempty"`
82-
OldPermission *string `json:"old_permission,omitempty"` // The permission level for membership changes, for example `admin` or `read`.
83-
OpenSSHPublicKey *string `json:"openssh_public_key,omitempty"`
84-
OperationType *string `json:"operation_type,omitempty"`
85-
Org *string `json:"org,omitempty"`
86-
OrgID *int64 `json:"org_id,omitempty"`
87-
OverriddenCodes []string `json:"overridden_codes,omitempty"`
88-
Permission *string `json:"permission,omitempty"` // The permission level for membership changes, for example `admin` or `read`.
89-
PreviousVisibility *string `json:"previous_visibility,omitempty"`
90-
ProgrammaticAccessType *string `json:"programmatic_access_type,omitempty"`
91-
PullRequestID *int64 `json:"pull_request_id,omitempty"`
92-
PullRequestTitle *string `json:"pull_request_title,omitempty"`
93-
PullRequestURL *string `json:"pull_request_url,omitempty"`
94-
ReadOnly *string `json:"read_only,omitempty"`
95-
Reasons []*PolicyOverrideReason `json:"reasons,omitempty"`
96-
Repo *string `json:"repo,omitempty"`
97-
Repository *string `json:"repository,omitempty"`
98-
RepositoryPublic *bool `json:"repository_public,omitempty"`
99-
RunAttempt *int64 `json:"run_attempt,omitempty"`
100-
RunnerGroupID *int64 `json:"runner_group_id,omitempty"`
101-
RunnerGroupName *string `json:"runner_group_name,omitempty"`
102-
RunnerID *int64 `json:"runner_id,omitempty"`
103-
RunnerLabels []string `json:"runner_labels,omitempty"`
104-
RunnerName *string `json:"runner_name,omitempty"`
105-
RunNumber *int64 `json:"run_number,omitempty"`
106-
SecretsPassed []string `json:"secrets_passed,omitempty"`
107-
SourceVersion *string `json:"source_version,omitempty"`
108-
StartedAt *Timestamp `json:"started_at,omitempty"`
109-
TargetLogin *string `json:"target_login,omitempty"`
110-
TargetVersion *string `json:"target_version,omitempty"`
111-
Team *string `json:"team,omitempty"`
112-
Timestamp *Timestamp `json:"@timestamp,omitempty"` // The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).
113-
TokenID *int64 `json:"token_id,omitempty"`
114-
TokenScopes *string `json:"token_scopes,omitempty"`
115-
Topic *string `json:"topic,omitempty"`
116-
TransportProtocolName *string `json:"transport_protocol_name,omitempty"` // A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data.
117-
TransportProtocol *int `json:"transport_protocol,omitempty"` // The type of protocol (for example, HTTP=1 or SSH=2) used to transfer Git data.
118-
TriggerID *int64 `json:"trigger_id,omitempty"`
119-
User *string `json:"user,omitempty"` // The user that was affected by the action performed (if available).
120-
UserAgent *string `json:"user_agent,omitempty"`
121-
Visibility *string `json:"visibility,omitempty"` // The repository visibility, for example `public` or `private`.
122-
WorkflowID *int64 `json:"workflow_id,omitempty"`
123-
WorkflowRunID *int64 `json:"workflow_run_id,omitempty"`
46+
ActorIP *string `json:"actor_ip,omitempty"`
47+
Action *string `json:"action,omitempty"` // The name of the action that was performed, for example `user.login` or `repo.create`.
48+
Active *bool `json:"active,omitempty"`
49+
ActiveWas *bool `json:"active_was,omitempty"`
50+
Actor *string `json:"actor,omitempty"` // The actor who performed the action.
51+
ActorLocation *ActorLocation `json:"actor_location,omitempty"`
52+
BlockedUser *string `json:"blocked_user,omitempty"`
53+
Business *string `json:"business,omitempty"`
54+
CancelledAt *Timestamp `json:"cancelled_at,omitempty"`
55+
CompletedAt *Timestamp `json:"completed_at,omitempty"`
56+
Conclusion *string `json:"conclusion,omitempty"`
57+
Config *HookConfig `json:"config,omitempty"`
58+
ConfigWas *HookConfig `json:"config_was,omitempty"`
59+
ContentType *string `json:"content_type,omitempty"`
60+
CreatedAt *Timestamp `json:"created_at,omitempty"`
61+
DeployKeyFingerprint *string `json:"deploy_key_fingerprint,omitempty"`
62+
DocumentID *string `json:"_document_id,omitempty"`
63+
Emoji *string `json:"emoji,omitempty"`
64+
EnvironmentName *string `json:"environment_name,omitempty"`
65+
Event *string `json:"event,omitempty"`
66+
Events []string `json:"events,omitempty"`
67+
EventsWere []string `json:"events_were,omitempty"`
68+
Explanation *string `json:"explanation,omitempty"`
69+
ExternalIdentityNameID *string `json:"external_identity_nameid,omitempty"`
70+
ExternalIdentityUsername *string `json:"external_identity_username,omitempty"`
71+
Fingerprint *string `json:"fingerprint,omitempty"`
72+
HashedToken *string `json:"hashed_token,omitempty"`
73+
HeadBranch *string `json:"head_branch,omitempty"`
74+
HeadSHA *string `json:"head_sha,omitempty"`
75+
HookID *int64 `json:"hook_id,omitempty"`
76+
IsHostedRunner *bool `json:"is_hosted_runner,omitempty"`
77+
JobName *string `json:"job_name,omitempty"`
78+
JobWorkflowRef *string `json:"job_workflow_ref,omitempty"`
79+
LimitedAvailability *bool `json:"limited_availability,omitempty"`
80+
Message *string `json:"message,omitempty"`
81+
Name *string `json:"name,omitempty"`
82+
OAuthApplicationID *int64 `json:"oauth_application_id,omitempty"`
83+
OldUser *string `json:"old_user,omitempty"`
84+
OldPermission *string `json:"old_permission,omitempty"` // The permission level for membership changes, for example `admin` or `read`.
85+
OpenSSHPublicKey *string `json:"openssh_public_key,omitempty"`
86+
OperationType *string `json:"operation_type,omitempty"`
87+
Org *string `json:"org,omitempty"`
88+
OrgID *int64 `json:"org_id,omitempty"`
89+
OverriddenCodes []string `json:"overridden_codes,omitempty"`
90+
Permission *string `json:"permission,omitempty"` // The permission level for membership changes, for example `admin` or `read`.
91+
PreviousVisibility *string `json:"previous_visibility,omitempty"`
92+
ProgrammaticAccessType *string `json:"programmatic_access_type,omitempty"`
93+
PullRequestID *int64 `json:"pull_request_id,omitempty"`
94+
PullRequestTitle *string `json:"pull_request_title,omitempty"`
95+
PullRequestURL *string `json:"pull_request_url,omitempty"`
96+
ReadOnly *string `json:"read_only,omitempty"`
97+
Reasons []*PolicyOverrideReason `json:"reasons,omitempty"`
98+
Repo *string `json:"repo,omitempty"`
99+
Repository *string `json:"repository,omitempty"`
100+
RepositoryPublic *bool `json:"repository_public,omitempty"`
101+
RunAttempt *int64 `json:"run_attempt,omitempty"`
102+
RunnerGroupID *int64 `json:"runner_group_id,omitempty"`
103+
RunnerGroupName *string `json:"runner_group_name,omitempty"`
104+
RunnerID *int64 `json:"runner_id,omitempty"`
105+
RunnerLabels []string `json:"runner_labels,omitempty"`
106+
RunnerName *string `json:"runner_name,omitempty"`
107+
RunNumber *int64 `json:"run_number,omitempty"`
108+
SecretsPassed []string `json:"secrets_passed,omitempty"`
109+
SourceVersion *string `json:"source_version,omitempty"`
110+
StartedAt *Timestamp `json:"started_at,omitempty"`
111+
TargetLogin *string `json:"target_login,omitempty"`
112+
TargetVersion *string `json:"target_version,omitempty"`
113+
Team *string `json:"team,omitempty"`
114+
Timestamp *Timestamp `json:"@timestamp,omitempty"` // The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).
115+
TokenID *int64 `json:"token_id,omitempty"`
116+
TokenScopes *string `json:"token_scopes,omitempty"`
117+
Topic *string `json:"topic,omitempty"`
118+
TransportProtocolName *string `json:"transport_protocol_name,omitempty"` // A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data.
119+
TransportProtocol *int `json:"transport_protocol,omitempty"` // The type of protocol (for example, HTTP=1 or SSH=2) used to transfer Git data.
120+
TriggerID *int64 `json:"trigger_id,omitempty"`
121+
User *string `json:"user,omitempty"` // The user that was affected by the action performed (if available).
122+
UserAgent *string `json:"user_agent,omitempty"`
123+
Visibility *string `json:"visibility,omitempty"` // The repository visibility, for example `public` or `private`.
124+
WorkflowID *int64 `json:"workflow_id,omitempty"`
125+
WorkflowRunID *int64 `json:"workflow_run_id,omitempty"`
124126

125127
Data *AuditEntryData `json:"data,omitempty"`
126128
}

0 commit comments

Comments
 (0)