Commit Graph

2122 Commits

Author SHA1 Message Date
Leonardo Di Donato
7e28e305a6 deps: update driver version
Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
ec2ccf4d1c build: fix cares include
Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Co-Authored-By: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
d2ecc52253 build(.circleci): fix build/musl when releasing
Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
be7ba9fea4 build: fix cares include path
Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
2141580a10 update(userspace/engine): bump driver version to 9c7755ae7aaa221a3d17c1d98911c4c2cbdbd21317559d744e53bf63a2677a4b
Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
1e64f0a5c9 build(.circleci): publish static tgz on release
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Lorenzo Fontana
7e9ca5c540 build: run_regression_tests.sh skip packages tests if asked
Co-Authored-By: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
2020-09-10 15:01:07 +02:00
Lorenzo Fontana
98a5813bd7 build: allow the tester command to retrieve the source and build env
variables

Co-Authored-By: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
2020-09-10 15:01:07 +02:00
Lorenzo Fontana
492fe0c372 build: circleci musl build
Co-Authored-By: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
2020-09-10 15:01:07 +02:00
Lorenzo Fontana
00d930199f build: strip userspace/falco/falco in release when building with musl
optimizations

Co-Authored-By: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
2020-09-10 15:01:07 +02:00
Lorenzo Fontana
f2bc92ac58 build: allow configurable cpack targets
Co-Authored-By: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
d5f752de7a build: add MUSL_OPTIMIZED_BUILD option
This option is now decoupled from `MINIMAL_BUILD`

Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
109efc2799 chore(cmake/modules): refine sysdig cmake for minimal build
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
c46dbc7f11 build: remove gRPC, openssl, curl from minimal build
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
b7e75095e6 build(userspace): avoid openssl dep for engine fields verification
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
68f937f5e8 build: disallow k8s audit trace file when minimal build
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
0c1ed551ca build: remove civetweb when minimal build
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
bdd14604d4 build: remove webserver from minimal build
Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leonardo Grasso
9d88bfd0d4 build: add MINIMAL_BUILD option
Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-10 15:01:07 +02:00
Leo Di Donato
361fec452e chore(.circleci): typos
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-09-08 11:07:48 +02:00
Leonardo Di Donato
cd449cb89b update(.circleci): cleanup/packages-dev job
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-09-08 11:07:48 +02:00
Leonardo Di Donato
2880bb1f23 build(.circleci): script for automatic cleanup of Falco development releases
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-09-08 11:07:48 +02:00
Leo Di Donato
d25e07381e update(proposals): clarify that prebuilding drivers is on a best-effort basis
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
2020-09-07 11:39:54 +02:00
Leonardo Di Donato
481eedb80e update(proposals): artifacts cleanup (prebuilt drivers part)
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-09-07 11:39:54 +02:00
Leonardo Di Donato
f077f2887f new(proposals): artifacts cleanup (packages part)
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-09-07 11:39:54 +02:00
Leonardo Di Donato
d80ffeae5b update(proposals): artifacts storage proposal
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-09-07 11:39:54 +02:00
Leonardo Di Donato
2d24df1ce2 new(proposals): initial document about SoA of artifacts storage
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-09-07 11:39:54 +02:00
Mark Stemm
f32bb84851 Start versioning trace files
Start versioning trace files with a unique date. Any time we need to
create new trace files, change TRACE_FILES_VERSION in this script and
copy to traces-{positive,negative,info}-<VERSION>.zip.

The zip file should unzip to traces-{positive,negative,info}, without
any version.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
7666bc3f3a rule(System ClusterRole Modified/Deleted): + role
Add system:managed-certificate-controller as a system role that can be
modified. Can be changed as a part of upgrades.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
08d38d8269 Rule(Pod Created in Kube Namespace): add images
Add several images seen in GKE environments that can run in the
kube-system namespace.

Also change the names of the lists to be more specific. The old names
are retained but are kept around for backwards compatibility.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
3fd4464dee rule(Disallowed K8s User): add known users
Seen when using K8s cluster autoscaling or addon manager.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
702d989cd0 rule(Create HostNetwork Pod): add images
Add a set of images known to run in the host network. Mostly related to
GKE, sometimes plus metrics collection.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
de9c8720c0 rule(Launch Privileged Container) add images
Most of these are seen in GKE and are uses for core routing/metrics
collection.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
534cb8e59f rule(Launch Privileged Container): sort/reorg list
Sort the items in the list falco_privileged_images alphabetically
and also separate them into individual lines. Make it easier to note
changes to the entries in the list using git blame.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
9b3adc1373 rule(Read sensitive file untrusted):google_oslogin
Related to https://github.com/GoogleCloudPlatform/guest-oslogin, full
cmdline is google_oslogin_control.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
fb5e13c694 rule(Write below root): add mysqlsh
Let mysqlsh write below /root/.mysqlsh.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
7effc02c60 rule(Write below etc): add calco exceptions
Add several calico images and command line programs that end up writing
below /etc/calico.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
7ae0ce1936 rule(Update Package Repository): restrict files
Previously any write to a file called sources.list would match the
access_repositories condition, even a file /usr/tmp/..../sources.list.

