scrubbing sensitive information

Not ready to be merged. Still waiting on a spec to be finalised. Thoughts about what I have not considered or possible edge cases are appreciated. 

I think that this function should cover most of the exposed credentials that a look at sentry revealed to me, but I am sure I have missed something!