mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
Removed required_fields from, well,
everything.
This commit is contained in:
@@ -5,11 +5,23 @@ date: '2024-09-30'
|
||||
author: Teoderick Contreras, Splunk
|
||||
status: production
|
||||
type: Anomaly
|
||||
description: The following analytic detects commits pushed directly to the 'develop' or 'main' branches in a GitHub repository. It leverages GitHub logs, focusing on commit metadata such as author details, commit messages, and timestamps. This activity is significant as direct commits to these branches can bypass the review process, potentially introducing unvetted changes. If confirmed malicious, this could lead to unauthorized code modifications, introducing vulnerabilities or backdoors into the codebase, and compromising the integrity of the development lifecycle.
|
||||
description: The following analytic detects commits pushed directly to the 'develop'
|
||||
or 'main' branches in a GitHub repository. It leverages GitHub logs, focusing on
|
||||
commit metadata such as author details, commit messages, and timestamps. This activity
|
||||
is significant as direct commits to these branches can bypass the review process,
|
||||
potentially introducing unvetted changes. If confirmed malicious, this could lead
|
||||
to unauthorized code modifications, introducing vulnerabilities or backdoors into
|
||||
the codebase, and compromising the integrity of the development lifecycle.
|
||||
data_source:
|
||||
- GitHub
|
||||
search: '`github` branches{}.name = main OR branches{}.name = develop | stats count min(_time) as firstTime max(_time) as lastTime by commit.author.html_url commit.commit.author.email commit.author.login commit.commit.message repository.pushed_at commit.commit.committer.date | eval phase="code" | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `github_commit_in_develop_filter`'
|
||||
how_to_implement: To successfully implement this search, you need to be ingesting logs related to github logs having the fork, commit, push metadata that can be use to monitor the changes in a github project.
|
||||
search: '`github` branches{}.name = main OR branches{}.name = develop | stats count
|
||||
min(_time) as firstTime max(_time) as lastTime by commit.author.html_url commit.commit.author.email
|
||||
commit.author.login commit.commit.message repository.pushed_at commit.commit.committer.date
|
||||
| eval phase="code" | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`
|
||||
| `github_commit_in_develop_filter`'
|
||||
how_to_implement: To successfully implement this search, you need to be ingesting
|
||||
logs related to github logs having the fork, commit, push metadata that can be use
|
||||
to monitor the changes in a github project.
|
||||
known_false_positives: admin can do changes directly to develop branch
|
||||
references:
|
||||
- https://www.redhat.com/en/topics/devops/what-is-devsecops
|
||||
@@ -19,7 +31,12 @@ drilldown_searches:
|
||||
earliest_offset: $info_min_time$
|
||||
latest_offset: $info_max_time$
|
||||
- name: View risk events for the last 7 days for - "$commit.commit.author.email$"
|
||||
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$commit.commit.author.email$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
|
||||
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$commit.commit.author.email$")
|
||||
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
|
||||
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
|
||||
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
|
||||
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
|
||||
| `security_content_ctime(lastTime)`'
|
||||
earliest_offset: $info_min_time$
|
||||
latest_offset: $info_max_time$
|
||||
tags:
|
||||
@@ -40,12 +57,11 @@ tags:
|
||||
- Splunk Enterprise
|
||||
- Splunk Enterprise Security
|
||||
- Splunk Cloud
|
||||
required_fields:
|
||||
- _time
|
||||
security_domain: endpoint
|
||||
tests:
|
||||
- name: True Positive Test
|
||||
attack_data:
|
||||
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1199/github_push_master/github_push_develop.json
|
||||
- data:
|
||||
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1199/github_push_master/github_push_develop.json
|
||||
source: github
|
||||
sourcetype: aws:firehose:json
|
||||
|
||||
Reference in New Issue
Block a user