github-vet / github-vet/rangeloop-pointer-findings
koli/koli: pkg/git/api/github.go; 6 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [koli/koli](https://www.github.com/koli/koli) at [pkg/git/api/github.go](https://github.com/koli/koli/blob/75f6e1d9426c2750e7648b3a332075086dbb3b2e/pkg/git/api/github.go#L221-L226)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to obj is reassigned at line 225
[Click here to see the code in its original context.](https://github.com/koli/koli/blob/75f6e1d9426c2750e7648b3a332075086dbb3b2e/pkg/git/api/github.go#L221-L226)
Click here to show the 6 line(s) of Go which triggered the analyzer.
```go
for _, obj := range auth0User.Identities {
if obj.Provider != "github" {
continue
}
identity = &obj
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 75f6e1d9426c2750e7648b3a332075086dbb3b2e
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading pkg/git/api/github.go around lines 221-226 and the surrounding use of identity. Check whether taking the address of the range variable can produce incorrect behavior in this context, then classify the finding as Bug, Mitigated, or Desirable Behavior using the linked analyzer guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100