Splunk
monitoring.splunk
Protects against destructive Splunk CLI/API operations like index removal and REST API DELETE calls
- 4blocking rules
- 3safe patterns
- 2Critical
- 2High
[packs]
enabled = ["monitoring.splunk"]Evaluated when a command contains splunk.
Blocking rules
Each rule ID is monitoring.splunk:<name>. Use it in allowlists and [policy.rules].
Criticalsplunk-clean-eventdatasplunk clean eventdata permanently deletes indexed data.
Explanation
Clean eventdata permanently removes all events from the specified index. This cannot be undone. Use this only when you're certain the data is no longer needed. Safer alternatives: - Set retention policies for automatic cleanup - Export data before cleaning - Use splunk search to verify what will be deleted
Criticalsplunk-remove-indexsplunk remove index deletes an index and its data permanently.
Explanation
Removing a Splunk index permanently deletes all indexed data within it. Historical logs, events, and metrics are irretrievably lost. Any searches, dashboards, or alerts referencing this index will fail. Safer alternatives: - splunk list index: Review index before removal - Archive the data before deletion - Use retention policies instead of manual deletion
Highsplunk-api-deleteSplunk REST DELETE calls can permanently remove objects. Verify the endpoint.
Explanation
Direct API DELETE calls to Splunk services can remove indexes, saved searches, dashboards, alerts, and other objects without confirmation. Safer alternatives: - GET the resource first to verify the object - Use Splunk CLI or web UI for better feedback - Export configuration before deletion
Highsplunk-delete-user-rolesplunk delete user/role removes access configurations. Verify before deleting.
Explanation
Deleting a user removes their access and any saved searches or dashboards owned by them. Deleting a role affects all users assigned to it, potentially breaking access controls. Safer alternatives: - splunk list user/role: Review before deletion - Disable the user instead of deleting - Reassign role capabilities before deletion
Safe patterns
Checked first. A command that matches one is never blocked by this pack.
splunk-listsplunk-showsplunk-search