MCPcopy Index your code
hub / github.com/codeaashu/claude-code / hasDangerousEnvVars

Function hasDangerousEnvVars

src/components/TrustDialog/utils.ts:218–225  ·  view source on GitHub ↗

* Check if settings have dangerous environment variables configured. * Any env var NOT in SAFE_ENV_VARS is considered dangerous.

(settings: SettingsJson | null)

Source from the content-addressed store, hash-verified

216 * Any env var NOT in SAFE_ENV_VARS is considered dangerous.
217 */
218function hasDangerousEnvVars(settings: SettingsJson | null): boolean {
219 if (!settings?.env) {
220 return false
221 }
222 return Object.keys(settings.env).some(
223 key => !SAFE_ENV_VARS.has(key.toUpperCase()),
224 )
225}
226
227/**
228 * Get which setting sources have dangerous environment variables configured.

Callers 1

Calls 2

keysMethod · 0.80
hasMethod · 0.45

Tested by

no test coverage detected