Commit Graph

2992 Commits

Author SHA1 Message Date
Josh Soref
5a19a1d3b0 spelling: content type
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
3806e62c3a spelling: constitute
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
25b07e134c spelling: complaints
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
bda7d7bb11 spelling: comparisons
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
ab05026065 spelling: commands
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
cc30fcc0cf spelling: command
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
fa7fab525f spelling: command lines
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
ae56a10932 spelling: cmake
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
676fc9efa8 spelling: between
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
ff94383ed9 spelling: berkeley
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
655ff76c3d spelling: attribute
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
cacbb3928d spelling: arg lists
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
72725a7f87 spelling: archiving
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
00c3fa4908 spelling: among
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
eabd3ad24b spelling: altogether
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Josh Soref
a84adbd231 spelling: allowed
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-03-01 16:30:24 +01:00
Andrea Terzolo
04ce76becc chore: bump libs to latest master e71045b
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
2022-03-01 16:10:24 +01:00
Andrea Terzolo
6dbccfcac5 new: add a new drop category n_drops_scratch_map
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
2022-03-01 16:10:24 +01:00
Andrew Suderman
bd725cb655 Add Fairwinds to ADOPTERS.md
Signed-off-by: Andrew Suderman <andrew@sudermanjr.com>
2022-03-01 15:46:24 +01:00
Luca Guerra
4d29b872ab fix(build): fix civetweb linking in cmake module
Signed-off-by: Luca Guerra <luca@guerra.sh>
Co-authored-by: Federico Di Pierro <nierro92@gmail.com>
2022-03-01 14:31:58 +01:00
Federico Di Pierro
f78c816abd update(build): updated libs to latest master.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-02-25 09:31:19 +01:00
Federico Di Pierro
1d76df3831 new(userspace/falco): allow to pass multiple --cri options.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-02-25 09:31:19 +01:00
Jason Dellaluce
335d79e79c chore(userspace/engine): remove unused lua functions and state vars
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2022-02-24 18:24:19 +01:00
Jason Dellaluce
ef6888181d fix(userspace/falco): correct plugins init config conversion from YAML to JSON
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2022-02-24 18:23:14 +01:00
Andrea Bonanno
d3083cde92 chore(userspace/falco): fixes truncated -b option description.
Signed-off-by: Andrea Bonanno <andrea@bonanno.cloud>
2022-02-24 16:14:27 +01:00
Mark Stemm
83353985f7 Update falco main to use falco application + cmdline_opts
Update falco's main falco_init() to use a falco::app::application and
falco::app::cmdline_opts object instead of storing all its command
line state in stack variables.

The bulk of the removed code is in usage() (not needed as cxxopt's
help() is self-documenting.) and getopt_long() which is replaced by
app.init(argc, argv).

For the most part, this is simply replacing references to local
variables (e.g. "all_events") to the bound variable inside the
cmdline_opts object (e.g. app.copts().all_events).

There are a few cases where more complex logic was used (output
formats, initializing k8s/mesos with string pointers), and those
changes are still in falco_init().

For the most part, the monolithic parts of falco_init that involve
reading config files, creating the inspector, loading rules, etc are
still present. Those will be addressed in later changes.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-02-24 10:40:16 +01:00
Mark Stemm
83b036bc0e Small changes to falco engine/config wrt new cmdline option parsing
For the most part, replacing getopt() with cxxopts + falco application
had no effect on falco engine/config interfaces. However, there were a
few places where it was wasier to change the interface than add
middleware code that transformed from, for example, vectors to lists.

This commit has those changes.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-02-24 10:40:16 +01:00
Mark Stemm
216f56b73b Initial falco::app::cmdline_options class
Fill in an initial falco::app::cmdline_options class using cxxopts
library to hold options:

- falco::app::cmdline_options contains a cxxopts::Options object to
  parse options and a cxxopts::ParseResult to hold the result.
- The only meaningful public method is parse() which parses argc/argv
  and returns true/false + error.
- The parsed options are all public instance variables of the object
  and generally use the same names of the corresponding variables in
  the old falco_init(). These variables are all bound to the
  corresponding command line option and are updated in parse().
- In a few cases, the command line option does not directly map to a
  bound variable (e.g. -b to set buffer format, -p/-pk/-pc to set
  extra formatting options, etc.) In these cases the option values are
  read after parsing and update the public instance variable.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-02-24 10:40:16 +01:00
Mark Stemm
17d8eea3bc Add notion of falco application object/cmdline opts skeleton
Add a notion of a falco application object. Eventually this will
replace the bulk of falco_init and contain methods to:

- Parse/validate command line options
- Parse/validate falco config
- Initialize prerequsites (inspector, falco engine, webserver, etc)
- Load plugins
- Load/validate rules
- Command/subcommand execution (e.g. --list/--list-fields, or
  nothing specified to run "main" loop)

For now, it is only responsible for command line options handling,
which is stubbed out.

Currently, the only public methods are init() to initialize everything
and copts() to access command line options.

