Commit graph

1159 commits

Author SHA1 Message Date
dependabot[bot]
65fa2bf8c3
Bump github.com/docker/distribution (#1996) 2023-02-20 10:34:52 +01:00
JDEV
12a4a5fb14
CAPI error code handling tests (#2027)
* Registration mocked error cases

* Authentication mock error cases

* mini facto

* check that getMEtric still has bouncers/machines keys in output even with empty collections

* fixed defer body close(), no need to defer and fprint arg

* fix fatal call

---------

Co-authored-by: jdv <julien@crowdsec.net>
2023-02-17 14:57:46 +01:00
blotus
83c3818504
Do not try to refresh JWT token when doing a login request (#2059) 2023-02-16 16:16:26 +01:00
mmetc
5de500d6da
CI: set GOBIN instead of go install + cp (#2030) 2023-02-15 14:27:47 +01:00
mmetc
5ff6bfba9c
CI: build with/require go 1.20 (#2031) 2023-02-15 14:27:17 +01:00
mmetc
06ddd01c70
test: bats-detect tests for "cscli setup" (#2057) 2023-02-15 14:23:52 +01:00
Laurence Jones
5aca11af70
Show s00 stats instead of "first_parser" (#2055)
* show s00 if verbose is provided

* Clean up code

* Fix failing test
2023-02-14 14:36:08 +00:00
Cristian Nitescu
ecb32d74c6
optimize blocklist fetch (#2039) 2023-02-13 15:06:14 +01:00
Cristian Nitescu
f280505eaa
omtimization - remove useless login call (#2036) 2023-02-13 15:05:58 +01:00
blotus
812b87ab48
Add IsIPV4() and IsIP() helpers (#2050) 2023-02-10 14:44:42 +01:00
Thibault "bui" Koechlin
0f5560b62a
more strings helpers (#2040)
* more strings helpers
2023-02-09 15:23:21 +01:00
blotus
6c15da4ece
strip v prefix in tag name in azure-pipeline (#2048) 2023-02-09 14:17:49 +01:00
blotus
ebd709a4fe
Fix azure pipeline (#2046) 2023-02-09 13:08:57 +01:00
blotus
2820f9b986
fix typo when assigning build_version in azure pipeline (#2044) 2023-02-09 10:50:48 +01:00
blotus
9f911318f3
use the tag name from the predefined variable for azure pipeline (#2041) 2023-02-08 18:41:23 +01:00
Thibault "bui" Koechlin
1d7d377f8b
changes following BL tests (#2038)
Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
2023-02-08 10:35:21 +01:00
Thibault "bui" Koechlin
a0b264047c
allow user to specify stash's cache strategy (#2037) 2023-02-06 15:42:55 +01:00
Cristian Nitescu
987f119c4b
v3 capi and blocklists links support (#2019)
* v3 model generation

* v3 model generation

* comms

* fixes after master merge

* missing reader close

* use constants defined for types

---------

Co-authored-by: bui <thibault@crowdsec.net>
2023-02-06 14:06:14 +01:00
mmetc
b6be18ca65
cscli setup (#1923)
Detect running services and generate acquisition configuration
2023-02-06 07:33:04 +01:00
AlteredCoder
7e871d2278
rename PAPI base URL (#2033) 2023-02-03 12:10:02 +01:00
mmetc
8f130196f8
CI: bump more actions (#2028) 2023-02-02 09:49:52 +01:00
mmetc
628af6e2d0
CI: update github actions and deprecated commands (#2023) 2023-02-01 16:55:34 +01:00
he2ss
8024693f4f
add dev docker image (based on master) (#2024)
* add dev docker image (based on master)
2023-02-01 14:47:38 +01:00
Thibault "bui" Koechlin
e927717fa0
Polling API Integration (#1715)
Co-authored-by: alteredCoder <kevin@crowdsec.net>
Co-authored-by: he2ss <hamza.essahely@gmail.com>
Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
2023-01-31 14:47:44 +01:00
mmetc
3bf95e1a83
docker: skip temporary installation of disabled items (#2018) 2023-01-26 17:13:57 +01:00
mmetc
e37d09e5b4
use helpers for shorter tests, add a couple of error cases (#2016) 2023-01-26 17:13:31 +01:00
mmetc
3fb3decf49
error if tls.key_file or cert_file are missing (#2020) 2023-01-26 17:12:59 +01:00
mmetc
b0f370bae2
fix docker support for legacy vars (#2021) 2023-01-26 17:12:40 +01:00
mmetc
6193047c35
remove SYSTEM=docker during build, update dockerignore (#2017) 2023-01-25 10:39:23 +01:00
mmetc
02be5f3618
allow literal $ in plugin configuration (#2015) 2023-01-23 16:28:43 +01:00
mmetc
47cc60bda9
allow use of literal $ in config.yaml (#2012) 2023-01-23 10:29:29 +01:00
he2ss
ce60c7b056
docker: add cri-logs collection by default to support CRI log format (#2005) 2023-01-20 16:02:04 +00:00
mmetc
d369656b26
agent: fix message when -dsn is provided without -type (#2009) 2023-01-20 16:14:26 +01:00
mmetc
e5833699c0
cscli config feature-flags (#2006) 2023-01-20 09:32:10 +01:00
ju_hnny5
83ed8a61aa
Store go module name in var in Makefile (#1989)
Co-authored-by: Julien Briault <jbriault@deezer.com>
2023-01-19 22:24:45 +01:00
mmetc
4bffc0df21
break in smaller functions cscli hub, hubtest, notifications, parsers, scenarios, simulation (#2004) 2023-01-19 13:29:36 +01:00
mmetc
1e4441b6ae
docker: replace BUILD_ENV with --target (#1995) 2023-01-19 11:02:23 +01:00
mmetc
7bb74b9664
refact cscli decisions (#2003) 2023-01-19 11:02:00 +01:00
Thibault "bui" Koechlin
4f29ce2ee7
CTI API Helpers in expr (#1851)
* Add CTI API helpers in expr
* Allow profiles to have an `on_error` option to profiles

Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
2023-01-19 08:45:50 +01:00
Marco Mariani
0c35d9d43c wip 2023-01-18 15:15:18 +01:00
Marco Mariani
4f25738d6b wip 2023-01-18 15:15:18 +01:00
Marco Mariani
47dbfa770d configure logging earlier 2023-01-18 15:15:18 +01:00
Marco Mariani
91b0f8fee1 load custom configuration paths when agent is disabled 2023-01-18 15:15:18 +01:00
Marco Mariani
2e91a82aa7 load feature.yaml as soon as possible 2023-01-18 15:15:18 +01:00
Thibault "bui" Koechlin
f25fdecc3f
normalize scopes for alerts and decisions (#2001)
* normalize scopes for alerts and decisions
2023-01-18 14:50:03 +01:00
Marco Mariani
b603bdfccc cscli refact: extracted New.*Cmd from alerts, capi, dashboard; removed (some) globals 2023-01-18 11:09:28 +01:00
Ben Scobie
3d8c891699
Fix reference to ghcr.io (#1999) 2023-01-17 16:50:27 +00:00
Yip Rui Fung
ecb5562b57
Fix docker_start.sh not properly handling env vars (#1993)
For example, the COLLECTIONS environment variable is supposed to do a space separated list.
But with the unquoted call to cscli_if_clean without quotes on the $COLLECTIONS environment variable, only the first entry is passed to it.
As a result, only the first entry is installed.

Would likely affect all call sites to cscli_if_clean
2023-01-14 19:56:27 +01:00
mmetc
2142f7bb5c
ci: remove hub dispatch, (msi) take release version from git history (#1949)
Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
2023-01-13 14:16:17 +01:00
mmetc
51800132cd
improve feature flag logging (#1986)
For cscli: it should provide a terse output, not nag users with configuration details. Although it's usually important that cscli and crowdsec have the same enabled features, having it list them every time the command is invoked can be too much.

For crowdsec: when features are set from the environment, it's too early to log where we should. So we can use log.Debug at activation time, and list them again once logging is configured.

 - wrap some functions in csconfig for convenience and DRY
 - for each enabled feature, log.Debug
 - log all enabled features once as Info (crowdsec) or Debug (cscli)
 - file does not exist -> log.Trace
2023-01-13 13:42:42 +01:00