fix(security): return full variable name in sponge_filter_secrets

This commit is contained in:
2026-09-09 20:49:16 -04:00
parent c7d7cea8ae
commit a1cf06624e
+1 -1
View File
@@ -33,7 +33,7 @@
# set -U -a sponge_filters sponge_filter_secrets # set -U -a sponge_filters sponge_filter_secrets
function sponge_filter_secrets --argument-names command function sponge_filter_secrets --argument-names command
# Find all exported variables with security-sensitive names # Find all exported variables with security-sensitive names
set -l sensitive_vars (set --names --export | string match --regex -- \ set -l sensitive_vars (set --names --export | string match --entire --regex -- \
'(?i)(?:TOKEN|PASSWORD|PASSWD|SECRET|API[_-]KEY|PRIVATE[_-]KEY|ACCESS[_-]KEY|AUTH[_-]KEY|CREDENTIAL|KOPIA_PASSWORD)') '(?i)(?:TOKEN|PASSWORD|PASSWD|SECRET|API[_-]KEY|PRIVATE[_-]KEY|ACCESS[_-]KEY|AUTH[_-]KEY|CREDENTIAL|KOPIA_PASSWORD)')
for var in $sensitive_vars for var in $sensitive_vars