Detection rules › Panther

GitHub Secret Scanning Alert Created

Severity
medium
Log types
GitHub.Audit
Tags
GitHub
Reference
https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning
Source
github.com/panther-labs/panther-analysis

GitHub detected a secret and created a secret scanning alert.

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1552 Unsecured Credentials

Rules detecting the same action

Other rules on this platform that filter on the same API call or operation.

Rule body yaml

AnalysisType: rule
Filename: github_secret_scanning_alert_created.py
RuleID: "GitHub.Secret.Scanning.Alert.Created"
DisplayName: "GitHub Secret Scanning Alert Created"
Enabled: true
LogTypes:
  - GitHub.Audit
Tags:
  - GitHub
Reports:
  MITRE ATT&CK:
    - TA0006:T1552
Severity: Medium
Description: GitHub detected a secret and created a secret scanning alert.
Runbook: Review the secret to determine if it needs to be revoked or the alert suppressed.
Reference: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning
Tests:
  - Name: secret_scanning_alert.create-true
    ExpectedResult: True
    Log:
      {
        "action": "secret_scanning_alert.create",
        "actor": "github",
        "actor_id": "1234",
        "business": "Acme Inc.",
        "business_id": "12345",
        "created_at": "2023-10-18 18:20:52.209000000",
        "number": 12,
        "org": "acme-inc",
        "org_id": 1234567,
        "repo": "acme-inc/crown-jewels",
        "repo_id": 123456789,
      }
  - Name: git.clone-false
    ExpectedResult: False
    Log:
      {
        "_document_id": "KCYtigpnShPBSohA4OXbRg==",
        "action": "git.clone",
        "actor": "acme-inc-user",
        "actor_id": "123456789",
        "actor_ip": "5.6.7.8",
        "actor_location": { "country_code": "US" },
        "at_sign_timestamp": "2023-11-20 21:20:09.423",
        "business": "acme-inc",
        "business_id": "12345",
        "external_identity_nameid": "",
        "external_identity_username": "",
        "hashed_token": "0771cae4d170dc02a6ff393d9946cd684d6145c1=",
        "org": "acme-inc",
        "org_id": 12345678,
        "programmatic_access_type": "OAuth access token",
        "repo": "acme-inc/a-repo",
        "repository": "acme-inc/a-repo",
        "repository_public": false,
        "token_id": "0123456789",
        "transport_protocol": 1,
        "transport_protocol_name": "http",
        "user": "",
        "user_agent": "git/2.30.2",
        "user_id": "0",
      }

Detection logic

Condition

action eq "secret_scanning_alert.create"

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
actioneq
  • secret_scanning_alert.create

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
github_organizationorg
github_repositoryrepo
alert_numbernumber