Documentation / Security
Secure database
You decide, connection by connection, what the agent can do in your database. Nothing writes without your approval.
On this page
Each connection in the database client has its own access policy for the agent. The IDE enforces it on every statement; the agent cannot change it.
The three levels
They are configured in the connection dialog, in the Agent access section.
| Level | What the agent sees and can do |
|---|---|
| No access | The agent does not see this connection. |
| Queries only (default) | Only SELECT, with a row limit. |
| Super permissions | Changes you choose, always with your approval. |
Super permissions
With Super permissions you check which kinds of statement are enabled:
| Checkbox | Statements |
|---|---|
| Modify data | INSERT, UPDATE, DELETE, MERGE |
| Change structure | CREATE, ALTER, DROP, TRUNCATE |
| Run code | PL/SQL blocks and procedures |
A statement of an unchecked kind is rejected: “This connection's super permissions don't include this kind of statement.”
Every statement is shown to you for approval and never runs in unattended mode. If the connection is marked as read-only, that overrides any agent permission.
How a write is approved
- The agent proposes the statement with the
yuli_db_executetool. - Yuli checks that the connection has Super permissions for that kind of statement.
- The “Run on the «name» database” card appears with the full statement.
- You approve or reject it. Without your approval, nothing runs.
The same applies in Subscription mode: if Claude Code, Kiro, Codex or Antigravity call yuli_db_execute, the card appears in Yuli.
Limits on the agent's queries
| Limit | Value |
|---|---|
| Maximum time per query | 45 seconds |
| Rows per query | Always limited, up to 1,000 (Max rows per query) |
| Expensive execution plans | A query is rejected when its plan estimates scanning more than 2 million rows under a sort, aggregation, join or DISTINCT. |
Yuli wraps every query with ROWNUM, TOP or LIMIT depending on the engine, so the row limit is always enforced.
The SQL console you use has its own limits: 500 rows by default, up to 100,000.
The agent's read-only session
The agent's reads never use your session. Yuli opens a session of its own for the agent and keeps it read-only with whatever each engine offers:
| Engine | How it is guaranteed |
|---|---|
| PostgreSQL | A READ ONLY session and, on top of that, every statement in a BEGIN READ ONLY … ROLLBACK. |
| MySQL and MariaDB | SET SESSION TRANSACTION READ ONLY and a read-only transaction rolled back on every statement. |
| SQL Server | ApplicationIntent=ReadOnly; every statement is rolled back. |
| Oracle | SET TRANSACTION READ ONLY on every statement, then a rollback. |
| DB2 | Autocommit off, everything rolled back and the access mode read-only. |
| SQLite | The file is opened read-only, with PRAGMA query_only = ON. |
| MongoDB | secondaryPreferred reads and a structural check of every command. |
| Redis and Cassandra | A structural check of every command. |
On top of that, Yuli checks every statement: a single one, a query, and no COMMIT, ROLLBACK, SAVEPOINT or AUTOCOMMIT.
The connection dialog tells you which level that engine reaches:
| Level | What the dialog shows |
|---|---|
| Session | "The agent reads on its own session, which the server keeps read-only." |
| Transaction | Every statement runs in a transaction that is always rolled back. |
| Checked | The engine has no read-only sessions, so Yuli checks every command by its structure. A read-only account reinforces it. |
Read-only account (optional)
On the connection you can set a Read-only account (optional), for example lector_yuli. When set, the agent's reads use that account instead of yours. Its password also goes to the system keychain.
It is the best defence for Redis and Cassandra, which have no read-only sessions: even if something slipped past the check, the server would reject it.
MongoDB and Redis: truly read-only
- MongoDB: Yuli parses each command by its structure, not by looking for words. It catches write stages even when hidden in nested pipelines (
$lookup.pipeline,$facet,$unionWith) and also$where. Anything it doesn't recognise is refused. - Redis: each command is classified the way the server itself does, with its read (
@read) and write (@write) flags.
No shortcuts through the terminal
The agent cannot use command-line database clients (sqlplus, sqlcl, sqlcmd, bcp, sqlite3, psql, mysql, mariadb, mongo, mongosh, isql, db2, impdp, expdp, rman and similar). That way, nobody bypasses the access policy.
Scripts that use drivers
A script that connects to a database through a driver (psycopg, pymysql, SQLAlchemy, pg, mysql2, mongodb, mongoose, JDBC, database/sql…) is not refused like a terminal client, but it doesn't run without you either: Yuli detects it in the command, in inline code (python -c, node -e, heredocs) and in the script's source, and asks you to approve it.
Sensitive columns
Your customers' data never reaches the agent in the clear. Yuli classifies each column as personal, financial, health, credential or none, and masks the classified ones in everything the agent reads.
By name, without AI
The classification is deterministic: it reads the column name with a lexicon, with no model and no tokens spent. It understands the conventions of legacy databases:
| Column | What Yuli understands |
|---|---|
fcNombre, prenom_client, nachname | First or last name, even with prefixes or in another language. |
fcApePat | Surname: prefix fc, abbreviation ape + pat. |
CLI_NOM_COMPLETO, nmbr | Full name, also abbreviated without vowels. |
strEmail, nuDocumento, fecNac, drccn | Email, ID document, date of birth, address. |
saldo, balance, accountbalance | Financial data. |
The lexicon covers Spanish, English, Portuguese, French, German and Italian, plus common abbreviations. And it uses context:
- The table:
nombreinclienteis personal data; inproducto, it isn't. - The type: a numeric
idApellidois a foreign key; a text one is a surname. - The prefixes of the table and the column.
Every verdict is explained, for example: "fcApePat → apellido (prefijo fc, abreviatura ape+pat)".
Categories and masking
| Category | What the agent receives |
|---|---|
| Personal data | A restorable marker with its type, or a stable pseudonym, depending on the project policy. |
| Financial | A marker or a pseudonym, like personal data. |
| Health | Nothing: the value is suppressed. |
| Credential | Nothing: the value is suppressed. |
| None | The value as is. |
Try the difference with fictional data:
You see
- id_cliente NUMBER(10)
- 104233
- fcnombre VARCHAR2(80)
- Lucía Ferrer Ortega
- email VARCHAR2(120)
- [email protected]
- telefono VARCHAR2(20)
- +34 600 11 22 33
- iban VARCHAR2(34)
- ES00 0000 0000 0000 0000
- saldo NUMBER(12,2)
- 18 420.75
- segmento VARCHAR2(12)
- PREMIUM
The agent receives
- id_cliente NUMBER(10)
- 104233
- fcnombre VARCHAR2(80)
- ⟦yuli:pii#1 type=NAME⟧
- email VARCHAR2(120)
- ⟦yuli:pii#2 type=EMAIL⟧
- telefono VARCHAR2(20)
- ⟦yuli:pii#3 type=PHONE⟧
- iban VARCHAR2(34)
- ⟦yuli:pii#4 type=IBAN⟧
- saldo NUMBER(12,2)
- ⟦yuli:pii#5 type=BALANCE⟧
- segmento VARCHAR2(12)
- PREMIUM
The Sensitive data panel
In Sensitive data you see each column with its category and its state: Suggested, Confirmed or Dismissed. You fix whatever needs it and press Analyse again when the schema changes.
If you want a second opinion, Review with the agent sends it only the names of doubtful columns, never their values.
Your decisions are saved in your configuration (db-column-catalog.json), per project and connection. Only names are stored, never values.
Team rules
So the whole team uses the same classification, Export rules produces a JSON file the others load with Import rules:
{
"format": "yuli-sensitive-rules",
"version": 1,
"exportedAt": "2026-10-27T10:00:00Z",
"rules": [
{ "schema": "ventas", "table": "cliente", "column": "fcApePat", "category": "pii", "state": "confirmado" }
]
}A file holds up to 50,000 rules. schema is optional. Category and state values are the engine's own keys (pii, financiero, salud, credencial, ninguna; sugerido, confirmado, descartado).
Passwords
Each connection's password is stored in the system keychain, never in the project. The agent's access policy is stored in your user configuration, outside the project, so a repository cannot grant itself permissions.
Best practices
- Keep Queries only on connections to shared environments.
- Use Super permissions only on your local or development database, and only with the kinds of statement you need.
- Mark connections to production as read-only.
- Set a Read-only account for the agent on shared connections.
- Export the Sensitive data rules and share them with the team.
- To explain or debug PL/SQL code, the agent does not need to write: reading the schema and the source code is enough.