ossf / scorecard

OpenSSF Scorecard - Security health metrics for Open Source
https://scorecard.dev
Apache License 2.0
4.37k stars 481 forks source link

BUG-Scorecard fails to run #863

Closed bhuvi11 closed 3 years ago

bhuvi11 commented 3 years ago

Hello Team,

Description: I tried running scorecard using

  1. Docker When i run "docker run -e GITHUB_AUTH_TOKEN=ghp_7ta6StgyRpazkjmuSZF0Loe5WmRr3xxxxxx gcr.io/openssf/scorecard:latest --show-details --repo=github.com/bhuvi11/ecom-service/"

i get the below error `panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x148 pc=0x8a7286]

goroutine 84 [running]: github.com/ossf/scorecard/v2/clients/githubrepo.(searchHandler).search(0xc000267340, 0xc7b2a3, 0x14, 0x0, 0x0, 0xc792c8, 0x12, 0x4, 0x2, 0x3, ...) /src/clients/githubrepo/search.go:49 +0x126 github.com/ossf/scorecard/v2/clients/githubrepo.(Client).Search(0xc0002de360, 0xc7b2a3, 0x14, 0x0, 0x0, 0xc792c8, 0x12, 0xed8764f58, 0x0, 0x0, ...) /src/clients/githubrepo/client.go:121 +0x5a github.com/ossf/scorecard/v2/checks.codeQLInCheckDefinitions(0xc0002e2000, 0x5, 0x0, 0x0) /src/checks/sast.go:166 +0xc2 github.com/ossf/scorecard/v2/checks.SAST(0xc0002e2000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /src/checks/sast.go:44 +0x9f github.com/ossf/scorecard/v2/checker.(*Runner).Run(0xc0004f9e00, 0xd5a0d0, 0xc000694030, 0xcabfd8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /src/checker/check_runner.go:124 +0x2cf github.com/ossf/scorecard/v2/pkg.runEnabledChecks.func1(0xc000449ed0, 0xc0000327d0, 0xc6e5c8, 0x4, 0xd5a0d0, 0xc0002991d0, 0xc0000eef20, 0xc0000c4470, 0xc000299170, 0xd60078, ...) /src/pkg/scorecard.go:67 +0x24e created by github.com/ossf/scorecard/v2/pkg.runEnabledChecks /src/pkg/scorecard.go:60 +0x2e5`

  1. Go installation using Go installation i tried the below go get github.com/ossf/scorecard/v2 scorecard --repo i get the below error 2021/08/17 15:41:43 GitHub token env var is not set. Please read https://github.com/ossf/scorecard#authentication please help

Thanks in advance

azeemshaikh38 commented 3 years ago

Thanks for reporting this. Fixed through #864