github / github/codeql

False positive - when json.Marshal output is used - cant result in "Potentially unsafe quoting"

Aberta
#14,159 3 comentários 0 reações 0 responsáveis Ver no GitHub
acknowledged false-positive Go
Linguagem predominante
CodeQL
Estrelas
10.1k
Forks
2.1k
Merge médio
2d 15h
PRs com merge (30d)
141

Descrição

**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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.