Skip to content

Commit

Permalink
docs: explicitly state which regex flavour is used for redaction
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Nikolic <[email protected]>
  • Loading branch information
f1ko authored and willfindlay committed Apr 25, 2024
1 parent ebbab4e commit 017aa40
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 20 deletions.
4 changes: 2 additions & 2 deletions api/v1/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/v1/tetragon/events.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/v1/tetragon/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ message CapFilterSet {
message RedactionFilter {
// Deprecated, do not use.
repeated Filter match = 1 [deprecated=true];
// Regular expressions to use for redaction. Strings inside capture groups are redacted.
// RE2 regular expressions to use for redaction. Strings inside capture groups are redacted.
repeated string redact = 2;
// Regular expression to match binary name. If supplied, redactions will only be applied to matching processes.
// RE2 regular expression to match binary name. If supplied, redactions will only be applied to matching processes.
repeated string binary_regex = 3;
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions docs/content/en/docs/concepts/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,16 @@ used to string patterns to redact from exported process arguments. These filters
in JSON and passed to the Tetragon agent via the `--redaction-filters` command
line flag or the `redactionFilters` Helm value.

To perform redactions, redaction filters define regular expressions in the
`redact` field. Any capture groups in these regular expressions are redacted and
To perform redactions, redaction filters define RE2 regular expressions in the
`redact` field. Any capture groups in these RE2 regular expressions are redacted and
replaced with `"*****"`.

{{< note >}}
This feature uses RE2 as its regular expression library. Make sure that you follow
RE2 regular expression guidelines as you may observe unexpected results otherwise.
More information on RE2 syntax can be found [here](https://github.com/google/re2/wiki/Syntax).
{{< /note >}}

{{< warning >}}
When writing regular expressions in JSON, it is important to escape backslash
characters. For instance `\Wpasswd\W?` would be written as `{"redact": "\\Wpasswd\\W?"}`.
Expand Down
4 changes: 2 additions & 2 deletions docs/content/en/docs/reference/grpc-api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions install/kubernetes/tetragon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,17 @@ tetragon:
fieldFilters: |-
# Filters to redact secrets from the args fields in Tetragon events. To perform
# redactions, redaction filters define regular expressions in the `redact`
# field. Any capture groups in these regular expressions are redacted and
# redactions, redaction filters define RE2 regular expressions in the `redact`
# field. Any capture groups in these RE2 regular expressions are redacted and
# replaced with "*****".
#
# For more control, you can select which binary or binaries should have their
# arguments redacted with the `binary_regex` field.
#
# NOTE: This feature uses RE2 as its regular expression library. Make sure that you follow
# RE2 regular expression guidelines as you may observe unexpected results otherwise.
# More information on RE2 syntax can be found [here](https://github.com/google/re2/wiki/Syntax).
#
# NOTE: When writing regular expressions in JSON, it is important to escape
# backslash characters. For instance `\Wpasswd\W?` would be written as
# `{"redact": "\\Wpasswd\\W?"}`.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 017aa40

Please sign in to comment.