You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`forward_to`|`list(LogsReceiver)`| List of receivers to send log entries to. || yes |
46
-
|`config_path`|`string`| Path to a custom Gitleaks TOML config file. If empty, the default Gitleaks config is used.|`""`| no |
46
+
|`gitleaks_config`|`string`| Path to a custom Gitleaks TOML config file. If empty, the default Gitleaks config is used. |`""`| no |
47
47
|`origin_label`|`string`| Loki label to use for the `secrets_redacted_by_origin` metric. If empty, that metric is not registered. |`""`| no |
48
48
|`redact_with`|`string`| Template for the redaction placeholder. Use `$SECRET_NAME` and `$SECRET_HASH`. When set, percentage-based redaction is not used. |`"<REDACTED-SECRET:$SECRET_NAME>"`| no |
49
49
|`redact_percent`|`uint`| When `redact_with` is not set: percent of the secret to redact (1–100). Shows leading (100-N)% + `"..."`; 100 = full `"REDACTED"`. 0 or unset defaults to 80. |`80`| no |
50
50
51
-
The `config_path` argument is the path to a custom [Gitleaks TOML config file][gitleaks-config]. The file supports the standard Gitleaks structure (rules, allowlists, and `[extend]` to extend the default config). If `config_path` is empty, the component uses the default Gitleaks configuration [embedded in the component][embedded-config].
51
+
The `gitleaks_config` argument is the path to a custom [Gitleaks TOML config file][gitleaks-config]. The file supports the standard Gitleaks structure (rules, allowlists, and `[extend]` to extend the default config). If `gitleaks_config` is empty, the component uses the default Gitleaks configuration [embedded in the component][embedded-config].
52
52
53
53
{{< admonition type="note" >}}
54
-
The default configuration may change between {{< param "PRODUCT_NAME" >}} versions. For consistent behavior, use an external configuration file via `config_path`.
54
+
The default configuration may change between {{< param "PRODUCT_NAME" >}} versions. For consistent behavior, use an external configuration file via `gitleaks_config`.
55
55
{{< /admonition >}}
56
56
57
57
**Redaction behavior:**
@@ -92,7 +92,7 @@ The following fields are exported and can be referenced by other components:
92
92
93
93
## Example
94
94
95
-
This example shows how to use `loki.secretfilter` to redact secrets from log lines before forwarding them to a Loki receiver. It uses a custom redaction template with `$SECRET_NAME` and `$SECRET_HASH`. You can instead omit `redact_with` to use percentage-based redaction (default 80% redacted), set `redact_percent` (e.g. `100` for full redaction), or set `config_path` to point to a custom Gitleaks TOML file.
95
+
This example shows how to use `loki.secretfilter` to redact secrets from log lines before forwarding them to a Loki receiver. It uses a custom redaction template with `$SECRET_NAME` and `$SECRET_HASH`. You can instead omit `redact_with` to use percentage-based redaction (default 80% redacted), set `redact_percent` (e.g. `100` for full redaction), or set `gitleaks_config` to point to a custom Gitleaks TOML file.
Copy file name to clipboardExpand all lines: internal/component/loki/secretfilter/secretfilter.go
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ type Arguments struct {
42
42
OriginLabelstring`alloy:"origin_label,attr,optional"`// The label name to use for tracking metrics by origin (if empty, no origin metrics are collected)
43
43
RedactWithstring`alloy:"redact_with,attr,optional"`// Template for redaction placeholder; $SECRET_NAME and $SECRET_HASH are replaced. When set, percentage-based redaction is not used.
44
44
RedactPercentuint`alloy:"redact_percent,attr,optional"`// When redact_with is not set: percent of the secret to redact (1-100; gitleaks-style: show leading (100-N)% + "...", 100 = "REDACTED"). 0 or unset defaults to 80.
45
-
ConfigPathstring`alloy:"config_path,attr,optional"`// Path to a gitleaks TOML config file; if empty, the default gitleaks config is used
45
+
GitleaksConfigstring`alloy:"gitleaks_config,attr,optional"`// Path to a gitleaks TOML config file; if empty, the default gitleaks config is used
46
46
}
47
47
48
48
// Exports holds the values exported by the loki.secretfilter component.
0 commit comments