Skip to content

Commit

Permalink
Also redact AWS_SECURITY_TOKEN (aws#3560)
Browse files Browse the repository at this point in the history
Signed-off-by: Elliot Murphy <statik@users.noreply.github.com>
  • Loading branch information
statik authored and mergify[bot] committed Aug 7, 2019
1 parent 02ef2dc commit a81e560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk/lib/commands/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ function displayCdkEnvironmentVariables() {

function anonymizeAwsVariable(name: string, value: string) {
if (name === 'AWS_ACCESS_KEY_ID') { return value.substr(0, 4) + '<redacted>'; } // Show ASIA/AKIA key type, but hide identifier
if (name === 'AWS_SECRET_ACCESS_KEY' || name === 'AWS_SESSION_TOKEN') { return '<redacted>'; }
if (name === 'AWS_SECRET_ACCESS_KEY' || name === 'AWS_SESSION_TOKEN' || name === 'AWS_SECURITY_TOKEN') { return '<redacted>'; }
return value;
}

0 comments on commit a81e560

Please sign in to comment.