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

Add support for null-data (-z flag) in grep rule #80

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

ValentinLvr
Copy link
Contributor

It should facilitate multi-lines matching on yaml files since it treats the input as a set of lines each terminated with a zero byte instead of newline.

In other words, grep sees the input as one big line.

example: with the -z flag (or --null-data), you cloud match this pattern

toto:
  tata:

inside this file:

# test.yaml
titi:
  toto:
    tata:

@ValentinLvr ValentinLvr marked this pull request as draft July 30, 2024 09:50
@ValentinLvr ValentinLvr force-pushed the add-null-data-flag branch 2 times, most recently from e8360ee to 9220881 Compare July 30, 2024 14:05
- should facilitate regex multi-lines matching on yaml files

Signed-off-by: ValentinLvr <valentin.levier@outlook.com>
@ValentinLvr ValentinLvr marked this pull request as ready for review July 30, 2024 14:18
@ValentinLvr ValentinLvr requested a review from a team July 30, 2024 14:35
@ValentinLvr
Copy link
Contributor Author

#sre

@ValentinLvr ValentinLvr merged commit bb32cb3 into main Jul 31, 2024
5 checks passed
@ValentinLvr ValentinLvr deleted the add-null-data-flag branch July 31, 2024 07:25
boser87 pushed a commit that referenced this pull request Aug 13, 2024
- should facilitate regex multi-lines matching with grep (on yaml files for example)

Signed-off-by: ValentinLvr <valentin.levier@outlook.com>
Signed-off-by: Stefano Celentano <stefano.celentano@qonto.com>
boser87 pushed a commit that referenced this pull request Aug 14, 2024
- should facilitate regex multi-lines matching with grep (on yaml files for example)

Signed-off-by: ValentinLvr <valentin.levier@outlook.com>
Signed-off-by: Stefano Celentano <stefano.celentano@qonto.com>
boser87 pushed a commit that referenced this pull request Aug 14, 2024
- should facilitate regex multi-lines matching with grep (on yaml files for example)

Signed-off-by: ValentinLvr <valentin.levier@outlook.com>
Signed-off-by: Stefano Celentano <stefano.celentano@qonto.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants