Package io.codemodder

Class SarifFindingKeyUtil

java.lang.Object
io.codemodder.SarifFindingKeyUtil

public final class SarifFindingKeyUtil extends Object
Utility class for building keys for SARIF findings.
  • Method Details

    • buildFindingId

      public static String buildFindingId(com.contrastsecurity.sarif.Result result)
      Builds a finding ID for a SARIF finding based on the provided result.

      Individual results are identified by the guid property, if present. Multiple results across scans are identified by the correlationGuid property. We prefer to identify the result by its guid if present, and fall back to the correlationGuid if not. We can be reasonably certain that the correlationGuid is unique within a single run.