GitHub Actions Disable Security Workflow
Description
This search detects a disabled security workflow in GitHub Actions. An attacker can disable a security workflow in GitHub actions to hide malicious code in it.
- Type: Anomaly
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2022-04-04
- Author: Patrick Bareiss, Splunk
- ID: 0459f1a5-c0ac-4987-82d6-65081209f854
Annotations
ATT&CK
Kill Chain Phase
- Delivery
NIST
- DE.AE
CIS20
- CIS 13
CVE
Search
1
2
3
4
5
6
7
`github` workflow_run.event=push OR workflow_run.event=pull_request
| stats values(workflow_run.name) as workflow_run.name by workflow_run.head_commit.id workflow_run.event workflow_run.head_branch workflow_run.head_commit.author.email workflow_run.head_commit.author.name workflow_run.head_commit.message workflow_run.head_commit.timestamp workflow_run.head_repository.full_name workflow_run.head_repository.owner.id workflow_run.head_repository.owner.login workflow_run.head_repository.owner.type
| rename workflow_run.head_commit.author.name as user, workflow_run.head_commit.author.email as user_email, workflow_run.head_repository.full_name as repository, workflow_run.head_branch as branch
| search NOT workflow_run.name=*security-testing*
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `github_actions_disable_security_workflow_filter`
Macros
The SPL above uses the following Macros:
github_actions_disable_security_workflow_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.
- workflow_run.event
- workflow_run.name
- workflow_run.head_commit.id
- workflow_run.event workflow_run.head_branch
- workflow_run.head_commit.author.email
- workflow_run.head_commit.author.name
- workflow_run.head_commit.message
- workflow_run.head_commit.timestamp
- workflow_run.head_repository.full_name
- workflow_run.head_repository.owner.id
- workflow_run.head_repository.owner.login
- workflow_run.head_repository.owner.type
How To Implement
You must index GitHub logs. You can follow the url in reference to onboard GitHub logs. Sometimes GitHub logs are truncated, make sure to disable it in props.conf. Replace security-testing with the name of your security testing workflow in GitHub Actions.
Known False Positives
unknown
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
27.0 | 30 | 90 | Security Workflow is disabled in branch $branch$ for repository $repository$ |
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: 1