generated from falcosecurity/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 4
feat(rulesfile): add ConfigMap as rules source #220
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
Merged
poiana
merged 4 commits into
falcosecurity:main
from
c2ndev:feat/rulesfile-configmap-support
Feb 6, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
759b629
feat(rulesfile): add ConfigMap reference support for rules
c2ndev 02ef70d
refactor(artifact): add filesystem abstraction and comprehensive tests
c2ndev be50a05
fix: add config map watch permission to artifact operator
c2ndev 800d4fe
fix(artifact): remove configMapKey, add configMap Indexer, restore ar…
c2ndev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| # Example ConfigMap containing Falco rules | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: custom-falco-rules | ||
| namespace: default | ||
| data: | ||
| rules.yaml: | | ||
| - rule: Terminal shell in container | ||
| desc: A shell was used as the entrypoint/exec point into a container with an attached terminal. | ||
| condition: > | ||
| spawned_process and container | ||
| and shell_procs and proc.tty != 0 | ||
| and container_entrypoint | ||
| and not user_expected_terminal_shell_in_container_conditions | ||
| output: > | ||
| A shell was spawned in a container with an attached terminal (user=%user.name user_loginuid=%user.loginuid %container.info | ||
| shell=%proc.name parent=%proc.pname cmdline=%proc.cmdline terminal=%proc.tty container_id=%container.id image=%container.image.repository) | ||
| priority: NOTICE | ||
| tags: [container, shell, mitre_execution, T1059] | ||
|
|
||
| - rule: Write below binary dir | ||
| desc: An attempt to write to any file below a set of binary directories. | ||
| condition: > | ||
| bin_dir and evt.dir = < and open_write | ||
| and not package_mgmt_procs | ||
| and not exe_running_docker_save | ||
| and not python_running_get_pip | ||
| and not python_running_ms_oms | ||
| and not user_known_write_below_binary_dir_activities | ||
| output: > | ||
| File below a known binary directory opened for writing (user=%user.name user_loginuid=%user.loginuid | ||
| command=%proc.cmdline file=%fd.name parent=%proc.pname pcmdline=%proc.pcmdline gparent=%proc.aname[2] container_id=%container.id image=%container.image.repository) | ||
| priority: ERROR | ||
| tags: [filesystem, mitre_persistence, T1543] | ||
|
|
||
| --- | ||
| # Example Rulesfile using ConfigMap reference | ||
| # Note: The ConfigMap must have a key named "rules.yaml" containing the rules content | ||
| apiVersion: artifact.falcosecurity.dev/v1alpha1 | ||
| kind: Rulesfile | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/name: falco-operator | ||
| app.kubernetes.io/managed-by: kustomize | ||
| name: rulesfile-from-configmap | ||
| namespace: default | ||
| spec: | ||
| configMapRef: | ||
| name: custom-falco-rules | ||
| priority: 60 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.