Commit graph

1236 commits

Author SHA1 Message Date
Sebastien Blot 1d9891a244
wip 2023-04-04 11:49:00 +02:00
mmetc 38ab6be7c2
Allow feature.yml to change available subcommands (#2156) 2023-04-03 10:11:56 +02:00
mmetc 3fa555fb25
Rename k8s_audit to k8s-audit (easier to type, consistent with labels) (#2153) 2023-04-03 09:53:38 +02:00
mmetc ea6401ce09
CI: Static builds by default; replace bincover with go -cover from 1.20 (#2150)
* Makefile: build static binaries only
* Replace bincover with go -cover from 1.20
* CI: Fix timing issue between lapi and agent containers
2023-03-30 15:05:09 +02:00
blotus 61bea26486
Add transform configuration option for acquisition (#2144) 2023-03-29 16:04:17 +02:00
blotus 772d5b5c32
Add experimental support for re2 (#2138) 2023-03-28 16:26:47 +02:00
blotus 1095f6c875
use expr.Function for custom functions instead of passing them in the env (#2133) 2023-03-28 10:49:01 +02:00
Thibault "bui" Koechlin 169b844212
fix awkward stacktrace in conditional filter (#2145) 2023-03-27 16:01:42 +02:00
mmetc f39fbf07fa
Docker: don't re-register local agent if not needed (#2141) 2023-03-27 15:38:38 +02:00
mmetc d769fff1e8
File acquisition: log "file reopen" events instead of writing to stderr (#2139) 2023-03-24 11:24:36 +01:00
mmetc 68d4bdc1bd
Docker: correct behavior of AGENTS_ALLOWED_OU, BOUNCERS_ALLOWED_OU (#2140) 2023-03-24 11:23:04 +01:00
mmetc bbfb7d1cfa
Allow running func tests while running containers with crowdsec (#2137)
Co-authored-by: Thibault "bui" Koechlin <thibault@crowdsec.net>
2023-03-24 10:19:22 +01:00
mmetc 3884c5f47d
Unit tests: remove leftover files (#2134) 2023-03-22 13:51:37 +01:00
mmetc 80de87ac34
Report docker systems in version and user agents (#2136) 2023-03-22 11:57:29 +01:00
Thibault "bui" Koechlin a3e5f0a3a0
fix dateparse (#2135) 2023-03-22 08:20:21 +01:00
blotus 91eb39cff6
New PAPI commands: reauth + force_pull (#2129) 2023-03-21 14:06:19 +01:00
blotus dc38e5ac00
S3 acquisition datasource (#2130) 2023-03-21 13:54:52 +01:00
Thibault "bui" Koechlin a74e424d53
support ip and cidr based whitelists for capi and 3rd party blocklists (#2132)
* support ip and cidr based whitelists for capi and 3rd party blocklist
2023-03-21 11:50:10 +01:00
Thibault "bui" Koechlin d87f088b8f
match expr helper (#2126)
* match expr helper
2023-03-21 10:39:17 +01:00
mmetc 86971da274
CI: avoid conflict with pkg/build cache in golangci-lint action (#2123) 2023-03-20 10:41:08 +01:00
Thibault "bui" Koechlin 618be9ff68
properly update the time structure within event (#2122)
* properly update the time structure within event to ensure it works in time-machine

* move LIVE and TIMEMACHINE to pkg/types : less code needs to import leakybucket package, and we avoid duplicating constants
2023-03-16 16:25:50 +01:00
blotus c77fe16943
actually fix expr-debugger to work with the new version (#2124) 2023-03-16 15:20:48 +01:00
blotus 94c7efdb5b
add ToString() helper (#2100) 2023-03-16 15:20:31 +01:00
blotus b1f2063a9a
Only support pgx driver for postgresql (#2118) 2023-03-16 11:02:31 +01:00
Thibault "bui" Koechlin 855f9e6f8d
protect map w/ mutex to avoid concurrent map writes with cscli explain when having many concurrent parser routines (#2113) 2023-03-16 11:01:25 +01:00
AlteredCoder e61a464951
Fix cscli explain when running from testenv (#2114)
* Fix cscli explain when running from testenv
2023-03-15 10:26:40 +01:00
Manuel Sabban b451d190b7
try to make reproducible build work (#2119)
Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2023-03-13 17:26:33 +01:00
mmetc 9c90144867
Docker readme: update build instructions, recommend acquis.d and config.yaml.local (#2115) 2023-03-10 17:30:08 +01:00
blotus 6aaf3cd50b
Update expr to 1.12.2 (#2110) 2023-03-09 16:56:11 +01:00
mmetc 0a114ca7d1
Fix docker tests by increasing timeout (again) and move compose test to plugin (#2112)
* Fix docker tests by increasing timeout (again) and move compose test to plugin

* Bump workflow timeout to 30 min

* Test only alpine-slim and debian-full flavors
2023-03-09 12:00:29 +01:00
mmetc e161507d08
Lint (type inference): remove redundant type declarations (#2111) 2023-03-09 11:56:02 +01:00
mmetc 9faa49c7e8
Load lapi config for config show output (#2097)
This adds URL and login parameters as it was intended.
Also rewrite configShow and displayOneAlert to use an embedded text/template for shorter code.
2023-03-08 22:47:25 +01:00
Thibault "bui" Koechlin d95b7afe61
Distance support : Impossible travel (#2108)
* add distance helpers
2023-03-08 18:29:42 +01:00
Thibault "bui" Koechlin 9d5aaf5ea2
add --origin to cscli decisions delete (#2109) 2023-03-08 18:29:20 +01:00
Thibault "bui" Koechlin 5b0fe4b7f1
support for regexps result cache (#2104)
* support for regexps result cache : gcache + xxhash

Co-authored-by: Marco Mariani <marco@crowdsec.net>
2023-03-08 16:07:49 +01:00
mmetc e71d146a2d
Fix docker tests by increasing timeout (#2107) 2023-03-08 14:51:49 +01:00
mmetc 137e7408fd
Run lint after tests instead of separate workflow (#2103) 2023-03-08 14:50:59 +01:00
mmetc e63a3ab92b
Unit tests: fix authentication to localstack (#2106) 2023-03-08 14:41:16 +01:00
mmetc c7014dba8f
Build notification plugins with current crowdsec; mod tidy (#2102) 2023-03-07 16:41:13 +01:00
mmetc 0a748d324e
Make: extract "goversion.mk" to reuse it in bouncers (#2101) 2023-03-07 11:46:52 +01:00
blotus 16a3be49e2
do not try to load PAPI is url is not set (#2099) 2023-03-06 15:38:58 +01:00
blotus e27a0a0e14
display source in alerts list when an alert has multiple decisions (#2098) 2023-03-06 13:51:57 +01:00
blotus b2c2c5ac59
add papi_url in credentials file when enabling console_management, and remove it when disabling console_management (#2095) 2023-03-03 17:03:21 +01:00
mmetc a19748ae35
Rename directory "tests" to "test" (#2094)
If you use a ./test/local directory, you need to create it again:
$ make clean bats-build bats-fixture
2023-03-03 15:54:49 +01:00
blotus 85ab9c68a2
Add cscli papi status and cscli papi sync (#2091) 2023-03-03 13:46:28 +01:00
mmetc f6d6c5bb2b
Add tests and typo fixes (#2092) 2023-03-03 11:06:27 +01:00
dependabot[bot] ef4e61e05e
Bump golang.org/x/net in /plugins/notifications/slack (#2088)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220418201149-a630d4f3e7a2 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 10:13:22 +01:00
dependabot[bot] 54fc5e48dc
Bump golang.org/x/net in /plugins/notifications/splunk (#2086)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220418201149-a630d4f3e7a2 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 22:21:00 +01:00
dependabot[bot] 7f04d12333
Bump golang.org/x/net in /plugins/notifications/http (#2087)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220418201149-a630d4f3e7a2 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 21:54:26 +01:00
dependabot[bot] 76c84c69c4
Bump golang.org/x/net in /plugins/notifications/email (#2085)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220418201149-a630d4f3e7a2 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-02 21:21:50 +01:00