github_secret_scanning_disabled_or_bypassed
Description
Detects when components of GitHub secret scanning is disabled for an enterprise or organization.
Query · yara_l
events:
$github.metadata.vendor_name = "GITHUB" nocase
$github.metadata.product_name = "GITHUB"
(
$github.metadata.product_event_type = "secret_scanning.disable" or
$github.metadata.product_event_type = "secret_scanning_new_repos.disable" or
$github.metadata.product_event_type = "secret_scanning_push_protection.bypass" or
$github.metadata.product_event_type = "business_secret_scanning_custom_pattern_push_protection.disabled" or
$github.metadata.product_event_type = "business_secret_scanning.disable" or
$github.metadata.product_event_type = "business_secret_scanning.disabled_for_new_repos" or
$github.metadata.product_event_type = "business_secret_scanning_push_protection_custom_message.disable" or
$github.metadata.product_event_type = "business_secret_scanning_push_protection.disable" or
$github.metadata.product_event_type = "business_secret_scanning_push_protection.disabled_for_new_repos" or
$github.metadata.product_event_type = "org_secret_scanning_generic_secrets.disabled" or
$github.metadata.product_event_type = "repository_secret_scanning.disable" or
$github.metadata.product_event_type = "repository_secret_scanning_generic_secrets.disabled" or
$github.metadata.product_event_type = "repository_secret_scanning_push_protection.disable"
)
outcome:
$risk_score = max(85)
$mitre_attack_tactic = "Defense Evasion"
$mitre_attack_technique = "Impair Defenses: Disable or Modify Tools"
$mitre_attack_technique_id = "T1562.001"
$principal_ip = array_distinct($github.principal.ip)
$principal_user_userid = array_distinct($github.principal.user.userid)
$principal_ip_country = array_distinct($github.principal.ip_geo_artifact.location.country_or_region)
$principal_ip_state = array_distinct($github.principal.ip_geo_artifact.location.state)
$principal_ip_city = array_distinct($github.principal.location.city)
$security_result_summary = array_distinct($github.security_result.summary)
condition:
$github