Try in Splunk Security Cloud

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.

  • Type: Anomaly
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-05-24
  • Author: Teoderick Contreras, Splunk
  • ID: f3030cb6-0b02-11ec-8f22-acde48001122

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1199 Trusted Relationship Initial Access
Kill Chain Phase
  • Delivery
NIST
  • DE.AE
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
`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`

Macros

The SPL above uses the following Macros:

:information_source: github_commit_in_develop_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time

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

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
9.0 30 30 Suspicious commit by $commit.commit.author.email$ to develop branch

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 2