-
Notifications
You must be signed in to change notification settings - Fork 206
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
[BUG] Dependency vulnerabilities #1500
Comments
@matheus-inacio thanks for reporting. As an immediate workaround: I see it's caused by the MondoDb driver - have you considered referencing the This above is just a quick idea as a workaround - we'll look int the specific issue as well. |
On the surface, it seems like this issue might be better directed to MongoDB, since it is the driver that has the dependency? |
It seems that the latest stable version of the MongoDB .net driver is 2.13.1 and the APM project seem to be using version 2.4.4 (that apparently is a 2017 version). https://github.com/mongodb/mongo-csharp-driver/releases I think that the dependencies are probably already up-to date in a more recent version of the driver. |
Good point @matheus-inacio. This one's a little awkward with how Elastic.Apm.NetCoreAll is intended to work. Elastic.Apm.NetCoreAll takes dependencies on all other packages that can subscribe diagnostic listeners, which includes Elastic.Apm.MongoDb, and subscribes listeners, so that if an application uses one of the services for which a listener is subscribed, then traces will be captured automatically for them. If a user is using MongoDb in their application, I think it's reasonable to expect that the package would be kept up to date, and be a newer version than ones which reference a dependency with a reported vulnerability. In this case, binding redirects will allow the integration to simply work with the new version, assuming compatibility (binary, API, etc). If a user is not using MongoDb in their application, then the version with the reported vulnerability will be pulled in, which is undesirable. I see a few approaches to address:
These approaches aren't mutually exclusive 🙂 Option 1 looks to me to be the most immediate action we can take to address this. |
With dotnet retire deprecated, I thought I'd see what
|
Short summary: In the agent we always target the lowest possible version of a given library, but that does not mean that specific version must be loaded at runtime. Typically, user code can depend on a newer version and the agent will be happy with it, it won't force the older version (the specific one the agent depends on) to be loaded. So I feel these reports are false positive and the solution is to just update the application to a newer version (in this case MongoDb) and then the version with the vulnerability won't get loaded. At the same time with this approach the agent can target the oldest possible version and maximize the list of supported versions. |
APM Agent version
Higher than 1.9.0
Environment
.NET 5 :
Describe the bug
In our company we make use of a tool called DotNetRetire (https://github.com/RetireNet/dotnet-retire) in our CI pipeline.
Since version 1.9.0 of the Elastic.Apm.NetCoreAll we have not been able to upgrade the dependency packges because of the following security issues:
PS.: I have sended an email about this to [email protected] a while back, but got no response. 😞
To Reproduce
Runing the C.I. with the use of the DotNetRetire
The text was updated successfully, but these errors were encountered: