Detection: Circle CI Disable Security Job

REMOVED DETECTION

This detection has been removed from the Splunk Threat Research content library and is no longer maintained or supported.

Reason: Detection deprecated because the Technology Add-on it uses has been archived, and no replacement TA exists.

Removed in version: 6.12.0

If you have any questions or concerns, please reach out to us at research@splunk.com.

Description

The following analytic detects the disabling of security jobs in CircleCI pipelines. It leverages CircleCI log data, renaming and extracting fields such as job names, workflow IDs, user information, commit messages, URLs, and branches. The detection identifies mandatory jobs for each workflow and checks if they were executed. This activity is significant because disabling security jobs can allow malicious code to bypass security checks, leading to potential data breaches, system downtime, and reputational damage. If confirmed malicious, this could result in unauthorized code execution and compromised pipeline integrity.

 1`circleci`
 2  
 3| rename vcs.committer_name as user vcs.subject as commit_message vcs.url as url workflows.* as *
 4  
 5| stats values(job_name) as job_names
 6    BY workflow_id workflow_name user
 7       commit_message url branch
 8  
 9| lookup local=t mandatory_job_for_workflow workflow_name OUTPUTNEW job_name AS mandatory_job
10  
11| search mandatory_job=*
12  
13| eval mandatory_job_executed=if(like(job_names, "%".mandatory_job."%"), 1, 0)
14  
15| where mandatory_job_executed=0
16  
17| eval phase="build"
18  
19| rex field=url "(?<repository>[^\/]*\/[^\/]*)$"
20  
21| `security_content_ctime(firstTime)`
22  
23| `security_content_ctime(lastTime)`
24  
25| `circle_ci_disable_security_job_filter`

Data Source

Name Platform Sourcetype Source
CircleCI Other 'circleci' 'circleci'

Macros Used

Name Value
circleci sourcetype=circleci
circle_ci_disable_security_job_filter ``
circle_ci_disable_security_job_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule N/A
Earliest Time N/A
Latest Time N/A
Schedule Window N/A
Creates Finding (Notable) No
Creates Intermediate Finding (Risk Event) No
Anomaly detections generate Intermediate Findings (Risk Events). They do not generate a Finding (Notable) directly.

Implementation

You must index CircleCI logs.

Known False Positives

No false positives have been identified at this time.

Associated Analytic Story

No associated analytic story

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Not Applicable N/A N/A N/A
Unit Not Applicable N/A N/A N/A
Integration Not Applicable N/A N/A N/A

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: GitHub |

Version: 12