suppress

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 2 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 suppress is the fourth pipeline stage: it alone decides whether a candidate is suppressed (test keys, inline allows, allowlists, ignore files, baselines) and records the reason.

Index

Constants

View Source
const Default = "default"

Default is the name of the default suppressor.

View Source
const ReasonTestKey = "test_key"

ReasonTestKey is the suppression reason for generated test keys (AD-16).

Variables

This section is empty.

Functions

func Register

func Register(name string, f Factory)

Register adds a suppress adapter. Adapters call it from init().

Types

type Factory

type Factory func(Options) (Suppressor, error)

Factory builds a Suppressor.

func Lookup

func Lookup(name string) (Factory, bool)

Lookup returns the suppress adapter registered under name.

type Options

type Options struct {
	// IncludeTestKeys keeps findings from generated test keys unsuppressed.
	IncludeTestKeys bool
}

Options configures a suppressor.

type Suppressor

type Suppressor interface {
	Suppress(c *candidate.Candidate)
}

Suppressor is the suppress stage interface. Suppress decides, from the predicates detect precomputed, whether the candidate is suppressed, and sets only the Finding's Suppressed and SuppressionReason fields.

Jump to

Keyboard shortcuts

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