-
Notifications
You must be signed in to change notification settings - Fork 905
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
rule(macro modify_shell_history, truncate_shell_history): avoid false positives from .zsh_history.new and .LOCK files #1832
Conversation
…ory.new and .LOCK files Signed-off-by: m4wh6k <m4wh6k@users.noreply.github.com>
Welcome @m4wh6k! It looks like this is your first PR to falcosecurity/falco 🎉 |
…story.new and .LOCK files Signed-off-by: m4wh6k m4wh6k@users.noreply.github.com
Signed-off-by: m4wh6k m4wh6k@users.noreply.github.com
/milestone 0.32.0 |
@m4wh6k thanks for the contribution! |
/lgtm |
LGTM label has been added. Git tree hash: 37b5756bb5703a5f11531a1851b1781c79db6293
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Kaizhe, leogr, m4wh6k The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: m4wh6k m4wh6k@users.noreply.github.com
/kind bug
/kind rule-update
/area rules
What this PR does / why we need it:
The default macros modify_shell_history and truncate_shell_history match on .zsh_history.new and .zsh_history.LOCK files, which are temporary files created while using zsh. This causes rules using these macros to produce false positives. This PR changes the macros to use
endswith
rather thancontains
, which makes it work in the expected way.Example false-positive:
Which issue(s) this PR fixes:
n/a
Does this PR introduce a user-facing change?: