MCPcopy Create free account
hub / github.com/anomalyco/opencode / envSecrets

Function envSecrets

packages/http-recorder/src/redaction.ts:43–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41const SAFE_ENV_VALUES = new Set(["fixture", "test", "test-key"])
42
43const envSecrets = () =>
44 Object.entries(process.env).flatMap(([name, value]) => {
45 if (!value) return []
46 if (!ENV_SECRET_NAMES.test(name)) return []
47 if (value.length < 12) return []
48 if (SAFE_ENV_VALUES.has(value.toLowerCase())) return []
49 return [{ name, value }]
50 })
51
52const pathFor = (base: string, key: string) => (base ? `${base}.${key}` : key)
53

Callers 1

secretFindingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected