Detection: SSH Key Deleted
Overview
Detect when an SSH key is deleted from a GitHub account. While this may be part of normal key rotation or credential cleanup, attackers may delete trusted SSH keys to disrupt legitimate developer access or to evade detection by removing evidence of unauthorized credentials. Monitoring these events helps maintain visibility into credential changes and detect potential attempts at defense evasion.
References:
Usage
Run the detection in your terminal:
powerpipe detection run github_security_log_detections.detection.ssh_key_deletedSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe detection run github_security_log_detections.detection.ssh_key_deleted --shareSQL
This detection uses a named query:
select  tp_timestamp as timestamp,action as operation,fingerprint as resource,actor,tp_source_ip as source_ip,tp_id as source_id,*exclude (actor, timestamp)
from  github_security_logwhere  action = 'public_key.delete'order by  tp_timestamp desc;