Github New Secret Created

 Original Source: [Sigma source]
Title: Github New Secret Created
Status: test
Description:Detects when a user creates action secret for the organization, environment, codespaces or repository.
References:
  -https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#audit-log-actions
Author: Muhammad Faisal (@faisalusuf)
Date: 2023-01-20
modified:None
Tags:
  • -'attack.persistence'
  • -'attack.privilege-escalation'
  • -'attack.initial-access'
  • -'attack.stealth'
  • -'attack.t1078.004'
Logsource:
  • product: github
  • service: audit
  • definition: Requirements: The audit log streaming feature must be enabled to be able to receive such logs. You can enable following the documentation here: https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise#setting-up-audit-log-streaming
Detection:
  selection:
    action:
      -'codespaces.create_an_org_secret'
      -'environment.create_actions_secret'
      -'org.create_actions_secret'
      -'repo.create_actions_secret'

  condition:selection
Falsepositives:
  -This detection cloud be noisy depending on the environment. It is recommended to keep a check on the new secrets when created and validate the "actor".
Level: low