Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Escape Markdown pipes #3332

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

z63d
Copy link
Contributor

@z63d z63d commented Jan 24, 2025

Description

There is a display problem because pipe is used in the Markdown table. The string after pipe is not displayed.
https://tetragon.io/docs/reference/helm-chart/
https://github.com/cilium/tetragon/blob/main/install/kubernetes/tetragon/README.md
Fix it by escaping pipe.

Also, if you escape pipe, the second half of the string will be recognized, and asterisk will make the following part bold.

**". 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?"}`. As a concrete example, the following will redact all passwords passed to processes with the "--password" argument: {"redact": ["--password(?:\\s+|=)(\\S*)"]} Now, an event which contains the string "--password=foo" would have that string replaced with "--password=**

So escape asterisk.

@z63d z63d requested a review from a team as a code owner January 24, 2025 07:03
@z63d z63d requested a review from tixxdz January 24, 2025 07:03
Copy link

netlify bot commented Jan 24, 2025

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit b883533
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/67933b3047c8df0008376b30
😎 Deploy Preview https://deploy-preview-3332--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, both those files are generated from the values, you could modify the comment there or fix the genrator.

Signed-off-by: Kaita Nakamura <[email protected]>
@z63d z63d force-pushed the fix/helm-markdown-doc branch from b883533 to 49c9f24 Compare January 24, 2025 10:36
@mtardy mtardy added the release-note/docs This PR updates the documentation. label Jan 24, 2025
@@ -124,15 +124,15 @@ tetragon:
# As a concrete example, the following will redact all passwords passed to
# processes with the "--password" argument:
#
# {"redact": ["--password(?:\\s+|=)(\\S*)"]}
# {"redact": ["--password(?:\\s+\|=)(\\S*)"]}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well this is not ideal since it eventually modify these regex (binary_regex) so that docs looks better but the direct docs on values isn't exact anymore. I'm afraid you'll have to fix the thing we use for the generation, it seems the issue already exists :/. This is a complete different task than just fixing this docs so don't feel like you have to fix this!

See:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! You are right.
Should I add this to the Issue?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as you wish! if you don't consider fixing this other project's issue I might take a look eventually, tell me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/docs This PR updates the documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants