Commit graph

206 commits

Author SHA1 Message Date
alteredCoder ba6aefc5b0 fix lapi option names 2022-04-15 16:04:13 +02:00
alteredCoder 7f42f94fe3 finalize 2022-04-15 15:55:03 +02:00
alteredCoder c7723158a0 update 2022-04-15 15:55:03 +02:00
alteredCoder 699dcb2c0f add tests 2022-04-15 15:55:03 +02:00
alteredCoder eb0fb243a3 display context with alert 2022-04-15 15:55:03 +02:00
alteredCoder 186d5c3aa5 update 2022-04-15 15:55:03 +02:00
alteredCoder ac16db5f21 update 2022-04-15 15:55:03 +02:00
alteredCoder ab525fff6a update 2022-04-15 15:55:03 +02:00
alteredCoder f96cb2a70d udpate 2022-04-15 15:55:03 +02:00
alteredCoder 4f80e889d4 update 2022-04-15 15:55:03 +02:00
alteredCoder 1831a27600 first iteration 2022-04-15 15:55:03 +02:00
AlteredCoder 71165bcd30
Send all installed scenario to LAPI (#1277) 2022-04-13 17:48:29 +02:00
mmetc 5f2797c83c
more func test coverage; capture exit code for bincover (#1425) 2022-04-13 15:44:23 +02:00
mmetc bf4bc0c9fc
single workflow for all tests, with bats coverage (#1413) 2022-04-05 11:00:11 +02:00
mmetc 1e63727064
int64 for metric units (#1419) 2022-04-04 21:50:19 +02:00
mmetc dad22a6aba
instrument main() for tests (#1399) 2022-04-01 11:17:45 +02:00
mmetc b202e387cf
fix "cscli" without arguments (#1406) 2022-03-31 16:50:38 +02:00
Thibault "bui" Koechlin d8dc01cd94
Revamp unit tests (#1368)
* Revamp unit tests
* Increase coverage
* Use go-acc to get cross packages coverage

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-03-29 14:20:26 +02:00
mmetc caf1dc71fb
allow capi register in functional tests (#1384) 2022-03-24 11:07:54 +01:00
AlteredCoder 411baa4dcf
Improve cscli metrics units (#1374)
* Improve cscli metrics units
2022-03-21 12:13:36 +01:00
AlteredCoder e4cc5fc997
Add -m flag for decisions list to display the machine (#1361)
* Add -m flag for decisions list to display the machine
2022-03-16 17:29:31 +01:00
Shivam Sandbhor 023ac9e138
Add trusted IPs which have admin API access (#1352)
* Add trusted IPs which have admin API access
2022-03-16 17:28:34 +01:00
AlteredCoder b57eb92bbc
Allow to ignore errors when installing multiple configuration items (#1359)
* Allow to ignore errors when installing multiple configuration items
2022-03-16 17:27:30 +01:00
AlteredCoder 24797c1534
Allow cscli remove to remove with --all (#1360) 2022-03-16 17:26:31 +01:00
Shivam Sandbhor 76e97303a5
Deprecate pid_file config (#1346)
* Deprecate pid_file config

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>

* Fix unit test

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>

* Impl review suggestions.

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-03-16 09:23:49 +01:00
AlteredCoder 0dd37240a5
Display acquisition dir in cscli config show (#1349) 2022-03-14 18:28:31 +01:00
mmetc b6aca81ebd
allow "cscli completion..." without configuration file (#1340) 2022-03-10 14:57:14 +01:00
mmetc aca37a38e7
return 1 with incomplete command line; always check error when calling cmd.Help (#1335) 2022-03-10 13:55:25 +01:00
Thibault "bui" Koechlin 52132ce398
fix #1157 (#1327) 2022-03-10 13:23:21 +01:00
mmetc 7c0593c659
noop code removal, typos and lint fixes (#1329) 2022-03-09 16:15:18 +01:00
Shivam Sandbhor 0f5e922851
Warn when log file in explain command is large. (#1293)
* Warn when log file in explain command is large.

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-02-28 14:57:59 +01:00
Shivam Sandbhor 1928d385b0
Fix typo in explain help (#1290) 2022-02-24 13:32:18 +01:00
Thibault "bui" Koechlin 9a42190e13
fix #1274 (#1285) 2022-02-24 10:24:04 +01:00
mmetc 556892cf86
make test (#1249) 2022-02-14 22:21:19 +01:00
AlteredCoder 8b90f4b2b2
Upgrade download datafiles if doesn't exist (#1254) 2022-02-14 16:51:06 +01:00
mmetc ef4bf6a8ab
grammar (#1257) 2022-02-14 13:47:15 +01:00
Thibault "bui" Koechlin 4fc7335112
fix help message (#1228) 2022-02-02 10:06:08 +01:00
mmetc ad28a979e9
local control flow cleanup (#1215)
removed redundant/unreachable returns, else branches, type declarations, unused variables
2022-02-01 22:08:06 +01:00
mmetc 35eea39db7
allow Makefile to override /etc/crowdsec and /var/lib/crowdsec/data (#1221) 2022-02-01 10:34:53 +01:00
mmetc 383eebf2b6
Makefile cleanup (#1211)
* rm -f => $(RM)
* PHONY targets
* remove email plugin binary on cleanup
* unused make variables
2022-02-01 09:22:47 +01:00
Thibault "bui" Koechlin dbde90d24c
fix #1200 (#1203) 2022-01-24 17:22:16 +01:00
Thibault "bui" Koechlin cc1ab8c50d
switch to utc time everywhere (#1167)
* switch to utc time everywhere


Co-authored-by: alteredCoder <kevin@crowdsec.net>
2022-01-19 14:56:05 +01:00
Thibault "bui" Koechlin 6e92da76ad
lapi to capi : allow push of tainted/custom/manual decisions (#1154)
* add console command to control signal sharing
* modify metrics endpoint to add lastpush

Co-authored-by: alteredCoder <kevin@crowdsec.net>
2022-01-13 16:46:16 +01:00
Thibault "bui" Koechlin 3bca25fd6d
lists support from central api (#1074)
* lists support from central api

Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
2022-01-11 14:31:51 +01:00
Shivam Sandbhor c109e0e7dd
Add option to print machine creds (#1149)
* Add option to print machine creds

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-01-07 16:53:56 +01:00
Shivam Sandbhor ba71c55492
Fix cscli inpsect json output (#1145)
* Fix cscli inpsect json output
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-01-05 10:42:27 +01:00
Shivam Sandbhor 6c4ec64ca9
Fix json output of cscli hub list (#1143)
* Fix json output of cscli hub list
* Fix functional tests.

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-01-04 11:49:23 +01:00
mmetc cf175ab07e
fixed "help collections list" message (#1142)
* fixed "help collections list" message

* corrected usage of "as well"
2022-01-03 17:09:07 +01:00
he2ss ed38ca3a73
cscli: raise error on unknown collection remove (#1133) 2021-12-30 11:32:05 +01:00
AlteredCoder 9c8ca5c73a
Alert inspect improvement / Use correct CSV output when listing in raw format (#1127) 2021-12-29 14:08:47 +01:00