Open
Description
Description of the false positive
Incomplete string escaping or encoding
This does not escape backslash characters in the input.
part = `"${part.replace(/"/g, '\\"')}"`;
This is intentional,
actual string: abc\"
-> "abc\\""
JS:
'abc\\"' '"abc\\\\""'
This code is used in a client library to serialize caller input as-is from list to header value.
const input = ["a", "b", `\\"`];
const serialized = `a,b,"\\\\""`;
Code samples or links to source code