Skip to content

Stop serializing all environment variables#84

Merged
shime merged 10 commits intomasterfrom
feature/remove-env
Feb 23, 2016
Merged

Stop serializing all environment variables#84
shime merged 10 commits intomasterfrom
feature/remove-env

Conversation

@shime
Copy link
Copy Markdown
Contributor

@shime shime commented Feb 15, 2016

It's considered a security issue, since sensitive data may end up serialized.

it's considered a security issue, since sensitive data may end
up serialized
@kyrylo
Copy link
Copy Markdown
Contributor

kyrylo commented Feb 15, 2016

Is it currently possible to attach it manually instead?

@shime
Copy link
Copy Markdown
Contributor Author

shime commented Feb 15, 2016

Nope, this just stops the serialization.

@kyrylo
Copy link
Copy Markdown
Contributor

kyrylo commented Feb 15, 2016

It would be nice to allow attaching it if users need it
LGTM

@zefer
Copy link
Copy Markdown

zefer commented Feb 16, 2016

It would be nice to allow attaching it if users need it

+1. After this change, is there a way to configure sending these vars again, for those that may want to?

@shime
Copy link
Copy Markdown
Contributor Author

shime commented Feb 17, 2016

Made it customizable now.


## Features

* Automatically add `process.env` as well as other information when sending notifications
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"as well as other information" was a feature. Specifically what is the other information, is it useful to list this as a feature?

@zefer
Copy link
Copy Markdown

zefer commented Feb 17, 2016

Made it customizable now.

This feature is needs more thought. It seems that ENV var blacklisting was already possible. If we merged this PR as-is, it would be very unclear how we are supposed to control which ENV vars are being reported.

Do we need both whitelisting and blacklisting?

@shime
Copy link
Copy Markdown
Contributor Author

shime commented Feb 17, 2016

I think we only need whitelisting. It should be secure by default and allow users to specify which environment variables to send.

@zefer
Copy link
Copy Markdown

zefer commented Feb 18, 2016

That sounds good to me. Are you considering removing the existing blacklisting mechanism?

It would probably make this a minor or even a major release.

Can we make the API simple and documented clearly?

Any thoughts @kyrylo?

@shime
Copy link
Copy Markdown
Contributor Author

shime commented Feb 18, 2016

Removed the blacklisting mechanism and added documentation for whitelisting.

@kyrylo
Copy link
Copy Markdown
Contributor

kyrylo commented Feb 18, 2016

Removing blacklisting doesn't make a lot of sense to me. What if I only want to filter out passwords and credit cards? Why would I use whitelisting for that? For example, the existing Ruby notifier supports both techniques.

@shime
Copy link
Copy Markdown
Contributor Author

shime commented Feb 19, 2016

Added support for both whitelisting and blacklisting of environment variables, for maximum flexibility.

@kyrylo
Copy link
Copy Markdown
Contributor

kyrylo commented Feb 22, 2016

I think this mechanism should be global to most of the payload. Filtering is useful here, but it's also useful in some other places.

I am not sure if this should be merged in the present state because it looks like we still send all the env variables, but filter them, if any filters are present. So, by default, we still send sensitive info, don't we?

@shime
Copy link
Copy Markdown
Contributor Author

shime commented Feb 22, 2016

By default we don't send anything.

lib/airbrake.js Outdated
} else if (this.blackListKeys.length > 0){
Object.keys(process.env).forEach(function(key) {
if (self.blackListKeys.indexOf(key) > -1){
return;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about saying [Filtered] similar to what we already do in the Ruby notifier? It's more descriptive and lets the user know that it was filtered, not missed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, [FILTERED] is better.

shime pushed a commit that referenced this pull request Feb 23, 2016
Stop serializing all environment variables
@shime shime merged commit 9c6498c into master Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants