https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122546
Bug ID: 122546
Summary: RFE: gracefully handle BOM char in sarif input
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: SARIF
Severity: normal
Priority: P3
Component: sarif-replay
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Target Milestone: ---
Quoting https://datatracker.ietf.org/doc/html/rfc8259#section-8.1
"""
Implementations MUST NOT add a byte order mark (U+FEFF) to the
beginning of a networked-transmitted JSON text. In the interests of
interoperability, implementations that parse JSON texts MAY ignore
the presence of a byte order mark rather than treating it as an
error.
"""
However, I've seen SARIF files (generated by Snyk Code) that contains them.
sarif-replay should probably gracefully handle them (perhaps with a
control-level warning?)