microsoft / security-devops-azdevops

Microsoft Security DevOps extension for Azure DevOps.
MIT License
59 stars 14 forks source link

Tool randomly requires .net 8 now? #96

Closed Poltergeisen closed 4 months ago

Poltergeisen commented 5 months ago

Previously this was working, but without a breaking change this tool now requires .net 8?

Error message:

App: /home/vsts/work/_msdo/versions/Microsoft.Security.Devops.Cli.linux-x64.0.196.0/tools/Microsoft.Guardian.Cli
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: /opt/hostedtoolcache/dotnet

The following frameworks were found:
  3.1.32 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]
  6.0.26 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=ubuntu.22.04-x64
/home/vsts/work/_msdo/versions/Microsoft.Security.Devops.Cli.linux-x64.0.196.0/tools/guardian run -p azuredevops --rich-exit-code --logger-pipeline --export-file /home/vsts/work/1/a/.gdn/msdo.sarif --telemetry-environment azdevops
You must install or update .NET to run this application.

App: /home/vsts/work/_msdo/versions/Microsoft.Security.Devops.Cli.linux-x64.0.196.0/tools/Microsoft.Guardian.Cli
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: /opt/hostedtoolcache/dotnet

The following frameworks were found:
  3.1.32 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]
  6.0.26 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]

We had created this on a pipeline template that is shared across our entire org, and it's tough to have them bump versions every time .net updates. Are you planning on bumping major versions on the extension next time a new .net framework is added? Or is there an alternative solution we can add that will future-proof this step?

old-guy-coder commented 5 months ago

Just started seeing this as well in our pipelines, almost identical the OPs reported error

App: D:\a\_msdo\versions\Microsoft.Security.Devops.Cli.win-x64.0.196.0\tools\Microsoft.Guardian.Cli.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: C:\hostedtoolcache\windows\dotnet

The following frameworks were found:
  6.0.26 at [C:\hostedtoolcache\windows\dotnet\shared\Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=win10-x64
C:\Windows\system32\cmd.exe /D /S /C "D:\a\_msdo\versions\Microsoft.Security.Devops.Cli.win-x64.0.196.0\tools\guardian.cmd run -c D:\a\1\s/credscan.gdnconfig -p microsoft --categories all --tool credscan binskim --rich-exit-code --logger-pipeline --export-file D:\a\1\a\.gdn\msdo.sarif --telemetry-environment azdevops"
You must install or update .NET to run this application.

App: D:\a\_msdo\versions\Microsoft.Security.Devops.Cli.win-x64.0.196.0\tools\Microsoft.Guardian.Cli.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: C:\hostedtoolcache\windows\dotnet

The following frameworks were found:
  6.0.26 at [C:\hostedtoolcache\windows\dotnet\shared\Microsoft.NETCore.App]
wh1t3cAt1k commented 5 months ago

@davidknise my pipelines started failing randomly due to missing framework dependencies... I would have definitely expected a major version increase in such cases.

jimmybaldeond commented 5 months ago

Hi, I use OnPremise Agents, everything was working fine before Dec 8 2023. I had Net 6 installed on my agents, but now I have the next error after the update performed in Dec 8 2023:

/__w/_msdo/versions/Microsoft.Security.Devops.Cli.linux-x64.0.196.0/tools/guardian init --force You must install or update .NET to run this application.

App: /__w/_msdo/versions/Microsoft.Security.Devops.Cli.linux-x64.0.196.0/tools/Microsoft.Guardian.Cli Architecture: x64 Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64) .NET location: /usr/share/dotnet

The following frameworks were found: 6.0.24 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Then I had to install Net 8, but Now I have the next error:

[error]You must install or update .NET to run this application.

[error]App: /__w/_msdo/packages/nuget/Microsoft.Security.CredScan.2.5.1.13/lib/net6.0/CredentialScanner.dll

[error]Architecture: x64

[error]Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)

[error].NET location: /usr/share/dotnet/

[error]The following frameworks were found:

[error] 8.0.1 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

[error]Learn more:

[error]https://aka.ms/dotnet/app-launch-failed

[error]To install missing framework, download:

[error]https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=linux-x64&os=ubuntu.22.04

If we read properly, at the beginning the error requested me install Net 8, but Now requested me install Net 6. It's a madness.

reynoldsa commented 5 months ago

Hello, MSDO team here. We did not intend to require you to have the net8 runtime installed with 196. We've identified the issue and are working on a new release now.

reynoldsa commented 4 months ago

Update - v0.198.0 has been released. Your pipelines should use it automatically, and .NET 8 should once again not be required. The issue was due to the fact that our own build pipeline stopped emitting the packages as self-contained due to a toolchain behaviour change in .NET 8.