Detection: GPG Key Deleted
Overview
Detect when a GPG key is removed from a GitHub account. While this may be part of normal key rotation, attackers may delete trusted GPG keys to prevent legitimate developers from signing commits or to replace them with their own keys. Monitoring these events helps ensure the authenticity of code contributions and detect potential tampering.
Usage
Run the detection in your terminal:
powerpipe detection run github_security_log_detections.detection.gpg_key_deleted
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe detection run github_security_log_detections.detection.gpg_key_deleted --share
SQL
This detection uses a named query:
select tp_timestamp as timestamp,action as operation,concat('https://github.com/', user) as resource,actor,tp_source_ip as source_ip,tp_id as source_id,*exclude (actor, timestamp)
from github_security_logwhere action = 'gpg_key.destroy'order by tp_timestamp desc;