-
Notifications
You must be signed in to change notification settings - Fork 13
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
Custom talon rules not working #491
Comments
Hi, This is a limitation I also noticed, and I'm working on a fix. For now, the listed rules files must be in the same folder as the values.yaml and only relative paths must be used (ie: no path and just the file name). Sorry for that, the helm features to manage files are not really great and all my devs have been made with local files, this is why I noticed this issue lately. |
Yeah, here is what I understood reading the configmap: apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "falco-talon.name" . }}-rules
labels:
{{- include "falco-talon.labels" . | nindent 4 }}
data:
rules.yaml: |-
{{- range $file := .Values.config.rulesFiles -}}
{{ $fileContent := $.Files.Get . }}
{{- $fileContent | nindent 4 -}}
{{- end -}}
So if we provide a file not directly included in the chart, the helm function isn't reading the content... Maybe we should allow user to pass rules directly from the chart, like falco is doing (cf: https://falco.org/docs/rules/custom-ruleset/) customRules:
talon-rules.yaml: |-
- rule: Example rule
desc: ... I would be excited to contribute to the project and implement this if you're agreeing. Otherwise, I think a better way to improve the rules customization could be by adding rules via CRDs, like Kyverno does. But this seems to be harder to implement. |
Your contribution will be welcome for sure, just take care, the official chart is https://github.com/falcosecurity/charts/tree/master/charts/falco-talon, the chart included in this repo will be removed soon. For the operator, it's already a WIP, with @alacuku we'll work on an operator to manage falco, its plugins and rules, but also the integrations with falcosidekick and the reactions with talon, all in a consistent way. |
I proposed a fix and some improvements 🚀 |
Hello,
I'm trying to POC falco and talon on local environment and I can't figure out how to custom talon rules.
You can find the whole code used here
Following the README and the Falco part only (on my projet), I set up Falco, falco-sidekick and falco-talon.
All working, except when I try to make custom rules for talon. It seems that if I overwrite this part:
The rules aren't loaded anymore, and my custom rules aren't loaded, too.
The configmap created is empty as follows:
I think this is a helm chart issues that the path used to get the file content isn't relative or something like that.
How can I handle that ?
The text was updated successfully, but these errors were encountered: