Skip to content

Redaction manipulates actual secrets in debug mode #334

@dkundel

Description

@dkundel

Actual Behavior

If you deploy a project with -l debug that contains any of these keywords here as names of environment variables

'authToken',
'apiSecret',
'username',
'password',
'cookies',
'AUTH_TOKEN',
'API_SECRET',
'TWILIO_AUTH_TOKEN',
'TWILIO_API_SECRET',

The environments variables will be uploaded as [REDACTED] instead.

Expected Behavior

The environment variables get uploaded the exact way they are referenced but the logs show them as [REDACTED].

How to Reproduce

twilio serverless:init sample
cd sample
echo "API_SECRET=something" >> .env
twilio serverless:deploy -l debug
twilio serverless:env:get --key API_SECRET
# shows [REDACTED]
twilio serverless:deploy
twilio serverless:env:get --key API_SECRET
# shows actual value something
# both should be "something"

Versions

Node.js: 12.22.1
@twilio/runtime-handler: 1.1.3
@twilio-labs/plugin-serverless: 2.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions