settings.json

httpHookAllowedEnvVars

型string[]記述場所どの設定ファイルでも可

HTTP フックがヘッダーに挿入することを許可する環境変数名の許可リスト。

記述例

{
  "httpHookAllowedEnvVars": ["MY_TOKEN", "HOOK_SECRET"]
}

使い方・用途

  • HTTP フック実行時に、認証トークンやシークレットなどの機密情報を含む環境変数を安全に参照・利用できるように制御します。
英語原文(公式ドキュメントより)

Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. Undefined = no restriction. Arrays merge across settings sources. See https://code.claude.com/docs/en/settings#hook-configuration

関連ドキュメント

関連する変更履歴

v2.1.267(1件)

Fixed
マネージド設定の allowedHttpHookUrls、httpHookAllowedEnvVars、allowedChannelPlugins が読み取れない場合に、何でも許可してしまう動作を修正し、何も許可しないようにした。
英語原文を表示
Fixed managed allowedHttpHookUrls, httpHookAllowedEnvVars and allowedChannelPlugins to admit nothing, not everything, when unreadable

関連ドキュメント