Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultArguments = Arguments{}
DefaultArguments defines the default settings for log scraping.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct {
ForwardTo []loki.LogsReceiver `alloy:"forward_to,attr"`
GitleaksConfig string `alloy:"gitleaks_config,attr,optional"` // Path to the custom gitleaks.toml file. If empty, the embedded one is used
Types []string `alloy:"types,attr,optional"` // Types of secret to look for (e.g. "aws", "gcp", ...). If empty, all types are included
RedactWith string `alloy:"redact_with,attr,optional"` // Redact the secret with this string. Use $SECRET_NAME and $SECRET_HASH to include the secret name and hash
IncludeGeneric bool `alloy:"include_generic,attr,optional"` // Include the generic API key rule (default: false)
AllowList []string `alloy:"allowlist,attr,optional"` // List of regexes to allowlist (on top of what's in the Gitleaks config)
PartialMask uint `alloy:"partial_mask,attr,optional"` // Show the first N characters of the secret (default: 0)
OriginLabel string `alloy:"origin_label,attr,optional"` // The label name to use for tracking metrics by origin (if empty, no origin metrics are collected)
EnableEntropy bool `alloy:"enable_entropy,attr,optional"` // Enable entropy calculation for secrets (default: false)
}
Arguments holds values which are used to configure the secretfilter component.
func (*Arguments) SetToDefault ¶
func (args *Arguments) SetToDefault()
SetToDefault implements syntax.Defaulter.
type Component ¶
type Component struct {
Rules []Rule
AllowList []AllowRule
// contains filtered or unexported fields
}
Component implements the loki.secretfilter component.
func (*Component) LiveDebugging ¶
func (c *Component) LiveDebugging()
type Exports ¶
type Exports struct {
Receiver loki.LogsReceiver `alloy:"receiver,attr"`
}
Exports holds the values exported by the loki.secretfilter component.
type GitLeaksConfig ¶
type GitLeaksConfig struct {
AllowList struct {
Description string
Regexes []string
}
Rules []struct {
ID string
Regex string
SecretGroup int
Entropy float64
// Old format, kept for compatibility
Allowlist struct {
Regexes []string
}
// New format
Allowlists []struct {
Regexes []string
}
}
}
This struct is used to parse the gitleaks.toml file Non-exhaustive representation. See https://github.com/gitleaks/gitleaks/blob/master/config/config.go
This comes from the Gitleaks project by Zachary Rice, which is licensed under the MIT license. See the gitleaks.toml file for copyright and license details.
Click to show internal directories.
Click to hide internal directories.