Commit graph

91 commits

Author SHA1 Message Date
blotus 4b311684ab
Add more JSON expr helpers (#1576) 2022-06-08 12:15:29 +02:00
AlteredCoder 1e1741aa45
Allow to set static to a pointer and add IsIPV6 helper (#1540)
* Allow to set static to a pointer and add IsIPV6 helper
2022-05-19 16:28:25 +02:00
blotus 64369b5c2b
add expr XML helpers (#1493) 2022-04-29 13:52:23 +02:00
AlteredCoder 526a4dbd08
Reduce the query unescape helper verbosity (#1447) 2022-04-19 12:31:29 +02:00
AlteredCoder 5a0843852a
add IpToRange helpers and allows to have an expression with scope Range (#1260)
* add IpToRange helpers and allows to have an expression with scope Range
2022-02-14 16:50:52 +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
AlteredCoder 458dcd1979
add more helpers (#1091)
* add more exprhelpers
2021-12-14 11:07:40 +01:00
blotus 2bc9f33e12
add ParseUri() expr helper (#994) 2021-10-08 16:50:31 +02:00
Thibault "bui" Koechlin af4bb350c0
hubtests revamp + cscli explain (#988)
* New hubtest CI for scenarios/parsers from the hub
 * New `cscli explain` command to visualize parsers/scenarios pipeline

Co-authored-by: alteredCoder <kevin@crowdsec.net>
Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
Co-authored-by: he2ss <hamza.essahely@gmail.com>
Co-authored-by: Cristian Nitescu <cristian@crowdsec.net>
2021-10-04 17:14:52 +02:00
he2ss e651379964
add jsonExtractUnescape Helper (#962)
* add jsonExtractUnescape Helper
2021-09-10 12:43:11 +02:00
AlteredCoder 5ae69aa293
fix stacktrace when mmdb file are not present (#935)
* fix stacktrace when mmdb file are not present
2021-09-09 16:27:30 +02:00
Thibault "bui" Koechlin 71c1d9431f
fix #823 : lower JsonExtract debug (#824)
* lower key not found log level, fix #823
2021-06-02 14:27:34 +02:00
registergoofy 7e9ce901a4
add TimeNow in the exprlib helpers (#756)
* add TimeNow in the exprlib helpers
* add a default date when none is detected: when no date is recognised by ParseDate, then use time.Now()
2021-04-16 19:13:48 +02:00
Thibault "bui" Koechlin a3d00fe130
skip empty lines to avoid issue of #630 (#631)
* skip empty lines to avoid issue of #630

* add tests on empty lines and comms
2021-02-25 09:57:24 +01:00
Thibault "bui" Koechlin 2e76097d35
Fix overflows of overflows requesting for different decision scope (#499) 2020-12-02 17:15:48 +01:00
Thibault "bui" Koechlin dbb420f79e
local api (#482)
Co-authored-by: AlteredCoder
Co-authored-by: erenJag
2020-11-30 10:37:17 +01:00
erenJag 6624fce66a
fix tests (#191)
* fix leakybucket test
2020-08-24 10:25:52 +02:00
erenJag 25dfcebf4c
improve fileInit func by not loading unspecified data (#189)
* improve fileInit func by not loading unsepcified data
2020-08-21 14:20:44 +02:00
Thibault "bui" Koechlin 1398a74c6d
add extra tests for exprlib visitors (#187)
* add extra tests for exprlib visitors
2020-08-20 11:53:47 +02:00
AlteredCoder 747065229e
fix expr debugger (#178)
Co-authored-by: AlteredCoder <AlteredCoder>
2020-08-05 16:27:16 +02:00
AlteredCoder b10c7e9bef
fix expr debugger when no variable is present (#174)
Co-authored-by: AlteredCoder <AlteredCoder>
2020-08-04 16:44:03 +02:00
AlteredCoder d8f0f5a3a9
Add debug expr (#168)
* debug expr in node.go
* update documentation

Co-authored-by: AlteredCoder <AlteredCoder>
Co-authored-by: Thibault bui Koechlin <thibault@crowdsec.net>
2020-08-03 12:21:15 +02:00
AlteredCoder b7096be6e6
fix message to verbose in expr helper (#166)
Co-authored-by: AlteredCoder <AlteredCoder>
2020-07-30 17:12:47 +02:00
AlteredCoder 794d3221d0
add tests in pkg/csconfig and improve pkg/exprhelpers tests (#150)
* add tests for csconfig & improve exprhelpers tests
2020-07-28 15:38:48 +02:00
AlteredCoder d0ac43b00f
Allow comments with # in expr wordlists
Co-authored-by: AlteredCoder <AlteredCoder>
2020-07-07 16:26:00 +02:00
Thibault "bui" Koechlin a62bac0ca0
verbosity (#121) 2020-07-03 18:26:23 +02:00
Thibault "bui" Koechlin 7691e5b663
re-enable postoverflows (#117)
* re-enable postoverflows

* debug

* yoloooo

* remove debug

* remove error print

* fix test

* fix leakybucket test

* fix

Co-authored-by: AlteredCoder <AlteredCoder>
2020-07-02 17:56:39 +02:00
erenJag f6826c7e47
add expr helper to check if IP is in ipRange (#113)
* add expr helper to check if IP is in ipRange

* update helper name

Co-authored-by: erenJag <erenJag>
2020-07-02 11:09:40 +02:00
Thibault "bui" Koechlin b9ae94b874
Sqlite : Support automatic db flushing (#91)
* add support for sqlite retention : max_records, max_records_age

* reduce verbosity of cwhub
2020-07-01 17:04:29 +02:00
Thibault "bui" Koechlin 430b7cd90d
add a 'Upper' expr helper (#50)
* add a 'Upper' expr helper

* remove redundant startsWith and endsWith
2020-06-01 16:12:48 +02:00
AlteredCoder 82d6e6938a
Fix expr helpers "StartsWith" and "EndsWith" (#48)
* fix

* fix typo

Co-authored-by: AlteredCoder <AlteredCoder>
2020-05-29 17:25:09 +02:00
AlteredCoder ea4e4153af fix review 2020-05-28 11:32:00 +02:00
AlteredCoder fd6ecd25df fix review 2020-05-28 11:28:49 +02:00
AlteredCoder 160478b419 add test for exprhelpers 2020-05-28 11:28:49 +02:00
Thibault "bui" Koechlin 1abdfc9b10 make message better 2020-05-28 11:28:49 +02:00
erenJag c020ff8c64
Merge pull request #22 from crowdsecurity/add_expr_helpers
add new expr helpers
2020-05-25 12:12:49 +02:00
Thibault bui Koechlin aad2e1421e fix printf 2020-05-25 11:35:32 +02:00
Thibault bui Koechlin d601e21afb working tests for json 2020-05-23 13:22:43 +02:00
Thibault bui Koechlin 32f32b41c7 add json support via expr helpers 2020-05-22 18:12:33 +02:00
AlteredCoder 62daa98bf3 add new helpers 2020-05-22 13:55:48 +02:00
Thibault bui Koechlin 2016167654 initial import 2020-05-15 11:39:16 +02:00