question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to remove sensitive information (ex: passwords) from the output

See original GitHub issue

Hi guys,

I have one migration to create a user on Postgres:

var pass = Environment.GetEnvironmentVariable("GENERATED_PASSWORD");
Execute.Sql($"CREATE USER bob WITH PASSWORD '{pass}';");

The output of this migration would be:

-------------------------------------------------------------------------------
1: _001_Change_MasterUser migrating
-------------------------------------------------------------------------------
Beginning Transaction
ExecuteSqlStatement CREATE USER bob WITH PASSWORD 'jw8s0F4dkjskfjkjsdfahu38**3e;;d';
Committing Transaction
1: _001_Change_MasterUser migrated

We use this for our pipelines, we let the developers create databases on-demand in lower environments but we take control of the password for the production ones.

For that reason, we don’t want the new password to be exposed in the log files.

Is there a way to achieve this?

Expected benefit Sensitive information is not exposed in log files.

Tks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
andrecarluccicommented, May 29, 2020

Hi guys! Sorry about the delay. I guess we are all busy these days 😃 @pergardebrink PR should solve my problem for now. Thanks a lot!

0reactions
jzabroskicommented, Jun 8, 2020

@andrecarlucci @pergardebrink Fixed in 3.2.7 released this morning. Thank you for your help and bringing this to my attention and coming up with a simple, elegant solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove sensitive files and their commits from Git history
Changing your passwords is a good idea, but for the process of removing password's from your repo's history, I recommend the BFG Repo-Cleaner,...
Read more >
Javascript: remove sensitive data from memory
I recently took a heap snapshot of my browser after clicking trough the browser version of 1password. To my surprise the passwords of...
Read more >
postgresql - How do I hide sensitive information like ...
I've seen this, which states you can use an md5 hash of the password, but then the hash is also in the clear....
Read more >
How to get rid of this pop up of "Enter password Because ...
How to get rid of this pop up of "Enter password Because you're accessing sensitive info, you need to verify your password" because...
Read more >
How To Remove Personal Information From Internet Sources ...
We've created a comprehensive guide to removing personal information from the internet so that you can enjoy a less invasive online experience.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found