Databricks Repeated Access to Secrets
Description
Detects repeated secret access (≥10 times in 60 minutes) which may indicate credential harvesting or unauthorized secret enumeration.
Query · python
from panther_databricks_helpers import SYSTEM_USERS, databricks_alert_context
def rule(event):
if event.get("actionName") != "getSecret":
return False
# Filter out system users
user = event.deep_get("userIdentity", "email", default="")
return user not in SYSTEM_USERS
def dedup(event):
user = event.deep_get("userIdentity", "email", default="unknown")
return f"secret_access_{user}"
def title(event):
user = event.deep_get("userIdentity", "email", default="Unknown User")
scope = event.deep_get("requestParams", "scope", default="Unknown Scope")
return f"Repeated secret access by {user} in scope {scope}"
def alert_context(event):
return databricks_alert_context(
event,
additional_fields={
"secret_scope": event.deep_get("requestParams", "scope"),
"secret_key": event.deep_get("requestParams", "key"),
},
)
Analyst notes
- Query audit logs for all secret access by this user in the past 24 hours to identify patterns
- Check if the accessed secrets were used in API calls or notebook execution in the 6 hours after access
- Find all users with high secret access rates in the past 7 days to establish baseline