Documentation
¶
Overview ¶
Package filter applies allowlist, baseline, warn_paths, and inline-ignore layers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InlineIgnored ¶
InlineIgnored reports whether the given file:line (or the preceding line) carries an "lintel:ignore-..." directive with a non-empty reason.
Accepted forms (on the same or preceding line):
// lintel:ignore-secret reason="test fixture" # lintel:ignore-rule=SQLi.raw-concat reason="hardened elsewhere"
A bare `lintel:ignore-*` without a reason is itself a finding caller can surface.
Types ¶
type AllowEntry ¶
type AllowEntry struct {
Path string `yaml:"path"`
Rule string `yaml:"rule"`
Checks []string `yaml:"checks"`
Reason string `yaml:"reason"`
Expires string `yaml:"expires"`
}
func (AllowEntry) Expired ¶
func (e AllowEntry) Expired() bool
func (AllowEntry) Matches ¶
func (e AllowEntry) Matches(check, rule, file string) bool
Matches returns true if the entry covers the given finding.
type Allowlist ¶
type Allowlist struct {
Entries []AllowEntry `yaml:"entries"`
}
func LoadAllowlist ¶
type Baseline ¶
type Baseline struct {
CreatedAt string `json:"created_at"`
Keys map[string]bool `json:"-"`
Raw []BaselineFinding `json:"findings"`
}
func LoadBaseline ¶
Click to show internal directories.
Click to hide internal directories.