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

fix: protect failing due to missing auth #550

Merged
merged 1 commit into from
Jun 4, 2019

Conversation

orsagie
Copy link
Contributor

@orsagie orsagie commented Jun 3, 2019

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Fixes issue where snyk protect fails due to missing api token.

The change was reverted here: #549

This change fixes the underlying issue, and adds a test to make sure protect auth behaviour is as expected.

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

What are the relevant tickets?

Screenshots

Additional questions

@orsagie orsagie requested a review from lili2311 June 3, 2019 11:59
@orsagie orsagie self-assigned this Jun 3, 2019
@lili2311
Copy link
Contributor

lili2311 commented Jun 3, 2019

Please include the original commit in this PR as well?

@orsagie orsagie force-pushed the fix/api_token_refactor branch 2 times, most recently from 44b351d to 892538c Compare June 3, 2019 12:59
@dkontorovskyy dkontorovskyy force-pushed the fix/api_token_refactor branch 2 times, most recently from a8c8439 to d5de27a Compare June 3, 2019 13:19
src/cli/index.ts Outdated Show resolved Hide resolved
src/lib/errors/missing-api-token.ts Show resolved Hide resolved
test/acceptance/protect.test.ts Outdated Show resolved Hide resolved
@dkontorovskyy dkontorovskyy force-pushed the fix/api_token_refactor branch 2 times, most recently from 2cb3c29 to 66746dd Compare June 3, 2019 13:51
@CLAassistant
Copy link

CLAassistant commented Jun 3, 2019

CLA assistant check
All committers have signed the CLA.

src/lib/index.js Show resolved Hide resolved
test/acceptance/protect.test.ts Show resolved Hide resolved
@dkontorovskyy
Copy link
Contributor

@kyegupov @lili2311 changes applied

Copy link
Contributor

@kyegupov kyegupov left a comment

Choose a reason for hiding this comment

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

good with minor comments

test/cli.test.js Outdated Show resolved Hide resolved
@lili2311
Copy link
Contributor

lili2311 commented Jun 4, 2019

tested locally:

  • protect ok with no auth
  • test fails without auth, then after auth OK

@dkontorovskyy dkontorovskyy merged commit 1668cef into master Jun 4, 2019
@dkontorovskyy dkontorovskyy deleted the fix/api_token_refactor branch June 4, 2019 11:06
@snyksec
Copy link

snyksec commented Jun 5, 2019

🎉 This PR is included in version 1.172.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

6 participants