Commit graph

1325 commits

Author SHA1 Message Date
mmetc 98c6038fde
Build with libre2 by default, options for wasm and static; add mk/gmsl (#2295) 2023-06-23 14:25:29 +02:00
mmetc 507da49b5a
send metrics immediately if agents are added or removed (#2296) 2023-06-23 14:06:04 +02:00
mmetc 9beb5388cb
errors.Wrap -> fmt.Errorf; clean up imports (#2301) 2023-06-23 14:04:58 +02:00
mmetc d4c0643122
CI: add fedora-37, -38 to vagrant tests (#2299) 2023-06-23 13:59:24 +02:00
mmetc e42841cd00
Change api_key encoding to base64 to comply with bcrypt max size (#2302) 2023-06-23 13:54:36 +02:00
mmetc 62caffb102
update leakybucket readme (#2298) 2023-06-22 15:35:01 +02:00
mmetc fddf597040
errors.Wrap -> fmt.Errorf; clean up imports (#2297) 2023-06-22 15:01:34 +02:00
mmetc 8bfeb7d90d
Update go dependencies (#2293)
- update fatih/color (fix windows issue)
- update mongo-driver (fix build issue)
- go.mod: merge two "require" blocks
- update semver dependency (same version as indirect dep), fix test checks in cscli setup
- remove gotest.tools dependency (use testify, cstest)
- update x/ exp, mod, sys dependencies
2023-06-22 11:31:41 +02:00
Emanuel Seemann 40e6b205bc
Add bayesian bucket type (#2290) 2023-06-21 15:08:27 +02:00
mmetc da6106bd23
spellcheck/style leakybucket readme (#2294) 2023-06-21 11:47:07 +02:00
mmetc 4c4b545e9b
append vendor.tgz to each release (#2288) 2023-06-21 09:52:33 +02:00
mmetc f7409d47be
fix error message when failing to parse ip address (#2292)
Co-authored-by: Thibault "bui" Koechlin <thibault@crowdsec.net>
2023-06-21 09:22:25 +02:00
Laurence Jones 062f71fb92
CI: vagrant configuration for debian 12 (#2285) 2023-06-19 21:18:29 +02:00
mmetc 89c3c18c19
allow running rootless docker tests (#2281)
Co-authored-by: Thibault "bui" Koechlin <thibault@crowdsec.net>
2023-06-19 12:02:59 +02:00
mmetc c3c2608947
CI: Remove cache entries when closing a PR (#2289)
This should reduce overall cache occupation and thrashing
2023-06-19 11:30:56 +02:00
Laurence Jones 2c8769adf6
Update jsonextract.go (#2287)
Return nil instead of empty string as ParseKV does the same
2023-06-16 18:34:55 +01:00
mmetc 381220daf4
Use go 1.20.5 (#2280)
https://groups.google.com/g/golang-announce/c/q5135a9d924
2023-06-15 23:18:57 +02:00
mmetc b9a3acb03f
light pkg/parser cleanup (#2279)
* pkg/parser: clean up imports
* remove duplicate import
* simplify boolean expression
* don't check length before range
* if..else if.. -> switch/case
* errors.Wrap -> fmt.Errorf
* typo, lint
* redundant break
2023-06-13 13:16:13 +02:00
mmetc 76429f033a
trim pkg/types: move DataSet/GetData to pkg/cwhub, removed unused Clone function (#2271) 2023-06-08 16:49:51 +02:00
mmetc cf747d65e0
fix missing import (#2275) 2023-06-08 15:49:37 +02:00
mmetc 25bb23d8b7
minor refactor to pkg/types, cscli machines (#2270)
* cleanup: separate ui and logic
* trim some code from pkg/types
2023-06-08 15:08:51 +02:00
mmetc 6096cb3c9b
Move grok_pattern.go away from pkg/types to trim bouncer dependencies (#2269) 2023-06-08 15:07:30 +02:00
mmetc 4e2c9c185b
Implement "crowdsec -fatal" flag; change help message (#2266)
The -trace...-fatal flags do not change the log destination but only the
verbosity. This change reflects that, and implements "-fatal" which was missing.
2023-06-08 15:06:06 +02:00
mmetc 8da9d5eefd
don't log notification error if not running under systemd (#2274) 2023-06-08 15:04:48 +02:00
mmetc 5b3200173e
don't pre-create log files (not required anymore) (#2267)
The lumberjack package fixed the issue in natefinch/lumberjack#83 (tested with umask 002) and this code is now redundant since we updated the dependency to v2.2.1.
2023-06-07 12:58:35 +02:00
mmetc edd062522d
build against libre2-dev if found (#2255) 2023-06-06 15:46:25 +02:00
mmetc 3cc6b2c0d0
CI: add tests for metrics configuration (#2251) 2023-06-05 23:17:30 +02:00
mmetc 9ccdddaab1
CI: refactor makefile for plugins and vendor target (#2256) 2023-06-05 23:15:18 +02:00
mmetc 0191faf3a8
update notif threshold test on windows (#2265) 2023-06-05 22:58:13 +02:00
mmetc 2a8e97d558
show option -winsvc only under windows (#2258) 2023-06-05 13:49:31 +02:00
mmetc 7673a20467
CI: make clean -> remove coverage data (#2259) 2023-06-05 13:03:18 +02:00
mmetc 18764eff0e
make: allow using a development version of Go, with a warning (#2260) 2023-06-05 13:02:37 +02:00
mmetc e3cb4ab2c4
do not send more than group_threshold alerts at once to a notification plugin (#2264)
* do not send more than group_threshold alerts at once to a notification plugin
* Use generic Chunks function, updated tests

---------

Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
2023-06-05 12:55:03 +02:00
mmetc 26e2bbd709
gitignore: ignore .vagrant directories (#2262) 2023-06-05 10:56:32 +02:00
mmetc 3b1f412e44
default config: simulation off -> false (yaml 1.2) (#2263) 2023-06-05 10:55:27 +02:00
mmetc a4eee41fd7
log.Warning if a notification is configured twice (#2240) 2023-06-02 14:41:50 +02:00
mmetc 228e4f9acc
cscli: add G (1e9) suffix to metric units (#2254) 2023-06-02 14:38:11 +02:00
mmetc d757cf8e84
CI: publish dev-debian docker image (amd64 only) (#2252) 2023-06-01 17:41:33 +02:00
mmetc 396dcf8e6e
dependencies: replaced function calls to pkg/types, errors.Wrap (#2235)
we now use a generic pointer function, and slowly remove the deprecated pkg/errors
2023-06-01 16:31:56 +02:00
mmetc 12c32d507c
CI: refactoring pkg/csplugin tests (#2247) 2023-06-01 10:33:08 +02:00
mmetc f6544962ea
CI: separate stderr in all func tests (#2250) 2023-06-01 09:42:27 +02:00
he2ss 084186c67a
update libsystemd in debian docker image (#2245)
* update libsystemd in debian docker image

* remove update dep in build step
2023-05-31 12:39:40 +02:00
mmetc 92a9d6c321
types.InSlice() -> slices.Contains() (#2246) 2023-05-31 12:39:22 +02:00
mmetc 3c1b957050
CI: use hub cli to upload release tar (#2244) 2023-05-30 10:47:04 +02:00
Laurence Jones 4fbc3402fb
Update KV ignore whitespace before and after = (#2236)
* Update KV ignore whitespace before and after `=`

* Update helpers.go

Don't need whitespace infront of KEY

* Add some tests to ensure edge cases

* Ensure quoted and unquoted values act the same
2023-05-26 15:35:46 +01:00
blotus 6720d89845
fix lock when dumping the parsing state in explain mode (#2234) 2023-05-26 15:23:50 +01:00
blotus f6924f8c57
generate asserts for evt.Unmarshaled in hubtest (#2214) 2023-05-26 11:44:58 +02:00
mmetc 9167bd107d
decouple bouncer dependencies: use go-cs-lib/pkg/ptr (#2228) 2023-05-25 15:43:39 +02:00
mmetc b2d3520519
decouple bouncer dependencies: use go-cs-lib in test code (#2229) 2023-05-25 15:37:44 +02:00
mmetc 364b833d67
test cleanup: remove /tmp/crowdsec_tests* directories (#2232) 2023-05-25 15:32:32 +02:00