( env: Record<string, string>, )
| 137 | } |
| 138 | |
| 139 | export 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 |
no test coverage detected