Change the macro so the files in repository_files must be somewhere
below any of repository_directories.

Also allow programs spawned by package management programs to change
these files, using package_mgmt_ancestor_procs.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
891965375d rule(Read sensitive file untrusted): linux-bench
Let programs spawned by linux-bench (CIS Linux Benchmark program) read
/etc/shadow. Tests in the benchmark check for permissions of the file
and accounts in the contents of the file.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Mark Stemm
7a4d790458 rule(Change thread namespace): Require proc name
In some cases, dropped events around the time a new container is started
can result in missing the exec/clone for a process that does a setns to
enter the namespace of a container. Here's an example from an oss
capture:

```

282273 09:01:22.098095673 30 runc:[0:PARENT] (168555) < setns res=0
282283 09:01:22.098138869 30 runc:[0:PARENT] (168555) < setns res=0
282295 09:01:22.098179685 30 runc:[0:PARENT] (168555) < setns res=0
517284 09:01:30.128723777 13 <NA> (168909) < setns res=0
517337 09:01:30.129054963 13 <NA> (168909) < setns res=0
517451 09:01:30.129560037 2 <NA> (168890) < setns res=0
524597 09:01:30.162741004 19 <NA> (168890) < setns res=0
527433 09:01:30.179786170 18 runc:[0:PARENT] (168927) < setns res=0
527448 09:01:30.179852428 18 runc:[0:PARENT] (168927) < setns res=0
535566 09:01:30.232420372 25 nsenter (168938) < setns res=0
537412 09:01:30.246200357 0 nsenter (168941) < setns res=0
554163 09:01:30.347158783 17 nsenter (168950) < setns res=0
659908 09:01:31.064622960 12 runc:[0:PARENT] (169023) < setns res=0
659919 09:01:31.064665759 12 runc:[0:PARENT] (169023) < setns res=0
732062 09:01:31.608297074 4 nsenter (169055) < setns res=0
812985 09:01:32.217527319 6 runc:[0:PARENT] (169077) < setns res=0
812991 09:01:32.217579396 6 runc:[0:PARENT] (169077) < setns res=0
813000 09:01:32.217632211 6 runc:[0:PARENT] (169077) < setns res=0
```

When this happens, it can cause false positives for the "Change thread
namespace" rule as it allows certain process names like "runc",
"containerd", etc to perform setns calls.

Other rules already use the proc_name_exists macro to require that the
process name exists. This change adds proc_name_exists to the Change
Thread Namespace rule as well.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2020-09-03 18:56:51 +02:00
Loris Degioanni
5d71d70a14 added brakets to three macros to make them less ambiguous
Signed-off-by: Loris Degioanni <loris@sysdig.com>
2020-08-31 18:02:10 +02:00
Leonardo Grasso
0b8ecfaed3 docs(README.md): correct CONTRIBUTING.md URL
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-08-31 17:08:06 +02:00
Leonardo Grasso
b003c92080 docs(RELEASE.md): correct typo in YYYY
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-08-31 17:08:06 +02:00
Chuck Schweizer
d678be5579 Adding user.loginuid to the default falco rules in any place user.name exists
This update will provide information as to which process uid intitiated the event.  This is really important for processes that are started
by a different user name.

Signed-off-by: Chuck Schweizer <chuck.schweizer.lvk2@statefarm.com>
2020-08-28 10:02:19 +02:00
Lorenzo Fontana
0a4d60c22b docs: changelog for 0.25.0
Co-Authored-By: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
2020-08-25 16:19:21 +02:00
Leonardo Grasso
385d6eff6d fix(userspace/falco): do not always rethrow the exception
Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-08-25 14:27:40 +02:00
Leonardo Grasso
e0b66ecae9 revert: "build: temporary remove falco_traces.yaml from integration test suite"
This reverts commit 7a2708de09.

Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-08-24 20:32:24 +02:00
Leonardo Grasso
a87913c822 build: update sysdig version to ae104eb20ff0198a5dcb0c91cc36c86e7c3f25c7
Co-Authored-By: Lorenzo Fontana <fontanalorenz@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-08-24 20:32:24 +02:00
Lorenzo Fontana
7a2708de09 build: temporary remove falco_traces.yaml from integration test suite
This happens because the file descriptors paths have been fixed
in this commit [0].
However, the scap files fixtures we have for the tests still contain
the old paths causing this problem.

We are commenting out those tests and opening an issue to get this fixed
later.

[0] 37aab8debf

Co-Authored-By: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
2020-08-20 19:26:56 +02:00
Leonardo Di Donato
fbac5b77ff build(cmake/modules): change driver version to 37aab8
This driver version brings into the following features:
- fix for https://github.com/draios/sysdig/issues/1659 (correct handling
  of the pathnames args for *at syscalls)
- update JQ + builtin oniguruma

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2020-08-20 19:26:56 +02:00