github-vet / github-vet/rangeloop-pointer-findings
sriharikapu/ethsign: ethsign.go; 7 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [sriharikapu/ethsign](https://www.github.com/sriharikapu/ethsign) at [ethsign.go](https://github.com/sriharikapu/ethsign/blob/ff29627c0f0ce16df9a7f04763260e2784d34ce5/ethsign.go#L415-L421)
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 y was used in a composite literal at line 418
[Click here to see the code in its original context.](https://github.com/sriharikapu/ethsign/blob/ff29627c0f0ce16df9a7f04763260e2784d34ce5/ethsign.go#L415-L421)
Click here to show the 7 line(s) of Go which triggered the analyzer.
```go
for _, y := range x.Accounts() {
if y.Address == from {
wallet = x
acct = &y
break Scan
}
}
```
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: ff29627c0f0ce16df9a7f04763260e2784d34ce5
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect ethsign.go lines 415-421 and the surrounding account-selection flow, starting with the analyzer's finding about the range variable y. Determine whether the stored account reference remains valid for the intended use, then check the project's existing validation or tests; done means classifying the finding as a bug, mitigated, or desirable behavior with supporting evidence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100