
Falcoctl: install and manage your rules and plugins
Since the launch of the plugin framework in January 2022, our adopters have requested an out-of-the-box solution to manage the lifecycle of rules (installation, updates). We heard your request and also created a guide to help you smoothly install the plugins.
The Falco maintainers proposed the following solution to help with these issues: falcoctl
. Falcoctl is a CLI tool that performs several useful tasks for Falco.
This blog post describes key concepts around falcoctl
to help you get started.
- Glossary
- Use falcoctl locally
- Use falcoctl in Kubernetes with Helm
- Disable falcoctl in the chart
- Conclusion
Glossary
Before diving into all the details, here's a glossary of the key words to understand how falcoctl
works. An exhaustive list can be found in the README.
Artifact
: An artifact is an elementfalcoctl
can manipulate, right now, onlyrulesfiles
andplugins
are considered.Index
: A .yaml file containing a list of available artifacts with their registries and repositories. The tool's default configuration contains an index file pointing to the officially supported artifacts from thefalcosecurity
organization, see here. Users can also maintain their own index files, pointing to registries and repositories containing custom rulesfiles and plugins.Registry
: A registry stores the artifacts, thatfalcoctl
understands in regards to the OCI standard, any compliant OCI can be used. The official registry uses Github Packages.Repository
: similar to containers, it belongs to a registry and contains one or more versions (tags) of an artifact.
Use falcoctl locally
The following steps explain the basic concepts used to install falcoctl
locally.
Installation
For a Linux amd64 system:
Other environments are described in the README
Now you are able to confirm that the installation went well. Check the version:
Print the help:
Index
Before being able to download and install artifacts, we need to configure an index, we provide one for all official artifacts, plugins and rules:
To confirm the installation:
❯ sudo falcoctl index list
NAME URL ADDED UPDATED
falcosecurity https://falcosecurity.github.io/falcoctl/index.yaml 2023-02-14 14:57:33 2023-02-14 15:48:43
The index is not automatically updated, when a new artifact is added to the list, you can refresh your local cache with:
Configuration
The default configuration of falcoctl
is /etc/falcoctl/falcoctl.yaml
, as it can store secrets, like credentials to private registries, the file is protected by default.
To know more about available settings, see the official docs.
Search for artifacts
Everything is set up and ready. We can search for new artifacts:
Note the
TYPE
column to determine the kind of artifact.
The search is made through names and keywords as we can find them in the index.yaml
:
Installation of artifacts
Installation of Rules
It's time to install our first artifact, the beloved falco default rules.
By default, the latest
version is used, but you can specify a targeted tag sudo falcoctl artifact install falco-rules:0.5.0
.
All official artifacts come with floating tags, for example:
0
for the last0.x.x
0.5
for the last0.5.x
- etc
You can find the available versions (tags) with:
You can also directly check in Github: https://github.com/falcosecurity/rules/pkgs/container/rules%2Ffalco-rules
When you install a ruleset requiring specific plugins, the relative plugins are also installed!
Installation of Plugins
Like rules, plugins can be installed with one simple command:
Easy!
Follow artifacts
A great feature of falcoctl
is its ability to run as a daemon to periodically check the artifacts' repositories and automatically install new versions.
The configuration of the behavior is also in /etc/falcoctl/falcoctl.yaml
.
The install
section lists the references of the artifacts we want to install at deployment of falcoctl
.
The follow
section lists those we want to automatically update and check every
for frequency.
Some plugins and rules versions depend on the falco
version, falcoctl
request, and the falco
type of /versions
and API endpoint that gather intel, this is why we have the falcoVersions
field in the configuration.
We do not advise to disable the plugins, as they are binaries, and could lead to security breaks.
Systemd service
To help you set falcoctl
as a daemon, here's a systemd service template /etc/systemd/system/falcoctl.service
:
To enable/start the new service:
Use falcoctl in Kubernetes with Helm
The last version of the falco
helm
chart, v3.0.0
includes falcoctl
as an init container and sidecar, to accordingly install and follow artifacts.
Add the official Helm repo
Nothing new under the sun, a classic helm
command:
Configure the installation and followed by the artifacts
Like any other values, we can set the values.yaml
field to choose the artifacts to install and follow the index we use for.
The
resolveDeps: true
avoids listing the plugin at install, and will be automatically installed with the rules.
Here's the final command to bootstrap a very basic installation with these settings:
Disable falcoctl in the chart
If for some reason you don't want to use falcoctl
to manage artifacts, you can disable its installation by following these steps:
Conclusion
In this blog post we learned some of the basic falcoctl
usages that we can run locally and in our Kubernetes clusters with helm
. It helps to manage the lifecycle of the rules and the plugins with an out of the box solution like falcoctl`. Stay tuned as the plugin ecosystem is growing and we are seeing the development of more features and enhancements.
More posts will also be out soon to detail more advanced usages, such as using private registries and creating your own artifacts. See you soon!
Per usual, if you have any feedback or need help, you can find us at any of the following locations.
- Get started in Falco.org
- Check out the Falcoctl project on GitHub.
- Check out the Falco Rules on GitHub.
- Check out the Falco Plugins on GitHub.
- Get involved in the Falco community.
- Meet the maintainers on the Falco Slack.
- Follow @falco_org on Twitter.