144
least privilege
The token, the database user, and the process can do only the one job. Admin is not the default.
What is least privilege?
Least privilege means each actor gets the minimum permissions that make its task possible. A web server does not connect as a database superuser. A CI job that deploys static files does not hold the production database password.
Why does least privilege matter when vibe coding?
Models use the root connection string from the tutorial for the app, the migration, and the script. One bug is total loss. Name the role per task.
How do you do least privilege?
Separate credentials: migrate, runtime, read-only reports. Runtime cannot drop tables. Tokens are scoped. Review a new credential by asking what it should not do.
How do you ask a model for least privilege?
Apply least privilege. The app’s database role can only (read/write these tables). It cannot drop, grant, or read other schemas. Do not reuse the admin credential at runtime.
What goes wrong with least privilege?
A “limited” role that owns the schema, which means it can alter anything it owns. Ownership is privilege.