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

[main] Fix CVEs reported by trivy scanner. #136

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

blackpiglet
Copy link
Contributor

Fix CVEs reported by trivy scanner.
Add GOPROXY in Dockerfile and Makefile.

Signed-off-by: Xun Jiang blackpiglet@gmail.com

Fix CVEs reported by trivy scanner.
Add GOPROXY in Dockerfile and Makefile.

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>

replace (
golang.org/x/net => golang.org/x/net v0.0.0-20220906165146-f3363e06e74c
golang.org/x/text => golang.org/x/text v0.3.8
Copy link
Contributor

@reasonerjt reasonerjt Dec 5, 2022

Choose a reason for hiding this comment

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

why not pin to 0.3.8 in the require section?

Copy link
Collaborator

@sseago sseago Dec 5, 2022

Choose a reason for hiding this comment

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

@reasonerjt Sometimes the replace is necessary due to embedded/indirect dependencies -- indirect deps might call for specific (older) versions. I haven't verified that it's needed here. The problem with replace CVE fixes is that we tend to forget to remove them later when we really need newer versions than the replace, which means it ends up downgrading instead of upgrading the dep.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I follow a previous Azure CVE fix PR to use the replace directive instead of require, and I think maybe using replace for indirect refereced module is more intuitive, although require directive should also work here.

I agree. We should at least go through the module file per release. The replace or require would grow out of date by time, then seperating them from the require section into replace is more helpful to distinguish.

@sseago sseago merged commit 2559c62 into vmware-tanzu:main Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants