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

implement csgrep --limit-msg-len to limit length of event messages #133

Closed
kdudka opened this issue Jun 30, 2023 · 0 comments
Closed

implement csgrep --limit-msg-len to limit length of event messages #133

kdudka opened this issue Jun 30, 2023 · 0 comments

Comments

@kdudka
Copy link
Member

kdudka commented Jun 30, 2023

This is again needed for Gitleaks, which is able to produce a few gigabytes of data even if we rate limit the number of warnings at 1024 (because it pastes the secrets as excessively long lines). This can be reproduced with nss-util-3.90.0-1.el7_9 and csmock -t gitleaks ....

kdudka added a commit to lbossis/csdiff that referenced this issue Jul 27, 2023
While --warning-rate-limit operates at the level of defects,
--limit-msg-len operates at the level of events.  So they cannot be
implemented in the same way.  I believe this commit makes the
--limit-msg-len option work as intended.

I have not touched the failing tests yet.  We should pick a snippet
of the excessively long messages from nss-util-3.90.0-1.el7_9 as the
testing input in order to demonstrate the typical case where the new
option is useful.

The commit summary should be:
```
csgrep --limit-msg-len: limit length of event messages
```

The commit message should also include a full URL to the fixed issue:
```
Closes: csutils#133
```
kdudka added a commit to lbossis/csdiff that referenced this issue Jul 27, 2023
While --warning-rate-limit operates at the level of defects,
--limit-msg-len operates at the level of events.  So they cannot be
implemented in the same way.  I believe this commit makes the
--limit-msg-len option work as intended.

I have not touched the failing tests yet.  We should pick a snippet
of the excessively long messages from nss-util-3.90.0-1.el7_9 as the
testing input in order to demonstrate the typical case where the new
option is useful.

The commit summary should be:
```
csgrep --limit-msg-len: limit length of event messages
```

The commit message should also include a full URL to the fixed issue:
```
Fixes: csutils#133
```
@kdudka kdudka closed this as completed in 2d8f403 Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant