jfrog / jfrog-cli

JFrog CLI is a client that provides a simple interface that automates access to the JFrog products.
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
Apache License 2.0
531 stars 230 forks source link

jfrog xr audit-nuget support #1281

Closed roybensh closed 2 years ago

roybensh commented 2 years ago

Support for scanning locally for NuGet projects through the JFrog CLI

aitzubi commented 2 years ago

I would love to have this as well

talarian1 commented 2 years ago

@roybensh , @aitzubi JFrog CLI 2.13.0 includes support for auditing .NET projects. read more about the audit command here.

aitzubi commented 2 years ago

@roybensh , @aitzubi JFrog CLI 2.13.0 includes support for auditing .NET projects. read more about the audit command here.

Yes but it is not working for us. We configure Jfrog CLI 2.13.0 to connect to our Artifactory / XRay instance. We run 'jf.exe audit' in the local folder of the project and after a while we get an 'index out of range' error.

So we thought that it is not fully supported...

aitzubi commented 2 years ago

The exact error we are getting is 'panic: runtime error: index out of range [0] with length 0'

talarian1 commented 2 years ago

@aitzubi, sorry for the inconvenience. Could you please share with us the command output after setting the JFROG_CLI_LOG_LEVEL=DEBUG?

aitzubi commented 2 years ago

@talarian1 we get the same error. Log Level seems not to care about this as we get the same output with different parameter configurations.

It is a .Net6 project. This is what we are getting:

` 10:05:13 [Info] Detected: nuget, dotnet. panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]: github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit/nuget.buildNugetDependencyTree(0xc000190420) /root/go/pkg/mod/github.com/jfrog/jfrog-cli-core/v2@v2.10.1/xray/commands/audit/nuget/nuget.go:50 +0x4f3 github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit/nuget.(AuditNugetCommand).Run(0xc000240900) /root/go/pkg/mod/github.com/jfrog/jfrog-cli-core/v2@v2.10.1/xray/commands/audit/nuget/nuget.go:41 +0x5f github.com/jfrog/jfrog-cli-core/v2/common/commands.Exec({0xfd8798, 0xc000240900}) /root/go/pkg/mod/github.com/jfrog/jfrog-cli-core/v2@v2.10.1/common/commands/command.go:26 +0xad github.com/jfrog/jfrog-cli/scan.AuditNugetCmd(0xc00022f1d0) /var/jenkins_home/workspace/eco-system/release/jfrog-cli-release/temp/jfrog-cli/scan/cli.go:269 +0xc5 github.com/jfrog/jfrog-cli/scan.AuditCmd(0xc000178f20) /var/jenkins_home/workspace/eco-system/release/jfrog-cli-release/temp/jfrog-cli/scan/cli.go:182 +0x2f3 github.com/urfave/cli.HandleAction({0xd21120, 0xeb0250}, 0x5) /root/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:524 +0xa8 github.com/urfave/cli.Command.Run({{0xe58bd4, 0x5}, {0x0, 0x0}, {0xc00021bdb0, 0x1, 0x1}, {0xe8eb4d, 0x3c}, {0x0, ...}, ...}, ...) /root/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:173 +0x652 github.com/urfave/cli.(App).Run(0xc000134a80, {0xc000030060, 0x2, 0x2}) /root/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:277 +0x705 main.execMain() /var/jenkins_home/workspace/eco-system/release/jfrog-cli-release/temp/jfrog-cli/main.go:104 +0x307 main.main() /var/jenkins_home/workspace/eco-system/release/jfrog-cli-release/temp/jfrog-cli/main.go:68 +0x25 `

aitzubi commented 2 years ago

Sorry, I forgot to mention that this happens when we run 'jf audit' on our project. We tried both windows and linux (ubuntu) version 2.13.0 of Jfrog CLI

aitzubi commented 2 years ago

@talarian1 any news on this? Tried 2.14.00 and its still not working

eyalbe4 commented 2 years ago

@aitzubi, Thanks for following up on this. This will be included in the upcoming JFrog CLI patch. It'll be released by the end of this week, but possible sooner.

aitzubi commented 2 years ago

Works with 2.14.1. Thanks!!!

eyalbe4 commented 2 years ago

Great news! Thanks for sharing @aitzubi!