Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

Use unsafe data when logging to stdout #50

Merged
merged 2 commits into from
Oct 9, 2017
Merged

Use unsafe data when logging to stdout #50

merged 2 commits into from
Oct 9, 2017

Conversation

FokkeZB
Copy link
Contributor

@FokkeZB FokkeZB commented Oct 4, 2017

When running zapier test --debug it can be very frustrating to have censored logs and IMHO as long as no hacker is peeking over your shoulder we should be fine logging unsafe data to the console.

I'm not sure if we can also use unsafe data for options.logBuffer && data.log_type === 'console' at https://github.com/zapier/zapier-platform-core/pull/50/files#diff-0936f4d83f660e8d3b1ba19e2225e4c6R114.

I'm also not sure how to best test this. Can we capture stdout in a test to verify it's unsafe?

@FokkeZB FokkeZB self-assigned this Oct 4, 2017
Copy link
Member

@bryanhelmig bryanhelmig left a comment

Choose a reason for hiding this comment

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

Yeah makes perfect sense to me!

@FokkeZB
Copy link
Contributor Author

FokkeZB commented Oct 5, 2017

@BrunoBernardino any thoughts on a test for this before I merge?

@BrunoBernardino
Copy link
Contributor

Awesome stuff @FokkeZB ! I'd just add a test to make sure we're logging the data censored (if there isn't one already). The uncensored version is harder and less important to test for, since it should happen on console. Does that make sense?

@FokkeZB
Copy link
Contributor Author

FokkeZB commented Oct 9, 2017

@BrunoBernardino we have existing tests for that which still pass so 👍
https://github.com/zapier/zapier-platform-core/blob/master/test/logger.js#L97

@BrunoBernardino
Copy link
Contributor

Awesome, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants