github-vet / github-vet/rangeloop-pointer-findings
aws/aws-app-mesh-controller-for-k8s: pkg/virtualgateway/enqueue_requests_for_mesh_events.go; 6 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [aws/aws-app-mesh-controller-for-k8s](https://www.github.com/aws/aws-app-mesh-controller-for-k8s) at [pkg/virtualgateway/enqueue_requests_for_mesh_events.go](https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/c94935b82442b7d4afccf3fc32ee12649fb549b6/pkg/virtualgateway/enqueue_requests_for_mesh_events.go#L65-L70)
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 vg was used in a composite literal at line 69
[Click here to see the code in its original context.](https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/c94935b82442b7d4afccf3fc32ee12649fb549b6/pkg/virtualgateway/enqueue_requests_for_mesh_events.go#L65-L70)
Click here to show the 6 line(s) of Go which triggered the analyzer.
```go
for _, vg := range vgList.Items {
if vg.Spec.MeshRef == nil || !mesh.IsMeshReferenced(ms, *vg.Spec.MeshRef) {
continue
}
queue.Add(ctrl.Request{NamespacedName: k8s.NamespacedName(&vg)})
}
```
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: c94935b82442b7d4afccf3fc32ee12649fb549b6
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with pkg/virtualgateway/enqueue_requests_for_mesh_events.go at the referenced lines and inspect the shown range-loop handling in commit c94935b82442b7d4afccf3fc32ee12649bf549b6. Determine whether the analyzer's reference-to-vg finding is a bug, mitigated, or desirable behavior, then record the appropriate reaction on the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100