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

update program_output example #507

Merged
merged 1 commit into from
Feb 20, 2019
Merged

update program_output example #507

merged 1 commit into from
Feb 20, 2019

Conversation

daixiang0
Copy link
Contributor

@daixiang0 daixiang0 commented Jan 29, 2019

Fix below issue:
when config with mail:

program_output:
  enabled: true
  keep_alive: false
  program: mail -s "Falco Notification" 764524258@qq.com
16:07:24.426355331: Informational Container with sensitive mount started (user=root command=runc:[1:CHILD] init k8s.ns=<NA> k8s.pod=<NA> container=95d852f177a5 image=sysdig/falco-event-generator@sha256:8be9e858ed798bb41c22601ba80f552244f50e452505a2eb34c3e1c82369b343 mounts=/var/lib/kubelet/pods/641309ac-25f8-11e9-8f73-1e00130014eb/volumes/kubernetes.io~secret/default-token-bp7qk:/var/run/secrets/kubernetes.io/serviceaccount:ro:false:rprivate,/var/lib/kubelet/pods/641309ac-25f8-11e9-8f73-1e00130014eb/etc-hosts:/etc/hosts::true:rprivate,/var/lib/kubelet/pods/641309ac-25f8-11e9-8f73-1e00130014eb/containers/falco-event-generator/76eff74a:/dev/termination-log::true:rprivate) k8s.ns=<NA> k8s.pod=<NA> container=95d852f177a5
sh: 1: mail: not found

If not, falco can not send mail.

falco-CLA-1.0-signed-off-by: Xiang Dai 764524258@qq.com

@daixiang0 daixiang0 changed the title add mailuils pkg add mailutils pkg Jan 29, 2019
@mfdii
Copy link
Member

mfdii commented Feb 2, 2019

This PR needs to be against dev, not master.

@mstemm
Copy link
Contributor

mstemm commented Feb 11, 2019

I think it wouldn't be very likely that you would want to run the normal falco container with a program output that could send mail directly. You'd probably need email server configuration that also configured an outbound mail gateway and probably credentials to contact that gateway. You could always create a new image that started with falco using FROM falco:latest and added mailutils and copied in the necessary configuration.

Of course, when running directly on the host, say via debian or rpm packages, you could rely on the host's configuration for mail servers, etc.

@daixiang0
Copy link
Contributor Author

For k8s env, i think it is possible to send mail from container, and in production env it should be default action i think.

By the way, in https://github.com/falcosecurity/falco/blob/dev/falco.yaml, send mail is default action. As you said, maybe add a comment here is better. If so, i would add comment about mail part.

@mfdii
Copy link
Member

mfdii commented Feb 12, 2019

Sending mail is not a default action, it’s an example and as mark points out it you would probably never want to do this. We should remove the example in favor of the slack example.

To expand on this, depending on how noisy you have falco configured you might get lots of mails per second. If your use case is to create an audit trail then mail is not the best option. Also, mail wouldn’t be the best way to have action immediately taken if your use case was incident response. Functions (severless) and a pub/sub service would be better.

falco-CLA-1.0-signed-off-by: Xiang Dai <764524258@qq.com>1
@daixiang0 daixiang0 changed the title add mailutils pkg update program_output example Feb 18, 2019
@daixiang0
Copy link
Contributor Author

@mfdii hi, any input?

@mstemm
Copy link
Contributor

mstemm commented Feb 19, 2019

So now the only change in the PR is that the example program output command line refers to jq and curl, right? That's the change you intended?

@daixiang0
Copy link
Contributor Author

yes, since that mail from container directly is not good enough, why show this example, change it is better, right?

@mstemm mstemm self-requested a review February 20, 2019 17:18
@mstemm mstemm merged commit f4b0b3c into falcosecurity:master Feb 20, 2019
mstemm pushed a commit that referenced this pull request Feb 20, 2019
falco-CLA-1.0-signed-off-by: Xiang Dai <764524258@qq.com>1
@mstemm
Copy link
Contributor

mstemm commented Feb 20, 2019

I see that the PR was still based against the master branch. I cherry-picked the commit onto a PR targeted towards the dev branch (#541).

mstemm added a commit that referenced this pull request Feb 20, 2019
falco-CLA-1.0-signed-off-by: Xiang Dai <764524258@qq.com>1
@daixiang0 daixiang0 deleted the add-mailutils branch February 21, 2019 01:27
@poiana poiana mentioned this pull request Jun 11, 2019
@poiana poiana mentioned this pull request Aug 20, 2019
@poiana poiana mentioned this pull request Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants