


Recently github.com dependabot complained that some dependencies in my project are vulnerable to DOS attacks and have "corrupt or risky Encryption Algorithm" and there is an "Uncontrolled Resource Consumption" error.
Specifically, it warned me about CVE-2022-27664 for the golang.org/x/net module, CVE-2022-27191 and CVE-2022-32149 for other modules.
What I did was run "go get -u" on all modules used. Obviously, this didn't solve the problem. Then I started using "go graph" to find module dependencies. It took a while and this is the order of dependencies I found:
google.golang.org/[email protected] => [email protected] => google.golang.org/[email protected] => github.com/envoyproxy/[email protected] => google.golang.org/[email protected] => golang.org/x/[email protected] => google.golang.org/[email protected] => golang.org/x/[email protected]
This means that the most modern and updated google.golang.org/api
packages from March 17, 2023 will result in golang.org/x/ from 2018 net
dependencies.
I found that other Google packages have a lot of dependencies on the old network module:
cloud.google.com/go/[email protected] golang.org/x/[email protected] github.com/googleapis/gax-go/[email protected] golang.org/x/[email protected] [email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected] google.golang.org/[email protected] golang.org/x/[email protected]
I checked the github.com/googleapis/google-api-go-client repository and found this issue https://github.com/googleapis/google-api-go-client/issues/1048
I said the same problem, but then user hashier
said that since the go list -m all
command shows the latest version, it's not a problem.
So, the main question is: is this a problem and why?
I just don't know what should be fixed here, github dependabot check or google-api-go-client module dependency.
Correct answer
It’s time to answer this question.
When I tried to check all the packages in the project one by one in a separate draft repository using go mod graph
, these vulnerable dependencies came from another repository: github .com/go-gorm/postgres
.
So, I incorrectly identified where the vulnerable dependency is coming from. Apparently this is due to the huge dependency graph:
[0] $ go mod graph | wc 667 1334 56113
If anyone is looking for a way to visualize project dependencies, here it is:
go mod graph | modgv | dot -Tsvg -o graph.svg
Back to the original question. This is caused by github.com/go-gorm/postgres
using an older version of go. As far as I understand, the only way to fix it is to upgrade the go version to 1.18. If the version is lower, go mod graph
will show many vulnerable packages.
The above is the detailed content of Golang: How to handle outdated dependency of google.golang.org/api on golang.org/x/net. For more information, please follow other related articles on the PHP Chinese website!

The article explains how to use the pprof tool for analyzing Go performance, including enabling profiling, collecting data, and identifying common bottlenecks like CPU and memory issues.Character count: 159

The article discusses writing unit tests in Go, covering best practices, mocking techniques, and tools for efficient test management.

This article demonstrates creating mocks and stubs in Go for unit testing. It emphasizes using interfaces, provides examples of mock implementations, and discusses best practices like keeping mocks focused and using assertion libraries. The articl

This article explores Go's custom type constraints for generics. It details how interfaces define minimum type requirements for generic functions, improving type safety and code reusability. The article also discusses limitations and best practices

The article discusses Go's reflect package, used for runtime manipulation of code, beneficial for serialization, generic programming, and more. It warns of performance costs like slower execution and higher memory use, advising judicious use and best

The article discusses using table-driven tests in Go, a method that uses a table of test cases to test functions with multiple inputs and outcomes. It highlights benefits like improved readability, reduced duplication, scalability, consistency, and a

OpenSSL, as an open source library widely used in secure communications, provides encryption algorithms, keys and certificate management functions. However, there are some known security vulnerabilities in its historical version, some of which are extremely harmful. This article will focus on common vulnerabilities and response measures for OpenSSL in Debian systems. DebianOpenSSL known vulnerabilities: OpenSSL has experienced several serious vulnerabilities, such as: Heart Bleeding Vulnerability (CVE-2014-0160): This vulnerability affects OpenSSL 1.0.1 to 1.0.1f and 1.0.2 to 1.0.2 beta versions. An attacker can use this vulnerability to unauthorized read sensitive information on the server, including encryption keys, etc.

This article explores using tracing tools to analyze Go application execution flow. It discusses manual and automatic instrumentation techniques, comparing tools like Jaeger, Zipkin, and OpenTelemetry, and highlighting effective data visualization


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Linux new version
SublimeText3 Linux latest version

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool