jfrog / jfrog/jfrog-cli-security
panic: runtime error: invalid memory address or nil pointer dereference
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13
- Forks
- 50
- Avg merge
- 3d 48m
- Merged PRs (30d)
- 26
Description
Last week it was fine, and may be after recent cli update I’m getting below error
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x13e5fe3]
Error:
panic:%20runtime%20error%3A%20invalid%20memory%20address%20or%20nil%20pointer%20dereference%20%5Bsignal%20SIGSEGV%3A%20segmentation%20violation%20code=0x1%20addr=0x40%20pc=0x13e5fe3%5D%20goroutine%201%20%5Brunningl%3A%0Agithub.com/jfrog/jfrog-cli-security/utils/results.checkIfFailBuildWithoutConsideringApplicability(...)%0A/%20root/go/pkg/mod/github.com/jfrog/jfrog-cli-security@v1.20.2/utils/results/common.go:%20119%0Agithub.com/jfrog/jfrog-cli-security/utils/results.CheckIfFailBuild(0xc00071e000)%0A/%20root/go/pkg/mod/github.com/jfrog/jfrog-cli-security@v1.20.2/utils/results/common.go:65%20+0x83%0Agithub.com/jfrog/jfrog-cli-security/commands/scan.%20(*ScanCommand)%20.RunAndRecordResults(0xc0001fc240,%20%7B0x21a7058?,%200x44df00?%7D,%200xc0004915f8)%0A/%20root/go/pkg/mod/github.com/jfrog/jfrog-cli-security@v1.20.2/commands/scan/scan.go:251%20+0x4dc%0Agithub.com/jfrog/jfrog-cli-security/commands/scan.%20(*ScanCommand)%20-Run%20(0x6?)%0A/%20root/go/pkg/mod/github.com/jfrog/jfrog-cli-security@v1.20.2/commands/scan/scan.go:199%20+0x35%0Agithub.com/jfrog/jfrog-cli-core/v2/common/commands.%20Exec%20(0x25d06f8,%200xc0001fc240%7D)%0A/%20root/go/pkg/mod/github.com/jfrog/jfrog-cli-core/v2@v2.59.3/common/commands/command.go:%2036%20+0x96
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the nil dereference reported at utils/results/common.go:119, then follow its callers in CheckIfFailBuild and commands/scan/scan.go at lines 199 and 251. Reproduce the scan failure if possible, identify which value is nil, and confirm the issue is resolved without a panic with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100