Circle CI Disable Security Job


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.

Query · spl

`circleci`
  | rename vcs.committer_name as user vcs.subject as commit_message vcs.url as url workflows.* as *
  | stats values(job_name) as job_names
    BY workflow_id workflow_name user
       commit_message url branch
  | lookup mandatory_job_for_workflow workflow_name OUTPUTNEW job_name AS mandatory_job
  | search mandatory_job=*
  | eval mandatory_job_executed=if(like(job_names, "%".mandatory_job."%"), 1, 0)
  | where mandatory_job_executed=0
  | eval phase="build"
  | rex field=url "(?<repository>[^\/]*\/[^\/]*)$"
  | `security_content_ctime(firstTime)`
  | `security_content_ctime(lastTime)`
  | `circle_ci_disable_security_job_filter`

Implementation guide

You must index CircleCI logs.

Known false positives

  • No false positives have been identified at this time.

Analyst notes

Known false positives: No false positives have been identified at this time.

Raw source Circle CI Disable Security Job · SPL
Esc
Published by splunk/security_content ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
name: Circle CI Disable Security Job
id: 4a2fdd41-c578-4cd4-9ef7-980e352517f2
version: 10
creation_date: '2021-09-02'
modification_date: '2026-05-13'
author: Patrick Bareiss, Splunk
status: production
type: Anomaly
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.
data_source:
    - CircleCI
search: |-
    `circleci`
      | rename vcs.committer_name as user vcs.subject as commit_message vcs.url as url workflows.* as *
      | stats values(job_name) as job_names
        BY workflow_id workflow_name user
           commit_message url branch
      | lookup mandatory_job_for_workflow workflow_name OUTPUTNEW job_name AS mandatory_job
      | search mandatory_job=*
      | eval mandatory_job_executed=if(like(job_names, "%".mandatory_job."%"), 1, 0)
      | where mandatory_job_executed=0
      | eval phase="build"
      | rex field=url "(?<repository>[^\/]*\/[^\/]*)$"
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `circle_ci_disable_security_job_filter`
how_to_implement: You must index CircleCI logs.
known_false_positives: No false positives have been identified at this time.
references: []
drilldown_searches:
    - name: View the detection results for - "$user$"
      search: '%original_detection_search% | search  user = "$user$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$user$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") | 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: 7d
      latest_offset: "0"
intermediate_findings:
    entities:
        - field: user
          type: user
          score: 20
          message: Disable security job $mandatory_job$ in workflow $workflow_name$ from user $user$
analytic_story:
    - Dev Sec Ops
asset_type: CircleCI
mitre_attack_id:
    - T1554
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: cloud
security_domain: network
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1554/circle_ci_disable_security_job/circle_ci_disable_security_job.json
          sourcetype: circleci
          source: circleci
      test_type: unit

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.