Skip to main content

Module hashing

Module hashing 

Expand description

Stable content-fingerprint primitive shared across the fingerprint-emitting modules (SARIF row identity in output::sarif, external-finding self-hash in external::sarif_parse).

Every fingerprint that must stay byte-stable across CI runs is a SHA-256 of the identifying fields joined by a single | byte, rendered as sha256:<hex>. Centralising the join + prefix here keeps those identities aligned: a change to the encoding lands in one place instead of drifting between the emitter and the parser.

Functions§

sha256_prefixed
SHA-256 the parts joined by a single | byte and return the digest as "sha256:<lowercase-hex>".