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

Documenting selective override #1254

Merged
merged 14 commits into from
Jan 30, 2024

Conversation

mikegcoleman
Copy link
Contributor

What type of PR is this?

/kind cleanup

/kind content

Any specific area of the project related to this PR?**
/area documentation

What this PR does / why we need it:

Adds documentation for the new selective override feature

Which issue(s) this PR fixes:

Fixes #1226

Special notes for your reviewer:

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

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

Amazing work! Just few nits

content/en/docs/rules/overriding.md Outdated Show resolved Hide resolved
content/en/docs/rules/overriding.md Outdated Show resolved Hide resolved
content/en/docs/rules/overriding.md Show resolved Hide resolved
@leogr leogr added this to the falco-0.37.0 milestone Jan 26, 2024
mikegcoleman and others added 7 commits January 26, 2024 07:42
Co-authored-by: Luca Guerra <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
Co-authored-by: Luca Guerra <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

## Overview
There may be cases where you need to adjust the behavior of the Falco-supplied {{< glossary_tooltip text="list" term_id="lists" >}}, {{< glossary_tooltip text="macro" term_id="macros" >}}, and {{< glossary_tooltip text="rule" term_id="rules" >}}.

You can override (modify) rules in falco two different ways:
Copy link
Contributor

Choose a reason for hiding this comment

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

Falco (upper case throughout?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)


You can override (modify) rules in falco two different ways:

1) Define multiple rules files. The additional rules files can be used to add new lists, macros and rules or to override existing ones.
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't fit in here but maybe you have an idea @mikegcoleman how to give a more concrete example. Somehow stating that a typical use case is to fetch the upstream Falco rules hosted in the rules repo and then customize them using the override feature.

Copy link
Member

Choose a reason for hiding this comment

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

this is a good suggestion, maybe we can find a way to improve this part of the doc in a follow-up PR, i would start to merge this one

content/en/docs/rules/overriding.md Outdated Show resolved Hide resolved
```yaml
- rule: program_accesses_file
desc: track whenever a set of programs opens a file
condition: proc.name in (cat, ls) and evt.type=open
Copy link
Contributor

Choose a reason for hiding this comment

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

same follow style guide

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed :)


### Enabling a disabled rule

Using `enabled: true` is deprecated, and should be avoided. Falco 0.37.0 and later will display a warning If `enabled: true` is used.
Copy link
Contributor

Choose a reason for hiding this comment

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

warning if

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)

content/en/docs/rules/overriding.md Outdated Show resolved Hide resolved
content/en/docs/rules/overriding.md Outdated Show resolved Hide resolved
content/en/docs/rules/overriding.md Outdated Show resolved Hide resolved
Co-authored-by: Melissa Kilby <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
mikegcoleman and others added 3 commits January 29, 2024 21:22
Co-authored-by: Melissa Kilby <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
Co-authored-by: Melissa Kilby <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
Co-authored-by: Melissa Kilby <[email protected]>
Signed-off-by: Mike Coleman <[email protected]>
Copy link
Contributor Author

@mikegcoleman mikegcoleman left a comment

Choose a reason for hiding this comment

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

Addressed these comments

```yaml
- rule: program_accesses_file
desc: track whenever a set of programs opens a file
condition: proc.name in (cat, ls) and evt.type=open
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed :)

## Overview
There may be cases where you need to adjust the behavior of the Falco-supplied {{< glossary_tooltip text="list" term_id="lists" >}}, {{< glossary_tooltip text="macro" term_id="macros" >}}, and {{< glossary_tooltip text="rule" term_id="rules" >}}.

You can override (modify) rules in falco two different ways:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)


### Enabling a disabled rule

Using `enabled: true` is deprecated, and should be avoided. Falco 0.37.0 and later will display a warning If `enabled: true` is used.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)

Signed-off-by: Mike Coleman <[email protected]>
@LucaGuerra LucaGuerra changed the title WIP: Documenting selective override Documenting selective override Jan 30, 2024
Co-authored-by: Andrea Terzolo <[email protected]>
Signed-off-by: Luca Guerra <[email protected]>
@poiana
Copy link

poiana commented Jan 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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
Copy link

poiana commented Jan 30, 2024

LGTM label has been added.

Git tree hash: c75557a3bb5ed20657f6dc6579e9f70458a9cce1

@poiana poiana merged commit 49517f9 into falcosecurity:master Jan 30, 2024
6 checks passed
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.

Need documentation for Selective Override (Falco PR# 2981)
6 participants