False positive - when json.Marshal output is used - cant result in "Potentially unsafe quoting"
Ouverte
acknowledged
false-positive
Go
- Langage dominant
- CodeQL
- Étoiles
- 10.1k
- Forks
- 2.1k
- Merge moyen
- 2 j 15 h
- PR mergées (30 j)
- 141
Description
**Description of the false positive**
An output of golang json.Marshal is apparently not at risk for `unsafe quoting`
**Code samples or links to source code**
```
...
learned, errMarshal := json.Marshal(guardianSpec.Learned)
...
str := fmt.Sprintf(`[{"op":"replace","path":"/spec/learned","value":%s},{"op":"replace","path":"/spec/samples","value":%d}]`, learned, guardianSpec.NumSamples)
...
```
**URL to the alert on GitHub code scanning (optional)**
https://github.com/knative-extensions/security-guard/pull/236
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.