Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: avoid printing TOTP to output when publishing #31

Merged
merged 1 commit into from
Nov 10, 2018

Conversation

not-an-aardvark
Copy link
Member

This prevents the npm 2FA code from being printed to standard output. As a result, an attacker who had compromised an npm access token and also had access to build output would no longer be able to obtain a TOTP and use it in the next 30 seconds.

I tested this by generating a release locally and then running npm run publish-release. As expected, the TOTP was redacted in the output (and then the release failed without doing anything because I supplied an invalid access token for the test).

This prevents the npm 2FA code from being printed to standard output. As a result, an attacker who had compromised an npm access token and also had access to build output would no longer be able to obtain a TOTP and use it in the next 30 seconds.
Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

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

LGTM. Good idea!

@not-an-aardvark not-an-aardvark merged commit 1f776d1 into master Nov 10, 2018
@not-an-aardvark not-an-aardvark deleted the no-print-totp branch November 10, 2018 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants