Azure / azqr

Azure Quick Review

Home Page:https://azure.github.io/azqr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid memory address or nil pointer dereference in DiagnosticSettingsScanner

MarinoValentino opened this issue · comments

commented

Expected Behavior

I expect some output when running the azqr scan command

Actual Behavior

[Jul 21 16:12:41.697290] Retry: response 400
[Jul 21 16:12:41.697305] Retry: exit due to non-retriable status code
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x84c611]

goroutine 1 [running]:
github.com/Azure/azqr/internal/scanners.(*DiagnosticSettingsScanner).ListResourcesWithDiagnosticSettings(0xc0002e8a60)
/home/runner/work/azqr/azqr/internal/scanners/diagnostics_settings.go:46 +0xf1
github.com/Azure/azqr/cmd/azqr.scan(0x8b1486?, {0xc00031d8a8, 0x1c, 0x128e29d?})
/home/runner/work/azqr/azqr/cmd/azqr/scan.go:224 +0xd12
github.com/Azure/azqr/cmd/azqr.glob..func24(0x1b47ca0?, {0xc0001ebd70?, 0x3?, 0x3?})
/home/runner/work/azqr/azqr/cmd/azqr/scan.go:102 +0x5c8
github.com/spf13/cobra.(*Command).execute(0x1b47ca0, {0xc0001ebd10, 0x3, 0x3})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x1b47400)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/Azure/azqr/cmd/azqr.Execute()
/home/runner/work/azqr/azqr/cmd/azqr/root.go:36 +0x39c
main.main()
/home/runner/work/azqr/azqr/cmd/main.go:11 +0x17

Steps to Reproduce the Problem

./azqr scan -s *SubscriptionID* --debug

For some reason you are getting an error 400.

  • Can you please run: azqr -v and share the version you are using (Seems it's not the latest).
  • Upgrade if needed
  • And set the AZURE_SDK_GO_LOGGING environment variable to all, repeat the scan and share the full log.

Thanks

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.