Command line options are held in a different class
falco::app::cmdline_opts. application::copts() returns a reference to
that object, which allows access to parsed command line options bound
to various public instance variables.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-02-24 10:40:16 +01:00
Mark Stemm
d74c8d6d4d Add cxxopts command line parsing library
We'll use this to better manage the fairly large set of command line
options in self-contained objects instead of a scattering of
individual stack variables.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-02-24 10:40:16 +01:00
Andrea Bonanno
888c15c6ee update(falco): updates usage description for -o, --option
Signed-off-by: Andrea Bonanno <andrea@bonanno.cloud>
2022-02-21 18:50:12 +01:00
Andrea Bonanno
eedb794fd5 fix(userspace/falco): applies FALCO_INSTALL_CONF_FILE as the default config.
Signed-off-by: Andrea Bonanno <andrea@bonanno.cloud>
2022-02-18 17:33:43 +01:00
Mark Stemm
83c527dd91 Use cmake function to copy files, as a single target
Replace nearly-identical blocks of code that defined individual custom
targets/custom commands to copy files from source to build dir with
the copy_files_to_build_dir function.

This reduces the number of build targets and speeds up/cleans up the
make output.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-02-18 16:47:43 +01:00
Mark Stemm
cbcc680c77 Cmake function to copy files from source to build dir, as a target
Define a cmake function copy_files_to_build_dir(source_files,
targetsuffix) that defines a single custom target and single custom
command to copy the set of source files to
CMAKE_CURRENT_BINARY_DIR. All of the real work is done via cmake -E
copy_if_different.

This function will replace the nearly identical cmake code in several
other directories. This function has the advantage of being a single
target for the set of source files instead of a target per-file.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-02-18 16:47:43 +01:00
Mark Stemm
ad90209177 Always skip update command for git based external projects
I noticed that some external projects were being reconfigured/built
with every make, even though no files in the external project had been
updated.

With some debugging I noticed that git based external projects were
re-running their "update" step every time, and that in turn caused the
configure/build/install steps to re-run as well. (Generally the build
step is a no-op as the Makefile/etc. in the external project is well
formed and doesn't do anything, but the configure/install steps still
run).

It seems related to this cmake bug:
https://gitlab.kitware.com/cmake/cmake/-/issues/19703. In short, the
git update step for an external project does not create any "done"
file that denotes that the files are still up-to-date. Without that
"done" file, the update step is always run, and that in turn causes
the other steps for the external project to re-run as well.

The best way to fix this seems to be to skip the update step by
defining an empty UPDATE_COMMAND. As long as the downloaded code for a
given hash/tag/etc does not change, the update step is unnecessary.

And if we *really* wanted to ensure unchanged dependencies, we would
download our own copies anyway.

Making this change significantly cleans up the falco build to avoid
rebuilding git based external dependencies.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-02-18 16:47:43 +01:00
Leonardo Grasso
204f9ff875 fix(scripts): correct typo in falco-driver-loader help message
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-02-14 10:06:41 +01:00
pablopez
87c410e49e upgrade macro(keepalived_writing_conf)
Signed-off-by: pablopez <pablo.lopezzaldivar@sysdig.com>
2022-02-11 11:36:47 +01:00
schie
b9925577ef Update rules/falco_rules.yaml
Signed-off-by: darryk10 stefano.chierici@sysdig.com

Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
2022-02-11 11:28:46 +01:00
Stefano
ae5342c54b Fixed rule condition
Signed-off-by: darryk10 <stefano.chierici@sysdig.com>
2022-02-11 11:28:46 +01:00
Stefano
1324522721 Added new Rule Polkit Local Privilege Escalation Vulnerability (CVE-2021-4034)
Co-authored-by: javery-sysdig <jason.avery@sysdig.com>

Signed-off-by: Stefano <stefano.chierici@sysdig.com>
2022-02-11 11:28:46 +01:00
rileydakota
7999e33aea Rule Update - Adds npm support
Adds `npm` to `package_mgmt_binaries` for detection of "living off the land" style attacks that utilize NPM pull down additional tooling

Signed-off-by: rileydakota <dakotariley2@gmail.com>
2022-02-11 11:27:46 +01:00
m4wh6k
f49a95f334 rule(macro modify_shell_history): Fix missing s on endswith
Signed-off-by: m4wh6k m4wh6k@users.noreply.github.com
2022-02-11 11:26:46 +01:00
m4wh6k
9e8687401d fix(macro truncate_shell_history): avoid false positives from .zsh_history.new and .LOCK files
Signed-off-by: m4wh6k m4wh6k@users.noreply.github.com
2022-02-11 11:26:46 +01:00
m4wh6k
6ead925f51 fix(macro modify_shell_history): avoid false positives from .zsh_history.new and .LOCK files
Signed-off-by: m4wh6k <m4wh6k@users.noreply.github.com>
2022-02-11 11:26:46 +01:00
Mac Chaffee
8a3a4c4d57 rule(maco write_etc_common): Fix false-positive of sssd updating /etc/krb5.keytab
Signed-off-by: Mac Chaffee <me@macchaffee.com>
2022-02-11 11:25:47 +01:00
Federico Di Pierro
ff21544186 update(build)!: replaced various PROBE with DRIVER where necessary.
Follow-up of https://github.com/falcosecurity/libs/pull/197.
Updated libs too to master version, as needed.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-02-08 09:50:39 +01:00
Mike Stewart
ee2f7c50e8 Potential fix for falcosecurity/falco#1884
Signed-off-by: Mike Stewart <mike.stewart@introhive.com>
2022-02-04 11:40:09 +01:00
pablopez
5da10a3b89 rule_output(Delete Bucket Public Access Block) typo
Signed-off-by: pablopez <pablo.lopezzaldivar@sysdig.com>
2022-02-03 18:23:08 +01:00
Federico Di Pierro
f86423db76 fix(build): fixed build folder path for publish bin static.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-01-31 17:02:48 +01:00
Federico Di Pierro
5eed3a6638 fix(build): hotfix for release 0.31.0.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-01-31 17:02:48 +01:00