Detection rules › Panther

GitHub Security Change, includes GitHub Advanced Security

Severity
low
Group by
action, actor
Log types
GitHub.Audit
Tags
GitHub
Reference
https://docs.github.com/en/code-security/getting-started/auditing-security-alerts
Source
github.com/panther-labs/panther-analysis

The rule alerts when GitHub Security tools (Dependabot, Secret Scanner, etc) are disabled.

MITRE ATT&CK coverage

TacticTechniques
StealthT1562 Impair Defenses

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_advanced_security_change.py
RuleID: "GitHub.Advanced.Security.Change"
DisplayName: "GitHub Security Change, includes GitHub Advanced Security"
Enabled: true
CreateAlert: false
LogTypes:
  - GitHub.Audit
Tags:
  - GitHub
Reports:
  MITRE ATT&CK:
    - TA0005:T1562
Severity: Low
Description: The rule alerts when GitHub Security tools (Dependabot, Secret Scanner, etc) are disabled.
Runbook: Confirm with GitHub administrators and re-enable the tools as applicable.
Reference: https://docs.github.com/en/code-security/getting-started/auditing-security-alerts
Tests:
  - Name: Secret Scanning Disabled on a Repo
    ExpectedResult: True
    Log:
      {
        "action": "repository_secret_scanning_push_protection.disable",
        "actor": "bobert",
        "actor_location": { "country_code": "US" },
        "at_sign_timestamp": "2022-08-16 16:56:49.309",
        "created_at": "2022-08-16 16:56:49.309",
        "org": "an-org",
        "repo": "an-org/a-repo",
        "user": "bobert",
      }
  - Name: Secret Scanning Disabled Org Wide
    ExpectedResult: True
    Log:
      {
        "action": "secret_scanning.disable",
        "actor": "bobert",
        "actor_location": { "country_code": "US" },
        "at_sign_timestamp": "2022-08-16 16:56:49.309",
        "created_at": "2022-08-16 16:56:49.309",
        "org": "an-org",
        "repo": "an-org/a-repo",
        "user": "bobert",
      }
  - Name: Secret Scanning Disabled for New Repos
    ExpectedResult: True
    Log:
      {
        "action": "secret_scanning_new_repos.disable",
        "actor": "bobert",
        "actor_location": { "country_code": "US" },
        "at_sign_timestamp": "2022-08-16 16:56:49.309",
        "created_at": "2022-08-16 16:56:49.309",
        "org": "an-org",
        "repo": "an-org/a-repo",
        "user": "bobert",
      }
  - Name: Dependabot Alerts Disabled Org Wide
    ExpectedResult: True
    Log:
      {
        "action": "dependabot_alerts.disable",
        "actor": "bobert",
        "actor_location": { "country_code": "US" },
        "at_sign_timestamp": "2022-08-16 16:56:49.309",
        "created_at": "2022-08-16 16:56:49.309",
        "org": "an-org",
        "repo": "an-org/a-repo",
        "user": "bobert",
      }
  - Name: Dependabot Alerts Disabled on New Repos
    ExpectedResult: True
    Log:
      {
        "action": "dependabot_alerts_new_repos.disable",
        "actor": "bobert",
        "actor_location": { "country_code": "US" },
        "at_sign_timestamp": "2022-08-16 16:56:49.309",
        "created_at": "2022-08-16 16:56:49.309",
        "org": "an-org",
        "repo": "an-org/a-repo",
        "user": "bobert",
      }
  - Name: Dependabot Disabled Org Wide
    ExpectedResult: True
    Log:
      {
        "action": "dependabot_security_updates.disable",
        "actor": "bobert",
        "actor_location": { "country_code": "US" },
        "at_sign_timestamp": "2022-08-16 16:56:49.309",
        "created_at": "2022-08-16 16:56:49.309",
        "org": "an-org",
        "repo": "an-org/a-repo",
        "user": "bobert",
      }
  - Name: Dependabot Disabled on New Repos
    ExpectedResult: True
    Log:
      {
        "action": "dependabot_security_updates_new_repos.disable",
        "actor": "bobert",
        "actor_location": { "country_code": "US" },
        "at_sign_timestamp": "2022-08-16 16:56:49.309",
        "created_at": "2022-08-16 16:56:49.309",
        "org": "an-org",
        "repo": "an-org/a-repo",
        "user": "bobert",
      }
  - Name: Non-GitHub Adv Sec Action
    ExpectedResult: False
    Log:
      {
        "action": "enterprise.config.disable_anonymous_git_access",
        "actor": "bobert",
        "actor_location": { "country_code": "US" },
        "at_sign_timestamp": "2022-08-16 16:56:49.309",
        "created_at": "2022-08-16 16:56:49.309",
        "org": "an-org",
        "repo": "an-org/a-repo",
        "user": "bobert",
      }
  - Name: Enterprise Log - business_advanced_security.enabled
    ExpectedResult: False
    Log:
      {
        "@timestamp": 1671111111111,
        "_document_id": "gAcccccccccccccccccccc",
        "action": "business_advanced_security.enabled",
        "actor": "bobert",
        "actor_ip": "12.12.12.12",
        "actor_location": { "country_code": "US" },
        "business": "example-enterprise",
        "created_at": 1671111111111,
        "operation_type": "modify",
        "user": "bobert",
      }
  - Name: Enterprise Log - business_advanced_security.disabled
    ExpectedResult: True
    Log:
      {
        "@timestamp": 1671111111111,
        "_document_id": "gAcccccccccccccccccccc",
        "action": "business_advanced_security.disabled",
        "actor": "bobert",
        "actor_ip": "12.12.12.12",
        "actor_location": { "country_code": "US" },
        "business": "example-enterprise",
        "created_at": 1671111111111,
        "operation_type": "modify",
        "user": "bobert",
      }

