Concedere a Claude Code l'accesso in sola lettura alla mia installazione self-hosted?

I have Claude Code and I’d like to make the best use possible of it to assist me in setting up and managing my install. I do not want to give it any kind of write access. Is there a way to give it SSH access to my Discourse install with only read permissions? Same with the database? And to forbid access to anything “security/confidential” on the server? Seems to me it would be much more efficient if I can give it this kind of access, rather than have it read web pages, dig through SQL dumps (btw, come to think of it: do those contain anything sensitive security-wise? I imagine they do), give it screenshots or copy-paste settings and error messages…

Is anybody doing this kind of thing?

Sì, puoi creare un utente SSH con accesso in sola lettura e permettere a Claude Code di utilizzarlo… questo protegge da modifiche non autorizzate, ma sarà comunque in grado di leggere informazioni sensibili.

La tua immaginazione è corretta! Il contenuto dei messaggi privati, le password hashate, gli indirizzi IP, le chiavi API, ecc… molte cose.

È più semplice creare un sito duplicato senza dati sensibili, con la stessa configurazione, e utilizzarlo come sandbox. Ci sono dei compromessi perché dovresti mantenere un sito separato e tenere la configurazione sincronizzata, e a volte potresti essere in grado di riprodurre un problema solo in produzione, ma è il metodo più sicuro.

Hai ragione a essere prudente… anche la nostra politica di sicurezza del team di Discourse ci impone questa limitazione; non possiamo permettere a un LLM di accedere ai database di produzione.