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

Added an event for defalult rule "Polkit Local Privilege Escalation Vulnerability (CVE-2021-4034)" #156

Conversation

GLVSKiriti
Copy link
Contributor

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind documentation

/kind tests

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area commands

/area pkg

/area events

What this PR does / why we need it:
Added an event for defalult rule "Polkit Local Privilege Escalation Vulnerability (CVE-2021-4034)" as mentioned here

Which issue(s) this PR fixes:

Fixes #149

Special notes for your reviewer:

@leogr
Copy link
Member

leogr commented Jun 17, 2024

Closing and reopening to trigger the CI

@leogr leogr closed this Jun 17, 2024
@leogr
Copy link
Member

leogr commented Jun 17, 2024

/reopen

@poiana poiana reopened this Jun 17, 2024
@poiana
Copy link

poiana commented Jun 17, 2024

@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.

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.

Function name must match the rules name as per our convention (see my comment below), otherwise SGTM.

cc @FedeDP @alacuku

events.WithDisabled(), // this rules is not included in falco_rules.yaml (stable rules), so disable the action
)

func PolkitLocalPrivilegeEscalationVulnerability(h events.Helper) error {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
func PolkitLocalPrivilegeEscalationVulnerability(h events.Helper) error {
func PolkitLocalPrivilegeEscalationVulnerability(h events.Helper) error {

This won't match the exact rule name, which is Polkit Local Privilege Escalation Vulnerability (CVE-2021-4034)

I guess the correct name should be PolkitLocalPrivilegeEscalationVulnerabilityCVE20214034, but I have to double-check.

This convention is important because the tester package relies on that to match rules names:

// MatchRule returns true if the name of an action matches a given rule.
func MatchRule(name string, rule string) bool {
parts := strings.Split(name, ".")
l := len(parts)
if l == 0 {
return false
}
return strings.ToLower(parts[l-1]) == strings.ToLower(nonAlphaNumericReg.ReplaceAllString(rule, ""))
}

@poiana
Copy link

poiana commented Jul 11, 2024

LGTM label has been added.

Git tree hash: 6a90a3299554faa7b92c3a58ef0562bd02bb2b0d

@poiana
Copy link

poiana commented Jul 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GLVSKiriti, 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 merged commit 8356c82 into falcosecurity:main Jul 18, 2024
4 checks passed
@GLVSKiriti GLVSKiriti deleted the PolkitLocalPrivilegeEscalationVulnerability branch July 18, 2024 15:45
@leogr leogr added this to the v0.12.0 milestone Oct 2, 2024
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.

Add an event on default rule "Polkit Local Privilege Escalation Vulnerability (CVE-2021-4034)"
3 participants