alteredCoder
7a3c055a08
fix linter
2023-10-02 11:30:57 +02:00
alteredCoder
1eaaa2075d
fix tests
2023-09-29 19:14:26 +02:00
alteredCoder
c7614a327a
fix windows creation
2023-09-29 17:51:52 +02:00
alteredCoder
97300548f7
fix
2023-09-29 16:06:49 +02:00
alteredCoder
c8fee2a656
create folder for RPM
2023-09-29 16:02:41 +02:00
alteredCoder
3561c4de3a
create the folder
2023-09-29 16:01:43 +02:00
alteredCoder
a3f7f966d0
fix
2023-09-29 15:55:07 +02:00
alteredCoder
281fbd739f
remove debug and allow helper in context
2023-09-29 15:44:30 +02:00
alteredCoder
4932a832fa
Allow crowdsec agent to read context configuration from folder
2023-09-29 15:04:45 +02:00
mmetc
0d1c4c6070
update test dependencies ( #2490 )
2023-09-29 10:19:55 +02:00
Thibault "bui" Koechlin
8f6659a2ec
fix the float comparison by using Abs(a,b) < 1e-6 approach (IEEE 754). Move the initializiation of expr helpers ( #2492 )
2023-09-28 17:22:00 +02:00
Laurence Jones
9dba6db676
add alert alias ( #2485 )
2023-09-23 19:35:02 +01:00
Laurence Jones
37c0c067a8
cscli hubtest whitelist ( #2479 )
...
* Initial tests
* Always print whitelist as we can compare if we mess up the opposite way
2023-09-20 16:42:19 +01:00
Thibault "bui" Koechlin
e4dcdd2572
fix include_capi filter ( #2478 )
2023-09-20 11:56:00 +02:00
mmetc
ac01faf483
strip '=' signs from encoded api keys ( #2472 )
...
Co-authored-by: Thibault "bui" Koechlin <thibault@crowdsec.net>
2023-09-19 14:00:23 +02:00
Thibault "bui" Koechlin
4c08e1e68c
exclude 'lists' too if we exclude CAPI ( #2474 )
2023-09-19 13:56:22 +02:00
mmetc
d5b6f2974b
Avoid sending nil body with metrics ( #2470 )
2023-09-19 13:53:50 +02:00
Laurence Jones
64deeab1ec
Fix PO expr whitelist ( #2471 )
2023-09-19 12:51:03 +01:00
mmetc
b2212f4225
Use go 1.20.8 ( #2473 )
2023-09-19 13:21:55 +02:00
Manuel Sabban
ce276d3838
Fix fc38 ( #2468 )
...
* fix installation on fc38
2023-09-18 11:54:09 +02:00
blotus
43ef32aa8d
Kafka acquisition: do not create empty events when a read error occurs ( #2466 )
2023-09-13 13:20:36 +02:00
Thibault "bui" Koechlin
0040569fa9
if 'include capi' is false, only exclude capi alerts instead of assuming they necessarily have attached decisions ( #2435 )
2023-09-12 11:19:36 +02:00
mmetc
6b9e065764
CI: update pytest-cs - don't remove stopped containers after tests ( #2459 )
2023-09-12 11:10:22 +02:00
mmetc
d45bec4047
minor log message improvements ( #2455 )
2023-09-12 11:04:56 +02:00
Laurence Jones
702da0f59a
[enhancement] cscli explain --labels ( #2461 )
...
* Add label support for explain and allow user to provide multiple labels
* Change my mind about empty string
* Add debug and im an idiot 😄
2023-09-11 14:18:04 +01:00
mmetc
f02f34d64c
CI: remove explicit cache-dependency-path ( #2452 )
...
not required anymore after moving the plugins to cmd/
2023-09-04 16:55:48 +02:00
mmetc
fd94e2c056
refactor alert/decisions insert/update to avoid database locking in bulk operations ( #2446 )
2023-09-04 14:21:45 +02:00
Laurence Jones
aff80a2863
Add html escape function so it can be invoked from template ( #2451 )
2023-09-04 09:49:39 +01:00
mmetc
22146eb3e4
fix "cscli console disable --all"; cleanup "cscli console" command ( #2444 )
2023-08-29 11:44:23 +02:00
mmetc
b562103024
Make: build with debug symbols in func tests or if DEBUG=1; drop BUILD_VENDOR_FLAGS ( #2443 )
2023-08-28 15:58:26 +02:00
mmetc
25868f27de
option db_client.decision_bulk_size ( #2440 )
2023-08-25 17:05:17 +02:00
mmetc
0c9943b740
CI: alternate vendor file (xz compression and version number) ( #2425 )
2023-08-25 17:02:00 +02:00
mmetc
32f196a774
use go 1.20.7 ( #2409 )
2023-08-25 16:24:04 +02:00
mmetc
c588be0842
golangci-lint: use v1.54, remove unnecessary byte/string conversions ( #2438 )
2023-08-25 16:22:10 +02:00
mmetc
f2154e362b
update functional tests for build pipeline ( #2442 )
2023-08-25 16:15:28 +02:00
mmetc
2aa55e9444
move plugins/notifications/* to cmd/notification-* ( #2429 )
...
This ensures keeping all dependencies in sync, and simplifies
packaging under freebsd/gentoo/etc because there is a single
vendor directory.
2023-08-24 09:46:25 +02:00
mmetc
e36df40ba7
pkg/types cleanup ( #2398 )
...
* move function GetLineCountForFile from pkg/types to cscli
* move ParseDuration from pkg/types to pkg/database
* remove unused types.Profile, types.RemediationProfile
2023-08-24 09:44:46 +02:00
Laurence Jones
86d9384954
Whitelist reason ( #2439 )
...
* Update node.go
Dont update whitelist reason if event is whitelisted
* oops
2023-08-23 14:51:37 +01:00
Rasmus
b4d9223625
Update main.go ( #2431 )
2023-08-22 14:09:53 +02:00
Efren
1ec52431b6
Remove duplicate line ( #2432 )
...
Remove duplicate line (60) which is outputting `Configuration Folder` twice in `cscli config show`
2023-08-22 14:09:19 +02:00
mmetc
e8e2ade8f0
remove calls to log.Fatal ( #2399 )
...
* remove log.Fatal from scenarios.go
* remove log.Fatal from collections.go
* remove log.Fatal from parsers.go and postoverflows.go
2023-08-16 21:04:46 +02:00
mmetc
6a6501691a
change behavior of flag disable_http_retry_backoff ( #2426 )
...
now it does not attempt any retry, instead of attempting all retries
immediately
example: cannot reach LAPI
Before:
$ CROWDSEC_FEATURE_DISABLE_HTTP_RETRY_BACKOFF=true cscli decisions list
ERRO[27-07-2023 10:44:44] error while performing request: dial tcp [::1]:8080: connect: connection refused; 4 retries left
INFO[27-07-2023 10:44:44] retrying in 0 seconds (attempt 2 of 5)
[...]
ERRO[27-07-2023 10:44:44] error while performing request: dial tcp [::1]:8080: connect: connection refused; 1 retries left
INFO[27-07-2023 10:44:44] retrying in 0 seconds (attempt 5 of 5)
ERRO[27-07-2023 10:44:44] error while performing request: dial tcp [::1]:8080: connect: connection refused; 0 retries left
FATA[27-07-2023 10:44:44] Unable to list decisions : performing request: Get "http://localhost:8080/v1/alerts?has_active_decision=true&include_capi=false&limit=100 ": could not get jwt token: Post "http://localhost:8080/v1/watchers/login ": dial tcp [::1]:8080: connect: connection refused
After:
$ CROWDSEC_FEATURE_DISABLE_HTTP_RETRY_BACKOFF=true ./test/local/bin/cscli decisions list
FATA[11-08-2023 16:49:58] unable to retrieve decisions: performing request: Get "http://127.0.0.1:8080/v1/alerts?has_active_decision=true&include_capi=false&limit=100 ": could not get jwt token: Post "http://127.0.0.1:8080/v1/watchers/login ": dial tcp 127.0.0.1:8080: connect: connection refused
2023-08-16 21:04:07 +02:00
mmetc
caaed7c515
Timeout on shutdown while waiting for events to be flushed ( #2423 )
2023-08-16 21:03:15 +02:00
mmetc
afeb541eac
apic: minor refactoring ( #2415 )
...
* apic: minor refactoring
* Add whitelist length check
If user configures the file but fails to define and actual whitelist we should check length to save allocs
* Init with length from file
* extract loop method from ApplyApicWhitelists
* pass pointer
* extract loop method updateBlocklist
---------
Co-authored-by: Laurence Jones <laurence.jones@live.co.uk>
2023-08-10 13:03:47 +02:00
Laurence Jones
93c22f29cf
Unmarshal Json ( #2414 )
...
Log the actual line that caused an error to help debugging
2023-08-09 09:42:08 +01:00
mmetc
0f319b31fd
update pytest dependencies ( #2407 )
2023-08-09 00:49:52 +02:00
Manuel Sabban
d6361d0a40
conditional overflow doesn't overflow on capacity ( #2412 )
...
* conditional overflow doesn't overflow on capacity
* typo
2023-08-08 16:12:50 +01:00
mmetc
cd9d8f309d
CI: increase test sleep to fix flaky acquisition/file test under win ( #2410 )
...
* CI: increase test sleep to attempt fix for flaky windows acquitition/file test
* wip
2023-08-08 16:11:32 +02:00
Laurence Jones
0334a9afe8
Add method name to child logger so we can see which function is erroring when in enrichers ( #2411 )
2023-08-08 13:38:11 +01:00
AlteredCoder
31c5727a90
Simplify context add ( #2408 )
2023-08-04 16:50:35 +02:00