Security is an interesting challenge.
The way we approach it is that we assume the LLM will spit out actions that are wrong or harmful. So everything needs to be handled with old school permissions.
Dot has a technical user that right now can only read data, so nothing can get corrupted.
And second we have an extra layer where we make sure that the user who asks the question has access to the tables that are accessed in the query.