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

feat(installer): Don't use hashicorp/go-getter #392

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

jjustin
Copy link
Contributor

@jjustin jjustin commented Feb 27, 2024

Why

Here is a bit of a story behind the provided changes:
We are using https://osv.dev/ to find the vulnerable packages in a project that uses pact-go. One of the vulnerable packages is github.com/aws/aws-sdk-go, which is an indirect dependency brought into our project by pact-go.
pact-go gets the aws-sdk-go package from github.com/hashicorp/go-getter.
Here is some more info on the vulnerability: https://osv.dev/vulnerability/GO-2022-0646. It's a vulnerability that pact-go is not affected with.

Out of curiosity I've looked into where go-getter is used and noticed that it's only usage is to download the library file, yet it brings A LOT of dependencies into the project (over 90% of the go.sum file).

Dropping the usage of go-getter should greatly reduce the dependency tree and make the build smaller

Changes

drop the usage of go-getter and use stdlib's net/http to download the file and compress/gzip to extract the file.

Drop the usage of github.com/hashicorp/go-getter module for downloading
the library
@mefellows
Copy link
Member

Sorry I lost track of this one, reviewing this now.

@mefellows mefellows merged commit b3b85cc into pact-foundation:master Apr 22, 2024
1 check passed
@mefellows
Copy link
Member

Thanks for this - will release this in the next version.

@jjustin
Copy link
Contributor Author

jjustin commented Apr 24, 2024

Thanks for taking a look at this

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.

2 participants