Replies: 2 comments
-
|
I have made an attempt at adding this feature myself here: #9627 |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Sorry for the late reply. Correct me if I’m wrong: To run a “regular” application, a compatible .NET Runtime must be installed on the machine. That means if I build a deps.json file, then update the .NET Runtime and build it again — That’s not ideal: But I understand your idea. So I suggest waiting for feedback from our users. Regards, Dmitriy |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When I publish a dotnet project using
dotnet publish --self-contained trueit will include some system libraries as dll files in the published directory. Trivy is filtering out these packages for non self-contained packages but there should be support for including these when they are packaged as self-contained.This has previously been discussed here: #7039
The solution at the time was to simply ignore these dependencies but I believe there is a solution for self-contained packages that could be added.
I created a sample dotnet project, added one library
YamlDotNetand published it as self-contained. Here is the generated deps.json.Looking inside the publish directory, it's inuding these dll files:
Using powershell I can get the version of the dll files. The
FileVersionhere matches thefileVersionin the deps.json undertargets.runtimepack.Microsoft.NETCore.App.Runtime.osx-arm64/9.0.1.runtime.I am able to determine the package is self contained if a type:
runtimepackexists under thelibrariessection in the deps.json file. Using this information Trivy could find the exact version of dll files packaged when the project is published as self-contained.Target
SBOM
Scanner
None
Beta Was this translation helpful? Give feedback.
All reactions