Commit Graph

249 Commits

Author SHA1 Message Date
Leonardo Di Donato
81e56067f8 fix(scripts/rpm): obtain the driver version (now different from the Falco version)
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-04-17 13:30:52 +02:00
Leonardo Di Donato
b3998a6b44 build(scripts): insert versions into falco-driver-version and install it
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-03-23 18:50:06 +01:00
Leonardo Di Donato
b39f322994 fix(scripts): falco-probe-loader becomes falco-driver-loader and distinghuishes driver version from falco version
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-03-23 18:50:06 +01:00
Leonardo Di Donato
b59e4b6072 chore(docker,cmake,scripts): correct maintainers email
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-02-28 17:32:38 +01:00
Lorenzo Fontana
802b9f7b69 fix: probe environment set to FALCO_BPF_PROBE also at load time
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2020-02-24 19:40:04 +01:00
Leonardo Di Donato
29847df168 fix(scripts/rpm): substitute underscores with dashes for RPM version
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-21 12:51:50 +01:00
Leonardo Di Donato
5434afaee1 build: remove SYSDIG_DIR variable
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-20 13:59:24 +01:00
Leonardo Di Donato
4383bf6e4a chore: remove old build script
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-20 13:59:24 +01:00
Leonardo Di Donato
9db6f95f22 update: deb/rpm falco description
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-20 13:59:24 +01:00
Leonardo Di Donato
c8e1491783 chore: remove jenkins
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-01-20 13:59:24 +01:00
Lorenzo Fontana
b8335b510d build: falco tester automatic version
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2020-01-17 19:09:31 +01:00
Leonardo Di Donato
885e131451 fix(scripts): copy falco-probe-loader during packages build
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Leonardo Di Donato
6ede7bd422 chore: removing sysdig references
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Leonardo Di Donato
a17a12c306 update(scripts): rename env variables for falco probe loader
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Leonardo Di Donato
514d8bacc3 update(docker): introduce SKIP_MODULE_LOAD env variable
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Leonardo Di Donato
17bc344381 fix(scripts): rename SYSDIG_HOST_ROOT env variable into HOST_ROOT
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Loris Degioanni
468fa35965 chore: naming cleanup
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Loris Degioanni
bb3c0275cc fix(scripts): license header
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Loris Degioanni
568f480942 new falco-probe-loader file that doesn't depend on sysdig
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Loris Degioanni
3b45e58217 chore: remove some more unnecessary, legacy references to falco in sysdig
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-11-14 10:00:36 -08:00
Lorenzo Fontana
c76518c681 update: license headers
Co-Authored-By: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2019-10-08 16:02:26 +02:00
Leonardo Di Donato
4a4701b4fd fix(scripts/jenkins): ensure to pull docker images (falco builder and tester)
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Leonardo Di Donato
40111a5d6e chore: moving travis build script in scripts directory
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Leonardo Di Donato
323a9ef51d chore: switching back to latest falco-builder and falco-tester docker images for CI
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Leonardo Di Donato
49752fc81a update(scripts): jenkins pipeline improvements
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Leonardo Di Donato
f18fc46a1c build: update cpack variables
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-26 03:23:01 +02:00
Lorenzo Fontana
19c12042f4 update: sysdig dir gate in subdirectories
Signed-off-by: Lorenzo Fontana <lo@linux.com>

Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
2019-07-03 15:27:28 +02:00
Mark Stemm
0e1c436d14
Add jenkins checks (#584)
* Supporting files to build/test via jenkins

Changes to build/test via jenkins, which also means running all tests in
a container instead of directly on the host:

- Jenkinsfile controls the stages, build.sh does the build and
  run-tests.sh does the regression tests.

- Create a new container falcosecurity/falco-tester that includes the
  dependencies required to run the regression tests. This is a different
  image than falco-builder because it doesn't need to be centos 6 based,
  doesn't install any compiler/etc, and installs the test running
  framework we use (avocado). We now use a newer version of avocado,
  which resulted in some small changes to how it is run and how yaml
  options are parsed.

- Modify run_regression_tests.sh to download trace files to the build
  directory and only if not present. Also honor BUILD_TYPE/BUILD_DIR,
  which is provided via the docker run cmd.

- The package tests are now moved to a separate falco_tests_package.yaml
  file. They will use rpm installs by default instead of debian
  packages. Also add the ability to install rpms in addition to debian
  packages.

- Automate the process of creating the docker local package by: 1)
  Adding CMake rules to copy the Dockerfile, entrypoint to the build
  directory and 2) Copy test trace files and rules into the build
  directory. This allows running the docker build command from
  build/docker/local instead of the source directory.

