Claude Code に自己ホスト環境への読み取り専用アクセスを与えることは可能ですか?

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?

はい、読み取り専用の SSH ユーザーを作成し、Claude Code にそれを使用させることができます。これにより不正な変更を防ぐことができますが、機密情報の読み取りは可能になります。

おっしゃる通りです!個人メッセージの内容、ハッシュ化されたパスワード、IP アドレス、API キーなど、多くの情報が含まれています。

より安全な方法として、機密データを含まない複製サイトを同じ構成で作成し、サンドボックスとして使用するのが簡単です。別サイトを維持して構成を同期させる必要があるためトレードオフはありますが、本番環境でのみ問題を再現できる場合もあるなど、いくつかの欠点もあります。それでも最も安全な方法です。

慎重であるのは正しい判断です。Discourse チームのセキュリティポリシーも同様にこれを制限しており、LLM に本番データベースへのアクセスを許可することはできません。