How to Configure Devin Snowflake Prevent Delete

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up a devin snowflake prevent delete rule, assign a custom database role. This role must exclude delete and drop permissions on your data tables. Engineering teams often give AI agents broad workspace roles to speed up initial testing. Overly broad permissions let an autonomous agent remove production rows or drop critical schemas by mistake. How to set up devin snowflake prevent delete with native roles Snowflake manages data permissions through role-based rules. Admins create a dedica

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

To set up a devin snowflake prevent delete rule, assign a custom database role. This role must exclude delete and drop permissions on your data tables. Engineering teams often give AI agents broad workspace roles to speed up initial testing. Overly broad permissions let an autonomous agent remove production rows or drop critical schemas by mistake.

How to set up devin snowflake prevent delete with native roles

Snowflake manages data permissions through role-based rules. Admins create a dedicated role just for the AI agent. They grant usage permissions on the warehouse, database, and schema to this specific role. Next, they grant select, insert, and update rights on the permissions tables. They leave out the delete, truncate, and drop privileges during this step.

After the role is ready, the team creates a service user for Devin. They assign the restricted role as the default option for that service user. Devin then uses those credentials to start a database session and run tasks. If the agent tries to run a delete statement, the database engine blocks it. This native setup keeps core data safe from accidental removal during automated coding runs.

Why role permissions alone leave operational gaps

Native database roles solve the basic problem of who can log in and modify tables. They work well when an agent only needs to read data or add new rows. Still, static role permissions apply to the entire session from start to finish. They do not inspect what individual statements or commands try to do in flight.

An agent with update rights can still overwrite every row in a table with blank values. A bad update query without a filter clause can ruin data just like a delete command. Also, static credentials stored in agent settings stay active until an admin rotates them. Teams often need a way to pause risky queries for human review before they run.

Snowflake Access Control + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Managing sensitive data during autonomous agent sessions

Blocking destructive queries is only one part of safe database management for AI tools. Autonomous agents also read large amounts of table data to debug code and build features. When an agent runs a select query, the results might contain sensitive customer details. This data often includes emails, phone numbers, card numbers, or national IDs.

Database admins can build native masking policies on specific columns to protect these fields. Data masking rewrites matched fields in query results before they reach the agent workspace. Maintaining these rules across dozens of schemas takes constant manual work from the data team. When teams add new tables, they must remember to attach the right masking rules right away.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Can Snowflake block delete statements for a specific AI user?

Yes, admins can create a custom role that only grants select, insert, and update privileges. Assigning this role to the AI user stops it from running delete or drop commands.

What happens if an agent has ownership of a staging schema?

Schema ownership gives the role full control over every table inside that specific schema. The agent can drop tables or delete rows there even without global delete permissions.

Does blocking delete commands stop all accidental data loss?

No, an agent with update permissions can still overwrite valid records with null values. Teams must also watch out for broad update statements that lack proper row filters.

The query runs. The emails stay hidden.