- Modify the way the container test is run a bit to use the trace
  files/rules copied into the container directly instead of host-mounted
  trace files.

* Use container builder + tester for travis

We'll probably be using jenkins soon, but this will allow switching back
to travis later if we want.

* Use download.draios.com for binutils packages

That way we won't be dependent on snapshot.debian.org.
2019-04-26 12:24:15 -07:00
Xiang Dai
04b1b4da67 delete all duplicate empty blanks (#542)
falco-CLA-1.0-signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-27 11:53:40 -05:00
Mark Stemm
32f8e304eb
Load/unload kernel module on start/stop (#459)
* Load/unload kernel module on start/stop

When falco is started, load the kernel module. (The falco binary also
will do a modprobe if it can't open the inspector, as a backup).

When falco is stopped, unload the kernel module.

This fixes https://github.com/falcosecurity/falco/issues/418.

* Put script execute line in right place.
2018-11-06 13:07:50 -08:00
Mark Stemm
6445cdb950
Better copyright notices (#426)
* Use correct copyright years.

Also include the start year.

* Improve copyright notices.

Use the proper start year instead of just 2018.

Add the right owner Draios dba Sysdig.

Add copyright notices to some files that were missing them.
2018-09-26 19:49:19 -07:00
Mark Stemm
2352b96d6b
Change license to Apache 2.0 (#419)
Replace references to GNU Public License to Apache license in:

 - COPYING file
 - README
 - all source code below falco
 - rules files
 - rules and code below test directory
 - code below falco directory
 - entrypoint for docker containers (but not the Dockerfiles)

I didn't generally add copyright notices to all the examples files, as
they aren't core falco. If they did refer to the gpl I changed them to
apache.
2018-09-20 11:47:10 -07:00
Riccardo Schirone
b8743385e8 Fix installation of falco on OS X (no driver, /usr not writable) 2017-06-16 22:36:13 +02:00
Mark Stemm
ec5adfe892 Build and package standalone falco kernel module
Start packaging (and building when necessary) a falco-specific kernel
module in falco releases. Previously, falco would depend on sysdig and
use its kernel module instead.

The kernel module was already templated to some degree in various
places, so we just had to change the templated name from
sysdig/sysdig-probe to falco/falco-probe.

In containers, run falco-probe-loader instead of
sysdig-probe-loader. This is actually a script in the sysdig repository
which is modified in https://github.com/draios/sysdig/pull/789, and uses
the filename to indicate what kernel module to build and/or load.

For the falco package itself, don't depend on sysdig any longer but instead
depend on dkms and its dependencies, using sysdig as a guide on the set
of required packages.

Additionally, for the package pre-install/post-install scripts start
running falco-probe-loader.

Finally, add a --version argument to falco so it can pass the desired
version string to falco-probe-loader.
2017-03-20 15:56:37 -07:00
Mark Stemm
f547dc97ab Move falco engine to its own library.
Move the c++ and lua code implementing falco engine/falco common to its
own directory userspace/engine. It's compiled as a static library
libfalco_engine.a, and has its own CMakeLists.txt so it can be included
by other projects.

The engine's CMakeLists.txt has a add_subdirectory for the falco rules
directory, so including the engine also builds the rules.

The variables you need to set to use the engine's CMakeLists.txt are:

- CMAKE_INSTALL_PREFIX: the root directory below which everything is
  installed.
- FALCO_ETC_DIR: where to install the rules file.
- FALCO_SHARE_DIR: where to install lua code, relative to the
- install/package root.
- LUAJIT_INCLUDE: where to find header files for lua.
- FALCO_SINSP_LIBRARY: the library containing sinsp code. It will be
- considered a dependency of the engine.
- LPEG_LIB/LYAML_LIB/LIBYAML_LIB: locations for third-party libraries.
- FALCO_COMPONENT: if set, will be included as a part of any install()
  commands.

Instead of specifying /usr/share/falco in config_falco_*.h.in, use
CMAKE_INSTALL_PREFIX and FALCO_SHARE_DIR.

The lua code for the engine has also moved, so the two lua source
directories (userspace/engine/lua and userspace/falco/lua) need to be
available separately via falco_common, so make it an argument to
falco_common::init.

As a part of making it easy to include in another project, also clean up
LPEG build/defs. Modify build-lpeg to add a PREFIX argument to allow for
object files/libraries being in an alternate location, and when building
lpeg, put object files in a build/ subdirectory.
2016-10-24 15:56:45 -07:00
Mark Stemm
2237532ff0 Quote path variables that may contain spaces.
Make sure that references to variables that may be paths (which in turn
may contain spaces) are quoted, so cmake won't break on the spaces.

This fixes https://github.com/draios/falco/issues/79.
2016-05-23 17:20:15 -07:00
Henri DF
fbdab4362c Remove install-falco script.
It isn't being used yet, for now we're using the corresponding script
from the sysdig repo. Removing it to avoid confusion, we can later
re-add as necessary.
2016-05-12 17:31:34 +00:00
Mark Stemm
58d730c62a Don't start by default on debian.
This makes the behavior consistent on debian and redhat.
2016-05-09 17:17:39 -07:00
Mark Stemm
a787dc84d5 Add daemonization, fix any bugs found.
Add support for daemonizing via the --daemon flag. If daemonized, the
pid is written to the file provided via the --pidfile flag. When
daemonized, falco immediately returns an error if stderr output or
logging was chosen on the command line.

Clean up handling of outputs to match the expected use case (daemon):

 - syslog output is enabled by default
 - stdout output is disabled by default
 - If not configured at all, both outputs are enabled.

Also fix some bugs I found while running via packages:

 - There were still some references to the old rules filename
   falco_rules.conf.
 - The redhat package mistakenly defined some system directories like
   /etc, /etc/init.d. Add them to the exclusion list (See
   https://cmake.org/Bug/view.php?id=13609 for context).
 - Clean up some of the error messages to be more consistent.

After this I was able to build and install debian and rpm
packages. Starting the falco service ran falco as a daemon with syslog
output.
2016-05-06 17:25:54 -07:00
Mark Stemm
cfc89127e7 Add init.d files to debian/redhat packages.
Add init.d scripts to debian/redhat packages as well as
postinstall/remove scripts to enable the falco service on install and
disable it on uninstall.

I still need to add support for daemonization to falco, and change the
default output options to match the expected use of being daemonized.
2016-05-06 14:04:44 -07:00
Henri DF
14c1e30c24 Simple script to list ignored syscalls 2016-05-01 23:35:30 +00:00
Henri DF
abe6220651 Renaming 2016-04-28 03:28:19 +00:00
Henri DF
1baedc156f Add install-digwatch script template 2016-04-21 16:33:17 -07:00
Henri DF
d96336ccaa Packaging: remove driver and add dep on sysdig package 2016-04-04 18:01:05 -07:00
Henri DF
86e1eeffb2 Statically link in lpeg lua library 2016-04-04 15:07:16 -07:00
Henri DF
171d58c805 Packaging
- add debian pre/post scripts
- make tgz and rpm (as well as deb)
2016-03-31 20:48:24 -07:00
Henri DF
37d0f7d3e0 Build .deb, .rpm, and .tgz 2016-03-31 18:54:52 -07:00
Henri DF
b8a16aab85 fix re.lua permissions 2016-03-08 01:15:43 +00:00
Henri DF
cc4837312e Pull lpeg and build it 2016-03-04 17:52:01 -08:00