github-vet / github-vet/rangeloop-pointer-findings

EventStore/keto: cmd/engines_acp_ory_policies_import.go; 4 LoC

Open
#15,352 0 comments 0 reactions 0 assignees View on GitHub
fresh tiny
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
PR metrics pending

Description

Found a possible issue in [EventStore/keto](https://www.github.com/EventStore/keto) at [cmd/engines_acp_ory_policies_import.go](https://github.com/EventStore/keto/blob/f9e17f2216a2bd4f0fe0b24b2c8fdfb523611e0c/cmd/engines_acp_ory_policies_import.go#L51-L54)

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 pp was used in a composite literal at line 52

[Click here to see the code in its original context.](https://github.com/EventStore/keto/blob/f9e17f2216a2bd4f0fe0b24b2c8fdfb523611e0c/cmd/engines_acp_ory_policies_import.go#L51-L54)

Click here to show the 4 line(s) of Go which triggered the analyzer.

```go
for _, pp := range p {
_, err := c.Engines.UpsertOryAccessControlPolicy(engines.NewUpsertOryAccessControlPolicyParams().WithFlavor(args[0]).WithBody(&pp))
cmdx.Must(err, "Unable to import ORY Access Control Policy: %s", err)
}

```

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: f9e17f2216a2bd4f0fe0b24b2c8fdfb523611e0c

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in cmd/engines_acp_ory_policies_import.go at lines 51-54 and read the surrounding import command and analyzer finding. Determine whether the reported range-loop reference requires a code change; done means the finding is classified as Bug, Mitigated, or Desirable Behavior with the appropriate reaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.