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

Delete or rename shell history: .ash_history #1956

Merged
merged 3 commits into from
May 14, 2022

Conversation

bdashrad
Copy link
Contributor

@bdashrad bdashrad commented Mar 23, 2022

What type of PR is this?

/kind rule-update

Any specific area of the project related to this PR?

/area rules

What this PR does / why we need it:

Includes .ash_history in rule: Delete or rename shell history

Which issue(s) this PR fixes:

Fixes #1605

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

rule(macro truncate_shell_history): include .ash_history
rule(macro modify_shell_history): include .ash_history

@poiana
Copy link
Contributor

poiana commented Mar 23, 2022

Welcome @bdashrad! It looks like this is your first PR to falcosecurity/falco 🎉

@poiana poiana added the size/XS label Mar 23, 2022
@jasondellaluce
Copy link
Contributor

/milestone 0.32.0

@poiana poiana added this to the 0.32.0 milestone Mar 24, 2022
@leogr
Copy link
Member

leogr commented Mar 24, 2022

/milestone 0.32.0

/cc @Kaizhe

@poiana poiana requested a review from Kaizhe March 24, 2022 10:40
@leogr
Copy link
Member

leogr commented May 2, 2022

Closing and reopening to trigger the CI
/close

@poiana poiana closed this May 2, 2022
@poiana
Copy link
Contributor

poiana commented May 2, 2022

@leogr: Closed this PR.

In response to this:

Closing and reopening to trigger the CI
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@leogr
Copy link
Member

leogr commented May 2, 2022

/reopen

@poiana poiana reopened this May 2, 2022
@poiana
Copy link
Contributor

poiana commented May 2, 2022

@leogr: Reopened this PR.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

evt.arg.oldpath contains "bash_history" or
evt.arg.oldpath endswith "zsh_history" or
evt.arg.oldpath contains "fish_read_history" or
evt.arg.oldpath endswith "fish_history" or
evt.arg.oldpath contains "ash_history" or
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be possible to use endswith operator instead of contains?
Thanks

Copy link
Member

Choose a reason for hiding this comment

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

Good idea @darryk10 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

If we introduce ash_history (doesn't matter whether using operator contains or endswith), we can ignore the bash_history then. A proper comment will be useful here saying both bash_history and ash_history will be covered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like a reasonable approach to me. Do we still want to use contains or do we want to change it to endswith. I don't have a preference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed up a change

@poiana poiana added size/S and removed size/XS labels May 9, 2022
Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

LGTM now, thank you!

/approve

@poiana poiana added the lgtm label May 9, 2022
@poiana
Copy link
Contributor

poiana commented May 9, 2022

LGTM label has been added.

Git tree hash: d8bf707d3fcaff499c0da286aca464a434332179

@poiana
Copy link
Contributor

poiana commented May 9, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bdashrad, leogr

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana added the approved label May 9, 2022
@leogr
Copy link
Member

leogr commented May 13, 2022

@Kaizhe ping 🤗

@poiana poiana merged commit 9d41b0a into falcosecurity:master May 14, 2022
@bdashrad bdashrad deleted the rule_ash_history branch June 14, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete or rename shell history: .ash_history
6 participants