mmetc
9510146780
update expr to 1.17.2 ( #3519 )
...
* update expr to 1.17.2
* add if test
---------
Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
2025-05-09 12:55:01 +02:00
mmetc
ce6018fbbf
config.yaml: make config_dir and notification_dir optional ( #3606 )
Tests / sqlite (push) Waiting to run
Tests / mariadb (push) Waiting to run
Tests / mysql (push) Waiting to run
Tests / postgres (push) Waiting to run
Tests / hub (push) Waiting to run
Release Drafter / update_release_draft (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Test Docker images / test_flavor (debian) (push) Waiting to run
Test Docker images / test_flavor (slim) (push) Waiting to run
Go tests (windows) / Build + tests (push) Waiting to run
Build / Build + tests (push) Waiting to run
(push-master) Publish latest Docker images / dev-alpine (push) Waiting to run
(push-master) Publish latest Docker images / dev-debian (push) Waiting to run
2025-05-09 10:58:12 +02:00
Manuel Sabban
341e816a5c
fix(apiserver): ensure nil is returned after setting token and expiration and before we reauthenticate ( #3613 )
2025-05-07 17:02:04 +02:00
mmetc
31b914512a
refact pkg/database: unnecessary pointers ( #3611 )
...
* refact pkg/database: unnecessary pointers
* lint
2025-05-07 11:12:27 +02:00
Manuel Sabban
e6b85b641c
feat(apic): add ApicAuth client and token re-authentication logic ( #3522 )
2025-05-06 16:23:56 +02:00
mmetc
3b9130469c
refact pkg/parser: extract method, avoid calling defer in loop ( #3564 )
2025-05-06 16:11:24 +02:00
mmetc
15dcbdeec9
refact: remove unused metod DeleteDecisionsWithFilter() ( #3605 )
2025-05-06 16:10:18 +02:00
mmetc
0e8b557402
refact alert, decision filters: remove unnecessary pointers ( #3607 )
2025-05-06 15:34:50 +02:00
blotus
959b872118
allowlists: automatically expire current matching decisions on update ( #3601 )
2025-05-06 14:10:30 +02:00
mmetc
f8f0b2a211
improve support for parsing time durations with 'day' units ( #3599 )
...
* custom duration type for "cscli decisions list", "cscli alerts list"
* custom duration type for "cscli allowlist add"
* custom duration type for "cscli machines prune"
* custom duration type for "cscli bouncers prune"
* replace old function ParseDuration
* use custom duration type in expr helpers
* update dependency
* lint
* test fix
* support days in 'metrics_max_age'
* DurationWithDays for 'max_age'
2025-05-05 15:12:29 +02:00
mmetc
d10067e772
refactor pkg/database/Client.createAlertChunk() ( #3585 )
2025-05-02 14:12:00 +02:00
David
8949309223
Fix monitorNewFiles for NFS + Remove dead tails from tail map ( #3508 )
...
* xx
* xx
* Tests
* fix tests
* XX
* Fix race condition in TestLiveAcquisition implementation
* Better comments for IsTailing and RemoveTail
* lint
* linter
* unmarshal DiscoveryPollInterval to time.Duration
* []byte -> string
* prefer void assignment to nolint
* extract method, add test
* excludedByRE() -> isExcluded()
* fix windows test
* fix regression - tail files from the end if they are detected when the application starts
---------
Co-authored-by: marco <marco@crowdsec.net>
2025-04-30 15:05:17 +02:00
Laurence Jones
764deee1c0
enhance: add listen_socket to http acquisition ( #3499 )
...
* enhance: add listen_socket to http acquisition
* wrap error for long socket path
* enhance: Cancel early go routines if config is emtpy and add a socket test
* enhance: use temp dir for socket tests
* enhance: use mktemp instead of hardcoding
* enhance: mr linter pls be happy with me
---------
Co-authored-by: marco <marco@crowdsec.net>
2025-04-29 17:19:10 +01:00
Laurence Jones
46e6398868
enhance: Allow the use of 'd' suffix in profiles ( #3594 )
2025-04-29 12:18:06 +01:00
mmetc
7891268486
lapi: return specific error if a unix socket path is too long for the OS ( #3593 )
2025-04-29 12:42:49 +02:00
mmetc
5bc2b49387
allowlists: check during bulk decision import ( #3588 )
2025-04-28 17:11:17 +02:00
mmetc
8689783ade
refact: pkg/exprhelpers/debugger, convert switch to function dispatch ( #3587 )
2025-04-24 11:27:45 +02:00
mmetc
418a27596e
lint/gocritic: enable importShadow, typeUnparen, unnecessaryDefer ( #3583 )
2025-04-24 11:12:38 +02:00
mmetc
34e306505c
refact pkg/database: dry decision count ( #3586 )
2025-04-24 10:25:48 +02:00
mmetc
d46cef1bcb
refact parser Init: argument types ( #3578 )
...
* refact parser Init: argument types
* lint
* tests
* rename struct field; drop redundant nil check
2025-04-23 21:30:03 +02:00
mmetc
7c4e91d304
tests: refact localtest helper, use testify.suite ( #3574 )
2025-04-17 17:35:28 +02:00
mmetc
7396a103d0
refact: logrus.GetLevel() -> logrus.IsLevelEnabled() ( #3579 )
2025-04-17 17:35:09 +02:00
mmetc
a0fab0ac5a
fix: avoid possible race condition while compiling expressions ( #3582 )
2025-04-17 17:34:40 +02:00
blotus
4004868245
fix mysql client certificate support ( #3575 )
2025-04-16 14:39:26 +02:00
mmetc
7e280b23af
fix: error check on postoverflow config ( #3576 )
...
* fix error check on postoverflow config
* lint
2025-04-16 13:15:12 +02:00
mmetc
620bd0117a
Refact pkg/database/decisions.go ( #3541 )
2025-04-16 11:53:52 +02:00
mmetc
c17d42278f
replace go-acc, richgo with gotestsum ( #3567 )
2025-04-14 16:21:32 +02:00
mmetc
89761938c7
pkg/hubtest: use os.CopyFS() ( #3539 )
2025-04-04 14:54:22 +02:00
mmetc
faa5b482f6
lint/refactor: defer, reflectvaluecompare, stylecheck ( #3544 )
...
* lint: enable reflectvaluecompare
* lint: remove exception
* lint: stylecheck ST016 - methods on the same type should have the same receiver name
* lint: enable revive[time-equal]
2025-04-04 14:52:45 +02:00
blotus
48e3c8c5d4
do not return an error if we cannot fetch allowlists when starting the appsec ( #3550 )
2025-04-04 14:44:18 +02:00
mmetc
49927f79a1
CI: golangci-lint v2 ( #3558 )
...
* golangci-lint v2
* CI: reduce parallel jobs for hubtests
2025-04-03 16:57:56 +02:00
mmetc
6c507604b1
hubtests: correct basename check in parser tests ( #3557 )
2025-04-03 12:56:19 +02:00
AlteredCoder
78a6179566
Support WithUserAgent in cti client ( #3542 )
2025-03-31 14:44:51 +02:00
blotus
d64f196b3f
Allowlists: fix range check in LAPI endpoint ( #3538 )
2025-03-25 14:30:18 +01:00
mmetc
55aa1893d1
explicit message for malformed data URL in local items ( #3537 )
2025-03-25 11:53:49 +01:00
mmetc
c245b1e6f8
CI: enable linter "noctx" ( #3528 )
...
* CI: enable linter "noctx"
* rename NewRequestWithContext() -> PrepareRequest()
2025-03-24 15:16:40 +01:00
mmetc
f735457ca4
revert ActionPlan info/warning to StandardLogger ( #3536 )
2025-03-24 15:13:24 +01:00
mmetc
9a3f94dc8f
fix #3532 "reload causes crashing process" ( #3534 )
2025-03-24 15:10:10 +01:00
blotus
2641a6cc07
only warn about capi_whitelists_path being deprecated if actually in use ( #3535 )
2025-03-24 15:05:53 +01:00
blotus
3843213d5c
use replace for coraza instead of renaming the entire package ( #3530 )
2025-03-21 14:30:27 +01:00
mmetc
0459a9a880
update appsec test runner ( #3518 )
2025-03-18 11:45:06 +01:00
blotus
663dad048b
close appsec transactions after processing request ( #3515 )
2025-03-17 11:36:14 +01:00
mmetc
cab99643d1
Parallel hubtest ( #3509 )
...
Hubtests are now much faster and have a --max-jobs option which defaults to the number of cpu cores.
2025-03-17 11:27:09 +01:00
blotus
941b3d98b9
appsec: less verbose logging for allowlists and headers check ( #3498 )
2025-03-12 10:55:06 +01:00
mmetc
c4f9adb799
appsec: use CA from client credentials when connecting to LAPI ( #3505 )
2025-03-12 10:36:30 +01:00
blotus
50a5ef5345
deprecate capi_whitelists_path ( #3504 )
2025-03-12 10:12:30 +01:00
mmetc
a432a6352d
appsec: support custom CA for lapi ( #3503 )
...
* apisever, appsec: refact listenAndServe..()
* RemoveAll() -> Remove()
* configure CA for tls auth request
* ignore error from os.Remove(socket) when there's no file
* appsec functional test
* lint
2025-03-12 09:33:21 +01:00
Laurence Jones
9bb7ad8c3a
enhancement: Add additional ssl options to db configuration ( #3387 )
2025-03-11 10:56:47 +01:00
Laurence Jones
bcce4afe5e
enhance: Flags now superceed all log levels ( #3496 )
...
* enhance: Flags now superceed all log levels
* enhance: remove global var for local scope
* test
---------
Co-authored-by: marco <marco@crowdsec.net>
2025-03-07 13:42:08 +00:00
mmetc
12a3c70860
lint: gocritic/httpNoBody ( #3493 )
...
* lint: gocritic/httpNoBody
2025-03-07 14:35:25 +01:00