github-vet / github-vet/rangeloop-pointer-findings
Tomo-9925/cnet: pkg/proc/process.go; 5 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [Tomo-9925/cnet](https://www.github.com/Tomo-9925/cnet) at [pkg/proc/process.go](https://github.com/Tomo-9925/cnet/blob/dcc484b34166b427e92f3691ea02ff417d013d42/pkg/proc/process.go#L77-L81)
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 suspiciousProcess is reassigned at line 78
[Click here to see the code in its original context.](https://github.com/Tomo-9925/cnet/blob/dcc484b34166b427e92f3691ea02ff417d013d42/pkg/proc/process.go#L77-L81)
Click here to show the 5 line(s) of Go which triggered the analyzer.
```go
for suspiciousProcess := range suspiciousProcesses {
process = &suspiciousProcess
argFields.WithField("identified_process", process).Debug("the process identified")
return
}
```
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: dcc484b34166b427e92f3691ea02ff417d013d42
Contributor guide
No contributing guide indexed for this repository
Research direction
Read pkg/proc/process.go at lines 77-81 and inspect how the range variable is referenced when assigning process. Use the linked analyzer classification guidance to decide whether this instance is a bug, mitigated, or desirable behavior, then leave the corresponding reaction on the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100