Yes, for anything the agent tries through GateRook, but not through other paths. A DROP, TRUNCATE or DELETE sent through GateRook is a change, so by default it waits in Approvals, where you see the exact statement before anything runs. You can go further:
- Use a read-only endpoint: tools that change data stay Off there, and no change can run.
- Set
sql_executeto Off, or turn on Block DDL in Policies, soCREATE,ALTER,DROPandTRUNCATEare denied instead of waiting. - Connect with a database user that can't drop or delete anything.
sql_query runs only reads, in read-only transactions where the database supports them.
Limits: a destructive statement runs if you approve it or set its tool to Bypass, and GateRook can't undo it, so keep backups. GateRook also can't stop an agent that reaches the database another way, for example with psql and a password from your files. See credentials outside GateRook.