diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 00000000..9d5bc76b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,28 @@ +--- +name: Bug Report +about: Report a bug encountered while operating Falco +labels: kind/bug + +--- + + + +**What happened**: + +**What you expected to happen**: + +**How to reproduce it (as minimally and precisely as possible)**: + +**Anything else we need to know?**: + +**Environment**: +- Falco version (use `falco --version`): +- System info +- Cloud provider or hardware configuration: +- OS (e.g: `cat /etc/os-release`): +- Kernel (e.g. `uname -a`): +- Install tools (e.g. in kubernetes, rpm, deb, from source): +- Others: diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md new file mode 100644 index 00000000..6eb481a3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -0,0 +1,11 @@ +--- +name: Enhancement Request +about: Suggest an enhancement to the Falco project +labels: kind/feature + +--- + + +**What would you like to be added**: + +**Why is this needed**: diff --git a/.github/ISSUE_TEMPLATE/failing-tests.md b/.github/ISSUE_TEMPLATE/failing-tests.md new file mode 100644 index 00000000..e3db8e35 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/failing-tests.md @@ -0,0 +1,20 @@ +--- +name: Failing Test +about: Report test failures in Falco CI jobs +labels: kind/failing-test + +--- + + + +**Which jobs are failing**: + +**Which test(s) are failing**: + +**Since when has it been failing**: + +**Test link**: + +**Reason for failure**: + +**Anything else we need to know**: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..d3ab3c5b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,54 @@ + + +**What type of PR is this?** +> Uncomment only one ` /kind <>` line, hit enter to put that in a new line, and remove leading whitespaces from that line: +> +> /kind bug +> /kind cleanup +> /kind design +> /kind documentation +> /kind failing-test +> /kind feature +> /kind flaky-test + +> If contributing rules or changes to rules, please make sure to uncomment the appropriate kind + +> /kind rule/update +> /kind rule/create + +**Any specific area of the project related to this PR?** + +> /area engine +> /area rules +> /area deployment +> /area integrations +> /area examples + +**What this PR does / why we need it**: + +**Which issue(s) this PR fixes**: + +Fixes # + +**Special notes for your reviewer**: + +**Does this PR introduce a user-facing change?**: + +```release-note + +``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 58b48801..a9b6c35f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,26 @@ This file documents all notable changes to Falco. The release numbering uses [semantic versioning](http://semver.org). +## v0.15.2 + +Released 2019-06-12 + +## Major Changes + +* New documentation and process handling around issues and pull requests. [[#644](https://github.com/falcosecurity/falco/pull/644)] [[#659](https://github.com/falcosecurity/falco/pull/659)] [[#664](https://github.com/falcosecurity/falco/pull/664)] [[#665](https://github.com/falcosecurity/falco/pull/665)] + +## Minor Changes + +* None. + +## Bug Fixes + +* Fix compilation of eBPF programs on COS (used by GKE) [[#sysdig/1431](https://github.com/draios/sysdig/pull/1431)] + +## Rule Changes + +* Rework exceptions lists for `Create Privileged Pod`, `Create Sensitive Mount Pod`, `Launch Sensitive Mount Container`, `Launch Privileged Container` rules to use separate specific lists rather than a single "Trusted Containers" list. [[#651](https://github.com/falcosecurity/falco/pull/651)] + ## v0.15.1 Released 2019-06-07 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..03379990 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,115 @@ +# Contributing to Falco + +- [Contributing to Falco](#contributing-to-falco) + - [Code of Conduct](#code-of-conduct) + - [Issues](#issues) + - [Triage issues](#triage-issues) + - [More about labels](#more-about-labels) + - [Slack](#slack) + - [Pull Requests](#pull-requests) + - [Developer Certificate Of Origin](#developer-certificate-of-origin) + +## Code of Conduct + +Falco has a +[Code of Conduct](CODE_OF_CONDUCT) +to which all contributors must adhere, please read it before interacting with the repository or the community in any way. + +## Issues + +Issues are the heartbeat ❤️ of the Falco project, there are mainly three kinds of issues you can open: + +- Bug report: you believe you found a problem in Falco and you want to discuss and get it fixed, +creating an issue with the **bug report template** is the best way to do so. +- Enhancement: any kind of new feature need to be discussed in this kind of issue, do you want a new rule or a new feature? This is the kind of issue you want to open. Be very good at explaining your intent, it's always important that others can understand what you mean in order to discuss, be open and collaborative in letting others help you getting this done! +- Failing tests: you noticed a flaky test or a problem with a build? This is the kind of issue to triage that! + +The best way to get **involved** in the project is through issues, you can help in many ways: + +- Issues triaging: participating in the discussion and adding details to open issues is always a good thing, +sometimes issues need to be verified, you could be the one writing a test case to fix a bug! +- Helping to resolve the issue: you can help in getting it fixed in many ways, more often by opening a pull request. + +### Triage issues + +We need help in categorizing issues. Thus any help is welcome! + +When you triage an issue, you: + +* assess whether it has merit or not + +* quickly close it by correctly answering a question + +* point the reporter to a resource or documentation answering the issue + +* tag it via labels, projects, or milestones + +* take ownership submitting a PR for it, in case you want 😇 + +#### More about labels + +These guidelines are not set in stone and are subject to change. + +Anyway a `kind/*` label for any issue is mandatory. + +This is the current [label set](https://github.com/falcosecurity/falco/labels) we have. + +You can use commands - eg., `/label ` to add (or remove) labels or manually do it. + +The commands available are the following ones: + +``` +/[remove-](area|kind|priority|triage|label) +``` + +Some examples: + +* `/area rules` +* `/remove-area rules` +* `/kind kernel-module` +* `/label good-first-issue` +* `/triage duplicate` +* `/triage unresolved` +* `/triage not-reproducible` +* `/triage support` +* ... + +### Slack + +Other discussion, and **support requests** should go through the `#falco` channel in the Sysdig slack, please join [here](https://slack.sysdig.com). + +## Pull Requests + +Thanks for taking time to make a [pull request](https://help.github.com/articles/about-pull-requests) (hereafter PR). + +In the PR body, feel free to add an area label if appropriate by typing `/area `, PRs will also +need a kind, make sure to specify the appropriate one by typing `/kind `. + +The list of labels is [here](https://github.com/falcosecurity/falco/labels). + +Also feel free to suggest a reviewer with `/assign @theirname`. + +Once your reviewer is happy, they will say `/lgtm` which will apply the +`lgtm` label, and will apply the `approved` label if they are an +[owner](/OWNERS). + +Your PR will be automatically merged once it has the `lgtm` and `approved` +labels, does not have any `do-not-merge/*` labels, and all status checks (eg., rebase, tests, DCO) are positive. + +## Developer Certificate Of Origin + +The [Developer Certificate of Origin (DCO)](https://developercertificate.org/) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. + +Contributors to the Falco project sign-off that they adhere to these requirements by adding a `Signed-off-by` line to commit messages. + +``` +This is my commit message + +Signed-off-by: John Poiana +``` + +Git even has a `-s` command line option to append this automatically to your commit message: + +``` +$ git commit -s -m 'This is my commit message' +``` diff --git a/OWNERS b/OWNERS new file mode 100644 index 00000000..ad27e230 --- /dev/null +++ b/OWNERS @@ -0,0 +1,11 @@ +approvers: + - leodido + - fntlnz + - mstemm +reviewers: + - leodido + - fntlnz + - mfdii + - kaizhe + - mstemm + diff --git a/README.md b/README.md index 21f0bb77..43af96f0 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,19 @@ +