Detection logic

Condition

action in ["dependabot_alerts.disable", "dependabot_alerts_new_repos.disable", "dependabot_security_updates.disable", "dependabot_security_updates_new_repos.disable", "repository_secret_scanning_push_protection.disable", "secret_scanning.disable", "secret_scanning_new_repos.disable", "bypass", "business.disable_oidc", "business.disable_saml", "business.disable_two_factor_requirement", "business.members_can_update_protected_branches.disable", "business.referrer_override_disable", "business_advanced_security.disabled", "business_advanced_security.disabled_for_new_repos", "business_secret_scanning.disable", "business_secret_scanning.disabled_for_new_repos", "business_secret_scanning_custom_pattern_push_protection.disabled", "business_secret_scanning_push_protection.disable", "business_secret_scanning_push_protection.disabled_for_new_repos", "business_secret_scanning_push_protection_custom_message.disable", "org.advanced_security_disabled_for_new_repos", "org.advanced_security_disabled_on_all_repos", "org.advanced_security_policy_selected_member_disabled", "repo.advanced_security_disabled", "repo.advanced_security_policy_selected_member_disabled", "repository_vulnerability_alerts.disable"]

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
actionin
  • business.disable_oidc
  • business.disable_saml
  • business.disable_two_factor_requirement
  • business.members_can_update_protected_branches.disable
  • business.referrer_override_disable
  • business_advanced_security.disabled
  • business_advanced_security.disabled_for_new_repos
  • business_secret_scanning.disable
  • business_secret_scanning.disabled_for_new_repos
  • business_secret_scanning_custom_pattern_push_protection.disabled
  • business_secret_scanning_push_protection.disable
  • business_secret_scanning_push_protection.disabled_for_new_repos
  • business_secret_scanning_push_protection_custom_message.disable
  • bypass
  • dependabot_alerts.disable
  • dependabot_alerts_new_repos.disable
  • dependabot_security_updates.disable
  • dependabot_security_updates_new_repos.disable
  • org.advanced_security_disabled_for_new_repos
  • org.advanced_security_disabled_on_all_repos
  • org.advanced_security_policy_selected_member_disabled
  • repo.advanced_security_disabled
  • repo.advanced_security_policy_selected_member_disabled
  • repository_secret_scanning_push_protection.disable
  • repository_vulnerability_alerts.disable
  • secret_scanning.disable
  • secret_scanning_new_repos.disable

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
action
actor
actor_locationactor_location.country_code
org
repo
user