MCPcopy Create free account
hub / github.com/Noumena-Network/code / redactRemoteSessionEnvironmentVariables

Function redactRemoteSessionEnvironmentVariables

src/utils/teleport.tsx:139–148  ·  view source on GitHub ↗
(
  env: Record<string, string>,
)

Source from the content-addressed store, hash-verified

137}
138
139export function redactRemoteSessionEnvironmentVariables(
140 env: Record<string, string>,
141): Record<string, string> {
142 return Object.fromEntries(
143 Object.entries(env).map(([key, value]) => [
144 key,
145 /KEY|TOKEN|SECRET|PASSWORD/i.test(key) ? '<redacted>' : value,
146 ]),
147 );
148}
149
150/**
151 * Creates a system message to inform about teleport session resume

Callers 2

teleportToRemoteFunction · 0.85
teleport.test.tsFile · 0.85

Calls 1

entriesMethod · 0.80

Tested by

no test coverage detected