encoding/json package. Unmarshal and Decoder.Decode() are sources of tainted data from JSON input. Marshal() propagates taint to output.
.Unmarshal().Unmarshal()SourceUnmarshal(data []byte, v any) error
Decodes JSON into v. v becomes tainted when data comes from user input.
1.Marshal()NeutralMarshal(v any) ([]byte, error)
Encodes v to JSON. Propagates taint from v to output bytes.
| FQN | Field | |
|---|---|---|
| encoding/json | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
// standard library — no go.mod entry required
from codepathfinder.go_rule import GoEncodingJSON