cloudposse-archives / tfmask

Terraform utility to mask select output from `terraform plan` and `terraform apply`
https://cloudposse.com/accelerate
Apache License 2.0
202 stars 27 forks source link

Support multiple quotes in sensitive data #9

Closed spr-mweber3 closed 4 years ago

spr-mweber3 commented 4 years ago

We had the case, that sensitive data wasn't masked correctly. We have a Docker config JSON which contains multiple quotes in a field.

Example:

{\"auths\":{\"https://some-registry.io\":{\"username\":\"docker-pull\",\"password\":\ would result in => "**"auths\":{\"https://some-registry.io\":{\"username\":\"docker-pull\",\"password\":\ now results in => "*******************************************************************************************"

This PR fixes this. Provided tests have been run.

spr-mweber3 commented 4 years ago

@osterman Is this interesting for you?

osterman commented 4 years ago

@spr-mweber3 seems reasonable.