Policy library

Block bulk deletes

Covers: Any industry (data integrity)

Use in VulnifyOpens in monitor mode by default. Nothing is created until you click Apply.

What it does

Blocks any delete that touches more than 100 records in one action, so a looping agent cannot wipe a table.

Default mode in this template: ENFORCE. The “Use in Vulnify” link preselects monitor mode; you can switch to enforce before applying.

Policy

Policy JSON (API)
{
  "name": "block-bulk-delete",
  "description": "Blocks any delete that touches more than 100 records in one action, so a looping agent cannot wipe a table.",
  "enabled": true,
  "action": "DELETE",
  "condition": {
    "minRecords": 101
  },
  "decision": "BLOCK",
  "mode": "ENFORCE"
}
Policy YAML (CLI policy file)
apiVersion: vulnify.io/v1
kind: Policy
metadata:
  name: block-bulk-delete
spec:
  description: "Blocks any delete that touches more than 100 records in one action, so a looping agent cannot wipe a table."
  enabled: true
  action: DELETE
  condition:
    minRecords: 101
  decision: BLOCK
  mode: ENFORCE

Example test cases

CaseInputExpected decision
agent deletes 10,000 rows{"agent":"example-agent","action":"DELETE_DATA","resource":"orders-db","recordsAffected":10000}BLOCK

Try this template on your own agents, in monitor mode first.

Use in Vulnify