-
Notifications
You must be signed in to change notification settings - Fork 567
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: fetch patch ignoring command line arguments #813
Conversation
c39c42e
to
f060530
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Can you please just check the situation around deleted test?
@@ -1,89 +0,0 @@ | |||
var test = require('tap').test; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this test being migrated. Is it desired?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's covered by the new request.test.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. And could we get back all the cases describe in https://github.com/snyk/snyk/pull/813/files#diff-f932f6df5ce16fc0d2438970c1daabd0L39? Or do you think it's not necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I can add tests using http_proxy and no_proxy
f060530
to
1d45215
Compare
BST-889 Fetch patch was making http requests by using needle directly Changed to use lib request which uses command line arguments when invoking needle Added tests for lib request Changed fetch patch fail test to typescript Removed patch fetch proxy test (now covered by lib request test) Added @types/sinon devDependency to help write test with sinon assertions and matchers
1d45215
to
c7bcc89
Compare
🎉 This PR is included in version 1.234.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
BST-889
Fetch patch was making http requests by using needle directly
Changed to use lib request which uses command line arguments when invoking needle
Added tests for lib request
Changed fetch patch fail test to typescript
Removed patch fetch proxy test (now covered by lib request test)
Added @types/sinon devDependency to help write test with sinon assertions and matchers
What does this PR do?
Fix issue when snyk protect run as part of snyk wizard and doesn’t keep the --insecure flag
Module fetch-patch was using needle directly
I've changed to use lib/request which handles command line arguments like --insecure
How should this be manually tested?
Run
DEBUG=* snyk wizard --insecure
against a project where a patch can be applied. Notice that fetch patch does not use insecure flag and should result in needle using rejectUnauthorized option.What are the relevant tickets?
BST-889
Screenshots