+

+ # Falco #### Latest release -**v0.15.1** +**v0.15.2** Read the [change log](https://github.com/falcosecurity/falco/blob/dev/CHANGELOG.md) Dev Branch: [![Build Status](https://travis-ci.com/falcosecurity/falco.svg?branch=dev)](https://travis-ci.com/falcosecurity/falco)
Master Branch: [![Build Status](https://travis-ci.com/falcosecurity/falco.svg?branch=master)](https://travis-ci.com/falcosecurity/falco)
CII Best Practices: [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2317/badge)](https://bestpractices.coreinfrastructure.org/projects/2317) +--- -## Overview Falco is a behavioral activity monitor designed to detect anomalous activity in your applications. Powered by [sysdig’s](https://github.com/draios/sysdig) system call capture infrastructure, Falco lets you continuously monitor and detect container, application, host, and network activity—all in one place—from one source of data, with one set of rules. Falco is hosted by the Cloud Native Computing Foundation (CNCF) as a sandbox level project. If you are an organization that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details read the [Falco CNCF project proposal](https://github.com/cncf/toc/tree/master/proposals/falco.adoc). @@ -26,6 +29,11 @@ Falco can detect and alert on any behavior that involves making Linux system cal - A non-device file is written to `/dev`. - A standard system binary, such as `ls`, is making an outbound network connection. + +### Installing Falco + +A comprehensive [installation guide](https://falco.org/docs/installation/) for Falco is available in the documentation website. + #### How do you compare Falco with other security tools? One of the questions we often get when we talk about Falco is “How does Falco differ from other Linux security tools such as SELinux, AppArmor, Auditd, etc.?”. We wrote a [blog post](https://sysdig.com/blog/selinux-seccomp-falco-technical-discussion/) comparing Falco with other tools. @@ -45,48 +53,6 @@ License Terms --- Falco is licensed to you under the [Apache 2.0](./COPYING) open source license. -Contributor License Agreements +Contributing --- -### Background -We are formalizing the way that we accept contributions of code from the contributing community. We must now ask that contributions to falco be provided subject to the terms and conditions of a [Contributor License Agreement (CLA)](./cla). The CLA comes in two forms, applicable to contributions by individuals, or by legal entities such as corporations and their employees. We recognize that entering into a CLA with us involves real consideration on your part, and we’ve tried to make this process as clear and simple as possible. - -We’ve modeled our CLA off of industry standards, such as [the CLA used by Kubernetes](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md). Note that this agreement is not a transfer of copyright ownership, this simply is a license agreement for contributions, intended to clarify the intellectual property license granted with contributions from any person or entity. It is for your protection as a contributor as well as the protection of falco; it does not change your rights to use your own contributions for any other purpose. - -For some background on why contributor license agreements are necessary, you can read FAQs from many other open source projects: - -- [Django’s excellent CLA FAQ](https://www.djangoproject.com/foundation/cla/faq/) -- [A well-written chapter from Karl Fogel’s Producing Open Source Software on CLAs](http://producingoss.com/en/copyright-assignment.html) -- [The Wikipedia article on CLAs](http://en.wikipedia.org/wiki/Contributor_license_agreement) - -As always, we are grateful for your past and present contributions to falco. - -### What do I need to do in order to contribute code? - -At first, you need to make the changes based on the dev branch not the master branch. - -**Individual contributions**: Individuals who wish to make contributions must review the [Individual Contributor License Agreement](./cla/falco_contributor_agreement.txt) and indicate agreement by adding the following line to every GIT commit message: - -``` -falco-CLA-1.0-signed-off-by: Joe Smith -``` - -Use your real name; pseudonyms or anonymous contributions are not allowed. - -**Corporate contributions**: Employees of corporations, members of LLCs or LLPs, or others acting on behalf of a contributing entity, must review the [Corporate Contributor License Agreement](./cla/falco_corp_contributor_agreement.txt), must be an authorized representative of the contributing entity, and indicate agreement to it on behalf of the contributing entity by adding the following lines to every GIT commit message: - -``` -falco-CLA-1.0-contributing-entity: Full Legal Name of Entity -falco-CLA-1.0-signed-off-by: Joe Smith -``` - -Use a real name of a natural person who is an authorized representative of the contributing entity; pseudonyms or anonymous contributions are not allowed. - -**Government contributions**: Employees or officers of the United States Government, must review the [Government Contributor License Agreement](https://github.com/falcosecurity/falco/blob/dev/cla/falco_govt_contributor_agreement.txt), must be an authorized representative of the contributing entity, and indicate agreement to it on behalf of the contributing entity by adding the following lines to every GIT commit message: - -``` -falco-CLA-1.0-contributing-govt-entity: Full Legal Name of Entity -falco-CLA-1.0-signed-off-by: Joe Smith -This file is a work of authorship of an employee or officer of the United States Government and is not subject to copyright in the United States under 17 USC 105. -``` - -Use a real name of a natural person who is an authorized representative of the contributing entity; pseudonyms or anonymous contributions are not allowed. +See the [CONTRIBUTING.md](./CONTRIBUTING.md). diff --git a/cla/falco_contributor_agreement.txt b/cla/falco_contributor_agreement.txt deleted file mode 100644 index 35f38d4f..00000000 --- a/cla/falco_contributor_agreement.txt +++ /dev/null @@ -1,30 +0,0 @@ -DRAIOS, INC. – OPEN SOURCE CONTRIBUTION LICENSE AGREEMENT (“Agreement”) - -Draios, Inc. dba Sysdig (“Draios” or “Sysdig”) welcomes you to work on our open source software projects. In order to clarify the intellectual property license granted with Contributions from any person or entity, you must agree to the license terms below in order to contribute code back to our repositories. This license is for your protection as a Contributor as well as the protection of Sysdig; it does not change your rights to use your own Contributions for any other purpose. To indicate your Agreement, follow the procedure set forth below under TO AGREE, after reading this Agreement. - -You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Draios/Sysdig. Except for the license granted herein to Draios/Sysdig and recipients of software distributed by Draios/Sysdig, You reserve all right, title, and interest in and to Your Contributions. - -1. Definitions. "You" (or "Your") shall mean the individual natural person and copyright owner who is making this Agreement with Draios/Sysdig. “You” excludes legal entities such as corporations, and Draios/Sysdig provides a separate CLA for corporations or other entities. "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Draios/Sysdig for inclusion in, or documentation of, any of the products owned or managed by Draios/Sysdig (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Draios/Sysdig or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Draios/Sysdig for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution." - -2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to Draios/Sysdig and to recipients of software distributed by Draios/Sysdig a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. - -3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to Draios/Sysdig and to recipients of software distributed by Draios/Sysdig a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims that You have the right to license and that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity other than Draios/Sysdig institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. - -4. You represent to Draios/Sysdig that You are legally entitled to grant the licenses set forth above. - -5. You represent that each of Your Contributions is Your original creation unless you act according to section 7 below. You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You represent that Your sign-off indicating assent to this Agreement includes your real name and not a pseudonym, and that you shall not attempt or make an anonymous Contribution. - -6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions to Draios/Sysdig on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. - -7. If You wish to submit work that is not Your original creation, You may submit it to Draios/Sysdig separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]". - -8. You agree to notify Draios/Sysdig of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect. - -9. You understand and agree that this project and Your Contribution are public and that a record of the contribution, including all personal information that I submit with it, including my sign-off, may be stored by Draios/Sysdig indefinitely and may be redistributed to others. You understand and agree that Draios/Sysdig has no obligation to use any Contribution in any Draios/Sysdig project or product, and Draios/Sysdig may decline to accept Your Contributions or Draios/Sysdig may remove Your Contributions from Draios/Sysdig projects or products at any time without notice. You understand and agree that Draios/Sysdig is not and will not pay you any form of compensation, in currency, equity or otherwise, in exchange for Your Contributions or for Your assent to this Agreement. You understand and agree that you are independent of Draios/Sysdig and you are not, by entering into this Agreement or providing Your Contributions, becoming employed, hired as an independent contractor, or forming any other relationship with Draios/Sysdig relating to employment, compensation or ownership or involving any fiduciary obligation. - -TO AGREE: -Add the following line to every GIT commit message: - -falco-CLA-1.0-signed-off-by: Joe Smith - -Use your real name; pseudonyms or anonymous contributions are not allowed. diff --git a/cla/falco_corp_contributor_agreement.txt b/cla/falco_corp_contributor_agreement.txt deleted file mode 100644 index d8afd549..00000000 --- a/cla/falco_corp_contributor_agreement.txt +++ /dev/null @@ -1,33 +0,0 @@ -DRAIOS, INC. – OPEN SOURCE CONTRIBUTION LICENSE AGREEMENT FOR CONTRIBUTING ENTITIES (SUCH AS CORPORATIONS) (“Agreement”) - -Draios, Inc. dba Sysdig (“Draios” or “Sysdig”) welcomes you to work on our open source software projects. In order to clarify the intellectual property license granted with Contributions from any person or entity, you must agree to the license terms below in order to contribute code back to our repositories. This license is for your protection as a Contributor as well as the protection of Sysdig; it does not change your rights to use your own Contributions for any other purpose. To indicate your Agreement, follow the procedure set forth below under TO AGREE, after reading this Agreement. - -A “contributing entity” means a corporation, limited liability company, partnership, or other entity that is organized and recognized under the laws of a state of the United States or another country (a “contributing entity”). We provide a separate CLA for individual contributors. - -You accept and agree to the following terms and conditions for Your present and future Contributions that are submitted to Draios/Sysdig. Except for the license granted herein to Draios/Sysdig and recipients of software distributed by Draios/Sysdig, You reserve all right, title, and interest in and to Your Contributions. - -1. Definitions. "You" (or "Your") shall mean the contributing entity that owns for copyright purposes or otherwise has the right to contribute the Contribution, and that is making this Agreement with Draios/Sysdig, and all other entities that control, are controlled by, or are under common control with the contributing entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Draios/Sysdig for inclusion in, or documentation of, any of the products owned or managed by Draios/Sysdig (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Draios/Sysdig or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Draios/Sysdig for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution." - -2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to Draios/Sysdig and to recipients of software distributed by Draios/Sysdig a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. - -3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to Draios/Sysdig and to recipients of software distributed by Draios/Sysdig a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims that You have the right to license and that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity other than Draios/Sysdig institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. - -4. You represent to Draios/Sysdig that You own or have the right to contribute Your Contributions to Draios/Sysdig, and that You are legally entitled to grant the licenses set forth above. - -5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You represent that Your sign-off indicating assent to this Agreement includes the real name of a natural person who is an authorized representative of You, and not a pseudonym, and that You are not attempting or making an anonymous Contribution. - -6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions to Draios/Sysdig on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. - -7. If You wish to submit work that is not Your original creation, You may submit it to Draios/Sysdig separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]". - -8. You agree to notify Draios/Sysdig of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect. - -9. You understand and agree that this project and Your Contribution are public and that a record of the contribution, including all personal information that You submit with it, including the sign-off of Your authorized representative, may be stored by Draios/Sysdig indefinitely and may be redistributed to others. You understand and agree that Draios/Sysdig has no obligation to use any Contribution in any Draios/Sysdig project or product, and Draios/Sysdig may decline to accept Your Contributions or Draios/Sysdig may remove Your Contributions from Draios/Sysdig projects or products at any time without notice. You understand and agree that Draios/Sysdig is not and will not pay You any form of compensation, in currency, equity or otherwise, in exchange for Your Contributions or for Your assent to this Agreement. You understand and agree that You are independent of Draios/Sysdig and You are not, by entering into this Agreement or providing Your Contributions, becoming employed, hired as an independent contractor, or forming any other relationship with Draios/Sysdig relating to employment, compensation or ownership or involving any fiduciary obligation. - -TO AGREE: -Add the following lines to every GIT commit message: - -falco-CLA-1.0-contributing-entity: Full Legal Name of Entity -falco-CLA-1.0-signed-off-by: Joe Smith - -Use a real name of a natural person who is an authorized representative of the contributing entity; pseudonyms or anonymous contributions are not allowed. diff --git a/cla/falco_govt_contributor_agreement.txt b/cla/falco_govt_contributor_agreement.txt deleted file mode 100644 index 14b2d328..00000000 --- a/cla/falco_govt_contributor_agreement.txt +++ /dev/null @@ -1,33 +0,0 @@ -DRAIOS, INC. OPEN SOURCE CONTRIBUTION AGREEMENT FOR UNITED STATES GOVERNMENT CONTRIBUTING ENTITIES (Agreement) - -Draios, Inc. (Draios or Sysdig) welcomes the work of others on our open source software projects. To contribute code back to our repositories, we require a contributing entity that is a United States Government agency to complete, and agree to, the Government Contributor Agreement (GCA) set forth here, by and through a designated authorized representative. This agreement clarifies the ability for us to use and incorporate the contributions of a government contributing entity in our projects and products. After agreeing to these terms, a contributing entity may contribute to our projects. To indicate the agreement of the contributing entity, an authorized representative shall follow the procedure set forth below under TO AGREE, after reading this Agreement. A contributing entity means any agency or unit of the United States government. We provide a separate CLA for individual contributors. - -You accept and agree to the following terms and conditions for Your present and future Contributions that are submitted to Draios/Sysdig. - -1. Definitions. "You" (or "Your") shall mean the contributing entity that has authored or otherwise has the right to contribute the Contribution, and that is making this Agreement with Draios/Sysdig. "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Draios/Sysdig for inclusion in, or documentation of, any of the products owned or managed by Draios/Sysdig (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Draios/Sysdig or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Draios/Sysdig for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution." - -2. Contributions Not Subject to Copyright. Each Contribution is a work authored by the United States Government or an employee or officer thereof and is not subject to copyright under 17 U.S.C. 105. - -3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to Draios/Sysdig and to recipients of software distributed by Draios/Sysdig a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims that You have the right to license and that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity other than Draios/Sysdig institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. - -4. You represent to Draios/Sysdig that You own or have the right to contribute Your Contributions to Draios/Sysdig, and that You are legally entitled to grant the license set forth above. - -5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions. You represent that Your sign-off indicating assent to this Agreement includes the real name of a natural person who is an authorized representative of You, and not a pseudonym, and that You are not attempting or making an anonymous Contribution. - -6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions to Draios/Sysdig on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. - -7. If You wish to submit work that is not Your original creation, You may submit it to Draios/Sysdig separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]". - -8. You agree to notify Draios/Sysdig of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect. - -9. You understand and agree that this project and Your Contribution are public and that a record of the contribution, including all personal information that You submit with it, including the sign-off of Your authorized representative, may be stored by Draios/Sysdig indefinitely and may be redistributed to others. You understand and agree that Draios/Sysdig has no obligation to use any Contribution in any Draios/Sysdig project or product, and Draios/Sysdig may decline to accept Your Contributions or Draios/Sysdig may remove Your Contributions from Draios/Sysdig projects or products at any time without notice. You understand and agree that Draios/Sysdig is not and will not pay You any form of compensation, in currency, equity or otherwise, in exchange for Your Contributions or for Your assent to this Agreement. You understand and agree that You are independent of Draios/Sysdig and You are not, by entering into this Agreement or providing Your Contributions, becoming employed, hired as an independent contractor, or forming any other relationship with Draios/Sysdig relating to employment, compensation or ownership or involving any fiduciary obligation. - -TO AGREE: -Add the following lines to every GIT commit message: - -falco-CLA-1.0-contributing-govt-entity: Full Legal Name of Entity -falco-CLA-1.0-signed-off-by: Joe Smith joe.smith@email.com -This file is a work of authorship of an employee or officer of the United States Government and is not subject to copyright in the United States under 17 USC 105. - -Use a real name of a natural person who is an authorized representative of the contributing entity; pseudonyms or anonymous contributions are not allowed. - diff --git a/rules/OWNERS b/rules/OWNERS new file mode 100644 index 00000000..ceb8db31 --- /dev/null +++ b/rules/OWNERS @@ -0,0 +1,10 @@ +approvers: + - mstemm + - kaizhe +reviewers: + - leodido + - fntlnz + - mfdii + - kaizhe + - mstemm + diff --git a/rules/falco_rules.yaml b/rules/falco_rules.yaml index 1a74bae8..78859d39 100644 --- a/rules/falco_rules.yaml +++ b/rules/falco_rules.yaml @@ -1665,40 +1665,95 @@ container.image.repository contains ose-docker-registry or container.image.repository contains image-inspector)) +# These images are allowed both to run with --privileged and to mount +# sensitive paths from the host filesystem. +# +# NOTE: This list is only provided for backwards compatibility with +# older local falco rules files that may have been appending to +# trusted_images. To make customizations, it's better to add images to +# either privileged_images or falco_sensitive_mount_images. - list: trusted_images + items: [] + +# Add conditions to this macro (probably in a separate file, +# overwriting this macro) to specify additional containers that are +# trusted and therefore allowed to run privileged *and* with sensitive +# mounts. +# +# Like trusted_images, this is deprecated in favor of +# user_privileged_containers and user_sensitive_mount_containers and +# is only provided for backwards compatibility. +# +# In this file, it just takes one of the images in trusted_containers +# and repeats it. +- macro: user_trusted_containers + condition: (container.image.repository=sysdig/agent) + +- list: sematext_images + items: [sematext/sematext-agent-docker, sematext/agent, sematext/logagent, + registry.access.redhat.com/sematext/sematext-agent-docker, + registry.access.redhat.com/sematext/agent, + registry.access.redhat.com/sematext/logagent] + +# These container images are allowed to run with --privileged +- list: falco_privileged_images items: [ - sysdig/agent, sysdig/falco, sysdig/sysdig, gcr.io/google_containers/hyperkube, - quay.io/coreos/flannel, gcr.io/google_containers/kube-proxy, calico/node, - rook/toolbox, cloudnativelabs/kube-router, consul, mesosphere/mesos-slave, - datadog/docker-dd-agent, datadog/agent, docker/ucp-agent, gliderlabs/logspout + sysdig/agent, sysdig/falco, sysdig/sysdig, + gcr.io/google_containers/kube-proxy, calico/node, + rook/toolbox, cloudnativelabs/kube-router, mesosphere/mesos-slave, + docker/ucp-agent, sematext_images ] -- macro: trusted_containers +- macro: falco_privileged_containers condition: (openshift_image or + user_trusted_containers or container.image.repository in (trusted_images) or + container.image.repository in (falco_privileged_images) or container.image.repository startswith istio/proxy_ or container.image.repository startswith quay.io/sysdig) +# Add conditions to this macro (probably in a separate file, +# overwriting this macro) to specify additional containers that are +# allowed to run privileged +# +# In this file, it just takes one of the images in falco_privileged_images +# and repeats it. +- macro: user_privileged_containers + condition: (container.image.repository=sysdig/agent) + + - list: rancher_images items: [ rancher/network-manager, rancher/dns, rancher/agent, rancher/lb-service-haproxy, rancher/metadata, rancher/healthcheck ] -# Add conditions to this macro (probably in a separate file, -# overwriting this macro) to specify additional containers that are -# trusted and therefore allowed to run privileged. -# -# In this file, it just takes one of the images in trusted_containers -# and repeats it. -- macro: user_trusted_containers - condition: (container.image.repository=sysdig/agent) +# These container images are allowed to mount sensitive paths from the +# host filesystem. +- list: falco_sensitive_mount_images + items: [ + sysdig/agent, sysdig/falco, sysdig/sysdig, + gcr.io/google_containers/hyperkube, + gcr.io/google_containers/kube-proxy, calico/node, + rook/toolbox, cloudnativelabs/kube-router, consul, + datadog/docker-dd-agent, datadog/agent, docker/ucp-agent, gliderlabs/logspout + ] + +- macro: falco_sensitive_mount_containers + condition: (user_trusted_containers or + container.image.repository in (trusted_images) or + container.image.repository in (falco_sensitive_mount_images) or + container.image.repository startswith quay.io/sysdig) + +# These container images are allowed to run with hostnetwork=true +- list: falco_hostnetwork_images + items: [] # Add conditions to this macro (probably in a separate file, # overwriting this macro) to specify additional containers that are # allowed to perform sensitive mounts. # -# In this file, it just takes one of the images in trusted_containers +# In this file, it just takes one of the images in falco_sensitive_mount_images # and repeats it. - macro: user_sensitive_mount_containers condition: (container.image.repository=sysdig/agent) @@ -1708,8 +1763,8 @@ condition: > container_started and container and container.privileged=true - and not trusted_containers - and not user_trusted_containers + and not falco_privileged_containers + and not user_privileged_containers output: Privileged container started (user=%user.name command=%proc.cmdline %container.info image=%container.image.repository:%container.image.tag) priority: INFO tags: [container, cis, mitre_privilege_escalation, mitre_lateral_movement] @@ -1748,7 +1803,7 @@ condition: > container_started and container and sensitive_mount - and not trusted_containers + and not falco_sensitive_mount_containers and not user_sensitive_mount_containers output: Container with sensitive mount started (user=%user.name command=%proc.cmdline %container.info image=%container.image.repository:%container.image.tag mounts=%container.mounts) priority: INFO diff --git a/rules/k8s_audit_rules.yaml b/rules/k8s_audit_rules.yaml index 046fcc7c..f8ca043f 100644 --- a/rules/k8s_audit_rules.yaml +++ b/rules/k8s_audit_rules.yaml @@ -17,6 +17,13 @@ # - required_engine_version: 2 +# Like always_true/always_false, but works with k8s audit events +- macro: k8s_audit_always_true + condition: (jevt.rawtime exists) + +- macro: k8s_audit_never_true + condition: (jevt.rawtime=0) + # Generally only consider audit events once the response has completed - list: k8s_audit_stages items: ["ResponseComplete"] @@ -48,11 +55,10 @@ # explicitly enumerate the container images that you want to run in # your environment. In this main falco rules file, there isn't any way # to know all the containers that can run, so any container is -# alllowed, by using a filter that is guaranteed to evaluate to true -# (the event time existing). In the overridden macro, the condition +# allowed, by using the always_true macro. In the overridden macro, the condition # would look something like (ka.req.container.image.repository=my-repo/my-image) - macro: allowed_k8s_containers - condition: (jevt.rawtime exists) + condition: (k8s_audit_always_true) - macro: response_successful condition: (ka.response.code startswith 2) @@ -108,31 +114,10 @@ source: k8s_audit tags: [k8s] -- list: trusted_k8s_containers - items: [sysdig/agent, sysdig/falco, quay.io/coreos/flannel, calico/node, rook/toolbox, - gcr.io/google_containers/hyperkube, gcr.io/google_containers/kube-proxy, - openshift3/ose-sti-builder, - registry.access.redhat.com/openshift3/logging-fluentd, - registry.access.redhat.com/openshift3/logging-elasticsearch, - registry.access.redhat.com/openshift3/metrics-cassandra, - registry.access.redhat.com/openshift3/ose-sti-builder, - registry.access.redhat.com/openshift3/ose-docker-builder, - registry.access.redhat.com/openshift3/image-inspector, - registry.access.redhat.com/sematext/sematext-agent-docker, - registry.access.redhat.com/sematext/agent, - registry.access.redhat.com/sematext/logagent, - cloudnativelabs/kube-router, istio/proxy, - datadog/docker-dd-agent, datadog/agent, - docker/ucp-agent, - gliderlabs/logspout - sematext/agent - sematext/logagent - sematext/sematext-agent-docker] - - rule: Create Privileged Pod desc: > Detect an attempt to start a pod with a privileged container - condition: kevt and pod and kcreate and ka.req.container.privileged=true and not ka.req.container.image.repository in (trusted_k8s_containers) + condition: kevt and pod and kcreate and ka.req.container.privileged=true and not ka.req.container.image.repository in (falco_privileged_images) output: Pod started with privileged container (user=%ka.user.name pod=%ka.resp.name ns=%ka.target.namespace image=%ka.req.container.image) priority: WARNING source: k8s_audit @@ -150,7 +135,7 @@ desc: > Detect an attempt to start a pod with a volume from a sensitive host directory (i.e. /proc). Exceptions are made for known trusted images. - condition: kevt and pod and kcreate and sensitive_vol_mount and not ka.req.container.image.repository in (trusted_k8s_containers) + condition: kevt and pod and kcreate and sensitive_vol_mount and not ka.req.container.image.repository in (falco_sensitive_mount_images) output: Pod started with sensitive mount (user=%ka.user.name pod=%ka.resp.name ns=%ka.target.namespace image=%ka.req.container.image mounts=%jevt.value[/requestObject/spec/volumes]) priority: WARNING source: k8s_audit @@ -159,7 +144,7 @@ # Corresponds to K8s CIS Benchmark 1.7.4 - rule: Create HostNetwork Pod desc: Detect an attempt to start a pod using the host network. - condition: kevt and pod and kcreate and ka.req.container.host_network=true and not ka.req.container.image.repository in (trusted_k8s_containers) + condition: kevt and pod and kcreate and ka.req.container.host_network=true and not ka.req.container.image.repository in (falco_hostnetwork_images) output: Pod started using host network (user=%ka.user.name pod=%ka.resp.name ns=%ka.target.namespace image=%ka.req.container.image) priority: WARNING source: k8s_audit @@ -307,7 +292,7 @@ # represent a stream of activity for a cluster. If you wish to disable # these events, modify the following macro. - macro: consider_activity_events - condition: (jevt.rawtime exists) + condition: (k8s_audit_always_true) - macro: kactivity condition: (kevt and consider_activity_events) @@ -429,7 +414,7 @@ # following macro. # condition: (jevt.rawtime exists) - macro: consider_all_events - condition: (not jevt.rawtime exists) + condition: (k8s_audit_never_true) - macro: kall condition: (kevt and consider_all_events) diff --git a/test/falco_k8s_audit_tests.yaml b/test/falco_k8s_audit_tests.yaml index 730cf88b..da6cec0e 100644 --- a/test/falco_k8s_audit_tests.yaml +++ b/test/falco_k8s_audit_tests.yaml @@ -21,6 +21,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/allow_namespace_foo.yaml detect_counts: @@ -30,6 +31,7 @@ trace_files: !mux user_in_allowed_set: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/allow_namespace_foo.yaml - ./rules/k8s_audit/allow_user_some-user.yaml @@ -40,6 +42,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/allow_only_apache_container.yaml detect_counts: @@ -49,6 +52,7 @@ trace_files: !mux create_allowed_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/allow_nginx_container.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_unprivileged.json @@ -57,6 +61,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Create Privileged Pod: 1 @@ -66,6 +71,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Create Privileged Pod: 1 @@ -74,6 +80,7 @@ trace_files: !mux create_privileged_trusted_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/trust_nginx_container.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_privileged.json @@ -81,12 +88,14 @@ trace_files: !mux create_unprivileged_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_unprivileged.json create_unprivileged_trusted_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/trust_nginx_container.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_unprivileged.json @@ -95,6 +104,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Create Sensitive Mount Pod: 1 @@ -104,6 +114,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Create Sensitive Mount Pod: 1 @@ -112,6 +123,7 @@ trace_files: !mux create_sensitive_mount_trusted_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/trust_nginx_container.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_sensitive_mount.json @@ -119,12 +131,14 @@ trace_files: !mux create_unsensitive_mount_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_unsensitive_mount.json create_unsensitive_mount_trusted_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/trust_nginx_container.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_unsensitive_mount.json @@ -133,6 +147,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Create HostNetwork Pod: 1 @@ -141,6 +156,7 @@ trace_files: !mux create_hostnetwork_trusted_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/trust_nginx_container.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_hostnetwork.json @@ -148,12 +164,14 @@ trace_files: !mux create_nohostnetwork_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_nohostnetwork.json create_nohostnetwork_trusted_pod: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/trust_nginx_container.yaml trace_file: trace_files/k8s_audit/create_nginx_pod_nohostnetwork.json @@ -162,6 +180,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/disallow_kactivity.yaml detect_counts: @@ -171,6 +190,7 @@ trace_files: !mux create_nonodeport_service: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/disallow_kactivity.yaml trace_file: trace_files/k8s_audit/create_nginx_service_nonodeport.json @@ -179,6 +199,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/disallow_kactivity.yaml detect_counts: @@ -188,6 +209,7 @@ trace_files: !mux create_configmap_no_private_creds: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/disallow_kactivity.yaml trace_file: trace_files/k8s_audit/create_configmap_no_sensitive_values.json @@ -196,6 +218,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Anonymous Request Allowed: 1 @@ -205,6 +228,7 @@ trace_files: !mux detect: True detect_level: NOTICE rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Attach/Exec Pod: 1 @@ -214,6 +238,7 @@ trace_files: !mux detect: True detect_level: NOTICE rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Attach/Exec Pod: 1 @@ -223,6 +248,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/allow_user_some-user.yaml detect_counts: @@ -232,6 +258,7 @@ trace_files: !mux namespace_in_allowed_set: detect: False rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/allow_namespace_foo.yaml - ./rules/k8s_audit/disallow_kactivity.yaml @@ -241,6 +268,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Pod Created in Kube Namespace: 1 @@ -250,6 +278,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Pod Created in Kube Namespace: 1 @@ -259,6 +288,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Service Account Created in Kube Namespace: 1 @@ -268,6 +298,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Service Account Created in Kube Namespace: 1 @@ -277,6 +308,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - System ClusterRole Modified/Deleted: 1 @@ -286,6 +318,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - System ClusterRole Modified/Deleted: 1 @@ -295,6 +328,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - Attach to cluster-admin Role: 1 @@ -304,6 +338,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - ClusterRole With Wildcard Created: 1 @@ -313,6 +348,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - ClusterRole With Wildcard Created: 1 @@ -322,6 +358,7 @@ trace_files: !mux detect: True detect_level: NOTICE rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - ClusterRole With Write Privileges Created: 1 @@ -331,6 +368,7 @@ trace_files: !mux detect: True detect_level: WARNING rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - ClusterRole With Pod Exec Created: 1 @@ -340,6 +378,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Deployment Created: 1 @@ -349,6 +388,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Deployment Deleted: 1 @@ -358,6 +398,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Service Created: 1 @@ -367,6 +408,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Service Deleted: 1 @@ -376,6 +418,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s ConfigMap Created: 1 @@ -385,6 +428,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s ConfigMap Deleted: 1 @@ -394,6 +438,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml - ./rules/k8s_audit/allow_namespace_foo.yaml - ./rules/k8s_audit/allow_user_some-user.yaml @@ -405,6 +450,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Namespace Deleted: 1 @@ -414,6 +460,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Serviceaccount Created: 1 @@ -423,6 +470,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Serviceaccount Deleted: 1 @@ -432,6 +480,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Role/Clusterrole Created: 1 @@ -441,6 +490,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Role/Clusterrole Deleted: 1 @@ -450,6 +500,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Role/Clusterrolebinding Created: 1 @@ -459,6 +510,7 @@ trace_files: !mux detect: True detect_level: INFO rules_file: + - ../rules/falco_rules.yaml - ../rules/k8s_audit_rules.yaml detect_counts: - K8s Role/Clusterrolebinding Deleted: 1 diff --git a/test/rules/k8s_audit/trust_nginx_container.yaml b/test/rules/k8s_audit/trust_nginx_container.yaml index 5e73cbe8..8ca78e51 100644 --- a/test/rules/k8s_audit/trust_nginx_container.yaml +++ b/test/rules/k8s_audit/trust_nginx_container.yaml @@ -1,3 +1,11 @@ -- list: trusted_k8s_containers +- list: falco_sensitive_mount_images + items: [nginx] + append: true + +- list: falco_privileged_images + items: [nginx] + append: true + +- list: falco_hostnetwork_images items: [nginx] append: true