Git
| action | Description | Sample | Rule |
|---|---|---|---|
| git. | A repository was cloned. This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports. | Y | Y |
| git. | Changes were fetched from a repository. This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports. | Y | Y |
| git. | Changes were pushed to a repository. This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports. | Y | Y |
git.clone
#Description
A repository was cloned. This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports.
GitHub Enterprise Cloud logs Git events by default, retrievable via the REST API or audit-log streaming only (not the web UI), with 7-day retention. GitHub Enterprise Server requires enabling Git events in audit-log configuration.
Documented on GitHub's enterprise audit log reference. Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis. Full rule details for this event, including ATT&CK technique mappings and native queries →Example Audit Log Entry #
{
"@timestamp": 1785026871063,
"_document_id": "U1lOX0RPQ18wMDAwMDAwMDAwMDAwMDU=",
"action": "example.invalid",
"actor": "user",
"actor_location": {
"country_code": "XX"
},
"business": "example-business",
"business_id": 9000003,
"hashed_token": "U1lOVEhFVElDX1RPS0VOX0hBU0hfMDAwMQ==",
"org": "example-org",
"org_id": 9000004,
"programmatic_access_type": "Personal access token (classic)",
"repo": "user/example-repo",
"repository": "user/example-repo",
"repository_public": false,
"token_id": 9000006,
"transport_protocol": 1,
"transport_protocol_name": "http",
"user": "user",
"user_agent": "git/2.39.5",
"user_id": 9000007
}
Common Indicators #
Field Kind Value Rules Vendors github.repository_public (elastic rule field)eq false2 rules elastic github.programmatic_access_type (elastic rule field)in fine-grained personal access token1 rule elastic github.programmatic_access_type (elastic rule field)in oauth access token1 rule elastic Detection Rules #
Elastic #
T1213, T1213.003, T1648T1020, T1213, T1213.003, T1567, T1567.001T1059, T1078, T1078.004, T1195, T1195.002, T1213↳ also matches git.push YARA-L #
T1213T1213Panther #
git.fetch
#Description
Changes were fetched from a repository. This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports.
GitHub Enterprise Cloud logs Git events by default, retrievable via the REST API or audit-log streaming only (not the web UI), with 7-day retention. GitHub Enterprise Server requires enabling Git events in audit-log configuration.
Documented on GitHub's enterprise audit log reference. Full rule details for this event, including ATT&CK technique mappings and native queries →Example Audit Log Entry #
{
"@timestamp": 1785027127063,
"_document_id": "U1lOX0RPQ18wMDAwMDAwMDAwMDAwMDQ=",
"action": "example.invalid",
"actor": "user",
"actor_location": {
"country_code": "XX"
},
"business": "example-business",
"business_id": 9000003,
"hashed_token": "U1lOVEhFVElDX1RPS0VOX0hBU0hfMDAwMQ==",
"org": "example-org",
"org_id": 9000004,
"programmatic_access_type": "Personal access token (classic)",
"repo": "user/example-repo",
"repository": "user/example-repo",
"repository_public": false,
"token_id": 9000006,
"transport_protocol": 1,
"transport_protocol_name": "http",
"user": "user",
"user_agent": "git/2.39.5",
"user_id": 9000007
}
Detection Rules #
Panther #
git.push
#Description
Changes were pushed to a repository. This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports.
GitHub Enterprise Cloud logs Git events by default, retrievable via the REST API or audit-log streaming only (not the web UI), with 7-day retention. GitHub Enterprise Server requires enabling Git events in audit-log configuration.
Documented on GitHub's enterprise audit log reference. Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis. Full rule details for this event, including ATT&CK technique mappings and native queries →Example Audit Log Entry #
{
"@timestamp": 1785026872972,
"_document_id": "U1lOX0RPQ18wMDAwMDAwMDAwMDAwMDQ=",
"action": "example.invalid",
"actor": "user",
"actor_location": {
"country_code": "XX"
},
"business": "example-business",
"business_id": 9000003,
"hashed_token": "U1lOVEhFVElDX1RPS0VOX0hBU0hfMDAwMQ==",
"org": "example-org",
"org_id": 9000004,
"programmatic_access_type": "Personal access token (classic)",
"repo": "user/example-repo",
"repository": "user/example-repo",
"repository_public": false,
"token_id": 9000006,
"transport_protocol": 1,
"transport_protocol_name": "http",
"user": "user",
"user_agent": "git/2.39.5",
"user_id": 9000007
}
Common Indicators #
Field Kind Value Rules Vendors github.repository_public (elastic rule field)eq false1 rule elastic Detection Rules #
Elastic #
T1059, T1195, T1195.002, T1565, T1565.001T1059, T1078, T1078.004, T1195, T1195.002, T1213↳ also matches git.clone Panther #