Полный продовый фикс fix22: DNS preflight, inet firewall, idempotent bootstrap, auth-semantics и redact-config
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
export function redactKeyValueSecrets(content: string): string {
|
||||
return content.replace(
|
||||
/^([A-Z0-9_]*(PASSWORD|PASS|SECRET|TOKEN)[A-Z0-9_]*=).*$/gm,
|
||||
"$1<redacted>"
|
||||
);
|
||||
}
|
||||
|
||||
export function redactEnv(content: string): string {
|
||||
return redactKeyValueSecrets(content);
|
||||
}
|
||||
|
||||
export function redactYaml(content: string): string {
|
||||
return content
|
||||
.replace(/(password:\s*).*/gi, "$1<redacted>")
|
||||
.replace(/(secret:\s*).*/gi, "$1<redacted>")
|
||||
.replace(/(auth:\s*).*/gi, "$1<redacted>");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user