sarif

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sarif provides a SARIF v2.1.0 output formatter for Leakwatch findings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct {
	// ShowRaw, when true, includes the unredacted secret value as a
	// "raw" entry under each result's properties bag. When false, no raw value
	// is emitted anywhere in the output.
	ShowRaw bool

	// Version is embedded verbatim as tool.driver.version. Callers should set
	// this to the real build version (the same value reported by `leakwatch
	// version`) so shipped SARIF documents are traceable to the Leakwatch
	// release that produced them. When left empty (e.g. a zero-value
	// Formatter), it falls back to defaultToolVersion ("dev") so existing
	// callers keep producing valid, non-empty output.
	Version string
}

Formatter outputs findings in SARIF v2.1.0 format.

func (*Formatter) FileExtension

func (f *Formatter) FileExtension() string

FileExtension returns the SARIF file extension.

func (*Formatter) Format

func (f *Formatter) Format(w io.Writer, findings []finding.Finding) error

Format writes findings in SARIF v2.1.0 JSON to the given writer. When ShowRaw is true, each result carries the unredacted secret value under properties.raw; otherwise no raw value is emitted.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL