MidnightBSD Magus

security/crowdsec

CrowdSec lightweight and collaborative security engine

Flavor Version Run OSVersion Arch License Restricted Status
1.6.3 594 3.2 i386 mit 0 fail

License Permissions:

Events

Machine Type Time Message
m3232 info 2024-12-19 07:24:58.062134 Test Started
m3232 fail 2024-12-19 07:29:34.464225 make test returned non-zero: 1
m3232 fail 2024-12-19 07:29:34.82152 Test complete.

Log

===>  Testing for crowdsec-1.6.3
(cd /magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3;  for t in ./...; do  echo "===>  Testing ${t}";  /usr/bin/env -i HOME=/magus/work/usr/mports/security/crowdsec/work  PWD="${PWD}"  __MAKE_CONF=/nonexistent OSVERSION=302002 PATH=/magus/work/usr/mports/security/crowdsec/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin TERM=vt100 TMPDIR=/tmp XDG_DATA_HOME=/magus/work/usr/mports/security/crowdsec/work  XDG_CONFIG_HOME=/magus/work/usr/mports/security/crowdsec/work  HOME=/magus/work/usr/mports/security/crowdsec/work TMPDIR="/tmp" PATH=/magus/work/usr/mports/security/crowdsec/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/magus/work/usr/mports/security/crowdsec/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES TARGETDIR=/usr/local  DESTDIR=  PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing"  CPP="cpp" CPPFLAGS=""  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing" BSD_INSTALL_PROGRAM="install  -s -o root -g wheel -m 555"  BSD_INSTALL_LIB="install  -s -o root -g wheel -m 444"  BSD_INSTALL_SCRIPT="install  -o root -g wheel -m 555"  BSD_INSTALL_DATA="install  -o root -g wheel -m 444"  BSD_INSTALL_MAN="install  -o root -g wheel -m 444" CGO_ENABLED=1  CGO_CFLAGS="-I/usr/local/include"  CGO_LDFLAGS="-L/usr/local/lib"  GOAMD64=  GOARM=  GOTMPDIR="/magus/work/usr/mports/security/crowdsec/work" GOPATH="/magus/distfiles/go/security_crowdsec"  GOBIN="/magus/work/usr/mports/security/crowdsec/work/bin"  GO111MODULE=on  GOFLAGS=-modcacherw  GOSUMDB=sum.golang.org GOPROXY=off /usr/local/bin/go122 test -v -buildvcs=false -mod=vendor ${t};  done)
===>  Testing ./...
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/ask	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clialert	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clibouncer	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clicapi	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/cliconsole	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clidecision	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/cliexplain	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clihub	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clihubtest	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/cliitem	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clientinfo	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/climachine	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clinotifications	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clipapi	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clisetup	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clisimulation	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clisupport	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/cstable	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/idgen	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/climetrics	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/reload	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/require	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/notification-dummy	[no test files]
=== RUN   TestPrepareAPIURL_NoProtocol
--- PASS: TestPrepareAPIURL_NoProtocol (0.00s)
=== RUN   TestPrepareAPIURL_Http
--- PASS: TestPrepareAPIURL_Http (0.00s)
=== RUN   TestPrepareAPIURL_Https
--- PASS: TestPrepareAPIURL_Https (0.00s)
=== RUN   TestPrepareAPIURL_UnixSocket
--- PASS: TestPrepareAPIURL_UnixSocket (0.00s)
=== RUN   TestPrepareAPIURL_Empty
--- PASS: TestPrepareAPIURL_Empty (0.00s)
=== RUN   TestPrepareAPIURL_Empty_ConfigOverride
--- PASS: TestPrepareAPIURL_Empty_ConfigOverride (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/cmd/crowdsec-cli/clilapi	0.141s
?   	github.com/crowdsecurity/crowdsec/cmd/notification-email	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/notification-file	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/notification-http	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/notification-sentinel	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/notification-slack	[no test files]
?   	github.com/crowdsecurity/crowdsec/cmd/notification-splunk	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/acquisition/configuration	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec/bodyprocessors	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/loki/internal/lokiclient	[no test files]
=== RUN   TestDataSourceConfigure
=== RUN   TestDataSourceConfigure/basic_valid_config
=== RUN   TestDataSourceConfigure/basic_debug_config
=== RUN   TestDataSourceConfigure/basic_tailmode_config
=== RUN   TestDataSourceConfigure/bad_mode_config
=== RUN   TestDataSourceConfigure/bad_type_config
=== RUN   TestDataSourceConfigure/mismatch_config
=== RUN   TestDataSourceConfigure/cant_run_error
--- PASS: TestDataSourceConfigure (0.00s)
    --- PASS: TestDataSourceConfigure/basic_valid_config (0.00s)
    --- PASS: TestDataSourceConfigure/basic_debug_config (0.00s)
    --- PASS: TestDataSourceConfigure/basic_tailmode_config (0.00s)
    --- PASS: TestDataSourceConfigure/bad_mode_config (0.00s)
    --- PASS: TestDataSourceConfigure/bad_type_config (0.00s)
    --- PASS: TestDataSourceConfigure/mismatch_config (0.00s)
    --- PASS: TestDataSourceConfigure/cant_run_error (0.00s)
=== RUN   TestLoadAcquisitionFromFile
=== RUN   TestLoadAcquisitionFromFile/non_existent_file
time="2024-12-19T07:28:59-05:00" level=info msg="loading acquisition file : does_not_exist"
=== RUN   TestLoadAcquisitionFromFile/invalid_yaml_file
time="2024-12-19T07:28:59-05:00" level=info msg="loading acquisition file : test_files/badyaml.yaml"
=== RUN   TestLoadAcquisitionFromFile/invalid_empty_yaml
time="2024-12-19T07:28:59-05:00" level=info msg="loading acquisition file : test_files/emptyitem.yaml"
=== RUN   TestLoadAcquisitionFromFile/basic_valid
time="2024-12-19T07:28:59-05:00" level=info msg="loading acquisition file : test_files/basic_filemode.yaml"
=== RUN   TestLoadAcquisitionFromFile/missing_labels
time="2024-12-19T07:28:59-05:00" level=info msg="loading acquisition file : test_files/missing_labels.yaml"
=== RUN   TestLoadAcquisitionFromFile/backward_compat
time="2024-12-19T07:28:59-05:00" level=info msg="loading acquisition file : test_files/backward_compat.yaml"
=== RUN   TestLoadAcquisitionFromFile/bad_type
time="2024-12-19T07:28:59-05:00" level=info msg="loading acquisition file : test_files/bad_source.yaml"
=== RUN   TestLoadAcquisitionFromFile/invalid_filetype_config
time="2024-12-19T07:28:59-05:00" level=info msg="loading acquisition file : test_files/bad_filetype.yaml"
--- PASS: TestLoadAcquisitionFromFile (0.00s)
    --- PASS: TestLoadAcquisitionFromFile/non_existent_file (0.00s)
    --- PASS: TestLoadAcquisitionFromFile/invalid_yaml_file (0.00s)
    --- PASS: TestLoadAcquisitionFromFile/invalid_empty_yaml (0.00s)
    --- PASS: TestLoadAcquisitionFromFile/basic_valid (0.00s)
    --- PASS: TestLoadAcquisitionFromFile/missing_labels (0.00s)
    --- PASS: TestLoadAcquisitionFromFile/backward_compat (0.00s)
    --- PASS: TestLoadAcquisitionFromFile/bad_type (0.00s)
    --- PASS: TestLoadAcquisitionFromFile/invalid_filetype_config (0.00s)
=== RUN   TestStartAcquisitionCat
--- PASS: TestStartAcquisitionCat (1.00s)
=== RUN   TestStartAcquisitionTail
--- PASS: TestStartAcquisitionTail (2.02s)
=== RUN   TestStartAcquisitionTailError
--- PASS: TestStartAcquisitionTailError (2.06s)
=== RUN   TestConfigureByDSN
=== RUN   TestConfigureByDSN/baddsn
=== RUN   TestConfigureByDSN/foobar://toto
=== RUN   TestConfigureByDSN/mockdsn://test_expect
=== RUN   TestConfigureByDSN/mockdsn://bad
--- PASS: TestConfigureByDSN (0.00s)
    --- PASS: TestConfigureByDSN/baddsn (0.00s)
    --- PASS: TestConfigureByDSN/foobar://toto (0.00s)
    --- PASS: TestConfigureByDSN/mockdsn://test_expect (0.00s)
    --- PASS: TestConfigureByDSN/mockdsn://bad (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/acquisition	5.262s
=== RUN   TestAppsecOnMatchHooks
=== RUN   TestAppsecOnMatchHooks/no_rule_:_check_return_code
time="2024-12-19T07:28:59-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22a97b00}" test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=info msg="Loaded 0 outofband rules" test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=info msg="Loaded 0 inband rules" test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x22a1f200 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=trace msg="Loaded outband rules: []" test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="Request received in runner" request_uuid= test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="New transaction created" band=inband test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=inband phase=1 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN variable=ARGS_GET
time="2024-12-19T07:28:59-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN variable_name=ARGS_GET
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=log band=inband test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=log band=inband test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=t band=inband test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=inband phase=2 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="rules matched for body : 756992091" test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=inband phase=5 test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="no rule : check return code" tx_id=gWjgCYseNboUJcEnGFN
time="2024-12-19T07:28:59-05:00" level=debug msg="inband rules matched : 756992091" test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="no rule : check return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="New transaction created" band=outband test="no rule : check return code" tx_id=wINBfcDmicuvPEkFPCR
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="no rule : check return code" tx_id=wINBfcDmicuvPEkFPCR
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=outband phase=1 test="no rule : check return code" tx_id=wINBfcDmicuvPEkFPCR
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="no rule : check return code" tx_id=wINBfcDmicuvPEkFPCR
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=outband phase=2 test="no rule : check return code" tx_id=wINBfcDmicuvPEkFPCR
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="no rule : check return code" tx_id=wINBfcDmicuvPEkFPCR
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=outband phase=5 test="no rule : check return code" tx_id=wINBfcDmicuvPEkFPCR
time="2024-12-19T07:28:59-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="no rule : check return code" tx_id=wINBfcDmicuvPEkFPCR
time="2024-12-19T07:28:59-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d03880)({\n    Capacity: (*int32)(0x23cfd42c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x228131f0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x22813200)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x22813210)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x22813220)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x22813240)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x22813250)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x22813260)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x22b2c728)((len=20) \"2024-12-19T12:28:59Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23cfd4cc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x22b2c7e0)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x22b2c800)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x228132a0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228132c0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228132e0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22813310)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22813330)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22813350)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x22b2c7e8)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x22b2c7f0)(\"\"),\n    ScenarioVersion: (*string)(0x22b2c7f8)(\"\"),\n    Simulated: (*bool)(0x23cfd4f0)(false),\n    Source: (*models.Source)(0x22a9fa40)(ip ),\n    StartAt: (*string)(0x22b2c810)((len=20) \"2024-12-19T12:28:59Z\"),\n    StopAt: (*string)(0x22b2c818)((len=20) \"2024-12-19T12:28:59Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23cfd42c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x228131f0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x22813200)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x22813210)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x22813220)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x22813240)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x22813250)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x22813260)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x22b2c728)((len=20) \"2024-12-19T12:28:59Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23cfd4cc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x22b2c7e0)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x22b2c800)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x228132a0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228132c0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228132e0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22813310)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22813330)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22813350)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x22b2c7e8)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x22b2c7f0)(\"\"),\n     ScenarioVersion: (*string)(0x22b2c7f8)(\"\"),\n     Simulated: (*bool)(0x23cfd4f0)(false),\n     Source: (*models.Source)(0x22a9fa40)(ip ),\n     StartAt: (*string)(0x22b2c810)((len=20) \"2024-12-19T12:28:59Z\"),\n     StopAt: (*string)(0x22b2c818)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:28:59.866948549 -0500 EST m=+0.120859555,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"gWjgCYseNboUJcEnGFN\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\",\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\"\n  }\n }\n}\n"
time="2024-12-19T07:28:59-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_change_return_code
time="2024-12-19T07:28:59-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetReturnCode(413)] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22abc100}" test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=info msg="Loaded 0 inband rules" test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23488ee0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=trace msg="Loaded outband rules: []" test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="New transaction created" band=inband test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH variable=ARGS_GET
time="2024-12-19T07:28:59-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH variable_name=ARGS_GET
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="rules matched for body : 756992091" test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: change return code" tx_id=uyQchdcZSjWghsYxugH
time="2024-12-19T07:28:59-05:00" level=debug msg="inband rules matched : 756992091" test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="setting http code to 413" request_uuid= test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: change return code"
time="2024-12-19T07:28:59-05:00" level=debug msg="New transaction created" band=outband test="on_match: change return code" tx_id=gBDGryYknTNWAExjABm
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: change return code" tx_id=gBDGryYknTNWAExjABm
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: change return code" tx_id=gBDGryYknTNWAExjABm
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: change return code" tx_id=gBDGryYknTNWAExjABm
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: change return code" tx_id=gBDGryYknTNWAExjABm
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: change return code" tx_id=gBDGryYknTNWAExjABm
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: change return code" tx_id=gBDGryYknTNWAExjABm
time="2024-12-19T07:28:59-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: change return code" tx_id=gBDGryYknTNWAExjABm
time="2024-12-19T07:28:59-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234aa200)({\n    Capacity: (*int32)(0x22be2f9c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x22afe970)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x22afe980)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x22afe990)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x22afe9a0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x22afe9c0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x22afe9d0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x22afe9e0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x22a4f1d0)((len=20) \"2024-12-19T12:28:59Z\")\n     })\n    },\n    EventsCount: (*int32)(0x22be303c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x22a4f228)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x22a4f248)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x22afea00)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22afea20)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22afea40)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22afea70)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22afea90)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22afeab0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x22a4f230)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x22a4f238)(\"\"),\n    ScenarioVersion: (*string)(0x22a4f240)(\"\"),\n    Simulated: (*bool)(0x22be3070)(false),\n    Source: (*models.Source)(0x22abdd80)(ip ),\n    StartAt: (*string)(0x22a4f258)((len=20) \"2024-12-19T12:28:59Z\"),\n    StopAt: (*string)(0x22a4f260)((len=20) \"2024-12-19T12:28:59Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x22be2f9c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x22afe970)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x22afe980)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x22afe990)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x22afe9a0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x22afe9c0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x22afe9d0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x22afe9e0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x22a4f1d0)((len=20) \"2024-12-19T12:28:59Z\")\n      })\n     },\n     EventsCount: (*int32)(0x22be303c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x22a4f228)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x22a4f248)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x22afea00)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22afea20)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22afea40)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22afea70)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22afea90)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22afeab0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x22a4f230)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x22a4f238)(\"\"),\n     ScenarioVersion: (*string)(0x22a4f240)(\"\"),\n     Simulated: (*bool)(0x22be3070)(false),\n     Source: (*models.Source)(0x22abdd80)(ip ),\n     StartAt: (*string)(0x22a4f258)((len=20) \"2024-12-19T12:28:59Z\"),\n     StopAt: (*string)(0x22a4f260)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:28:59.925262572 -0500 EST m=+0.179173458,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"uyQchdcZSjWghsYxugH\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\",\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\"\n  }\n }\n}\n"
time="2024-12-19T07:28:59-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 413,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_change_action_to_a_non_standard_one_(log)
time="2024-12-19T07:28:59-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('log')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22ae0680}" test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=info msg="Loaded 0 inband rules" test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x234b6f00 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=trace msg="Loaded outband rules: []" test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=debug msg="New transaction created" band=inband test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ variable=ARGS_GET
time="2024-12-19T07:28:59-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ variable_name=ARGS_GET
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="rules matched for body : 756992091" test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: change action to a non standard one (log)" tx_id=gyIigCqvuDkcdJpVIuJ
time="2024-12-19T07:28:59-05:00" level=debug msg="inband rules matched : 756992091" test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=debug msg="setting action to log" request_uuid= test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: change action to a non standard one (log)"
time="2024-12-19T07:28:59-05:00" level=debug msg="New transaction created" band=outband test="on_match: change action to a non standard one (log)" tx_id=UoFqxvAQlqqRZEtARGV
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: change action to a non standard one (log)" tx_id=UoFqxvAQlqqRZEtARGV
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: change action to a non standard one (log)" tx_id=UoFqxvAQlqqRZEtARGV
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: change action to a non standard one (log)" tx_id=UoFqxvAQlqqRZEtARGV
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: change action to a non standard one (log)" tx_id=UoFqxvAQlqqRZEtARGV
time="2024-12-19T07:28:59-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: change action to a non standard one (log)" tx_id=UoFqxvAQlqqRZEtARGV
time="2024-12-19T07:28:59-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: change action to a non standard one (log)" tx_id=UoFqxvAQlqqRZEtARGV
time="2024-12-19T07:28:59-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: change action to a non standard one (log)" tx_id=UoFqxvAQlqqRZEtARGV
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234aa400)({\n    Capacity: (*int32)(0x234c6038)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x228be470)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x228be480)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x228be490)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x228be4a0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x228be4c0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x228be4d0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x228be4e0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x22ad7c58)((len=20) \"2024-12-19T12:28:59Z\")\n     })\n    },\n    EventsCount: (*int32)(0x234c60dc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x22ad7ca8)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x22ad7cc8)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x228be500)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228be520)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228be540)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228be570)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228be590)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228be5b0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x22ad7cb0)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x22ad7cb8)(\"\"),\n    ScenarioVersion: (*string)(0x22ad7cc0)(\"\"),\n    Simulated: (*bool)(0x234c60e0)(false),\n    Source: (*models.Source)(0x22af84c0)(ip ),\n    StartAt: (*string)(0x22ad7cd8)((len=20) \"2024-12-19T12:28:59Z\"),\n    StopAt: (*string)(0x22ad7ce0)((len=20) \"2024-12-19T12:28:59Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x234c6038)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x228be470)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x228be480)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x228be490)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x228be4a0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x228be4c0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x228be4d0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x228be4e0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x22ad7c58)((len=20) \"2024-12-19T12:28:59Z\")\n      })\n     },\n     EventsCount: (*int32)(0x234c60dc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x22ad7ca8)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x22ad7cc8)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x228be500)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228be520)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228be540)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228be570)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228be590)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228be5b0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x22ad7cb0)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x22ad7cb8)(\"\"),\n     ScenarioVersion: (*string)(0x22ad7cc0)(\"\"),\n     Simulated: (*bool)(0x234c60e0)(false),\n     Source: (*models.Source)(0x22af84c0)(ip ),\n     StartAt: (*string)(0x22ad7cd8)((len=20) \"2024-12-19T12:28:59Z\"),\n     StopAt: (*string)(0x22ad7ce0)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:28:59.978323404 -0500 EST m=+0.232234469,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"gyIigCqvuDkcdJpVIuJ\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"log\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_change_action_to_another_standard_one_(allow)
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('allow')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22af8dc0}" test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x234c4f60 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 756992091" test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: change action to another standard one (allow)" tx_id=DLDoLacdLioPkmUDpjf
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 756992091" test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action to allow" request_uuid= test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: change action to another standard one (allow)"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="on_match: change action to another standard one (allow)" tx_id=YMDkibvlfLqgFvYYjLm
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: change action to another standard one (allow)" tx_id=YMDkibvlfLqgFvYYjLm
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: change action to another standard one (allow)" tx_id=YMDkibvlfLqgFvYYjLm
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: change action to another standard one (allow)" tx_id=YMDkibvlfLqgFvYYjLm
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: change action to another standard one (allow)" tx_id=YMDkibvlfLqgFvYYjLm
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: change action to another standard one (allow)" tx_id=YMDkibvlfLqgFvYYjLm
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: change action to another standard one (allow)" tx_id=YMDkibvlfLqgFvYYjLm
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: change action to another standard one (allow)" tx_id=YMDkibvlfLqgFvYYjLm
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234aa600)({\n    Capacity: (*int32)(0x234cd3d8)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x228bfb30)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x228bfb40)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x228bfb50)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x228bfb60)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x228bfb80)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x228bfb90)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x228bfba0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x234c9658)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x234cd47c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x234c96a8)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x234c96c8)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x228bfbc0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228bfbe0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228bfc00)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x228bfef0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22ab22f0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22ab23d0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x234c96b0)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x234c96b8)(\"\"),\n    ScenarioVersion: (*string)(0x234c96c0)(\"\"),\n    Simulated: (*bool)(0x234cd480)(false),\n    Source: (*models.Source)(0x22afcdc0)(ip ),\n    StartAt: (*string)(0x234c96d8)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x234c96e0)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x234cd3d8)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x228bfb30)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x228bfb40)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x228bfb50)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x228bfb60)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x228bfb80)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x228bfb90)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x228bfba0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x234c9658)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x234cd47c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x234c96a8)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x234c96c8)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x228bfbc0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228bfbe0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228bfc00)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x228bfef0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22ab22f0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22ab23d0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x234c96b0)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x234c96b8)(\"\"),\n     ScenarioVersion: (*string)(0x234c96c0)(\"\"),\n     Simulated: (*bool)(0x234cd480)(false),\n     Source: (*models.Source)(0x22afcdc0)(ip ),\n     StartAt: (*string)(0x234c96d8)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x234c96e0)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.042514438 -0500 EST m=+0.296425146,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"DLDoLacdLioPkmUDpjf\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_change_action_to_another_standard_one_(ban)
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('ban')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22afd640}" test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x234fcf80 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 756992091" test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: change action to another standard one (ban)" tx_id=LNyJFxVVWMjtVDMcahc
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 756992091" test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action to ban" request_uuid= test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: change action to another standard one (ban)"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="on_match: change action to another standard one (ban)" tx_id=hssRxMBRHhzXsKBZbkB
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: change action to another standard one (ban)" tx_id=hssRxMBRHhzXsKBZbkB
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: change action to another standard one (ban)" tx_id=hssRxMBRHhzXsKBZbkB
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: change action to another standard one (ban)" tx_id=hssRxMBRHhzXsKBZbkB
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: change action to another standard one (ban)" tx_id=hssRxMBRHhzXsKBZbkB
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: change action to another standard one (ban)" tx_id=hssRxMBRHhzXsKBZbkB
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: change action to another standard one (ban)" tx_id=hssRxMBRHhzXsKBZbkB
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: change action to another standard one (ban)" tx_id=hssRxMBRHhzXsKBZbkB
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234aa800)({\n    Capacity: (*int32)(0x22f0876c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x22f8a3b0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x22f8a3c0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x22f8a3d0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x22f8a3e0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x22f8a400)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x22f8a410)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x22f8a420)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x22f83060)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x22f087ec)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x22f830b0)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x22f830d0)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x22f8a440)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8a460)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8a480)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8a4b0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8a4d0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8a4f0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x22f830b8)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x22f830c0)(\"\"),\n    ScenarioVersion: (*string)(0x22f830c8)(\"\"),\n    Simulated: (*bool)(0x22f08810)(false),\n    Source: (*models.Source)(0x22b11280)(ip ),\n    StartAt: (*string)(0x22f830e0)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x22f830e8)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x22f0876c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x22f8a3b0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x22f8a3c0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x22f8a3d0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x22f8a3e0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x22f8a400)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x22f8a410)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x22f8a420)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x22f83060)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x22f087ec)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x22f830b0)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x22f830d0)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x22f8a440)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8a460)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8a480)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8a4b0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8a4d0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8a4f0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x22f830b8)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x22f830c0)(\"\"),\n     ScenarioVersion: (*string)(0x22f830c8)(\"\"),\n     Simulated: (*bool)(0x22f08810)(false),\n     Source: (*models.Source)(0x22b11280)(ip ),\n     StartAt: (*string)(0x22f830e0)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x22f830e8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.098424489 -0500 EST m=+0.352335316,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"LNyJFxVVWMjtVDMcahc\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"revision\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_change_action_to_another_standard_one_(captcha)
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('captcha')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22ab0640}" test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2354ed20 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 756992091" test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: change action to another standard one (captcha)" tx_id=jqBVAcHYhtmrTZHIodg
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 756992091" test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action to captcha" request_uuid= test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: change action to another standard one (captcha)"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="on_match: change action to another standard one (captcha)" tx_id=mRJphoPthpLESRATELE
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: change action to another standard one (captcha)" tx_id=mRJphoPthpLESRATELE
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: change action to another standard one (captcha)" tx_id=mRJphoPthpLESRATELE
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: change action to another standard one (captcha)" tx_id=mRJphoPthpLESRATELE
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: change action to another standard one (captcha)" tx_id=mRJphoPthpLESRATELE
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: change action to another standard one (captcha)" tx_id=mRJphoPthpLESRATELE
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: change action to another standard one (captcha)" tx_id=mRJphoPthpLESRATELE
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: change action to another standard one (captcha)" tx_id=mRJphoPthpLESRATELE
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d03c00)({\n    Capacity: (*int32)(0x23559d58)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2302e230)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2302e240)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x2302e250)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x2302e260)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2302e280)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x2302e290)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x2302e2a0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x230322d8)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23559dfc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23032328)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23032348)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2302e2c0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2302e2e0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2302e300)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2302e330)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2302e350)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2302e370)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23032330)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x23032338)(\"\"),\n    ScenarioVersion: (*string)(0x23032340)(\"\"),\n    Simulated: (*bool)(0x23559e00)(false),\n    Source: (*models.Source)(0x22b18240)(ip ),\n    StartAt: (*string)(0x23032358)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x23032360)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23559d58)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2302e230)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2302e240)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x2302e250)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x2302e260)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2302e280)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x2302e290)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x2302e2a0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x230322d8)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23559dfc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23032328)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23032348)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2302e2c0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2302e2e0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2302e300)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2302e330)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2302e350)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2302e370)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23032330)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x23032338)(\"\"),\n     ScenarioVersion: (*string)(0x23032340)(\"\"),\n     Simulated: (*bool)(0x23559e00)(false),\n     Source: (*models.Source)(0x22b18240)(ip ),\n     StartAt: (*string)(0x23032358)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x23032360)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.154102439 -0500 EST m=+0.408013207,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"jqBVAcHYhtmrTZHIodg\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=7) \"captcha\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_change_action_to_a_non_standard_one
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('foobar')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22adc940}" test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2291cdc0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 756992091" test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: change action to a non standard one" tx_id=ydYLEDCgHqDwLeMEEXX
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 756992091" test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action to foobar" request_uuid= test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: change action to a non standard one"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="on_match: change action to a non standard one" tx_id=cgcoExDqWNEyiuchXiE
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: change action to a non standard one" tx_id=cgcoExDqWNEyiuchXiE
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: change action to a non standard one" tx_id=cgcoExDqWNEyiuchXiE
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: change action to a non standard one" tx_id=cgcoExDqWNEyiuchXiE
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: change action to a non standard one" tx_id=cgcoExDqWNEyiuchXiE
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: change action to a non standard one" tx_id=cgcoExDqWNEyiuchXiE
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: change action to a non standard one" tx_id=cgcoExDqWNEyiuchXiE
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: change action to a non standard one" tx_id=cgcoExDqWNEyiuchXiE
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d0e100)({\n    Capacity: (*int32)(0x229412ec)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x22920d70)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x22920d80)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x22920d90)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x22920da0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x22920dc0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x22920dd0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x22920de0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x2291f840)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x2294136c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x2291f890)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x2291f8b0)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x22920e00)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22920e20)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22920e40)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22920e70)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22920e90)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22920eb0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x2291f898)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x2291f8a0)(\"\"),\n    ScenarioVersion: (*string)(0x2291f8a8)(\"\"),\n    Simulated: (*bool)(0x22941390)(false),\n    Source: (*models.Source)(0x22b26380)(ip ),\n    StartAt: (*string)(0x2291f8c0)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x2291f8c8)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x229412ec)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x22920d70)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x22920d80)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x22920d90)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x22920da0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x22920dc0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x22920dd0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x22920de0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x2291f840)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x2294136c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x2291f890)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x2291f8b0)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x22920e00)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22920e20)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22920e40)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22920e70)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22920e90)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22920eb0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x2291f898)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x2291f8a0)(\"\"),\n     ScenarioVersion: (*string)(0x2291f8a8)(\"\"),\n     Simulated: (*bool)(0x22941390)(false),\n     Source: (*models.Source)(0x22b26380)(ip ),\n     StartAt: (*string)(0x2291f8c0)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x2291f8c8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.214008918 -0500 EST m=+0.467919685,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"ydYLEDCgHqDwLeMEEXX\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=11) \"target_host\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     }\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=6) \"foobar\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_cancel_alert
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true && LogInfo('XX -> %s', evt.Appsec.MatchedRules.GetName()) FilterExpr: OnSuccess: Apply:[CancelAlert()] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22b26ec0}" test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23d1cee0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 1376422392" test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: cancel alert" tx_id=vXsfrmspZcEevqyZrAu
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 1376422392" test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=info msg="XX -> native_rule:1376422392"
time="2024-12-19T07:29:00-05:00" level=debug msg="canceling alert" request_uuid= test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: cancel alert"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="on_match: cancel alert" tx_id=fxsXBwwYtnmMORfkLjI
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: cancel alert" tx_id=fxsXBwwYtnmMORfkLjI
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: cancel alert" tx_id=fxsXBwwYtnmMORfkLjI
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: cancel alert" tx_id=fxsXBwwYtnmMORfkLjI
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: cancel alert" tx_id=fxsXBwwYtnmMORfkLjI
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: cancel alert" tx_id=fxsXBwwYtnmMORfkLjI
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: cancel alert" tx_id=fxsXBwwYtnmMORfkLjI
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: cancel alert" tx_id=fxsXBwwYtnmMORfkLjI
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=1 cap=1) {\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.268594793 -0500 EST m=+0.522505739,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"vXsfrmspZcEevqyZrAu\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=8) \"revision\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) false\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_cancel_event
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[CancelEvent()] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22b2f040}" test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23d45040 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 1376422392" test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: cancel event" tx_id=yJrZlmQVZCgwbWOzWrZ
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 1376422392" test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=debug msg="canceling event" request_uuid= test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: cancel event"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="on_match: cancel event" tx_id=TfqmpoKVzQEsAkKPSfD
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: cancel event" tx_id=TfqmpoKVzQEsAkKPSfD
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: cancel event" tx_id=TfqmpoKVzQEsAkKPSfD
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: cancel event" tx_id=TfqmpoKVzQEsAkKPSfD
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: cancel event" tx_id=TfqmpoKVzQEsAkKPSfD
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: cancel event" tx_id=TfqmpoKVzQEsAkKPSfD
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: cancel event" tx_id=TfqmpoKVzQEsAkKPSfD
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: cancel event" tx_id=TfqmpoKVzQEsAkKPSfD
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=1 cap=1) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d0e400)({\n    Capacity: (*int32)(0x23d37fcc)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23d46bf0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23d46c00)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x23d46c10)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x23d46c20)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23d46c40)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23d46c50)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23d46c60)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x23d58de8)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23d7006c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23d58e38)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23d58e58)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23d46c80)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d46ca0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d46cc0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d46cf0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d46d10)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d46d30)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23d58e40)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x23d58e48)(\"\"),\n    ScenarioVersion: (*string)(0x23d58e50)(\"\"),\n    Simulated: (*bool)(0x23d70070)(false),\n    Source: (*models.Source)(0x22b5b300)(ip ),\n    StartAt: (*string)(0x23d58e68)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x23d58e70)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23d37fcc)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23d46bf0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23d46c00)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x23d46c10)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x23d46c20)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23d46c40)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23d46c50)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23d46c60)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x23d58de8)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23d7006c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23d58e38)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23d58e58)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23d46c80)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d46ca0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d46cc0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d46cf0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d46d10)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d46d30)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23d58e40)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x23d58e48)(\"\"),\n     ScenarioVersion: (*string)(0x23d58e50)(\"\"),\n     Simulated: (*bool)(0x23d70070)(false),\n     Source: (*models.Source)(0x22b5b300)(ip ),\n     StartAt: (*string)(0x23d58e68)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x23d58e70)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) false,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_on_success_break
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess:break Apply:[CancelEvent()] ApplyExpr:[]} {Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('captcha')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22b5bd00}" test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23d692e0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 1376422392" test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: on_success break" tx_id=eLvAtDUZBAXKsvEXrSz
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 1376422392" test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=debug msg="canceling event" request_uuid= test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: on_success break"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="on_match: on_success break" tx_id=RwPZHGuCYFzJjWEDxXz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: on_success break" tx_id=RwPZHGuCYFzJjWEDxXz
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: on_success break" tx_id=RwPZHGuCYFzJjWEDxXz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: on_success break" tx_id=RwPZHGuCYFzJjWEDxXz
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: on_success break" tx_id=RwPZHGuCYFzJjWEDxXz
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: on_success break" tx_id=RwPZHGuCYFzJjWEDxXz
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: on_success break" tx_id=RwPZHGuCYFzJjWEDxXz
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: on_success break" tx_id=RwPZHGuCYFzJjWEDxXz
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=1 cap=1) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d0e600)({\n    Capacity: (*int32)(0x23d866a8)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23d47b40)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23d47b50)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x23d47b60)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x23d47b70)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23d47b90)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23d47ba0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23d47bb0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x23d8ec30)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23d8674c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23d8ec80)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23d8eca0)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23d47bd0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d47bf0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d47c10)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d47c40)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d47c60)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d47c80)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23d8ec88)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x23d8ec90)(\"\"),\n    ScenarioVersion: (*string)(0x23d8ec98)(\"\"),\n    Simulated: (*bool)(0x23d86750)(false),\n    Source: (*models.Source)(0x22b60080)(ip ),\n    StartAt: (*string)(0x23d8ecb0)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x23d8ecb8)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23d866a8)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23d47b40)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23d47b50)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x23d47b60)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x23d47b70)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23d47b90)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23d47ba0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23d47bb0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x23d8ec30)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23d8674c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23d8ec80)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23d8eca0)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23d47bd0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d47bf0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d47c10)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d47c40)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d47c60)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d47c80)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23d8ec88)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x23d8ec90)(\"\"),\n     ScenarioVersion: (*string)(0x23d8ec98)(\"\"),\n     Simulated: (*bool)(0x23d86750)(false),\n     Source: (*models.Source)(0x22b60080)(ip ),\n     StartAt: (*string)(0x23d8ecb0)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x23d8ecb8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) false,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecOnMatchHooks/on_match:_on_success_continue
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess:continue Apply:[CancelEvent()] ApplyExpr:[]} {Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('captcha')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22b60b40}" test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23d99580 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 1376422392" test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: on_success continue" tx_id=IYYhaRuAmsfRlsIzkIy
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 1376422392" test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="canceling event" request_uuid= test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action to captcha" request_uuid= test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="on_match: on_success continue" tx_id=xPMKMHfQFJMTqjxpqTh
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: on_success continue" tx_id=xPMKMHfQFJMTqjxpqTh
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: on_success continue" tx_id=xPMKMHfQFJMTqjxpqTh
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: on_success continue" tx_id=xPMKMHfQFJMTqjxpqTh
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: on_success continue" tx_id=xPMKMHfQFJMTqjxpqTh
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: on_success continue" tx_id=xPMKMHfQFJMTqjxpqTh
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: on_success continue" tx_id=xPMKMHfQFJMTqjxpqTh
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: on_success continue" tx_id=xPMKMHfQFJMTqjxpqTh
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=1 cap=1) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d0e800)({\n    Capacity: (*int32)(0x23da4d98)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23d9cbf0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23d9cc00)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x23d9cc10)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x23d9cc20)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23d9cc40)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23d9cc50)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23d9cc60)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x23dbeb28)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23da4e3c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23dbeb78)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23dbeb98)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23d9cc80)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d9cca0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d9ccc0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d9ccf0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d9cd10)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23d9cd30)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23dbeb80)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x23dbeb88)(\"\"),\n    ScenarioVersion: (*string)(0x23dbeb90)(\"\"),\n    Simulated: (*bool)(0x23da4e40)(false),\n    Source: (*models.Source)(0x22b66640)(ip ),\n    StartAt: (*string)(0x23dbeba8)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x23dbebb0)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23da4d98)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23d9cbf0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23d9cc00)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x23d9cc10)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x23d9cc20)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23d9cc40)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23d9cc50)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23d9cc60)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x23dbeb28)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23da4e3c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23dbeb78)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23dbeb98)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23d9cc80)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d9cca0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d9ccc0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d9ccf0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d9cd10)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23d9cd30)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23dbeb80)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x23dbeb88)(\"\"),\n     ScenarioVersion: (*string)(0x23dbeb90)(\"\"),\n     Simulated: (*bool)(0x23da4e40)(false),\n     Source: (*models.Source)(0x22b66640)(ip ),\n     StartAt: (*string)(0x23dbeba8)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x23dbebb0)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=7) \"captcha\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) false,\n  SendAlert: (bool) true\n }\n}\n"
--- PASS: TestAppsecOnMatchHooks (0.62s)
    --- PASS: TestAppsecOnMatchHooks/no_rule_:_check_return_code (0.06s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_change_return_code (0.05s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_change_action_to_a_non_standard_one_(log) (0.06s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_change_action_to_another_standard_one_(allow) (0.06s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_change_action_to_another_standard_one_(ban) (0.06s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_change_action_to_another_standard_one_(captcha) (0.06s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_change_action_to_a_non_standard_one (0.05s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_cancel_alert (0.06s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_cancel_event (0.05s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_on_success_break (0.06s)
    --- PASS: TestAppsecOnMatchHooks/on_match:_on_success_continue (0.05s)
=== RUN   TestAppsecPreEvalHooks
=== RUN   TestAppsecPreEvalHooks/Basic_pre_eval_hook_to_disable_inband_rule
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter:1 == 1 FilterExpr: OnSuccess: Apply:[RemoveInBandRuleByName('rule1')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22b66e80}" test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23dc5760 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="Basic pre_eval hook to disable inband rule" tx_id=vGiwJpgWWmSRMfhKGsY
time="2024-12-19T07:29:00-05:00" level=debug msg="removing inband rule crowdsec-rule1" request_uuid= test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="Basic pre_eval hook to disable inband rule" tx_id=vGiwJpgWWmSRMfhKGsY
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="Basic pre_eval hook to disable inband rule" tx_id=vGiwJpgWWmSRMfhKGsY
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="Basic pre_eval hook to disable inband rule" tx_id=vGiwJpgWWmSRMfhKGsY
time="2024-12-19T07:29:00-05:00" level=debug msg="Skipping rule" band=inband rule_id=756992091 test="Basic pre_eval hook to disable inband rule" tx_id=vGiwJpgWWmSRMfhKGsY
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="Basic pre_eval hook to disable inband rule" tx_id=vGiwJpgWWmSRMfhKGsY
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="Basic pre_eval hook to disable inband rule" tx_id=vGiwJpgWWmSRMfhKGsY
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="Basic pre_eval hook to disable inband rule" tx_id=vGiwJpgWWmSRMfhKGsY
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="Basic pre_eval hook to disable inband rule" tx_id=vGiwJpgWWmSRMfhKGsY
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="Basic pre_eval hook to disable inband rule" tx_id=aRUCHKCbtpKHcvGUZzS
time="2024-12-19T07:29:00-05:00" level=debug msg="removing inband rule crowdsec-rule1" request_uuid= test="Basic pre_eval hook to disable inband rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="Basic pre_eval hook to disable inband rule" tx_id=aRUCHKCbtpKHcvGUZzS
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="Basic pre_eval hook to disable inband rule" tx_id=aRUCHKCbtpKHcvGUZzS
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="Basic pre_eval hook to disable inband rule" tx_id=aRUCHKCbtpKHcvGUZzS
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="Basic pre_eval hook to disable inband rule" tx_id=aRUCHKCbtpKHcvGUZzS
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="Basic pre_eval hook to disable inband rule" tx_id=aRUCHKCbtpKHcvGUZzS
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="Basic pre_eval hook to disable inband rule" tx_id=aRUCHKCbtpKHcvGUZzS
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="Basic pre_eval hook to disable inband rule" tx_id=aRUCHKCbtpKHcvGUZzS
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/Basic_pre_eval_fails_to_disable_rule
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter:1 ==2 FilterExpr: OnSuccess: Apply:[RemoveInBandRuleByName('rule1')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22b7ed40}" test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23ded080 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="filter didnt match" request_uuid= test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 756992091" test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="Basic pre_eval fails to disable rule" tx_id=zSplpcoSFjLDoAIlnLV
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 756992091" test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="Basic pre_eval fails to disable rule" tx_id=grOyEfYleAjkrrMFngB
time="2024-12-19T07:29:00-05:00" level=debug msg="filter didnt match" request_uuid= test="Basic pre_eval fails to disable rule"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="Basic pre_eval fails to disable rule" tx_id=grOyEfYleAjkrrMFngB
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="Basic pre_eval fails to disable rule" tx_id=grOyEfYleAjkrrMFngB
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="Basic pre_eval fails to disable rule" tx_id=grOyEfYleAjkrrMFngB
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="Basic pre_eval fails to disable rule" tx_id=grOyEfYleAjkrrMFngB
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="Basic pre_eval fails to disable rule" tx_id=grOyEfYleAjkrrMFngB
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="Basic pre_eval fails to disable rule" tx_id=grOyEfYleAjkrrMFngB
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="Basic pre_eval fails to disable rule" tx_id=grOyEfYleAjkrrMFngB
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d0ea80)({\n    Capacity: (*int32)(0x23dcfb2c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23df67f0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23df6800)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x23df6810)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x23df6820)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23df6840)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23df6850)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23df6860)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x23def7e0)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23dcfbcc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23def830)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23def850)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23df6880)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23df68a0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23df68c0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23df68f0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23df6910)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23df6930)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23def838)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x23def840)(\"\"),\n    ScenarioVersion: (*string)(0x23def848)(\"\"),\n    Simulated: (*bool)(0x23dcfbd0)(false),\n    Source: (*models.Source)(0x22ba0a80)(ip ),\n    StartAt: (*string)(0x23def860)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x23def868)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23dcfb2c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23df67f0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23df6800)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x23df6810)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x23df6820)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23df6840)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23df6850)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23df6860)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x23def7e0)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23dcfbcc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23def830)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23def850)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23df6880)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23df68a0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23df68c0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23df68f0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23df6910)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23df6930)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23def838)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x23def840)(\"\"),\n     ScenarioVersion: (*string)(0x23def848)(\"\"),\n     Simulated: (*bool)(0x23dcfbd0)(false),\n     Source: (*models.Source)(0x22ba0a80)(ip ),\n     StartAt: (*string)(0x23def860)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x23def868)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.538286031 -0500 EST m=+0.792196917,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"zSplpcoSFjLDoAIlnLV\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=9) \"file_line\": (int) 1\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/pre_eval_:_disable_inband_by_tag
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter: FilterExpr: OnSuccess: Apply:[RemoveInBandRuleByTag('crowdsec-rulez')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22b18600}" test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\"" test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1516470898 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rulez] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2306e440 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rulez LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="pre_eval : disable inband by tag" tx_id=yBWjezAtViyPeqYBTGo
time="2024-12-19T07:29:00-05:00" level=debug msg="removing inband rule with tag crowdsec-rulez" request_uuid= test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="pre_eval : disable inband by tag" tx_id=yBWjezAtViyPeqYBTGo
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="pre_eval : disable inband by tag" tx_id=yBWjezAtViyPeqYBTGo
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="pre_eval : disable inband by tag" tx_id=yBWjezAtViyPeqYBTGo
time="2024-12-19T07:29:00-05:00" level=debug msg="Skipping rule" band=inband rule_id=1516470898 test="pre_eval : disable inband by tag" tx_id=yBWjezAtViyPeqYBTGo
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="pre_eval : disable inband by tag" tx_id=yBWjezAtViyPeqYBTGo
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="pre_eval : disable inband by tag" tx_id=yBWjezAtViyPeqYBTGo
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="pre_eval : disable inband by tag" tx_id=yBWjezAtViyPeqYBTGo
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="pre_eval : disable inband by tag" tx_id=yBWjezAtViyPeqYBTGo
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="pre_eval : disable inband by tag" tx_id=utGShGLKcyDGwxKkZsL
time="2024-12-19T07:29:00-05:00" level=debug msg="removing inband rule with tag crowdsec-rulez" request_uuid= test="pre_eval : disable inband by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="pre_eval : disable inband by tag" tx_id=utGShGLKcyDGwxKkZsL
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="pre_eval : disable inband by tag" tx_id=utGShGLKcyDGwxKkZsL
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="pre_eval : disable inband by tag" tx_id=utGShGLKcyDGwxKkZsL
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="pre_eval : disable inband by tag" tx_id=utGShGLKcyDGwxKkZsL
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="pre_eval : disable inband by tag" tx_id=utGShGLKcyDGwxKkZsL
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="pre_eval : disable inband by tag" tx_id=utGShGLKcyDGwxKkZsL
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="pre_eval : disable inband by tag" tx_id=utGShGLKcyDGwxKkZsL
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/pre_eval_:_disable_inband_by_ID
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter: FilterExpr: OnSuccess: Apply:[RemoveInBandRuleByID(1516470898)] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22ba1640}" test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\"" test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1516470898 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rulez] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23e06fa0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rulez LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="pre_eval : disable inband by ID" tx_id=VCQeOoPMvBkwfWYHlZA
time="2024-12-19T07:29:00-05:00" level=debug msg="removing inband rule 1516470898" request_uuid= test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="pre_eval : disable inband by ID" tx_id=VCQeOoPMvBkwfWYHlZA
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="pre_eval : disable inband by ID" tx_id=VCQeOoPMvBkwfWYHlZA
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="pre_eval : disable inband by ID" tx_id=VCQeOoPMvBkwfWYHlZA
time="2024-12-19T07:29:00-05:00" level=debug msg="Skipping rule" band=inband rule_id=1516470898 test="pre_eval : disable inband by ID" tx_id=VCQeOoPMvBkwfWYHlZA
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="pre_eval : disable inband by ID" tx_id=VCQeOoPMvBkwfWYHlZA
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="pre_eval : disable inband by ID" tx_id=VCQeOoPMvBkwfWYHlZA
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="pre_eval : disable inband by ID" tx_id=VCQeOoPMvBkwfWYHlZA
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="pre_eval : disable inband by ID" tx_id=VCQeOoPMvBkwfWYHlZA
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="pre_eval : disable inband by ID" tx_id=sachnioTrOdSBjlUKmq
time="2024-12-19T07:29:00-05:00" level=debug msg="removing inband rule 1516470898" request_uuid= test="pre_eval : disable inband by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="pre_eval : disable inband by ID" tx_id=sachnioTrOdSBjlUKmq
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="pre_eval : disable inband by ID" tx_id=sachnioTrOdSBjlUKmq
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="pre_eval : disable inband by ID" tx_id=sachnioTrOdSBjlUKmq
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="pre_eval : disable inband by ID" tx_id=sachnioTrOdSBjlUKmq
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="pre_eval : disable inband by ID" tx_id=sachnioTrOdSBjlUKmq
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="pre_eval : disable inband by ID" tx_id=sachnioTrOdSBjlUKmq
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="pre_eval : disable inband by ID" tx_id=sachnioTrOdSBjlUKmq
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/pre_eval_:_disable_inband_by_name
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter: FilterExpr: OnSuccess: Apply:[RemoveInBandRuleByName('rulez')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22ba8940}" test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\"" test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1516470898 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rulez] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2306fa40 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rulez LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="pre_eval : disable inband by name" tx_id=caLEryIZRKrngBDElXP
time="2024-12-19T07:29:00-05:00" level=debug msg="removing inband rule crowdsec-rulez" request_uuid= test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="pre_eval : disable inband by name" tx_id=caLEryIZRKrngBDElXP
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="pre_eval : disable inband by name" tx_id=caLEryIZRKrngBDElXP
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="pre_eval : disable inband by name" tx_id=caLEryIZRKrngBDElXP
time="2024-12-19T07:29:00-05:00" level=debug msg="Skipping rule" band=inband rule_id=1516470898 test="pre_eval : disable inband by name" tx_id=caLEryIZRKrngBDElXP
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="pre_eval : disable inband by name" tx_id=caLEryIZRKrngBDElXP
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="pre_eval : disable inband by name" tx_id=caLEryIZRKrngBDElXP
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="pre_eval : disable inband by name" tx_id=caLEryIZRKrngBDElXP
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="pre_eval : disable inband by name" tx_id=caLEryIZRKrngBDElXP
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="pre_eval : disable inband by name" tx_id=LSxTQzTqBdsRUawHXVo
time="2024-12-19T07:29:00-05:00" level=debug msg="removing inband rule crowdsec-rulez" request_uuid= test="pre_eval : disable inband by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="pre_eval : disable inband by name" tx_id=LSxTQzTqBdsRUawHXVo
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="pre_eval : disable inband by name" tx_id=LSxTQzTqBdsRUawHXVo
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="pre_eval : disable inband by name" tx_id=LSxTQzTqBdsRUawHXVo
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="pre_eval : disable inband by name" tx_id=LSxTQzTqBdsRUawHXVo
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="pre_eval : disable inband by name" tx_id=LSxTQzTqBdsRUawHXVo
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="pre_eval : disable inband by name" tx_id=LSxTQzTqBdsRUawHXVo
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="pre_eval : disable inband by name" tx_id=LSxTQzTqBdsRUawHXVo
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/pre_eval_:_outofband_default_behavior
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x23e9c500}" test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=outband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\"" test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: []" test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: [{RuleMetadata:{ID_:1516470898 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rulez] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23e950a0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rulez LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="pre_eval : outofband default behavior" tx_id=ozdrCImsoPZyYhIbxqN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="pre_eval : outofband default behavior" tx_id=ozdrCImsoPZyYhIbxqN
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="pre_eval : outofband default behavior" tx_id=ozdrCImsoPZyYhIbxqN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="pre_eval : outofband default behavior" tx_id=ozdrCImsoPZyYhIbxqN
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="pre_eval : outofband default behavior" tx_id=ozdrCImsoPZyYhIbxqN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="pre_eval : outofband default behavior" tx_id=ozdrCImsoPZyYhIbxqN
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="pre_eval : outofband default behavior" tx_id=ozdrCImsoPZyYhIbxqN
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="pre_eval : outofband default behavior" tx_id=ozdrCImsoPZyYhIbxqN
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=outband rule_id=1516470898 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=outband rule_id=1516470898 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=outband rule_id=1516470898 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=outband rule_id=1516470898 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=outband key=foo rule_id=1516470898 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=outband test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=outband test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=outband test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=outband test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=outband operator_data=^toto operator_function=@rx rule_id=1516470898 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=outband rule_id=1516470898 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=outband rule_id=1516470898 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=outband rule_id=1516470898 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 1516470898" test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="pre_eval : outofband default behavior" tx_id=wqIBBHUotcXJRYlHVZN
time="2024-12-19T07:29:00-05:00" level=debug msg="outband rules matched : 1516470898" test="pre_eval : outofband default behavior"
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=1 cap=1) {\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.753615984 -0500 EST m=+1.007526751,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"wqIBBHUotcXJRYlHVZN\",\n   (string) (len=21) \"outofband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=16) \"outofband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) true,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=9) \"rule_type\": (string) (len=9) \"outofband\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1516470898\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rulez\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 1516470898,\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rulez\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"hash\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) {\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/pre_eval_:_set_remediation_by_tag
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter: FilterExpr: OnSuccess: Apply:[SetRemediationByTag('crowdsec-rulez', 'foobar')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22b11c40}" test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\"" test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1516470898 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rulez] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x22f8ef40 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rulez LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of crowdsec-rulez to foobar" request_uuid= test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1516470898 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1516470898 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1516470898 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=1516470898 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 1516470898" test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="pre_eval : set remediation by tag" tx_id=lgBQEzjgAssAXLLYMeM
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 1516470898" test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="pre_eval : set remediation by tag" tx_id=LDWUFxAvueEGznclSci
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of crowdsec-rulez to foobar" request_uuid= test="pre_eval : set remediation by tag"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="pre_eval : set remediation by tag" tx_id=LDWUFxAvueEGznclSci
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="pre_eval : set remediation by tag" tx_id=LDWUFxAvueEGznclSci
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="pre_eval : set remediation by tag" tx_id=LDWUFxAvueEGznclSci
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="pre_eval : set remediation by tag" tx_id=LDWUFxAvueEGznclSci
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="pre_eval : set remediation by tag" tx_id=LDWUFxAvueEGznclSci
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="pre_eval : set remediation by tag" tx_id=LDWUFxAvueEGznclSci
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="pre_eval : set remediation by tag" tx_id=LDWUFxAvueEGznclSci
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234aaa00)({\n    Capacity: (*int32)(0x22fa882c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x22f8b2d0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x22f8b2e0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1516470898\"\n       }),\n       (*models.MetaItems0)(0x22f8b2f0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1516470898\"\n       }),\n       (*models.MetaItems0)(0x22f8b300)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x22f8b320)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x22f8b330)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x22f8b340)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rulez\"\n       })\n      },\n      Timestamp: (*string)(0x23f089d8)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x22fa88cc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23f08a28)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23f08a48)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x22f8b360)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8b380)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8b3a0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8b3d0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8b3f0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x22f8b410)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23f08a30)((len=22) \"native_rule:1516470898\"),\n    ScenarioHash: (*string)(0x23f08a38)(\"\"),\n    ScenarioVersion: (*string)(0x23f08a40)(\"\"),\n    Simulated: (*bool)(0x22fa88d0)(false),\n    Source: (*models.Source)(0x23f07580)(ip ),\n    StartAt: (*string)(0x23f08a58)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x23f08a60)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x22fa882c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x22f8b2d0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x22f8b2e0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1516470898\"\n        }),\n        (*models.MetaItems0)(0x22f8b2f0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1516470898\"\n        }),\n        (*models.MetaItems0)(0x22f8b300)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x22f8b320)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x22f8b330)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x22f8b340)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rulez\"\n        })\n       },\n       Timestamp: (*string)(0x23f089d8)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x22fa88cc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23f08a28)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23f08a48)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x22f8b360)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8b380)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8b3a0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8b3d0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8b3f0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x22f8b410)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23f08a30)((len=22) \"native_rule:1516470898\"),\n     ScenarioHash: (*string)(0x23f08a38)(\"\"),\n     ScenarioVersion: (*string)(0x23f08a40)(\"\"),\n     Simulated: (*bool)(0x22fa88d0)(false),\n     Source: (*models.Source)(0x23f07580)(ip ),\n     StartAt: (*string)(0x23f08a58)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x23f08a60)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.807534229 -0500 EST m=+1.061444757,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"lgBQEzjgAssAXLLYMeM\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=2) \"id\": (int) 1516470898,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rulez\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rulez\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1516470898\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=6) \"foobar\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/pre_eval_:_set_remediation_by_name
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter: FilterExpr: OnSuccess: Apply:[SetRemediationByName('rulez', 'foobar')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x23f07e40}" test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\"" test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1516470898 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rulez] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23f10fc0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rulez LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of crowdsec-rulez to foobar" request_uuid= test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1516470898 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1516470898 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1516470898 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=1516470898 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 1516470898" test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="pre_eval : set remediation by name" tx_id=UaqgEoRADFKdzaDQYuD
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 1516470898" test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="pre_eval : set remediation by name" tx_id=WBXjhqwVwsxJrLhxNxB
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of crowdsec-rulez to foobar" request_uuid= test="pre_eval : set remediation by name"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="pre_eval : set remediation by name" tx_id=WBXjhqwVwsxJrLhxNxB
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="pre_eval : set remediation by name" tx_id=WBXjhqwVwsxJrLhxNxB
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="pre_eval : set remediation by name" tx_id=WBXjhqwVwsxJrLhxNxB
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="pre_eval : set remediation by name" tx_id=WBXjhqwVwsxJrLhxNxB
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="pre_eval : set remediation by name" tx_id=WBXjhqwVwsxJrLhxNxB
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="pre_eval : set remediation by name" tx_id=WBXjhqwVwsxJrLhxNxB
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="pre_eval : set remediation by name" tx_id=WBXjhqwVwsxJrLhxNxB
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234aac00)({\n    Capacity: (*int32)(0x23f17bbc)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23f482b0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23f482c0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1516470898\"\n       }),\n       (*models.MetaItems0)(0x23f482d0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1516470898\"\n       }),\n       (*models.MetaItems0)(0x23f482e0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23f48300)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23f48310)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23f48320)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rulez\"\n       })\n      },\n      Timestamp: (*string)(0x23f501b0)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23f17c3c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23f50200)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23f50220)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23f48340)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f48360)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f48380)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f483b0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f483d0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f483f0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23f50208)((len=22) \"native_rule:1516470898\"),\n    ScenarioHash: (*string)(0x23f50210)(\"\"),\n    ScenarioVersion: (*string)(0x23f50218)(\"\"),\n    Simulated: (*bool)(0x23f17c60)(false),\n    Source: (*models.Source)(0x23f35680)(ip ),\n    StartAt: (*string)(0x23f50230)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x23f50238)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23f17bbc)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23f482b0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23f482c0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1516470898\"\n        }),\n        (*models.MetaItems0)(0x23f482d0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1516470898\"\n        }),\n        (*models.MetaItems0)(0x23f482e0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23f48300)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23f48310)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23f48320)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rulez\"\n        })\n       },\n       Timestamp: (*string)(0x23f501b0)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23f17c3c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23f50200)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23f50220)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23f48340)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f48360)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f48380)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f483b0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f483d0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f483f0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23f50208)((len=22) \"native_rule:1516470898\"),\n     ScenarioHash: (*string)(0x23f50210)(\"\"),\n     ScenarioVersion: (*string)(0x23f50218)(\"\"),\n     Simulated: (*bool)(0x23f17c60)(false),\n     Source: (*models.Source)(0x23f35680)(ip ),\n     StartAt: (*string)(0x23f50230)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x23f50238)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.861823631 -0500 EST m=+1.115734159,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"UaqgEoRADFKdzaDQYuD\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rulez\"\n     },\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=2) \"id\": (int) 1516470898,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rulez\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1516470898\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=6) \"foobar\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/pre_eval_:_set_remediation_by_ID
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter: FilterExpr: OnSuccess: Apply:[SetRemediationByID(1516470898, 'foobar')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x23f7e000}" test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\"" test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1516470898 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rulez] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23f4ef60 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rulez LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of 1516470898 to foobar" request_uuid= test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1516470898 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1516470898 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1516470898 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=1516470898 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1516470898 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 1516470898" test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="pre_eval : set remediation by ID" tx_id=wsfjKroUIWSFSTvMCao
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 1516470898" test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="pre_eval : set remediation by ID" tx_id=mHDYECtFsuXNmDYTPuQ
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of 1516470898 to foobar" request_uuid= test="pre_eval : set remediation by ID"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="pre_eval : set remediation by ID" tx_id=mHDYECtFsuXNmDYTPuQ
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="pre_eval : set remediation by ID" tx_id=mHDYECtFsuXNmDYTPuQ
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="pre_eval : set remediation by ID" tx_id=mHDYECtFsuXNmDYTPuQ
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="pre_eval : set remediation by ID" tx_id=mHDYECtFsuXNmDYTPuQ
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="pre_eval : set remediation by ID" tx_id=mHDYECtFsuXNmDYTPuQ
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="pre_eval : set remediation by ID" tx_id=mHDYECtFsuXNmDYTPuQ
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="pre_eval : set remediation by ID" tx_id=mHDYECtFsuXNmDYTPuQ
time="2024-12-19T07:29:00-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234aae00)({\n    Capacity: (*int32)(0x23f66f6c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23f49190)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23f491a0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1516470898\"\n       }),\n       (*models.MetaItems0)(0x23f491b0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1516470898\"\n       }),\n       (*models.MetaItems0)(0x23f491c0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23f491e0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23f491f0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23f49200)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rulez\"\n       })\n      },\n      Timestamp: (*string)(0x23f51898)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23f6700c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23f518e8)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23f51908)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23f49220)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f49240)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f49260)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f49290)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f492b0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23f492d0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23f518f0)((len=22) \"native_rule:1516470898\"),\n    ScenarioHash: (*string)(0x23f518f8)(\"\"),\n    ScenarioVersion: (*string)(0x23f51900)(\"\"),\n    Simulated: (*bool)(0x23f67010)(false),\n    Source: (*models.Source)(0x23f7f740)(ip ),\n    StartAt: (*string)(0x23f51918)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x23f51920)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23f66f6c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23f49190)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23f491a0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1516470898\"\n        }),\n        (*models.MetaItems0)(0x23f491b0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1516470898\"\n        }),\n        (*models.MetaItems0)(0x23f491c0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23f491e0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23f491f0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23f49200)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rulez\"\n        })\n       },\n       Timestamp: (*string)(0x23f51898)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23f6700c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23f518e8)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23f51908)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23f49220)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f49240)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f49260)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f49290)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f492b0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23f492d0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23f518f0)((len=22) \"native_rule:1516470898\"),\n     ScenarioHash: (*string)(0x23f518f8)(\"\"),\n     ScenarioVersion: (*string)(0x23f51900)(\"\"),\n     Simulated: (*bool)(0x23f67010)(false),\n     Source: (*models.Source)(0x23f7f740)(ip ),\n     StartAt: (*string)(0x23f51918)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x23f51920)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.932254549 -0500 EST m=+1.186165257,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"wsfjKroUIWSFSTvMCao\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=11) \"target_host\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rulez\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=2) \"id\": (int) 1516470898,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rulez\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1516470898\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     }\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:00-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=6) \"foobar\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/pre_eval_:_on_success_continue
time="2024-12-19T07:29:00-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter:1==1 FilterExpr: OnSuccess:continue Apply:[SetRemediationByName('rulez', 'foobar')] ApplyExpr:[]} {Filter:1==1 FilterExpr: OnSuccess: Apply:[SetRemediationByName('rulez', 'foobar2')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22b20540}" test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 outofband rules" test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=info msg="Loaded 0 inband rules" test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\"" test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1516470898 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rulez] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2317a900 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rulez LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=trace msg="Loaded outband rules: []" test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="Request received in runner" request_uuid= test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=inband test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of crowdsec-rulez to foobar" request_uuid= test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of crowdsec-rulez to foobar2" request_uuid= test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=1 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1516470898 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1516470898 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn variable=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1516470898 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1516470898 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1516470898 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn variable_name=ARGS_GET
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating action" action=t band=inband test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1516470898 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1516470898 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Rule matched" band=inband rule_id=1516470898 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1516470898 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=2 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="rules matched for body : 1516470898" test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=inband phase=5 test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="pre_eval : on_success continue" tx_id=LIGeZmhxtaGKoagtFbn
time="2024-12-19T07:29:00-05:00" level=debug msg="inband rules matched : 1516470898" test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="New transaction created" band=outband test="pre_eval : on_success continue" tx_id=uCVuqsLiACxePUkTZev
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of crowdsec-rulez to foobar" request_uuid= test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="setting action of crowdsec-rulez to foobar2" request_uuid= test="pre_eval : on_success continue"
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="pre_eval : on_success continue" tx_id=uCVuqsLiACxePUkTZev
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=1 test="pre_eval : on_success continue" tx_id=uCVuqsLiACxePUkTZev
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="pre_eval : on_success continue" tx_id=uCVuqsLiACxePUkTZev
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=2 test="pre_eval : on_success continue" tx_id=uCVuqsLiACxePUkTZev
time="2024-12-19T07:29:00-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="pre_eval : on_success continue" tx_id=uCVuqsLiACxePUkTZev
time="2024-12-19T07:29:00-05:00" level=debug msg="Finished phase" band=outband phase=5 test="pre_eval : on_success continue" tx_id=uCVuqsLiACxePUkTZev
time="2024-12-19T07:29:00-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="pre_eval : on_success continue" tx_id=uCVuqsLiACxePUkTZev
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x2407a100)({\n    Capacity: (*int32)(0x2401d30c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23156a00)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23156a10)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1516470898\"\n       }),\n       (*models.MetaItems0)(0x23156a20)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1516470898\"\n       }),\n       (*models.MetaItems0)(0x23156a30)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23156a50)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23156a60)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23156a70)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rulez\"\n       })\n      },\n      Timestamp: (*string)(0x2317fd28)((len=20) \"2024-12-19T12:29:00Z\")\n     })\n    },\n    EventsCount: (*int32)(0x2401d3ac)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x2317fd78)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x2317fd98)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23156a90)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23156ab0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23156ad0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23156b00)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23156b20)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23156b40)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x2317fd80)((len=22) \"native_rule:1516470898\"),\n    ScenarioHash: (*string)(0x2317fd88)(\"\"),\n    ScenarioVersion: (*string)(0x2317fd90)(\"\"),\n    Simulated: (*bool)(0x2401d3b0)(false),\n    Source: (*models.Source)(0x24086180)(ip ),\n    StartAt: (*string)(0x2317fda8)((len=20) \"2024-12-19T12:29:00Z\"),\n    StopAt: (*string)(0x2317fdb0)((len=20) \"2024-12-19T12:29:00Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x2401d30c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23156a00)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23156a10)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1516470898\"\n        }),\n        (*models.MetaItems0)(0x23156a20)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1516470898\"\n        }),\n        (*models.MetaItems0)(0x23156a30)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23156a50)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23156a60)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23156a70)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rulez\"\n        })\n       },\n       Timestamp: (*string)(0x2317fd28)((len=20) \"2024-12-19T12:29:00Z\")\n      })\n     },\n     EventsCount: (*int32)(0x2401d3ac)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x2317fd78)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x2317fd98)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23156a90)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23156ab0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23156ad0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23156b00)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23156b20)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23156b40)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x2317fd80)((len=22) \"native_rule:1516470898\"),\n     ScenarioHash: (*string)(0x2317fd88)(\"\"),\n     ScenarioVersion: (*string)(0x2317fd90)(\"\"),\n     Simulated: (*bool)(0x2401d3b0)(false),\n     Source: (*models.Source)(0x24086180)(ip ),\n     StartAt: (*string)(0x2317fda8)((len=20) \"2024-12-19T12:29:00Z\"),\n     StopAt: (*string)(0x2317fdb0)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:00.987783965 -0500 EST m=+1.241694613,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"LIGeZmhxtaGKoagtFbn\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rulez\"\n     },\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1516470898\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"msg\": (string) (len=5) \"rulez\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=2) \"id\": (int) 1516470898,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=7) \"foobar2\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecPreEvalHooks/pre_eval_:_on_success_break
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter:1==1 FilterExpr: OnSuccess:break Apply:[SetRemediationByName('rulez', 'foobar')] ApplyExpr:[]} {Filter:1==1 FilterExpr: OnSuccess: Apply:[SetRemediationByName('rulez', 'foobar2')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24086a80}" test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\"" test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1516470898 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rulez] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1516470898,phase:2,deny,log,msg:'rulez',tag:'crowdsec-rulez',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x24092e00 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rulez LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="setting action of crowdsec-rulez to foobar" request_uuid= test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1516470898 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1516470898 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1516470898 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1516470898 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1516470898 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1516470898 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1516470898 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=1516470898 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1516470898 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 1516470898" test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="pre_eval : on_success break" tx_id=hAQfTTmUawFhqCnMviZ
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 1516470898" test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="pre_eval : on_success break" tx_id=shUKBxqXYWWZUdiGKlB
time="2024-12-19T07:29:01-05:00" level=debug msg="setting action of crowdsec-rulez to foobar" request_uuid= test="pre_eval : on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="pre_eval : on_success break" tx_id=shUKBxqXYWWZUdiGKlB
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="pre_eval : on_success break" tx_id=shUKBxqXYWWZUdiGKlB
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="pre_eval : on_success break" tx_id=shUKBxqXYWWZUdiGKlB
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="pre_eval : on_success break" tx_id=shUKBxqXYWWZUdiGKlB
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="pre_eval : on_success break" tx_id=shUKBxqXYWWZUdiGKlB
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="pre_eval : on_success break" tx_id=shUKBxqXYWWZUdiGKlB
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="pre_eval : on_success break" tx_id=shUKBxqXYWWZUdiGKlB
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x2407a300)({\n    Capacity: (*int32)(0x240a87fc)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23157a20)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23157a30)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1516470898\"\n       }),\n       (*models.MetaItems0)(0x23157a40)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1516470898\"\n       }),\n       (*models.MetaItems0)(0x23157a50)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23157a70)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23157a80)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23157a90)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rulez\"\n       })\n      },\n      Timestamp: (*string)(0x240c60d0)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x240a889c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x240c6120)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x240c6140)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23157ab0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23157ad0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23157af0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23157b20)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23157b40)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23157b60)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x240c6128)((len=22) \"native_rule:1516470898\"),\n    ScenarioHash: (*string)(0x240c6130)(\"\"),\n    ScenarioVersion: (*string)(0x240c6138)(\"\"),\n    Simulated: (*bool)(0x240a88a0)(false),\n    Source: (*models.Source)(0x240c4380)(ip ),\n    StartAt: (*string)(0x240c6150)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x240c6158)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x240a87fc)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23157a20)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23157a30)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1516470898\"\n        }),\n        (*models.MetaItems0)(0x23157a40)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1516470898\"\n        }),\n        (*models.MetaItems0)(0x23157a50)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23157a70)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23157a80)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23157a90)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rulez\"\n        })\n       },\n       Timestamp: (*string)(0x240c60d0)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x240a889c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x240c6120)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x240c6140)((len=45) \"AppSec block: native_rule:1516470898 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23157ab0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1516470898\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23157ad0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1516470898\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23157af0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23157b20)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23157b40)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23157b60)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rulez\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x240c6128)((len=22) \"native_rule:1516470898\"),\n     ScenarioHash: (*string)(0x240c6130)(\"\"),\n     ScenarioVersion: (*string)(0x240c6138)(\"\"),\n     Simulated: (*bool)(0x240a88a0)(false),\n     Source: (*models.Source)(0x240c4380)(ip ),\n     StartAt: (*string)(0x240c6150)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x240c6158)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.044451113 -0500 EST m=+1.298361880,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"hAQfTTmUawFhqCnMviZ\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rulez\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 1516470898,\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rulez\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1516470898\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=6) \"foobar\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
--- PASS: TestAppsecPreEvalHooks (0.61s)
    --- PASS: TestAppsecPreEvalHooks/Basic_pre_eval_hook_to_disable_inband_rule (0.05s)
    --- PASS: TestAppsecPreEvalHooks/Basic_pre_eval_fails_to_disable_rule (0.06s)
    --- PASS: TestAppsecPreEvalHooks/pre_eval_:_disable_inband_by_tag (0.05s)
    --- PASS: TestAppsecPreEvalHooks/pre_eval_:_disable_inband_by_ID (0.05s)
    --- PASS: TestAppsecPreEvalHooks/pre_eval_:_disable_inband_by_name (0.06s)
    --- PASS: TestAppsecPreEvalHooks/pre_eval_:_outofband_default_behavior (0.05s)
    --- PASS: TestAppsecPreEvalHooks/pre_eval_:_set_remediation_by_tag (0.05s)
    --- PASS: TestAppsecPreEvalHooks/pre_eval_:_set_remediation_by_name (0.07s)
    --- PASS: TestAppsecPreEvalHooks/pre_eval_:_set_remediation_by_ID (0.06s)
    --- PASS: TestAppsecPreEvalHooks/pre_eval_:_on_success_continue (0.06s)
    --- PASS: TestAppsecPreEvalHooks/pre_eval_:_on_success_break (0.05s)
=== RUN   TestAppsecRemediationConfigHooks
=== RUN   TestAppsecRemediationConfigHooks/Basic_matching_rule
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x240c4c00}" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x240c8cc0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 756992091" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="Basic matching rule" tx_id=tChcRCDqArYGtiLxHVR
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 756992091" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="Basic matching rule" tx_id=gLPvIcVcLXUqbGXgIQL
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="Basic matching rule" tx_id=gLPvIcVcLXUqbGXgIQL
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="Basic matching rule" tx_id=gLPvIcVcLXUqbGXgIQL
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="Basic matching rule" tx_id=gLPvIcVcLXUqbGXgIQL
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="Basic matching rule" tx_id=gLPvIcVcLXUqbGXgIQL
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="Basic matching rule" tx_id=gLPvIcVcLXUqbGXgIQL
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="Basic matching rule" tx_id=gLPvIcVcLXUqbGXgIQL
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="Basic matching rule" tx_id=gLPvIcVcLXUqbGXgIQL
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x2407a500)({\n    Capacity: (*int32)(0x240d3ae0)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x240ca960)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x240ca970)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x240ca980)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x240ca990)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x240ca9b0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x240ca9c0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x240ca9d0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x240c74a8)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x240d3b5c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x240c74f8)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x240c7518)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x240ca9f0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240caa10)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240caa30)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240caa60)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240caa80)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240caaa0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x240c7500)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x240c7508)(\"\"),\n    ScenarioVersion: (*string)(0x240c7510)(\"\"),\n    Simulated: (*bool)(0x240d3b80)(false),\n    Source: (*models.Source)(0x240fc3c0)(ip ),\n    StartAt: (*string)(0x240c7528)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x240c7530)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x240d3ae0)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x240ca960)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x240ca970)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x240ca980)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x240ca990)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x240ca9b0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x240ca9c0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x240ca9d0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x240c74a8)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x240d3b5c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x240c74f8)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x240c7518)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x240ca9f0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240caa10)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240caa30)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240caa60)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240caa80)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240caaa0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x240c7500)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x240c7508)(\"\"),\n     ScenarioVersion: (*string)(0x240c7510)(\"\"),\n     Simulated: (*bool)(0x240d3b80)(false),\n     Source: (*models.Source)(0x240fc3c0)(ip ),\n     StartAt: (*string)(0x240c7528)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x240c7530)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.098314938 -0500 EST m=+1.352225467,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"tChcRCDqArYGtiLxHVR\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRemediationConfigHooks/SetRemediation
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter: FilterExpr: OnSuccess: Apply:[SetRemediation('captcha')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x23f94200}" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23f8ef20 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 756992091" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test=SetRemediation tx_id=XgMJLNPQrjiXTcnDhtT
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 756992091" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="setting action to captcha" request_uuid= test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test=SetRemediation tx_id=bSrZPUabHLkYBNIyAcG
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test=SetRemediation tx_id=bSrZPUabHLkYBNIyAcG
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test=SetRemediation tx_id=bSrZPUabHLkYBNIyAcG
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test=SetRemediation tx_id=bSrZPUabHLkYBNIyAcG
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test=SetRemediation tx_id=bSrZPUabHLkYBNIyAcG
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test=SetRemediation tx_id=bSrZPUabHLkYBNIyAcG
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test=SetRemediation tx_id=bSrZPUabHLkYBNIyAcG
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test=SetRemediation tx_id=bSrZPUabHLkYBNIyAcG
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234ab000)({\n    Capacity: (*int32)(0x23fb62e8)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23fba150)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23fba160)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x23fba170)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x23fba180)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23fba1a0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23fba1b0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23fba1c0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x23fa8f20)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23fb638c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23fa8f70)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23fa8f90)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23fba1e0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fba200)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fba220)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fba250)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fba270)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fba290)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23fa8f78)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x23fa8f80)(\"\"),\n    ScenarioVersion: (*string)(0x23fa8f88)(\"\"),\n    Simulated: (*bool)(0x23fb6390)(false),\n    Source: (*models.Source)(0x23f95940)(ip ),\n    StartAt: (*string)(0x23fa8fa0)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x23fa8fa8)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23fb62e8)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23fba150)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23fba160)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x23fba170)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x23fba180)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23fba1a0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23fba1b0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23fba1c0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x23fa8f20)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23fb638c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23fa8f70)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23fa8f90)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23fba1e0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fba200)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fba220)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fba250)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fba270)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fba290)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23fa8f78)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x23fa8f80)(\"\"),\n     ScenarioVersion: (*string)(0x23fa8f88)(\"\"),\n     Simulated: (*bool)(0x23fb6390)(false),\n     Source: (*models.Source)(0x23f95940)(ip ),\n     StartAt: (*string)(0x23fa8fa0)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x23fa8fa8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.154042599 -0500 EST m=+1.407953247,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"XgMJLNPQrjiXTcnDhtT\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=8) \"revision\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=7) \"captcha\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRemediationConfigHooks/SetRemediation#01
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter: FilterExpr: OnSuccess: Apply:[SetReturnCode(418)] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x23fc02c0}" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23fbce00 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 756992091" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test=SetRemediation tx_id=JzoUofvZHrgpZITaJOv
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 756992091" test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="setting http code to 418" request_uuid= test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test=SetRemediation
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test=SetRemediation tx_id=ZVXwxKIFNFkgUXwrVEh
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test=SetRemediation tx_id=ZVXwxKIFNFkgUXwrVEh
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test=SetRemediation tx_id=ZVXwxKIFNFkgUXwrVEh
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test=SetRemediation tx_id=ZVXwxKIFNFkgUXwrVEh
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test=SetRemediation tx_id=ZVXwxKIFNFkgUXwrVEh
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test=SetRemediation tx_id=ZVXwxKIFNFkgUXwrVEh
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test=SetRemediation tx_id=ZVXwxKIFNFkgUXwrVEh
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test=SetRemediation tx_id=ZVXwxKIFNFkgUXwrVEh
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234ab200)({\n    Capacity: (*int32)(0x23fc963c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23fbafd0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23fbafe0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x23fbaff0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x23fbb000)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23fbb020)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23fbb030)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23fbb040)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x23fee4c0)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23fc96dc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23fee510)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23fee530)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23fbb060)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fbb080)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fbb0a0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fbb0d0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fbb0f0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23fbb110)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23fee518)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x23fee520)(\"\"),\n    ScenarioVersion: (*string)(0x23fee528)(\"\"),\n    Simulated: (*bool)(0x23fc96e0)(false),\n    Source: (*models.Source)(0x23fc1a00)(ip ),\n    StartAt: (*string)(0x23fee540)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x23fee548)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23fc963c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23fbafd0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23fbafe0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x23fbaff0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x23fbb000)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23fbb020)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23fbb030)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23fbb040)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x23fee4c0)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23fc96dc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23fee510)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23fee530)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23fbb060)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fbb080)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fbb0a0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fbb0d0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fbb0f0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23fbb110)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23fee518)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x23fee520)(\"\"),\n     ScenarioVersion: (*string)(0x23fee528)(\"\"),\n     Simulated: (*bool)(0x23fc96e0)(false),\n     Source: (*models.Source)(0x23fc1a00)(ip ),\n     StartAt: (*string)(0x23fee540)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x23fee548)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.20812416 -0500 EST m=+1.462034569,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"JzoUofvZHrgpZITaJOv\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 418,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
--- PASS: TestAppsecRemediationConfigHooks (0.16s)
    --- PASS: TestAppsecRemediationConfigHooks/Basic_matching_rule (0.06s)
    --- PASS: TestAppsecRemediationConfigHooks/SetRemediation (0.05s)
    --- PASS: TestAppsecRemediationConfigHooks/SetRemediation#01 (0.05s)
=== RUN   TestOnMatchRemediationHooks
=== RUN   TestOnMatchRemediationHooks/set_remediation_to_allow_with_on_match_hook
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('allow')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x23ff6340}" test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23ff0e80 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 1376422392" test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="set remediation to allow with on_match hook" tx_id=yWiSLfXNjYlwhElOOHu
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 1376422392" test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="setting action to allow" request_uuid= test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="set remediation to allow with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="set remediation to allow with on_match hook" tx_id=aNESDLguJgwDuiFzFdg
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="set remediation to allow with on_match hook" tx_id=aNESDLguJgwDuiFzFdg
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="set remediation to allow with on_match hook" tx_id=aNESDLguJgwDuiFzFdg
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="set remediation to allow with on_match hook" tx_id=aNESDLguJgwDuiFzFdg
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="set remediation to allow with on_match hook" tx_id=aNESDLguJgwDuiFzFdg
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="set remediation to allow with on_match hook" tx_id=aNESDLguJgwDuiFzFdg
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="set remediation to allow with on_match hook" tx_id=aNESDLguJgwDuiFzFdg
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="set remediation to allow with on_match hook" tx_id=aNESDLguJgwDuiFzFdg
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234ab400)({\n    Capacity: (*int32)(0x241809f8)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23fbbef0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x241b2000)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x241b2010)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x241b2020)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x241b2040)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x241b2050)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x241b2060)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x23fefe78)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x24180aa0)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23fefec8)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23fefee8)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x241b2080)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b20a0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b20c0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b20f0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b2110)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b2130)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23fefed0)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x23fefed8)(\"\"),\n    ScenarioVersion: (*string)(0x23fefee0)(\"\"),\n    Simulated: (*bool)(0x24180aa4)(false),\n    Source: (*models.Source)(0x23ff7ac0)(ip ),\n    StartAt: (*string)(0x23fefef8)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x241b4000)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x241809f8)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23fbbef0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x241b2000)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x241b2010)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x241b2020)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x241b2040)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x241b2050)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x241b2060)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x23fefe78)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x24180aa0)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23fefec8)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23fefee8)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x241b2080)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b20a0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b20c0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b20f0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b2110)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b2130)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23fefed0)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x23fefed8)(\"\"),\n     ScenarioVersion: (*string)(0x23fefee0)(\"\"),\n     Simulated: (*bool)(0x24180aa4)(false),\n     Source: (*models.Source)(0x23ff7ac0)(ip ),\n     StartAt: (*string)(0x23fefef8)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x241b4000)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.260571781 -0500 EST m=+1.514482130,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"yWiSLfXNjYlwhElOOHu\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=7) \"version\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestOnMatchRemediationHooks/set_remediation_to_captcha_+_custom_user_code_with_on_match_hook
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:allow DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('captcha') SetReturnCode(418)] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x241b6400}" test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x241acfe0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 1376422392" test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="set remediation to captcha + custom user code with on_match hook" tx_id=MBObqSiZjFZOuVcLxmd
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 1376422392" test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="setting action to captcha" request_uuid= test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="setting http code to 418" request_uuid= test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="set remediation to captcha + custom user code with on_match hook"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="set remediation to captcha + custom user code with on_match hook" tx_id=BzXcDjxksXQDYeXmhrQ
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="set remediation to captcha + custom user code with on_match hook" tx_id=BzXcDjxksXQDYeXmhrQ
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="set remediation to captcha + custom user code with on_match hook" tx_id=BzXcDjxksXQDYeXmhrQ
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="set remediation to captcha + custom user code with on_match hook" tx_id=BzXcDjxksXQDYeXmhrQ
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="set remediation to captcha + custom user code with on_match hook" tx_id=BzXcDjxksXQDYeXmhrQ
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="set remediation to captcha + custom user code with on_match hook" tx_id=BzXcDjxksXQDYeXmhrQ
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="set remediation to captcha + custom user code with on_match hook" tx_id=BzXcDjxksXQDYeXmhrQ
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="set remediation to captcha + custom user code with on_match hook" tx_id=BzXcDjxksXQDYeXmhrQ
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234ab600)({\n    Capacity: (*int32)(0x241bfe2c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x241b2f50)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x241b2f60)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x241b2f70)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x241b2f80)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x241b2fa0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x241b2fb0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x241b2fc0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x241b5be0)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x241bfecc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x241b5c30)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x241b5c50)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x241b2fe0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b3000)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b3020)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b3050)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b3070)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x241b3090)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x241b5c38)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x241b5c40)(\"\"),\n    ScenarioVersion: (*string)(0x241b5c48)(\"\"),\n    Simulated: (*bool)(0x241bfed0)(false),\n    Source: (*models.Source)(0x241b7c00)(ip ),\n    StartAt: (*string)(0x241b5c60)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x241b5c68)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x241bfe2c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x241b2f50)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x241b2f60)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x241b2f70)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x241b2f80)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x241b2fa0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x241b2fb0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x241b2fc0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x241b5be0)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x241bfecc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x241b5c30)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x241b5c50)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x241b2fe0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b3000)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b3020)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b3050)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b3070)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x241b3090)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x241b5c38)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x241b5c40)(\"\"),\n     ScenarioVersion: (*string)(0x241b5c48)(\"\"),\n     Simulated: (*bool)(0x241bfed0)(false),\n     Source: (*models.Source)(0x241b7c00)(ip ),\n     StartAt: (*string)(0x241b5c60)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x241b5c68)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.316359046 -0500 EST m=+1.570269634,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"MBObqSiZjFZOuVcLxmd\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=7) \"captcha\",\n  UserHTTPResponseCode: (int) 418,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
([]appsec.AppsecTempResponse) (len=1 cap=1) {
 (appsec.AppsecTempResponse) {
  InBandInterrupt: (bool) true,
  OutOfBandInterrupt: (bool) false,
  Action: (string) (len=7) "captcha",
  UserHTTPResponseCode: (int) 418,
  BouncerHTTPResponseCode: (int) 403,
  SendEvent: (bool) true,
  SendAlert: (bool) true
 }
}
(appsec.BodyResponse) {
 Action: (string) (len=7) "captcha",
 HTTPStatus: (int) 418
}
time="2024-12-19T07:29:01-05:00" level=error msg="http status : 403"
=== RUN   TestOnMatchRemediationHooks/on_match:_on_success_break
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:allow DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess:break Apply:[SetRemediation('captcha') SetReturnCode(418)] ApplyExpr:[]} {Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('ban')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x241e4580}" test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x241e3480 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 1376422392" test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: on_success break" tx_id=IXWEmQICUSeHleAKZNr
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 1376422392" test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="setting action to captcha" request_uuid= test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="setting http code to 418" request_uuid= test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: on_success break"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="on_match: on_success break" tx_id=tLSzdRoZHrIXMBjWpFD
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: on_success break" tx_id=tLSzdRoZHrIXMBjWpFD
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: on_success break" tx_id=tLSzdRoZHrIXMBjWpFD
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: on_success break" tx_id=tLSzdRoZHrIXMBjWpFD
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: on_success break" tx_id=tLSzdRoZHrIXMBjWpFD
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: on_success break" tx_id=tLSzdRoZHrIXMBjWpFD
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: on_success break" tx_id=tLSzdRoZHrIXMBjWpFD
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: on_success break" tx_id=tLSzdRoZHrIXMBjWpFD
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234ab800)({\n    Capacity: (*int32)(0x241ef4ac)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2422e080)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2422e090)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x2422e0a0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x2422e0b0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2422e0d0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x2422e0e0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x2422e0f0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x242300a0)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x241ef54c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x242300f0)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x24230110)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2422e110)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422e130)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422e150)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422e180)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422e1a0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422e1c0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x242300f8)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x24230100)(\"\"),\n    ScenarioVersion: (*string)(0x24230108)(\"\"),\n    Simulated: (*bool)(0x241ef550)(false),\n    Source: (*models.Source)(0x241e5e00)(ip ),\n    StartAt: (*string)(0x24230120)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x24230128)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x241ef4ac)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2422e080)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2422e090)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x2422e0a0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x2422e0b0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2422e0d0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x2422e0e0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x2422e0f0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x242300a0)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x241ef54c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x242300f0)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x24230110)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2422e110)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422e130)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422e150)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422e180)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422e1a0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422e1c0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x242300f8)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x24230100)(\"\"),\n     ScenarioVersion: (*string)(0x24230108)(\"\"),\n     Simulated: (*bool)(0x241ef550)(false),\n     Source: (*models.Source)(0x241e5e00)(ip ),\n     StartAt: (*string)(0x24230120)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x24230128)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.372641208 -0500 EST m=+1.626551915,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"IXWEmQICUSeHleAKZNr\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\",\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=7) \"captcha\",\n  UserHTTPResponseCode: (int) 418,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
([]appsec.AppsecTempResponse) (len=1 cap=1) {
 (appsec.AppsecTempResponse) {
  InBandInterrupt: (bool) true,
  OutOfBandInterrupt: (bool) false,
  Action: (string) (len=7) "captcha",
  UserHTTPResponseCode: (int) 418,
  BouncerHTTPResponseCode: (int) 403,
  SendEvent: (bool) true,
  SendAlert: (bool) true
 }
}
(appsec.BodyResponse) {
 Action: (string) (len=7) "captcha",
 HTTPStatus: (int) 418
}
time="2024-12-19T07:29:01-05:00" level=error msg="http status : 403"
=== RUN   TestOnMatchRemediationHooks/on_match:_on_success_continue
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:allow DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess:continue Apply:[SetRemediation('captcha') SetReturnCode(418)] ApplyExpr:[]} {Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('ban')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24234780}" test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x24227920 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 1376422392" test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="on_match: on_success continue" tx_id=YYaXITbbrEzuTLTbXAU
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 1376422392" test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=debug msg="setting action to captcha" request_uuid= test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=debug msg="setting http code to 418" request_uuid= test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=debug msg="setting action to ban" request_uuid= test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="on_match: on_success continue"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="on_match: on_success continue" tx_id=XIVtbxhPiznZRQNpNXO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="on_match: on_success continue" tx_id=XIVtbxhPiznZRQNpNXO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="on_match: on_success continue" tx_id=XIVtbxhPiznZRQNpNXO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="on_match: on_success continue" tx_id=XIVtbxhPiznZRQNpNXO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="on_match: on_success continue" tx_id=XIVtbxhPiznZRQNpNXO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="on_match: on_success continue" tx_id=XIVtbxhPiznZRQNpNXO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="on_match: on_success continue" tx_id=XIVtbxhPiznZRQNpNXO
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="on_match: on_success continue" tx_id=XIVtbxhPiznZRQNpNXO
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234aba00)({\n    Capacity: (*int32)(0x24254b48)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2422f110)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2422f120)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x2422f130)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x2422f140)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2422f160)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x2422f170)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x2422f180)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x2427e518)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x24254bcc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x2427e568)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x2427e588)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2422f1a0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422f1c0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422f1e0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422f210)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422f230)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2422f250)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x2427e570)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x2427e578)(\"\"),\n    ScenarioVersion: (*string)(0x2427e580)(\"\"),\n    Simulated: (*bool)(0x24254bf0)(false),\n    Source: (*models.Source)(0x24282140)(ip ),\n    StartAt: (*string)(0x2427e598)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x2427e5a0)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x24254b48)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2422f110)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2422f120)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x2422f130)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x2422f140)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2422f160)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x2422f170)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x2422f180)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x2427e518)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x24254bcc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x2427e568)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x2427e588)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2422f1a0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422f1c0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422f1e0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422f210)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422f230)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2422f250)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x2427e570)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x2427e578)(\"\"),\n     ScenarioVersion: (*string)(0x2427e580)(\"\"),\n     Simulated: (*bool)(0x24254bf0)(false),\n     Source: (*models.Source)(0x24282140)(ip ),\n     StartAt: (*string)(0x2427e598)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x2427e5a0)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.429159046 -0500 EST m=+1.683069456,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"YYaXITbbrEzuTLTbXAU\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=4) \"hash\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 418,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
([]appsec.AppsecTempResponse) (len=1 cap=1) {
 (appsec.AppsecTempResponse) {
  InBandInterrupt: (bool) true,
  OutOfBandInterrupt: (bool) false,
  Action: (string) (len=3) "ban",
  UserHTTPResponseCode: (int) 418,
  BouncerHTTPResponseCode: (int) 403,
  SendEvent: (bool) true,
  SendAlert: (bool) true
 }
}
(appsec.BodyResponse) {
 Action: (string) (len=3) "ban",
 HTTPStatus: (int) 418
}
time="2024-12-19T07:29:01-05:00" level=error msg="http status : 403"
--- PASS: TestOnMatchRemediationHooks (0.23s)
    --- PASS: TestOnMatchRemediationHooks/set_remediation_to_allow_with_on_match_hook (0.06s)
    --- PASS: TestOnMatchRemediationHooks/set_remediation_to_captcha_+_custom_user_code_with_on_match_hook (0.06s)
    --- PASS: TestOnMatchRemediationHooks/on_match:_on_success_break (0.06s)
    --- PASS: TestOnMatchRemediationHooks/on_match:_on_success_continue (0.06s)
=== RUN   TestAppsecRuleTransformsOthers
=== RUN   TestAppsecRuleTransformsOthers/normalizepath
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x242829c0}" test=normalizepath
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test=normalizepath
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test=normalizepath
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@streq b/c\" \"id:3821948434,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:normalizePath\"" test=normalizepath
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "3821948434": value out of range
=== RUN   TestAppsecRuleTransformsOthers/normalizepath_#2
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24282cc0}" test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@streq b/c/\" \"id:45690725,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:normalizePath\"" test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:45690725 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@streq b/c/\" \"id:45690725,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:normalizePath\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2427bac0 transformations:[{Function:0x1bfe140}] transformationsID:2 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=45690725 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=45690725 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=45690725 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=45690725 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=45690725 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=b/c/ band=inband operator_data=b/c/ operator_function=@streq rule_id=45690725 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=45690725 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=45690725 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=45690725 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 45690725" test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="normalizepath #2" tx_id=HJNmXbmUuTolnhmnBOv
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 45690725" test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="normalizepath #2"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="normalizepath #2" tx_id=lqROriRPQqcjbTEnnaT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="normalizepath #2" tx_id=lqROriRPQqcjbTEnnaT
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="normalizepath #2" tx_id=lqROriRPQqcjbTEnnaT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="normalizepath #2" tx_id=lqROriRPQqcjbTEnnaT
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="normalizepath #2" tx_id=lqROriRPQqcjbTEnnaT
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="normalizepath #2" tx_id=lqROriRPQqcjbTEnnaT
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="normalizepath #2" tx_id=lqROriRPQqcjbTEnnaT
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="normalizepath #2" tx_id=lqROriRPQqcjbTEnnaT
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x234abc00)({\n    Capacity: (*int32)(0x242b210c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x242ac120)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x242ac130)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=8) \"45690725\"\n       }),\n       (*models.MetaItems0)(0x242ac140)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=20) \"native_rule:45690725\"\n       }),\n       (*models.MetaItems0)(0x242ac150)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x242ac170)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=27) \"/?foo=a/../b/c/////././././\"\n       }),\n       (*models.MetaItems0)(0x242ac180)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x242ac190)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x2427fa10)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x242b217c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x2427fa60)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x2427fa80)((len=43) \"AppSec block: native_rule:45690725 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x242ac1b0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x242ac1d0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=31) \"[\\\"/?foo=a/../b/c/////././././\\\"]\"\n     }),\n     (*models.MetaItems0)(0x242ac1f0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x242ac220)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x242ac240)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=12) \"[\\\"45690725\\\"]\"\n     }),\n     (*models.MetaItems0)(0x242ac260)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=24) \"[\\\"native_rule:45690725\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x2427fa68)((len=20) \"native_rule:45690725\"),\n    ScenarioHash: (*string)(0x2427fa70)(\"\"),\n    ScenarioVersion: (*string)(0x2427fa78)(\"\"),\n    Simulated: (*bool)(0x242b2180)(false),\n    Source: (*models.Source)(0x242ae3c0)(ip ),\n    StartAt: (*string)(0x2427fa90)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x2427fa98)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x242b210c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x242ac120)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x242ac130)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=8) \"45690725\"\n        }),\n        (*models.MetaItems0)(0x242ac140)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=20) \"native_rule:45690725\"\n        }),\n        (*models.MetaItems0)(0x242ac150)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x242ac170)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=27) \"/?foo=a/../b/c/////././././\"\n        }),\n        (*models.MetaItems0)(0x242ac180)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x242ac190)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x2427fa10)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x242b217c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x2427fa60)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x2427fa80)((len=43) \"AppSec block: native_rule:45690725 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x242ac1b0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x242ac1d0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=31) \"[\\\"/?foo=a/../b/c/////././././\\\"]\"\n      }),\n      (*models.MetaItems0)(0x242ac1f0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x242ac220)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x242ac240)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=12) \"[\\\"45690725\\\"]\"\n      }),\n      (*models.MetaItems0)(0x242ac260)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=24) \"[\\\"native_rule:45690725\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x2427fa68)((len=20) \"native_rule:45690725\"),\n     ScenarioHash: (*string)(0x2427fa70)(\"\"),\n     ScenarioVersion: (*string)(0x2427fa78)(\"\"),\n     Simulated: (*bool)(0x242b2180)(false),\n     Source: (*models.Source)(0x242ae3c0)(ip ),\n     StartAt: (*string)(0x2427fa90)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x2427fa98)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.488401172 -0500 EST m=+1.742311581,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"HJNmXbmUuTolnhmnBOv\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=10) \"target_uri\": (string) (len=27) \"/?foo=a/../b/c/////././././\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=11) \"target_host\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=20) \"native_rule:45690725\",\n     (string) (len=3) \"uri\": (string) (len=27) \"/?foo=a/../b/c/////././././\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=2) \"id\": (int) 45690725,\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\",\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
--- FAIL: TestAppsecRuleTransformsOthers (0.05s)
    --- FAIL: TestAppsecRuleTransformsOthers/normalizepath (0.00s)
    --- PASS: TestAppsecRuleTransformsOthers/normalizepath_#2 (0.05s)
=== RUN   TestAppsecDefaultPassRemediation
=== RUN   TestAppsecDefaultPassRemediation/Basic_non-matching_rule
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x242aec00}" test="Basic non-matching rule"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="Basic non-matching rule"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="Basic non-matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic non-matching rule"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x242a7980 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="Basic non-matching rule"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="Basic non-matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="Basic non-matching rule"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="Basic non-matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=tutu band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="Basic non-matching rule" tx_id=QTsRMeJhoeDdnREWHUm
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="Basic non-matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="Basic non-matching rule" tx_id=qhrKLApNefeUtvhSEFd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="Basic non-matching rule" tx_id=qhrKLApNefeUtvhSEFd
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="Basic non-matching rule" tx_id=qhrKLApNefeUtvhSEFd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="Basic non-matching rule" tx_id=qhrKLApNefeUtvhSEFd
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="Basic non-matching rule" tx_id=qhrKLApNefeUtvhSEFd
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="Basic non-matching rule" tx_id=qhrKLApNefeUtvhSEFd
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="Basic non-matching rule" tx_id=qhrKLApNefeUtvhSEFd
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="Basic non-matching rule" tx_id=qhrKLApNefeUtvhSEFd
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecDefaultPassRemediation/DefaultPassAction:_pass
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x242f6600}" test="DefaultPassAction: pass"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="DefaultPassAction: pass"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="DefaultPassAction: pass"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="DefaultPassAction: pass"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x242f31a0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="DefaultPassAction: pass"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="DefaultPassAction: pass"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="DefaultPassAction: pass"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="DefaultPassAction: pass"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=tutu band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="DefaultPassAction: pass" tx_id=FrYrfTQGLKhhXGXDaHl
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="DefaultPassAction: pass"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="DefaultPassAction: pass" tx_id=dicFWtOEALSZtJFMzhp
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="DefaultPassAction: pass" tx_id=dicFWtOEALSZtJFMzhp
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="DefaultPassAction: pass" tx_id=dicFWtOEALSZtJFMzhp
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="DefaultPassAction: pass" tx_id=dicFWtOEALSZtJFMzhp
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="DefaultPassAction: pass" tx_id=dicFWtOEALSZtJFMzhp
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="DefaultPassAction: pass" tx_id=dicFWtOEALSZtJFMzhp
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="DefaultPassAction: pass" tx_id=dicFWtOEALSZtJFMzhp
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="DefaultPassAction: pass" tx_id=dicFWtOEALSZtJFMzhp
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecDefaultPassRemediation/DefaultPassAction:_captcha
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:captcha BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24308000}" test="DefaultPassAction: captcha"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="DefaultPassAction: captcha"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="DefaultPassAction: captcha"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="DefaultPassAction: captcha"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x243049a0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="DefaultPassAction: captcha"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="DefaultPassAction: captcha"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="DefaultPassAction: captcha"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="DefaultPassAction: captcha"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=tutu band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="DefaultPassAction: captcha" tx_id=nrQcQrKChNLLzklhHnO
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="DefaultPassAction: captcha"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="DefaultPassAction: captcha" tx_id=NFEdKbzfgoYZSbSOLiE
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="DefaultPassAction: captcha" tx_id=NFEdKbzfgoYZSbSOLiE
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="DefaultPassAction: captcha" tx_id=NFEdKbzfgoYZSbSOLiE
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="DefaultPassAction: captcha" tx_id=NFEdKbzfgoYZSbSOLiE
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="DefaultPassAction: captcha" tx_id=NFEdKbzfgoYZSbSOLiE
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="DefaultPassAction: captcha" tx_id=NFEdKbzfgoYZSbSOLiE
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="DefaultPassAction: captcha" tx_id=NFEdKbzfgoYZSbSOLiE
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="DefaultPassAction: captcha" tx_id=NFEdKbzfgoYZSbSOLiE
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=7) \"captcha\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecDefaultPassRemediation/DefaultPassHTTPCode:_200
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24309900}" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2431a1a0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=tutu band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="DefaultPassHTTPCode: 200" tx_id=HLpzqNoRZAwNBjdzxxe
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="DefaultPassHTTPCode: 200" tx_id=rwfekcjGIpFukyFXcrA
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="DefaultPassHTTPCode: 200" tx_id=rwfekcjGIpFukyFXcrA
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="DefaultPassHTTPCode: 200" tx_id=rwfekcjGIpFukyFXcrA
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="DefaultPassHTTPCode: 200" tx_id=rwfekcjGIpFukyFXcrA
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="DefaultPassHTTPCode: 200" tx_id=rwfekcjGIpFukyFXcrA
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="DefaultPassHTTPCode: 200" tx_id=rwfekcjGIpFukyFXcrA
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="DefaultPassHTTPCode: 200" tx_id=rwfekcjGIpFukyFXcrA
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="DefaultPassHTTPCode: 200" tx_id=rwfekcjGIpFukyFXcrA
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecDefaultPassRemediation/DefaultPassHTTPCode:_200#01
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:418 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24325300}" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2431b8a0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=tutu band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="DefaultPassHTTPCode: 200" tx_id=ZzAJngsOTKAITDYrNQX
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="DefaultPassHTTPCode: 200"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="DefaultPassHTTPCode: 200" tx_id=EBRyLcifASeGEYbhRvc
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="DefaultPassHTTPCode: 200" tx_id=EBRyLcifASeGEYbhRvc
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="DefaultPassHTTPCode: 200" tx_id=EBRyLcifASeGEYbhRvc
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="DefaultPassHTTPCode: 200" tx_id=EBRyLcifASeGEYbhRvc
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="DefaultPassHTTPCode: 200" tx_id=EBRyLcifASeGEYbhRvc
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="DefaultPassHTTPCode: 200" tx_id=EBRyLcifASeGEYbhRvc
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="DefaultPassHTTPCode: 200" tx_id=EBRyLcifASeGEYbhRvc
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="DefaultPassHTTPCode: 200" tx_id=EBRyLcifASeGEYbhRvc
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 418,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
--- PASS: TestAppsecDefaultPassRemediation (0.27s)
    --- PASS: TestAppsecDefaultPassRemediation/Basic_non-matching_rule (0.05s)
    --- PASS: TestAppsecDefaultPassRemediation/DefaultPassAction:_pass (0.05s)
    --- PASS: TestAppsecDefaultPassRemediation/DefaultPassAction:_captcha (0.05s)
    --- PASS: TestAppsecDefaultPassRemediation/DefaultPassHTTPCode:_200 (0.05s)
    --- PASS: TestAppsecDefaultPassRemediation/DefaultPassHTTPCode:_200#01 (0.06s)
=== RUN   TestAppsecDefaultRemediation
=== RUN   TestAppsecDefaultRemediation/Basic_matching_rule
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22baf400}" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23e26740 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 756992091" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="Basic matching rule" tx_id=bYBYqIHRKfnBYNlbntz
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 756992091" test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="Basic matching rule"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="Basic matching rule" tx_id=RjIXGlbLNJnRkNvgJap
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="Basic matching rule" tx_id=RjIXGlbLNJnRkNvgJap
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="Basic matching rule" tx_id=RjIXGlbLNJnRkNvgJap
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="Basic matching rule" tx_id=RjIXGlbLNJnRkNvgJap
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="Basic matching rule" tx_id=RjIXGlbLNJnRkNvgJap
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="Basic matching rule" tx_id=RjIXGlbLNJnRkNvgJap
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="Basic matching rule" tx_id=RjIXGlbLNJnRkNvgJap
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="Basic matching rule" tx_id=RjIXGlbLNJnRkNvgJap
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d0ed00)({\n    Capacity: (*int32)(0x23e1cbec)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23e442d0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23e442e0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x23e442f0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x23e44300)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23e44320)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23e44330)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23e44340)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x23e139b8)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23e1cc90)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23e13a08)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23e13a28)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23e44360)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e44380)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e443a0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e443d0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e443f0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e44410)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23e13a10)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x23e13a18)(\"\"),\n    ScenarioVersion: (*string)(0x23e13a20)(\"\"),\n    Simulated: (*bool)(0x23e1cc94)(false),\n    Source: (*models.Source)(0x23e47000)(ip ),\n    StartAt: (*string)(0x23e13a38)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x23e13a40)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23e1cbec)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23e442d0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23e442e0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x23e442f0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x23e44300)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23e44320)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23e44330)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23e44340)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x23e139b8)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23e1cc90)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23e13a08)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23e13a28)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23e44360)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e44380)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e443a0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e443d0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e443f0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e44410)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23e13a10)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x23e13a18)(\"\"),\n     ScenarioVersion: (*string)(0x23e13a20)(\"\"),\n     Simulated: (*bool)(0x23e1cc94)(false),\n     Source: (*models.Source)(0x23e47000)(ip ),\n     StartAt: (*string)(0x23e13a38)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x23e13a40)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.812791355 -0500 EST m=+2.066701705,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"bYBYqIHRKfnBYNlbntz\",\n   (string) (len=11) \"target_host\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 756992091,\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecDefaultRemediation/default_remediation_to_ban_(default)
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x23e47880}" test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x23e504a0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 1376422392" test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="default remediation to ban (default)" tx_id=uXCFmOrUbThPhYLtHDX
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 1376422392" test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="default remediation to ban (default)"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="default remediation to ban (default)" tx_id=RCvxvIOnAZjmTGFPchO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="default remediation to ban (default)" tx_id=RCvxvIOnAZjmTGFPchO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="default remediation to ban (default)" tx_id=RCvxvIOnAZjmTGFPchO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="default remediation to ban (default)" tx_id=RCvxvIOnAZjmTGFPchO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="default remediation to ban (default)" tx_id=RCvxvIOnAZjmTGFPchO
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="default remediation to ban (default)" tx_id=RCvxvIOnAZjmTGFPchO
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="default remediation to ban (default)" tx_id=RCvxvIOnAZjmTGFPchO
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="default remediation to ban (default)" tx_id=RCvxvIOnAZjmTGFPchO
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d0ef00)({\n    Capacity: (*int32)(0x23e57ebc)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23e45090)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23e450a0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x23e450b0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x23e450c0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23e450e0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23e450f0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23e45100)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x23e5cce0)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23e57f5c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23e5cd30)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23e5cd50)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23e45120)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e45140)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e45160)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e45190)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e451b0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23e451d0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23e5cd38)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x23e5cd40)(\"\"),\n    ScenarioVersion: (*string)(0x23e5cd48)(\"\"),\n    Simulated: (*bool)(0x23e57f60)(false),\n    Source: (*models.Source)(0x24381040)(ip ),\n    StartAt: (*string)(0x23e5cd60)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x23e5cd68)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23e57ebc)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23e45090)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23e450a0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x23e450b0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x23e450c0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23e450e0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23e450f0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23e45100)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x23e5cce0)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23e57f5c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23e5cd30)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23e5cd50)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23e45120)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e45140)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e45160)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e45190)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e451b0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23e451d0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23e5cd38)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x23e5cd40)(\"\"),\n     ScenarioVersion: (*string)(0x23e5cd48)(\"\"),\n     Simulated: (*bool)(0x23e57f60)(false),\n     Source: (*models.Source)(0x24381040)(ip ),\n     StartAt: (*string)(0x23e5cd60)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x23e5cd68)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.869750685 -0500 EST m=+2.123661094,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"uXCFmOrUbThPhYLtHDX\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecDefaultRemediation/default_remediation_to_allow
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:allow DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24381880}" test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x243a61e0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 1376422392" test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="default remediation to allow" tx_id=LuvjKzMgglOtZfkmvur
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 1376422392" test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="default remediation to allow"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="default remediation to allow" tx_id=CyHHwoNcTQQZkvvjsuU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="default remediation to allow" tx_id=CyHHwoNcTQQZkvvjsuU
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="default remediation to allow" tx_id=CyHHwoNcTQQZkvvjsuU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="default remediation to allow" tx_id=CyHHwoNcTQQZkvvjsuU
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="default remediation to allow" tx_id=CyHHwoNcTQQZkvvjsuU
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="default remediation to allow" tx_id=CyHHwoNcTQQZkvvjsuU
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="default remediation to allow" tx_id=CyHHwoNcTQQZkvvjsuU
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="default remediation to allow" tx_id=CyHHwoNcTQQZkvvjsuU
time="2024-12-19T07:29:01-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d0f100)({\n    Capacity: (*int32)(0x2439116c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23e45e50)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23e45e60)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x23e45e70)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x23e45e80)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23e45ea0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x23e45eb0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x23e45ec0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x243b0008)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x243911ec)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x243b0058)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x243b0078)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23e45ee0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2000)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2020)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2050)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2070)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2090)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x243b0060)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x243b0068)(\"\"),\n    ScenarioVersion: (*string)(0x243b0070)(\"\"),\n    Simulated: (*bool)(0x24391210)(false),\n    Source: (*models.Source)(0x243ab040)(ip ),\n    StartAt: (*string)(0x243b0088)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x243b0090)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x2439116c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23e45e50)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23e45e60)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x23e45e70)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x23e45e80)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23e45ea0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x23e45eb0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x23e45ec0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x243b0008)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x243911ec)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x243b0058)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x243b0078)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23e45ee0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2000)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2020)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2050)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2070)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2090)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x243b0060)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x243b0068)(\"\"),\n     ScenarioVersion: (*string)(0x243b0070)(\"\"),\n     Simulated: (*bool)(0x24391210)(false),\n     Source: (*models.Source)(0x243ab040)(ip ),\n     StartAt: (*string)(0x243b0088)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x243b0090)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.925725108 -0500 EST m=+2.179635518,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"LuvjKzMgglOtZfkmvur\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     }\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\",\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\"\n  }\n }\n}\n"
time="2024-12-19T07:29:01-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecDefaultRemediation/default_remediation_to_captcha
time="2024-12-19T07:29:01-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:captcha DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x243ab880}" test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 outofband rules" test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=info msg="Loaded 0 inband rules" test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x243a7e20 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=trace msg="Loaded outband rules: []" test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=debug msg="Request received in runner" request_uuid= test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=inband test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=1 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH variable=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH variable_name=ARGS_GET
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating action" action=t band=inband test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=2 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="rules matched for body : 1376422392" test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=inband phase=5 test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="default remediation to captcha" tx_id=HOYzcwjkaGDEkRnpQyH
time="2024-12-19T07:29:01-05:00" level=debug msg="inband rules matched : 1376422392" test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="default remediation to captcha"
time="2024-12-19T07:29:01-05:00" level=debug msg="New transaction created" band=outband test="default remediation to captcha" tx_id=yFEMQUzUOexOMiRXXrF
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="default remediation to captcha" tx_id=yFEMQUzUOexOMiRXXrF
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=1 test="default remediation to captcha" tx_id=yFEMQUzUOexOMiRXXrF
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="default remediation to captcha" tx_id=yFEMQUzUOexOMiRXXrF
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=2 test="default remediation to captcha" tx_id=yFEMQUzUOexOMiRXXrF
time="2024-12-19T07:29:01-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="default remediation to captcha" tx_id=yFEMQUzUOexOMiRXXrF
time="2024-12-19T07:29:01-05:00" level=debug msg="Finished phase" band=outband phase=5 test="default remediation to captcha" tx_id=yFEMQUzUOexOMiRXXrF
time="2024-12-19T07:29:01-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="default remediation to captcha" tx_id=yFEMQUzUOexOMiRXXrF
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x23d0f300)({\n    Capacity: (*int32)(0x243cc42c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x243b2d10)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x243b2d20)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x243b2d30)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x243b2d40)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x243b2d60)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x243b2d70)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x243b2d80)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x243b1230)((len=20) \"2024-12-19T12:29:01Z\")\n     })\n    },\n    EventsCount: (*int32)(0x243cc4ac)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x243b1280)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x243b12a0)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x243b2da0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2dc0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2de0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2e10)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2e30)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b2e50)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x243b1288)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x243b1290)(\"\"),\n    ScenarioVersion: (*string)(0x243b1298)(\"\"),\n    Simulated: (*bool)(0x243cc4d0)(false),\n    Source: (*models.Source)(0x243d5040)(ip ),\n    StartAt: (*string)(0x243b12b0)((len=20) \"2024-12-19T12:29:01Z\"),\n    StopAt: (*string)(0x243b12b8)((len=20) \"2024-12-19T12:29:01Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x243cc42c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x243b2d10)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x243b2d20)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x243b2d30)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x243b2d40)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x243b2d60)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x243b2d70)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x243b2d80)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x243b1230)((len=20) \"2024-12-19T12:29:01Z\")\n      })\n     },\n     EventsCount: (*int32)(0x243cc4ac)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x243b1280)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x243b12a0)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x243b2da0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2dc0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2de0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2e10)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2e30)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b2e50)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x243b1288)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x243b1290)(\"\"),\n     ScenarioVersion: (*string)(0x243b1298)(\"\"),\n     Simulated: (*bool)(0x243cc4d0)(false),\n     Source: (*models.Source)(0x243d5040)(ip ),\n     StartAt: (*string)(0x243b12b0)((len=20) \"2024-12-19T12:29:01Z\"),\n     StopAt: (*string)(0x243b12b8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:01.978880891 -0500 EST m=+2.232791300,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"HOYzcwjkaGDEkRnpQyH\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=8) \"accuracy\": (int) 0\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=7) \"captcha\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecDefaultRemediation/custom_user_HTTP_code
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:418 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x2433ae80}" test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x243370a0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm variable_name=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 1376422392" test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="custom user HTTP code" tx_id=akYrQrFxiBpHhjTmnzm
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 1376422392" test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="custom user HTTP code" tx_id=OQIyWduUlWTNbqAfZKp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="custom user HTTP code" tx_id=OQIyWduUlWTNbqAfZKp
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="custom user HTTP code" tx_id=OQIyWduUlWTNbqAfZKp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="custom user HTTP code" tx_id=OQIyWduUlWTNbqAfZKp
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="custom user HTTP code" tx_id=OQIyWduUlWTNbqAfZKp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="custom user HTTP code" tx_id=OQIyWduUlWTNbqAfZKp
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="custom user HTTP code" tx_id=OQIyWduUlWTNbqAfZKp
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="custom user HTTP code" tx_id=OQIyWduUlWTNbqAfZKp
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330180)({\n    Capacity: (*int32)(0x24345efc)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2433ca30)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2433ca40)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x2433ca50)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x2433ca60)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2433ca80)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x2433ca90)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x2433caa0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x2435ebe8)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x24345f9c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x2435ec38)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x2435ec58)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2433cac0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433cae0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433cb00)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433cb30)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433cb50)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433cb70)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x2435ec40)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x2435ec48)(\"\"),\n    ScenarioVersion: (*string)(0x2435ec50)(\"\"),\n    Simulated: (*bool)(0x24345fa0)(false),\n    Source: (*models.Source)(0x24366640)(ip ),\n    StartAt: (*string)(0x2435ec68)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x2435ec70)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x24345efc)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2433ca30)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2433ca40)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x2433ca50)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x2433ca60)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2433ca80)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x2433ca90)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x2433caa0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x2435ebe8)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x24345f9c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x2435ec38)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x2435ec58)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2433cac0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433cae0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433cb00)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433cb30)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433cb50)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433cb70)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x2435ec40)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x2435ec48)(\"\"),\n     ScenarioVersion: (*string)(0x2435ec50)(\"\"),\n     Simulated: (*bool)(0x24345fa0)(false),\n     Source: (*models.Source)(0x24366640)(ip ),\n     StartAt: (*string)(0x2435ec68)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x2435ec70)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.033426772 -0500 EST m=+2.287337181,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"akYrQrFxiBpHhjTmnzm\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     }\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 418,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecDefaultRemediation/custom_remediation_+_HTTP_code
time="2024-12-19T07:29:02-05:00" level=warning msg="default 'foobar' remediation of  is none of [ban,captcha,allow] ensure bouncer compatbility!" test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:foobar DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:418 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24366ec0}" test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2436ae00 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa variable_name=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 1376422392" test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="custom remediation + HTTP code" tx_id=sABzsQwjflJzcgekcLa
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 1376422392" test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="custom remediation + HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="custom remediation + HTTP code" tx_id=QmAGsmWUZnEBvSlfeFD
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="custom remediation + HTTP code" tx_id=QmAGsmWUZnEBvSlfeFD
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="custom remediation + HTTP code" tx_id=QmAGsmWUZnEBvSlfeFD
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="custom remediation + HTTP code" tx_id=QmAGsmWUZnEBvSlfeFD
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="custom remediation + HTTP code" tx_id=QmAGsmWUZnEBvSlfeFD
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="custom remediation + HTTP code" tx_id=QmAGsmWUZnEBvSlfeFD
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="custom remediation + HTTP code" tx_id=QmAGsmWUZnEBvSlfeFD
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="custom remediation + HTTP code" tx_id=QmAGsmWUZnEBvSlfeFD
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330380)({\n    Capacity: (*int32)(0x243791cc)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2433d7f0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2433d800)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x2433d810)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x2433d820)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2433d840)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x2433d850)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x2433d860)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x2435fe58)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x2437926c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x2435fea8)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x2435fec8)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2433d880)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433d8a0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433d8c0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433d8f0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433d910)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2433d930)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x2435feb0)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x2435feb8)(\"\"),\n    ScenarioVersion: (*string)(0x2435fec0)(\"\"),\n    Simulated: (*bool)(0x24379270)(false),\n    Source: (*models.Source)(0x244146c0)(ip ),\n    StartAt: (*string)(0x2435fed8)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x2435fee0)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x243791cc)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2433d7f0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2433d800)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x2433d810)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x2433d820)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2433d840)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x2433d850)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x2433d860)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x2435fe58)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x2437926c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x2435fea8)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x2435fec8)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2433d880)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433d8a0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433d8c0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433d8f0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433d910)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2433d930)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x2435feb0)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x2435feb8)(\"\"),\n     ScenarioVersion: (*string)(0x2435fec0)(\"\"),\n     Simulated: (*bool)(0x24379270)(false),\n     Source: (*models.Source)(0x244146c0)(ip ),\n     StartAt: (*string)(0x2435fed8)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x2435fee0)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.0893854 -0500 EST m=+2.343296167,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"sABzsQwjflJzcgekcLa\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=6) \"foobar\",\n  UserHTTPResponseCode: (int) 418,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
--- PASS: TestAppsecDefaultRemediation (0.33s)
    --- PASS: TestAppsecDefaultRemediation/Basic_matching_rule (0.06s)
    --- PASS: TestAppsecDefaultRemediation/default_remediation_to_ban_(default) (0.06s)
    --- PASS: TestAppsecDefaultRemediation/default_remediation_to_allow (0.05s)
    --- PASS: TestAppsecDefaultRemediation/default_remediation_to_captcha (0.05s)
    --- PASS: TestAppsecDefaultRemediation/custom_user_HTTP_code (0.05s)
    --- PASS: TestAppsecDefaultRemediation/custom_remediation_+_HTTP_code (0.06s)
=== RUN   TestAppsecRuleMatches
=== RUN   TestAppsecRuleMatches/Basic_matching_rule
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24414f00}" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2441acc0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=756992091 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff variable_name=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=756992091 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=756992091 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 756992091" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="Basic matching rule" tx_id=qMcIkeWLabHchVSCGff
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 756992091" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="Basic matching rule" tx_id=ujEapjpQePOwYCabNbB
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="Basic matching rule" tx_id=ujEapjpQePOwYCabNbB
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="Basic matching rule" tx_id=ujEapjpQePOwYCabNbB
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="Basic matching rule" tx_id=ujEapjpQePOwYCabNbB
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="Basic matching rule" tx_id=ujEapjpQePOwYCabNbB
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="Basic matching rule" tx_id=ujEapjpQePOwYCabNbB
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="Basic matching rule" tx_id=ujEapjpQePOwYCabNbB
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="Basic matching rule" tx_id=ujEapjpQePOwYCabNbB
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330580)({\n    Capacity: (*int32)(0x244444ac)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2443e6d0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2443e6e0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"756992091\"\n       }),\n       (*models.MetaItems0)(0x2443e6f0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:756992091\"\n       }),\n       (*models.MetaItems0)(0x2443e700)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2443e720)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x2443e730)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x2443e740)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x2441d3a0)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x2444452c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x2441d3f0)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x2441d410)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2443e760)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2443e780)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2443e7a0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2443e7d0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2443e7f0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2443e810)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x2441d3f8)((len=21) \"native_rule:756992091\"),\n    ScenarioHash: (*string)(0x2441d400)(\"\"),\n    ScenarioVersion: (*string)(0x2441d408)(\"\"),\n    Simulated: (*bool)(0x24444550)(false),\n    Source: (*models.Source)(0x2444c6c0)(ip ),\n    StartAt: (*string)(0x2441d420)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x2441d428)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x244444ac)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2443e6d0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2443e6e0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"756992091\"\n        }),\n        (*models.MetaItems0)(0x2443e6f0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:756992091\"\n        }),\n        (*models.MetaItems0)(0x2443e700)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2443e720)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x2443e730)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x2443e740)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x2441d3a0)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x2444452c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x2441d3f0)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x2441d410)((len=44) \"AppSec block: native_rule:756992091 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2443e760)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2443e780)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2443e7a0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2443e7d0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2443e7f0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"756992091\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2443e810)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:756992091\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x2441d3f8)((len=21) \"native_rule:756992091\"),\n     ScenarioHash: (*string)(0x2441d400)(\"\"),\n     ScenarioVersion: (*string)(0x2441d408)(\"\"),\n     Simulated: (*bool)(0x24444550)(false),\n     Source: (*models.Source)(0x2444c6c0)(ip ),\n     StartAt: (*string)(0x2441d420)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x2441d428)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.149920587 -0500 EST m=+2.403843931,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"qMcIkeWLabHchVSCGff\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:756992091\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=2) \"id\": (int) 756992091\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleMatches/Basic_non-matching_rule
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x2444cf00}" test="Basic non-matching rule"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="Basic non-matching rule"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="Basic non-matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic non-matching rule"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:756992091 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:756992091,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2444ea20 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="Basic non-matching rule"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="Basic non-matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="Basic non-matching rule"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="Basic non-matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=tutu band=inband operator_data=^toto operator_function=@rx rule_id=756992091 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=756992091 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="Basic non-matching rule" tx_id=sABVeOQYTKzPYpIxpBR
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="Basic non-matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="Basic non-matching rule" tx_id=FtnUWfgszzqccZCVIUD
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="Basic non-matching rule" tx_id=FtnUWfgszzqccZCVIUD
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="Basic non-matching rule" tx_id=FtnUWfgszzqccZCVIUD
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="Basic non-matching rule" tx_id=FtnUWfgszzqccZCVIUD
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="Basic non-matching rule" tx_id=FtnUWfgszzqccZCVIUD
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="Basic non-matching rule" tx_id=FtnUWfgszzqccZCVIUD
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="Basic non-matching rule" tx_id=FtnUWfgszzqccZCVIUD
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="Basic non-matching rule" tx_id=FtnUWfgszzqccZCVIUD
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleMatches/default_remediation_to_allow
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:allow DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24478900}" test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2447a220 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj variable_name=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 1376422392" test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="default remediation to allow" tx_id=ggAIwNlYSIQgaONbgUj
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 1376422392" test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="default remediation to allow"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="default remediation to allow" tx_id=HXcEfbhvDdsobXcPKeo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="default remediation to allow" tx_id=HXcEfbhvDdsobXcPKeo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="default remediation to allow" tx_id=HXcEfbhvDdsobXcPKeo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="default remediation to allow" tx_id=HXcEfbhvDdsobXcPKeo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="default remediation to allow" tx_id=HXcEfbhvDdsobXcPKeo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="default remediation to allow" tx_id=HXcEfbhvDdsobXcPKeo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="default remediation to allow" tx_id=HXcEfbhvDdsobXcPKeo
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="default remediation to allow" tx_id=HXcEfbhvDdsobXcPKeo
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330800)({\n    Capacity: (*int32)(0x2445be6c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x24486140)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x24486150)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x24486160)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x24486170)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x24486190)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x244861a0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x244861b0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x24475238)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x2445beec)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x24475288)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x244752a8)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x244861d0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x244861f0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24486210)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24486240)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24486260)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24486280)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x24475290)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x24475298)(\"\"),\n    ScenarioVersion: (*string)(0x244752a0)(\"\"),\n    Simulated: (*bool)(0x2445bf10)(false),\n    Source: (*models.Source)(0x2448c0c0)(ip ),\n    StartAt: (*string)(0x244752b8)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x244752c0)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x2445be6c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x24486140)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x24486150)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x24486160)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x24486170)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x24486190)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x244861a0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x244861b0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x24475238)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x2445beec)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x24475288)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x244752a8)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x244861d0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x244861f0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24486210)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24486240)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24486260)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24486280)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x24475290)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x24475298)(\"\"),\n     ScenarioVersion: (*string)(0x244752a0)(\"\"),\n     Simulated: (*bool)(0x2445bf10)(false),\n     Source: (*models.Source)(0x2448c0c0)(ip ),\n     StartAt: (*string)(0x244752b8)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x244752c0)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.272616796 -0500 EST m=+2.526542226,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"ggAIwNlYSIQgaONbgUj\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     }\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleMatches/default_remediation_to_captcha
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:captcha DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x2448c900}" test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2447be60 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK variable_name=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 1376422392" test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="default remediation to captcha" tx_id=TKVRYKEVKaAIYjTgVmK
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 1376422392" test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="default remediation to captcha"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="default remediation to captcha" tx_id=sCaGMeUmTtvrMUwbkjW
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="default remediation to captcha" tx_id=sCaGMeUmTtvrMUwbkjW
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="default remediation to captcha" tx_id=sCaGMeUmTtvrMUwbkjW
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="default remediation to captcha" tx_id=sCaGMeUmTtvrMUwbkjW
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="default remediation to captcha" tx_id=sCaGMeUmTtvrMUwbkjW
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="default remediation to captcha" tx_id=sCaGMeUmTtvrMUwbkjW
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="default remediation to captcha" tx_id=sCaGMeUmTtvrMUwbkjW
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="default remediation to captcha" tx_id=sCaGMeUmTtvrMUwbkjW
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330a00)({\n    Capacity: (*int32)(0x24499110)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x24486f00)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x24486f10)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x24486f20)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x24486f30)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x24486f50)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x24486f60)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x24486f70)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x244be560)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x244991ac)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x244be5b0)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x244be5d0)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x24486f90)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24486fb0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24486fd0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24487000)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24487020)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24487040)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x244be5b8)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x244be5c0)(\"\"),\n    ScenarioVersion: (*string)(0x244be5c8)(\"\"),\n    Simulated: (*bool)(0x244991b0)(false),\n    Source: (*models.Source)(0x244c20c0)(ip ),\n    StartAt: (*string)(0x244be5e0)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x244be5e8)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x24499110)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x24486f00)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x24486f10)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x24486f20)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x24486f30)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x24486f50)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x24486f60)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x24486f70)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x244be560)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x244991ac)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x244be5b0)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x244be5d0)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x24486f90)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24486fb0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24486fd0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24487000)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24487020)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24487040)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x244be5b8)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x244be5c0)(\"\"),\n     ScenarioVersion: (*string)(0x244be5c8)(\"\"),\n     Simulated: (*bool)(0x244991b0)(false),\n     Source: (*models.Source)(0x244c20c0)(ip ),\n     StartAt: (*string)(0x244be5e0)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x244be5e8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.335277721 -0500 EST m=+2.589201542,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"TKVRYKEVKaAIYjTgVmK\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=7) \"captcha\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleMatches/no_default_remediation_/_custom_user_HTTP_code
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:418 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x244c2900}" test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x244b9ba0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1376422392 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv variable_name=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1376422392 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=1376422392 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 1376422392" test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="no default remediation / custom user HTTP code" tx_id=yxNUUwghKfNDWgrGEkv
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 1376422392" test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="no default remediation / custom user HTTP code"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="no default remediation / custom user HTTP code" tx_id=pmMzodBsggkMJAzyrjI
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="no default remediation / custom user HTTP code" tx_id=pmMzodBsggkMJAzyrjI
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="no default remediation / custom user HTTP code" tx_id=pmMzodBsggkMJAzyrjI
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="no default remediation / custom user HTTP code" tx_id=pmMzodBsggkMJAzyrjI
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="no default remediation / custom user HTTP code" tx_id=pmMzodBsggkMJAzyrjI
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="no default remediation / custom user HTTP code" tx_id=pmMzodBsggkMJAzyrjI
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="no default remediation / custom user HTTP code" tx_id=pmMzodBsggkMJAzyrjI
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="no default remediation / custom user HTTP code" tx_id=pmMzodBsggkMJAzyrjI
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330c00)({\n    Capacity: (*int32)(0x244f03e0)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x24487cb0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x24487cc0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1376422392\"\n       }),\n       (*models.MetaItems0)(0x24487cd0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1376422392\"\n       }),\n       (*models.MetaItems0)(0x24487ce0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x24487d00)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x24487d10)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x24487d20)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=6) \"rule42\"\n       })\n      },\n      Timestamp: (*string)(0x244bf788)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x244f045c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x244bf7d8)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x244bf7f8)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x24487d40)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24487d60)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24487d80)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24487db0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24487dd0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24487df0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x244bf7e0)((len=22) \"native_rule:1376422392\"),\n    ScenarioHash: (*string)(0x244bf7e8)(\"\"),\n    ScenarioVersion: (*string)(0x244bf7f0)(\"\"),\n    Simulated: (*bool)(0x244f0480)(false),\n    Source: (*models.Source)(0x244fa0c0)(ip ),\n    StartAt: (*string)(0x244bf808)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x244bf810)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x244f03e0)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x24487cb0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x24487cc0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1376422392\"\n        }),\n        (*models.MetaItems0)(0x24487cd0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1376422392\"\n        }),\n        (*models.MetaItems0)(0x24487ce0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x24487d00)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x24487d10)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x24487d20)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=6) \"rule42\"\n        })\n       },\n       Timestamp: (*string)(0x244bf788)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x244f045c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x244bf7d8)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x244bf7f8)((len=45) \"AppSec block: native_rule:1376422392 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x24487d40)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24487d60)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24487d80)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24487db0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=10) \"[\\\"rule42\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24487dd0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1376422392\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24487df0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1376422392\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x244bf7e0)((len=22) \"native_rule:1376422392\"),\n     ScenarioHash: (*string)(0x244bf7e8)(\"\"),\n     ScenarioVersion: (*string)(0x244bf7f0)(\"\"),\n     Simulated: (*bool)(0x244f0480)(false),\n     Source: (*models.Source)(0x244fa0c0)(ip ),\n     StartAt: (*string)(0x244bf808)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x244bf810)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.401025687 -0500 EST m=+2.654950878,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"yxNUUwghKfNDWgrGEkv\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 1376422392,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1376422392\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=15) \"crowdsec-rule42\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=3) \"msg\": (string) (len=6) \"rule42\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 418,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleMatches/no_match_but_try_to_set_remediation_to_captcha_with_on_match_hook
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediation('captcha')] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x244fa900}" test="no match but try to set remediation to captcha with on_match hook"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="no match but try to set remediation to captcha with on_match hook"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="no match but try to set remediation to captcha with on_match hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="no match but try to set remediation to captcha with on_match hook"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x244f5b60 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="no match but try to set remediation to captcha with on_match hook"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="no match but try to set remediation to captcha with on_match hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="no match but try to set remediation to captcha with on_match hook"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="no match but try to set remediation to captcha with on_match hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=bla band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="no match but try to set remediation to captcha with on_match hook" tx_id=qSbEDXgDXVSTkPxXpwN
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="no match but try to set remediation to captcha with on_match hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="no match but try to set remediation to captcha with on_match hook" tx_id=cxnWNNyfZVAQkTjVQvo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="no match but try to set remediation to captcha with on_match hook" tx_id=cxnWNNyfZVAQkTjVQvo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="no match but try to set remediation to captcha with on_match hook" tx_id=cxnWNNyfZVAQkTjVQvo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="no match but try to set remediation to captcha with on_match hook" tx_id=cxnWNNyfZVAQkTjVQvo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="no match but try to set remediation to captcha with on_match hook" tx_id=cxnWNNyfZVAQkTjVQvo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="no match but try to set remediation to captcha with on_match hook" tx_id=cxnWNNyfZVAQkTjVQvo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="no match but try to set remediation to captcha with on_match hook" tx_id=cxnWNNyfZVAQkTjVQvo
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="no match but try to set remediation to captcha with on_match hook" tx_id=cxnWNNyfZVAQkTjVQvo
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleMatches/no_match_but_try_to_set_user_HTTP_code_with_on_match_hook
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetReturnCode(418)] ApplyExpr:[]}] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24530380}" test="no match but try to set user HTTP code with on_match hook"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="no match but try to set user HTTP code with on_match hook"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="no match but try to set user HTTP code with on_match hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="no match but try to set user HTTP code with on_match hook"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x2452d5e0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="no match but try to set user HTTP code with on_match hook"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="no match but try to set user HTTP code with on_match hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="no match but try to set user HTTP code with on_match hook"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="no match but try to set user HTTP code with on_match hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=bla band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="no match but try to set user HTTP code with on_match hook" tx_id=rWFIqnaTkwCBlAdUgDY
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="no match but try to set user HTTP code with on_match hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="no match but try to set user HTTP code with on_match hook" tx_id=DSwGPaOozQyHhmcewfB
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="no match but try to set user HTTP code with on_match hook" tx_id=DSwGPaOozQyHhmcewfB
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="no match but try to set user HTTP code with on_match hook" tx_id=DSwGPaOozQyHhmcewfB
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="no match but try to set user HTTP code with on_match hook" tx_id=DSwGPaOozQyHhmcewfB
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="no match but try to set user HTTP code with on_match hook" tx_id=DSwGPaOozQyHhmcewfB
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="no match but try to set user HTTP code with on_match hook" tx_id=DSwGPaOozQyHhmcewfB
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="no match but try to set user HTTP code with on_match hook" tx_id=DSwGPaOozQyHhmcewfB
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="no match but try to set user HTTP code with on_match hook" tx_id=DSwGPaOozQyHhmcewfB
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleMatches/no_match_but_try_to_set__remediation_with_pre_eval_hook
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[{Filter:IsInBand == true FilterExpr: OnSuccess: Apply:[SetRemediationByName('rule42', 'captcha')] ApplyExpr:[]}] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24531d00}" test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\"" test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1376422392 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule42] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@rx ^toto\" \"id:1376422392,phase:2,deny,log,msg:'rule42',tag:'crowdsec-rule42',t:lowercase\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x24547080 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule42 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="setting action of crowdsec-rule42 to captcha" request_uuid= test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1376422392 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1376422392 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1376422392 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1376422392 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=bla band=inband operator_data=^toto operator_function=@rx rule_id=1376422392 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1376422392 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="no match but try to set  remediation with pre_eval hook" tx_id=RAimBDeBXDEDAQVqguo
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="no match but try to set  remediation with pre_eval hook" tx_id=HTZSsXPVobRNEjSFJvy
time="2024-12-19T07:29:02-05:00" level=debug msg="filter didnt match" request_uuid= test="no match but try to set  remediation with pre_eval hook"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="no match but try to set  remediation with pre_eval hook" tx_id=HTZSsXPVobRNEjSFJvy
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="no match but try to set  remediation with pre_eval hook" tx_id=HTZSsXPVobRNEjSFJvy
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="no match but try to set  remediation with pre_eval hook" tx_id=HTZSsXPVobRNEjSFJvy
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="no match but try to set  remediation with pre_eval hook" tx_id=HTZSsXPVobRNEjSFJvy
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="no match but try to set  remediation with pre_eval hook" tx_id=HTZSsXPVobRNEjSFJvy
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="no match but try to set  remediation with pre_eval hook" tx_id=HTZSsXPVobRNEjSFJvy
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="no match but try to set  remediation with pre_eval hook" tx_id=HTZSsXPVobRNEjSFJvy
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) {\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) false,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=5) \"allow\",\n  UserHTTPResponseCode: (int) 200,\n  BouncerHTTPResponseCode: (int) 200,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleMatches/Basic_matching_in_cookies
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24557800}" test="Basic matching in cookies"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="Basic matching in cookies"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="Basic matching in cookies"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_COOKIES:foo \"@rx ^toto\" \"id:3905347335,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic matching in cookies"
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "3905347335": value out of range
=== RUN   TestAppsecRuleMatches/Basic_matching_in_all_cookies
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24557c00}" test="Basic matching in all cookies"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="Basic matching in all cookies"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="Basic matching in all cookies"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_COOKIES \"@rx ^tutu\" \"id:2318111615,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic matching in all cookies"
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "2318111615": value out of range
=== RUN   TestAppsecRuleMatches/Basic_matching_in_cookie_name
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24572100}" test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_COOKIES_NAMES \"@rx ^tutu\" \"id:1848555202,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1848555202 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule REQUEST_COOKIES_NAMES \"@rx ^tutu\" \"id:1848555202,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:58 KeyRx: KeyStr: Exceptions:[]}] operator:0x24566ee0 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE variable=REQUEST_COOKIES_NAMES
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=bar band=inband operator_data=^tutu operator_function=@rx rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=tututata rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE variable_name=REQUEST_COOKIES_NAMES
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=tututata band=inband operator_data=^tutu operator_function=@rx rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1848555202 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 1848555202" test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="Basic matching in cookie name" tx_id=DiJwoSTmRlnkVehuuIE
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 1848555202" test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="Basic matching in cookie name"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="Basic matching in cookie name" tx_id=YaikrqNxreJaDTsPIWb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="Basic matching in cookie name" tx_id=YaikrqNxreJaDTsPIWb
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="Basic matching in cookie name" tx_id=YaikrqNxreJaDTsPIWb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="Basic matching in cookie name" tx_id=YaikrqNxreJaDTsPIWb
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="Basic matching in cookie name" tx_id=YaikrqNxreJaDTsPIWb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="Basic matching in cookie name" tx_id=YaikrqNxreJaDTsPIWb
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="Basic matching in cookie name" tx_id=YaikrqNxreJaDTsPIWb
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="Basic matching in cookie name" tx_id=YaikrqNxreJaDTsPIWb
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330f80)({\n    Capacity: (*int32)(0x2454d1f8)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x24561410)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x24561420)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1848555202\"\n       }),\n       (*models.MetaItems0)(0x24561430)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1848555202\"\n       }),\n       (*models.MetaItems0)(0x24561440)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x24561460)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x24561470)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=30) \"REQUEST_COOKIES_NAMES.tututata\"\n       }),\n       (*models.MetaItems0)(0x24561480)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x2457a8c8)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x2454d27c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x2457a918)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x2457a938)((len=45) \"AppSec block: native_rule:1848555202 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x245614a0)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1848555202\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245614c0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1848555202\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245614e0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24561510)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24561530)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=34) \"[\\\"REQUEST_COOKIES_NAMES.tututata\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24561550)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x2457a920)((len=22) \"native_rule:1848555202\"),\n    ScenarioHash: (*string)(0x2457a928)(\"\"),\n    ScenarioVersion: (*string)(0x2457a930)(\"\"),\n    Simulated: (*bool)(0x2454d280)(false),\n    Source: (*models.Source)(0x24573a40)(ip ),\n    StartAt: (*string)(0x2457a948)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x2457a950)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x2454d1f8)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x24561410)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x24561420)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1848555202\"\n        }),\n        (*models.MetaItems0)(0x24561430)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1848555202\"\n        }),\n        (*models.MetaItems0)(0x24561440)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x24561460)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x24561470)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=30) \"REQUEST_COOKIES_NAMES.tututata\"\n        }),\n        (*models.MetaItems0)(0x24561480)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x2457a8c8)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x2454d27c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x2457a918)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x2457a938)((len=45) \"AppSec block: native_rule:1848555202 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x245614a0)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1848555202\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245614c0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1848555202\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245614e0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24561510)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24561530)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=34) \"[\\\"REQUEST_COOKIES_NAMES.tututata\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24561550)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x2457a920)((len=22) \"native_rule:1848555202\"),\n     ScenarioHash: (*string)(0x2457a928)(\"\"),\n     ScenarioVersion: (*string)(0x2457a930)(\"\"),\n     Simulated: (*bool)(0x2454d280)(false),\n     Source: (*models.Source)(0x24573a40)(ip ),\n     StartAt: (*string)(0x2457a948)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x2457a950)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.646868894 -0500 EST m=+2.900793668,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"DiJwoSTmRlnkVehuuIE\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1848555202\",\n     (string) (len=2) \"id\": (int) 1848555202,\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=30) \"REQUEST_COOKIES_NAMES.tututata\"\n     },\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleMatches/Basic_matching_in_multipart_file_name
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24584380}" test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule FILES \"@rx \\.php$\" \"id:270859609,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:270859609 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule FILES \"@rx \\.php$\" \"id:270859609,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:52 KeyRx: KeyStr: Exceptions:[]}] operator:0x24582e60 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:4 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Attempting to process request body" band=inband body_processor=multipart test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=270859609 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=270859609 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm variable=FILES
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=270859609 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=270859609 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key= rule_id=270859609 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm variable_name=FILES
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=bar.php band=inband operator_data="\\.php$" operator_function=@rx rule_id=270859609 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=270859609 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=270859609 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=270859609 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 270859609" test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="Basic matching in multipart file name" tx_id=OurmBmjxEAumIxQSIVm
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 270859609" test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="Basic matching in multipart file name"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="Basic matching in multipart file name" tx_id=wOHipWrjrqBLGoTyPRc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="Basic matching in multipart file name" tx_id=wOHipWrjrqBLGoTyPRc
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="Basic matching in multipart file name" tx_id=wOHipWrjrqBLGoTyPRc
time="2024-12-19T07:29:02-05:00" level=debug msg="Attempting to process request body" band=outband body_processor=multipart test="Basic matching in multipart file name" tx_id=wOHipWrjrqBLGoTyPRc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="Basic matching in multipart file name" tx_id=wOHipWrjrqBLGoTyPRc
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="Basic matching in multipart file name" tx_id=wOHipWrjrqBLGoTyPRc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="Basic matching in multipart file name" tx_id=wOHipWrjrqBLGoTyPRc
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="Basic matching in multipart file name" tx_id=wOHipWrjrqBLGoTyPRc
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="Basic matching in multipart file name" tx_id=wOHipWrjrqBLGoTyPRc
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24331180)({\n    Capacity: (*int32)(0x245a24b8)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x245a6500)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x245a6510)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"270859609\"\n       }),\n       (*models.MetaItems0)(0x245a6520)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:270859609\"\n       }),\n       (*models.MetaItems0)(0x245a6530)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x245a6550)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/urllll\"\n       }),\n       (*models.MetaItems0)(0x245a6560)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=5) \"FILES\"\n       }),\n       (*models.MetaItems0)(0x245a6570)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x245b8460)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x245a2560)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x245b84b0)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x245b84d0)((len=44) \"AppSec block: native_rule:270859609 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x245a6590)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a65b0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=9) \"[\\\"FILES\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a65d0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a6600)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"270859609\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a6620)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:270859609\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a6640)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x245b84b8)((len=21) \"native_rule:270859609\"),\n    ScenarioHash: (*string)(0x245b84c0)(\"\"),\n    ScenarioVersion: (*string)(0x245b84c8)(\"\"),\n    Simulated: (*bool)(0x245a2564)(false),\n    Source: (*models.Source)(0x24585b80)(ip ),\n    StartAt: (*string)(0x245b84e0)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x245b84e8)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x245a24b8)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x245a6500)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x245a6510)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"270859609\"\n        }),\n        (*models.MetaItems0)(0x245a6520)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:270859609\"\n        }),\n        (*models.MetaItems0)(0x245a6530)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x245a6550)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/urllll\"\n        }),\n        (*models.MetaItems0)(0x245a6560)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=5) \"FILES\"\n        }),\n        (*models.MetaItems0)(0x245a6570)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x245b8460)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x245a2560)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x245b84b0)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x245b84d0)((len=44) \"AppSec block: native_rule:270859609 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x245a6590)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/urllll\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a65b0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=9) \"[\\\"FILES\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a65d0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a6600)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"270859609\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a6620)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:270859609\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a6640)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x245b84b8)((len=21) \"native_rule:270859609\"),\n     ScenarioHash: (*string)(0x245b84c0)(\"\"),\n     ScenarioVersion: (*string)(0x245b84c8)(\"\"),\n     Simulated: (*bool)(0x245a2564)(false),\n     Source: (*models.Source)(0x24585b80)(ip ),\n     StartAt: (*string)(0x245b84e0)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x245b84e8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.714299795 -0500 EST m=+2.968224688,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"OurmBmjxEAumIxQSIVm\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/urllll\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:270859609\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=2) \"id\": (int) 270859609,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=7) \"/urllll\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=5) \"FILES\"\n     },\n     (string) (len=4) \"file\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
--- FAIL: TestAppsecRuleMatches (0.63s)
    --- PASS: TestAppsecRuleMatches/Basic_matching_rule (0.06s)
    --- PASS: TestAppsecRuleMatches/Basic_non-matching_rule (0.06s)
    --- PASS: TestAppsecRuleMatches/default_remediation_to_allow (0.06s)
    --- PASS: TestAppsecRuleMatches/default_remediation_to_captcha (0.07s)
    --- PASS: TestAppsecRuleMatches/no_default_remediation_/_custom_user_HTTP_code (0.06s)
    --- PASS: TestAppsecRuleMatches/no_match_but_try_to_set_remediation_to_captcha_with_on_match_hook (0.06s)
    --- PASS: TestAppsecRuleMatches/no_match_but_try_to_set_user_HTTP_code_with_on_match_hook (0.06s)
    --- PASS: TestAppsecRuleMatches/no_match_but_try_to_set__remediation_with_pre_eval_hook (0.06s)
    --- FAIL: TestAppsecRuleMatches/Basic_matching_in_cookies (0.00s)
    --- FAIL: TestAppsecRuleMatches/Basic_matching_in_all_cookies (0.00s)
    --- PASS: TestAppsecRuleMatches/Basic_matching_in_cookie_name (0.06s)
    --- PASS: TestAppsecRuleMatches/Basic_matching_in_multipart_file_name (0.07s)
=== RUN   TestAppsecRuleTransforms
=== RUN   TestAppsecRuleTransforms/Basic_matching_rule
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x245be600}" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="Basic matching rule"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_FILENAME \"@streq /toto\" \"id:2494461990,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="Basic matching rule"
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "2494461990": value out of range
=== RUN   TestAppsecRuleTransforms/lowercase
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x245be900}" test=lowercase
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test=lowercase
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test=lowercase
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_FILENAME \"@streq /toto\" \"id:180612551,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\"" test=lowercase
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:180612551 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule REQUEST_FILENAME \"@streq /toto\" \"id:180612551,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:lowercase\" SecMark_:} variables:[{Count:false Variable:23 KeyRx: KeyStr: Exceptions:[]}] operator:0x245b7460 transformations:[{Function:0x1bfddc0}] transformationsID:1 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test=lowercase
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test=lowercase
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test=lowercase
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test=lowercase
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=180612551 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=180612551 test=lowercase tx_id=LCciCwEirGMliUUvZNc variable=REQUEST_FILENAME
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=180612551 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=180612551 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key= rule_id=180612551 test=lowercase tx_id=LCciCwEirGMliUUvZNc variable_name=REQUEST_FILENAME
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=/toto band=inband operator_data=/toto operator_function=@streq rule_id=180612551 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=180612551 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=180612551 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=180612551 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 180612551" test=lowercase
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test=lowercase tx_id=LCciCwEirGMliUUvZNc
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 180612551" test=lowercase
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test=lowercase
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test=lowercase tx_id=dsixgpJOprMHHZTywPj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test=lowercase tx_id=dsixgpJOprMHHZTywPj
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test=lowercase tx_id=dsixgpJOprMHHZTywPj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test=lowercase tx_id=dsixgpJOprMHHZTywPj
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test=lowercase tx_id=dsixgpJOprMHHZTywPj
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test=lowercase tx_id=dsixgpJOprMHHZTywPj
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test=lowercase tx_id=dsixgpJOprMHHZTywPj
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test=lowercase tx_id=dsixgpJOprMHHZTywPj
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24331380)({\n    Capacity: (*int32)(0x245d1938)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x245a74b0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x245a74c0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"180612551\"\n       }),\n       (*models.MetaItems0)(0x245a74d0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:180612551\"\n       }),\n       (*models.MetaItems0)(0x245a74e0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x245a7500)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=5) \"/TOTO\"\n       }),\n       (*models.MetaItems0)(0x245a7510)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=16) \"REQUEST_FILENAME\"\n       }),\n       (*models.MetaItems0)(0x245a7520)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x245b9928)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x245d19bc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x245b9978)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x245b9998)((len=44) \"AppSec block: native_rule:180612551 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x245a7540)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=20) \"[\\\"REQUEST_FILENAME\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a7560)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a7580)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"180612551\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a75b0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:180612551\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a75d0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x245a75f0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=9) \"[\\\"/TOTO\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x245b9980)((len=21) \"native_rule:180612551\"),\n    ScenarioHash: (*string)(0x245b9988)(\"\"),\n    ScenarioVersion: (*string)(0x245b9990)(\"\"),\n    Simulated: (*bool)(0x245d19c0)(false),\n    Source: (*models.Source)(0x245fc000)(ip ),\n    StartAt: (*string)(0x245b99a8)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x245b99b0)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x245d1938)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x245a74b0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x245a74c0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"180612551\"\n        }),\n        (*models.MetaItems0)(0x245a74d0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:180612551\"\n        }),\n        (*models.MetaItems0)(0x245a74e0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x245a7500)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=5) \"/TOTO\"\n        }),\n        (*models.MetaItems0)(0x245a7510)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=16) \"REQUEST_FILENAME\"\n        }),\n        (*models.MetaItems0)(0x245a7520)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x245b9928)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x245d19bc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x245b9978)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x245b9998)((len=44) \"AppSec block: native_rule:180612551 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x245a7540)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=20) \"[\\\"REQUEST_FILENAME\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a7560)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a7580)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"180612551\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a75b0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:180612551\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a75d0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x245a75f0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=9) \"[\\\"/TOTO\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x245b9980)((len=21) \"native_rule:180612551\"),\n     ScenarioHash: (*string)(0x245b9988)(\"\"),\n     ScenarioVersion: (*string)(0x245b9990)(\"\"),\n     Simulated: (*bool)(0x245d19c0)(false),\n     Source: (*models.Source)(0x245fc000)(ip ),\n     StartAt: (*string)(0x245b99a8)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x245b99b0)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.776128163 -0500 EST m=+3.030038573,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=5) \"/TOTO\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"LCciCwEirGMliUUvZNc\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=16) \"REQUEST_FILENAME\"\n     },\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:180612551\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=2) \"id\": (int) 180612551,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=5) \"/TOTO\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\",\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleTransforms/uppercase
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x245fc840}" test=uppercase
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test=uppercase
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test=uppercase
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_FILENAME \"@streq /TOTO\" \"id:1187077494,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:uppercase\"" test=uppercase
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1187077494 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule REQUEST_FILENAME \"@streq /TOTO\" \"id:1187077494,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:uppercase\" SecMark_:} variables:[{Count:false Variable:23 KeyRx: KeyStr: Exceptions:[]}] operator:0x245fb260 transformations:[{Function:0x1bffbf0}] transformationsID:3 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test=uppercase
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test=uppercase
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test=uppercase
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test=uppercase
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1187077494 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1187077494 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd variable=REQUEST_FILENAME
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1187077494 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1187077494 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key= rule_id=1187077494 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd variable_name=REQUEST_FILENAME
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=/TOTO band=inband operator_data=/TOTO operator_function=@streq rule_id=1187077494 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1187077494 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=1187077494 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1187077494 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 1187077494" test=uppercase
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test=uppercase tx_id=zDcPbGVpjdAGVOMAUbd
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 1187077494" test=uppercase
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test=uppercase
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test=uppercase tx_id=wjScQOCLZCRjdMZlblZ
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test=uppercase tx_id=wjScQOCLZCRjdMZlblZ
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test=uppercase tx_id=wjScQOCLZCRjdMZlblZ
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test=uppercase tx_id=wjScQOCLZCRjdMZlblZ
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test=uppercase tx_id=wjScQOCLZCRjdMZlblZ
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test=uppercase tx_id=wjScQOCLZCRjdMZlblZ
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test=uppercase tx_id=wjScQOCLZCRjdMZlblZ
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test=uppercase tx_id=wjScQOCLZCRjdMZlblZ
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24331580)({\n    Capacity: (*int32)(0x2460cae8)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x24632370)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x24632380)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1187077494\"\n       }),\n       (*models.MetaItems0)(0x24632390)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1187077494\"\n       }),\n       (*models.MetaItems0)(0x246323a0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x246323c0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=5) \"/toto\"\n       }),\n       (*models.MetaItems0)(0x246323d0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=16) \"REQUEST_FILENAME\"\n       }),\n       (*models.MetaItems0)(0x246323e0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x24620ad8)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x2460cb6c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x24620b28)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x24620b48)((len=45) \"AppSec block: native_rule:1187077494 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x24632400)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24632420)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1187077494\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24632440)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1187077494\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24632470)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24632490)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=9) \"[\\\"/toto\\\"]\"\n     }),\n     (*models.MetaItems0)(0x246324b0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=20) \"[\\\"REQUEST_FILENAME\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x24620b30)((len=22) \"native_rule:1187077494\"),\n    ScenarioHash: (*string)(0x24620b38)(\"\"),\n    ScenarioVersion: (*string)(0x24620b40)(\"\"),\n    Simulated: (*bool)(0x2460cb70)(false),\n    Source: (*models.Source)(0x245fde40)(ip ),\n    StartAt: (*string)(0x24620b58)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x24620b60)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x2460cae8)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x24632370)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x24632380)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1187077494\"\n        }),\n        (*models.MetaItems0)(0x24632390)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1187077494\"\n        }),\n        (*models.MetaItems0)(0x246323a0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x246323c0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=5) \"/toto\"\n        }),\n        (*models.MetaItems0)(0x246323d0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=16) \"REQUEST_FILENAME\"\n        }),\n        (*models.MetaItems0)(0x246323e0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x24620ad8)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x2460cb6c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x24620b28)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x24620b48)((len=45) \"AppSec block: native_rule:1187077494 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x24632400)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24632420)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1187077494\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24632440)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1187077494\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24632470)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24632490)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=9) \"[\\\"/toto\\\"]\"\n      }),\n      (*models.MetaItems0)(0x246324b0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=20) \"[\\\"REQUEST_FILENAME\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x24620b30)((len=22) \"native_rule:1187077494\"),\n     ScenarioHash: (*string)(0x24620b38)(\"\"),\n     ScenarioVersion: (*string)(0x24620b40)(\"\"),\n     Simulated: (*bool)(0x2460cb70)(false),\n     Source: (*models.Source)(0x245fde40)(ip ),\n     StartAt: (*string)(0x24620b58)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x24620b60)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.834531116 -0500 EST m=+3.088441466,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"zDcPbGVpjdAGVOMAUbd\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=10) \"target_uri\": (string) (len=5) \"/toto\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=2) \"id\": (int) 1187077494,\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1187077494\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=5) \"/toto\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=16) \"REQUEST_FILENAME\"\n     }\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleTransforms/b64decode
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x2463e780}" test=b64decode
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test=b64decode
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test=b64decode
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@streq toto\" \"id:1636202678,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:base64Decode\"" test=b64decode
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1636202678 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@streq toto\" \"id:1636202678,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:base64Decode\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x24637040 transformations:[{Function:0x1bfbb90}] transformationsID:4 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test=b64decode
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test=b64decode
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test=b64decode
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test=b64decode
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1636202678 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1636202678 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1636202678 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1636202678 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1636202678 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb variable_name=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=toto operator_function=@streq rule_id=1636202678 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1636202678 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=1636202678 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1636202678 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 1636202678" test=b64decode
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test=b64decode tx_id=UxZbtBsgPQTFzGOBowb
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 1636202678" test=b64decode
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test=b64decode
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test=b64decode tx_id=sXtdEYBdqPIDukqPGyy
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test=b64decode tx_id=sXtdEYBdqPIDukqPGyy
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test=b64decode tx_id=sXtdEYBdqPIDukqPGyy
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test=b64decode tx_id=sXtdEYBdqPIDukqPGyy
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test=b64decode tx_id=sXtdEYBdqPIDukqPGyy
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test=b64decode tx_id=sXtdEYBdqPIDukqPGyy
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test=b64decode tx_id=sXtdEYBdqPIDukqPGyy
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test=b64decode tx_id=sXtdEYBdqPIDukqPGyy
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24331780)({\n    Capacity: (*int32)(0x24643d10)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x24633140)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x24633150)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1636202678\"\n       }),\n       (*models.MetaItems0)(0x24633160)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1636202678\"\n       }),\n       (*models.MetaItems0)(0x24633170)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x24633190)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=12) \"/?foo=dG90bw\"\n       }),\n       (*models.MetaItems0)(0x246331a0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x246331b0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x24621bd8)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x24643d8c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x24621c28)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x24621c48)((len=45) \"AppSec block: native_rule:1636202678 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x246331d0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1636202678\\\"]\"\n     }),\n     (*models.MetaItems0)(0x246331f0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24633210)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=16) \"[\\\"/?foo=dG90bw\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24633240)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24633260)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x24633280)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1636202678\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x24621c30)((len=22) \"native_rule:1636202678\"),\n    ScenarioHash: (*string)(0x24621c38)(\"\"),\n    ScenarioVersion: (*string)(0x24621c40)(\"\"),\n    Simulated: (*bool)(0x24643db0)(false),\n    Source: (*models.Source)(0x2463fdc0)(ip ),\n    StartAt: (*string)(0x24621c58)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x24621c60)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x24643d10)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x24633140)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x24633150)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1636202678\"\n        }),\n        (*models.MetaItems0)(0x24633160)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1636202678\"\n        }),\n        (*models.MetaItems0)(0x24633170)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x24633190)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=12) \"/?foo=dG90bw\"\n        }),\n        (*models.MetaItems0)(0x246331a0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x246331b0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x24621bd8)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x24643d8c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x24621c28)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x24621c48)((len=45) \"AppSec block: native_rule:1636202678 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x246331d0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1636202678\\\"]\"\n      }),\n      (*models.MetaItems0)(0x246331f0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24633210)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=16) \"[\\\"/?foo=dG90bw\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24633240)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24633260)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x24633280)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1636202678\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x24621c30)((len=22) \"native_rule:1636202678\"),\n     ScenarioHash: (*string)(0x24621c38)(\"\"),\n     ScenarioVersion: (*string)(0x24621c40)(\"\"),\n     Simulated: (*bool)(0x24643db0)(false),\n     Source: (*models.Source)(0x2463fdc0)(ip ),\n     StartAt: (*string)(0x24621c58)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x24621c60)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.887743105 -0500 EST m=+3.141653515,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"UxZbtBsgPQTFzGOBowb\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=12) \"/?foo=dG90bw\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=3) \"uri\": (string) (len=12) \"/?foo=dG90bw\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1636202678\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=2) \"id\": (int) 1636202678,\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"accuracy\": (int) 0\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleTransforms/b64decode_with_extra_padding
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24666700}" test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@streq toto\" \"id:1636202678,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:base64Decode\"" test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1636202678 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@streq toto\" \"id:1636202678,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:base64Decode\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x24664e20 transformations:[{Function:0x1bfbb90}] transformationsID:4 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1636202678 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1636202678 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1636202678 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1636202678 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1636202678 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp variable_name=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=toto band=inband operator_data=toto operator_function=@streq rule_id=1636202678 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1636202678 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=1636202678 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1636202678 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 1636202678" test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="b64decode with extra padding" tx_id=ODMhQtfeseTVvwTUEdp
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 1636202678" test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="b64decode with extra padding"
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test="b64decode with extra padding" tx_id=ukGLvpQUqXfZbzrJDzq
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="b64decode with extra padding" tx_id=ukGLvpQUqXfZbzrJDzq
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test="b64decode with extra padding" tx_id=ukGLvpQUqXfZbzrJDzq
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="b64decode with extra padding" tx_id=ukGLvpQUqXfZbzrJDzq
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test="b64decode with extra padding" tx_id=ukGLvpQUqXfZbzrJDzq
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="b64decode with extra padding" tx_id=ukGLvpQUqXfZbzrJDzq
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test="b64decode with extra padding" tx_id=ukGLvpQUqXfZbzrJDzq
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="b64decode with extra padding" tx_id=ukGLvpQUqXfZbzrJDzq
time="2024-12-19T07:29:02-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24331980)({\n    Capacity: (*int32)(0x24674f5c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2469e000)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2469e010)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1636202678\"\n       }),\n       (*models.MetaItems0)(0x2469e020)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1636202678\"\n       }),\n       (*models.MetaItems0)(0x2469e030)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2469e050)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=15) \"/?foo=dG90bw===\"\n       }),\n       (*models.MetaItems0)(0x2469e060)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x2469e070)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x2466ae98)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x24674fbc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x2466aee8)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x2466af08)((len=45) \"AppSec block: native_rule:1636202678 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2469e090)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1636202678\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469e0b0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469e0d0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=19) \"[\\\"/?foo=dG90bw===\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469e100)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469e120)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469e140)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1636202678\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x2466aef0)((len=22) \"native_rule:1636202678\"),\n    ScenarioHash: (*string)(0x2466aef8)(\"\"),\n    ScenarioVersion: (*string)(0x2466af00)(\"\"),\n    Simulated: (*bool)(0x24674fe0)(false),\n    Source: (*models.Source)(0x24667cc0)(ip ),\n    StartAt: (*string)(0x2466af18)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x2466af20)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x24674f5c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2469e000)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2469e010)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1636202678\"\n        }),\n        (*models.MetaItems0)(0x2469e020)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1636202678\"\n        }),\n        (*models.MetaItems0)(0x2469e030)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2469e050)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=15) \"/?foo=dG90bw===\"\n        }),\n        (*models.MetaItems0)(0x2469e060)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x2469e070)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x2466ae98)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x24674fbc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x2466aee8)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x2466af08)((len=45) \"AppSec block: native_rule:1636202678 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2469e090)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1636202678\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469e0b0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469e0d0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=19) \"[\\\"/?foo=dG90bw===\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469e100)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469e120)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469e140)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1636202678\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x2466aef0)((len=22) \"native_rule:1636202678\"),\n     ScenarioHash: (*string)(0x2466aef8)(\"\"),\n     ScenarioVersion: (*string)(0x2466af00)(\"\"),\n     Simulated: (*bool)(0x24674fe0)(false),\n     Source: (*models.Source)(0x24667cc0)(ip ),\n     StartAt: (*string)(0x2466af18)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x2466af20)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.94012224 -0500 EST m=+3.194033246,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=15) \"/?foo=dG90bw===\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"ODMhQtfeseTVvwTUEdp\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=15) \"/?foo=dG90bw===\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=2) \"id\": (int) 1636202678,\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1636202678\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:02-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleTransforms/length
time="2024-12-19T07:29:02-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x246a2600}" test=length
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 outofband rules" test=length
time="2024-12-19T07:29:02-05:00" level=info msg="Loaded 0 inband rules" test=length
time="2024-12-19T07:29:02-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@ge 3\" \"id:802340010,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:length\"" test=length
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:802340010 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@ge 3\" \"id:802340010,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:length\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x246a0b60 transformations:[{Function:0x1bfdd60}] transformationsID:5 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test=length
time="2024-12-19T07:29:02-05:00" level=trace msg="Loaded outband rules: []" test=length
time="2024-12-19T07:29:02-05:00" level=debug msg="Request received in runner" request_uuid= test=length
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test=length
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=inband test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=1 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating rule" band=inband rule_id=802340010 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=802340010 test=length tx_id=xYusOTcHhszFWxLowSH variable=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=802340010 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=802340010 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=802340010 test=length tx_id=xYusOTcHhszFWxLowSH variable_name=ARGS_GET
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=log band=inband test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating action" action=t band=inband test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating operator: MATCH" arg=4 band=inband operator_data=3 operator_function=@ge rule_id=802340010 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=802340010 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Rule matched" band=inband rule_id=802340010 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=802340010 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=2 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="rules matched for body : 802340010" test=length
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=inband phase=5 test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=inband test=length tx_id=xYusOTcHhszFWxLowSH
time="2024-12-19T07:29:02-05:00" level=debug msg="inband rules matched : 802340010" test=length
time="2024-12-19T07:29:02-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test=length
time="2024-12-19T07:29:02-05:00" level=debug msg="New transaction created" band=outband test=length tx_id=xoirsLdaAQRoSUYqRzD
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test=length tx_id=xoirsLdaAQRoSUYqRzD
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=1 test=length tx_id=xoirsLdaAQRoSUYqRzD
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test=length tx_id=xoirsLdaAQRoSUYqRzD
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=2 test=length tx_id=xoirsLdaAQRoSUYqRzD
time="2024-12-19T07:29:02-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test=length tx_id=xoirsLdaAQRoSUYqRzD
time="2024-12-19T07:29:02-05:00" level=debug msg="Finished phase" band=outband phase=5 test=length tx_id=xoirsLdaAQRoSUYqRzD
time="2024-12-19T07:29:02-05:00" level=debug msg="Transaction marked for audit logging" band=outband test=length tx_id=xoirsLdaAQRoSUYqRzD
time="2024-12-19T07:29:03-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24331b80)({\n    Capacity: (*int32)(0x246cc11c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2469ede0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2469edf0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"802340010\"\n       }),\n       (*models.MetaItems0)(0x2469ee00)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:802340010\"\n       }),\n       (*models.MetaItems0)(0x2469ee10)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2469ee30)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=10) \"/?foo=toto\"\n       }),\n       (*models.MetaItems0)(0x2469ee40)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x2469ee50)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x246d00e8)((len=20) \"2024-12-19T12:29:02Z\")\n     })\n    },\n    EventsCount: (*int32)(0x246cc1bc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x246d0138)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x246d0158)((len=44) \"AppSec block: native_rule:802340010 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2469ee70)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"802340010\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469ee90)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:802340010\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469eeb0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469eee0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=14) \"[\\\"/?foo=toto\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469ef00)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469ef20)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x246d0140)((len=21) \"native_rule:802340010\"),\n    ScenarioHash: (*string)(0x246d0148)(\"\"),\n    ScenarioVersion: (*string)(0x246d0150)(\"\"),\n    Simulated: (*bool)(0x246cc1c0)(false),\n    Source: (*models.Source)(0x246a3c00)(ip ),\n    StartAt: (*string)(0x246d0168)((len=20) \"2024-12-19T12:29:02Z\"),\n    StopAt: (*string)(0x246d0170)((len=20) \"2024-12-19T12:29:02Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x246cc11c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2469ede0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2469edf0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"802340010\"\n        }),\n        (*models.MetaItems0)(0x2469ee00)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:802340010\"\n        }),\n        (*models.MetaItems0)(0x2469ee10)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2469ee30)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=10) \"/?foo=toto\"\n        }),\n        (*models.MetaItems0)(0x2469ee40)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x2469ee50)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x246d00e8)((len=20) \"2024-12-19T12:29:02Z\")\n      })\n     },\n     EventsCount: (*int32)(0x246cc1bc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x246d0138)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x246d0158)((len=44) \"AppSec block: native_rule:802340010 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2469ee70)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"802340010\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469ee90)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:802340010\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469eeb0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469eee0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=14) \"[\\\"/?foo=toto\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469ef00)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469ef20)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x246d0140)((len=21) \"native_rule:802340010\"),\n     ScenarioHash: (*string)(0x246d0148)(\"\"),\n     ScenarioVersion: (*string)(0x246d0150)(\"\"),\n     Simulated: (*bool)(0x246cc1c0)(false),\n     Source: (*models.Source)(0x246a3c00)(ip ),\n     StartAt: (*string)(0x246d0168)((len=20) \"2024-12-19T12:29:02Z\"),\n     StopAt: (*string)(0x246d0170)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:02.995303506 -0500 EST m=+3.249213915,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=10) \"/?foo=toto\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"xYusOTcHhszFWxLowSH\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=11) \"target_host\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=2) \"id\": (int) 802340010,\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:802340010\",\n     (string) (len=3) \"uri\": (string) (len=10) \"/?foo=toto\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=7) \"version\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:03-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleTransforms/urldecode
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x246d4540}" test=urldecode
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test=urldecode
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test=urldecode
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@streq BB/A\" \"id:3526372111,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:urlDecode\"" test=urldecode
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "3526372111": value out of range
=== RUN   TestAppsecRuleTransforms/trim
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x246d4840}" test=trim
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test=trim
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test=trim
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET:foo \"@streq BB/A\" \"id:1498549847,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:urlDecode,t:trim\"" test=trim
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1498549847 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_GET:foo \"@streq BB/A\" \"id:1498549847,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1',t:urlDecode,t:trim\" SecMark_:} variables:[{Count:false Variable:42 KeyRx: KeyStr:foo Exceptions:[]}] operator:0x246d2c00 transformations:[{Function:0x1bffc90} {Function:0x1bffaa0}] transformationsID:7 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0} {Name:t Function:0x20d0fe0} {Name:t Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test=trim
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded outband rules: []" test=trim
time="2024-12-19T07:29:03-05:00" level=debug msg="Request received in runner" request_uuid= test=trim
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test=trim
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=inband test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=1 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1498549847 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1498549847 test=trim tx_id=lyOcueqoRtdRLbjtTfm variable=ARGS_GET
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1498549847 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1498549847 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Matching rule" band=inband key=foo rule_id=1498549847 test=trim tx_id=lyOcueqoRtdRLbjtTfm variable_name=ARGS_GET
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=t band=inband test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=t band=inband test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: MATCH" arg=BB/A band=inband operator_data=BB/A operator_function=@streq rule_id=1498549847 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1498549847 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Rule matched" band=inband rule_id=1498549847 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1498549847 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=2 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="rules matched for body : 1498549847" test=trim
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=5 test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=inband test=trim tx_id=lyOcueqoRtdRLbjtTfm
time="2024-12-19T07:29:03-05:00" level=debug msg="inband rules matched : 1498549847" test=trim
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test=trim
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=outband test=trim tx_id=BvhizkcOFUrGkpcDsON
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test=trim tx_id=BvhizkcOFUrGkpcDsON
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=1 test=trim tx_id=BvhizkcOFUrGkpcDsON
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test=trim tx_id=BvhizkcOFUrGkpcDsON
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=2 test=trim tx_id=BvhizkcOFUrGkpcDsON
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test=trim tx_id=BvhizkcOFUrGkpcDsON
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=5 test=trim tx_id=BvhizkcOFUrGkpcDsON
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=outband test=trim tx_id=BvhizkcOFUrGkpcDsON
time="2024-12-19T07:29:03-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24331d80)({\n    Capacity: (*int32)(0x246dd50c)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2469fce0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2469fcf0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1498549847\"\n       }),\n       (*models.MetaItems0)(0x2469fd00)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1498549847\"\n       }),\n       (*models.MetaItems0)(0x2469fd10)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2469fd30)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=30) \"/?foo=%20%20%42%42%2F%41%20%20\"\n       }),\n       (*models.MetaItems0)(0x2469fd40)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"ARGS_GET.foo\"\n       }),\n       (*models.MetaItems0)(0x2469fd50)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x246d1440)((len=20) \"2024-12-19T12:29:03Z\")\n     })\n    },\n    EventsCount: (*int32)(0x246dd590)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x246d1490)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x246d14b0)((len=45) \"AppSec block: native_rule:1498549847 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2469fd70)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469fd90)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1498549847\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469fdb0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1498549847\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469fde0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469fe00)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=34) \"[\\\"/?foo=%20%20%42%42%2F%41%20%20\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469fe20)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x246d1498)((len=22) \"native_rule:1498549847\"),\n    ScenarioHash: (*string)(0x246d14a0)(\"\"),\n    ScenarioVersion: (*string)(0x246d14a8)(\"\"),\n    Simulated: (*bool)(0x246dd594)(false),\n    Source: (*models.Source)(0x24802000)(ip ),\n    StartAt: (*string)(0x246d14c0)((len=20) \"2024-12-19T12:29:03Z\"),\n    StopAt: (*string)(0x246d14c8)((len=20) \"2024-12-19T12:29:03Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x246dd50c)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2469fce0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2469fcf0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1498549847\"\n        }),\n        (*models.MetaItems0)(0x2469fd00)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1498549847\"\n        }),\n        (*models.MetaItems0)(0x2469fd10)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2469fd30)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=30) \"/?foo=%20%20%42%42%2F%41%20%20\"\n        }),\n        (*models.MetaItems0)(0x2469fd40)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"ARGS_GET.foo\"\n        }),\n        (*models.MetaItems0)(0x2469fd50)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x246d1440)((len=20) \"2024-12-19T12:29:03Z\")\n      })\n     },\n     EventsCount: (*int32)(0x246dd590)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x246d1490)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x246d14b0)((len=45) \"AppSec block: native_rule:1498549847 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2469fd70)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469fd90)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1498549847\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469fdb0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1498549847\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469fde0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469fe00)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=34) \"[\\\"/?foo=%20%20%42%42%2F%41%20%20\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469fe20)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"ARGS_GET.foo\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x246d1498)((len=22) \"native_rule:1498549847\"),\n     ScenarioHash: (*string)(0x246d14a0)(\"\"),\n     ScenarioVersion: (*string)(0x246d14a8)(\"\"),\n     Simulated: (*bool)(0x246dd594)(false),\n     Source: (*models.Source)(0x24802000)(ip ),\n     StartAt: (*string)(0x246d14c0)((len=20) \"2024-12-19T12:29:03Z\"),\n     StopAt: (*string)(0x246d14c8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:03.048446235 -0500 EST m=+3.302356585,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"lyOcueqoRtdRLbjtTfm\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=10) \"target_uri\": (string) (len=30) \"/?foo=%20%20%42%42%2F%41%20%20\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=3) \"uri\": (string) (len=30) \"/?foo=%20%20%42%42%2F%41%20%20\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1498549847\",\n     (string) (len=2) \"id\": (int) 1498549847,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"ARGS_GET.foo\"\n     },\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:03-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
--- FAIL: TestAppsecRuleTransforms (0.32s)
    --- FAIL: TestAppsecRuleTransforms/Basic_matching_rule (0.00s)
    --- PASS: TestAppsecRuleTransforms/lowercase (0.06s)
    --- PASS: TestAppsecRuleTransforms/uppercase (0.05s)
    --- PASS: TestAppsecRuleTransforms/b64decode (0.05s)
    --- PASS: TestAppsecRuleTransforms/b64decode_with_extra_padding (0.06s)
    --- PASS: TestAppsecRuleTransforms/length (0.05s)
    --- FAIL: TestAppsecRuleTransforms/urldecode (0.00s)
    --- PASS: TestAppsecRuleTransforms/trim (0.05s)
=== RUN   TestAppsecRuleZones
=== RUN   TestAppsecRuleZones/rule:_ARGS
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24700140}" test="rule: ARGS"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: ARGS"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: ARGS"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET \"@streq toto\" \"id:4095874416,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: ARGS"
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "4095874416": value out of range
=== RUN   TestAppsecRuleZones/rule:_ARGS_NAMES
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24700440}" test="rule: ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_GET_NAMES \"@streq toto\" \"id:3387504279,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: ARGS_NAMES"
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "3387504279": value out of range
=== RUN   TestAppsecRuleZones/rule:_BODY_ARGS
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24700740}" test="rule: BODY_ARGS"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: BODY_ARGS"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: BODY_ARGS"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_POST \"@streq toto\" \"id:2146189195,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: BODY_ARGS"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_POST \"@streq foobar\" \"id:2862769255,phase:2,deny,log,msg:'rule2',tag:'crowdsec-rule2'\"" test="rule: BODY_ARGS"
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "2862769255": value out of range
=== RUN   TestAppsecRuleZones/rule:_BODY_ARGS_NAMES
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x24700c00}" test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_POST_NAMES \"@streq toto\" \"id:1312125164,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule ARGS_POST_NAMES \"@streq foobar\" \"id:1585621256,phase:2,deny,log,msg:'rule2',tag:'crowdsec-rule2'\"" test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1312125164 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_POST_NAMES \"@streq toto\" \"id:1312125164,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\" SecMark_:} variables:[{Count:false Variable:62 KeyRx: KeyStr: Exceptions:[]}] operator:0x243d0da0 transformations:[] transformationsID:0 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:4 chainMinPhase:0 withPhaseUnknownVariable:false} {RuleMetadata:{ID_:1585621256 File_: Line_:2 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule2] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule ARGS_POST_NAMES \"@streq foobar\" \"id:1585621256,phase:2,deny,log,msg:'rule2',tag:'crowdsec-rule2'\" SecMark_:} variables:[{Count:false Variable:62 KeyRx: KeyStr: Exceptions:[]}] operator:0x243d0f40 transformations:[] transformationsID:0 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule2 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:4 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded outband rules: []" test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="Request received in runner" request_uuid= test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=inband test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=1 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Attempting to process request body" band=inband body_processor=urlencoded test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1312125164 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1312125164 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC variable=ARGS_POST_NAMES
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1312125164 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1312125164 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=smth band=inband operator_data=toto operator_function=@streq rule_id=1312125164 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1312125164 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1312125164 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=foobar band=inband operator_data=toto operator_function=@streq rule_id=1312125164 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1312125164 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC variable=ARGS_POST_NAMES
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Matching rule" band=inband key=foobar rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC variable_name=ARGS_POST_NAMES
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: MATCH" arg=foobar band=inband operator_data=foobar operator_function=@streq rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=smth band=inband operator_data=foobar operator_function=@streq rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Rule matched" band=inband rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1585621256 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=2 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="rules matched for body : 1585621256" test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=5 test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="rule: BODY_ARGS_NAMES" tx_id=GYtBoXOUKeZSeVfLBOC
time="2024-12-19T07:29:03-05:00" level=debug msg="inband rules matched : 1585621256" test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="rule: BODY_ARGS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=outband test="rule: BODY_ARGS_NAMES" tx_id=xWZBajjxoRZZRleNZiI
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="rule: BODY_ARGS_NAMES" tx_id=xWZBajjxoRZZRleNZiI
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=1 test="rule: BODY_ARGS_NAMES" tx_id=xWZBajjxoRZZRleNZiI
time="2024-12-19T07:29:03-05:00" level=debug msg="Attempting to process request body" band=outband body_processor=urlencoded test="rule: BODY_ARGS_NAMES" tx_id=xWZBajjxoRZZRleNZiI
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="rule: BODY_ARGS_NAMES" tx_id=xWZBajjxoRZZRleNZiI
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=2 test="rule: BODY_ARGS_NAMES" tx_id=xWZBajjxoRZZRleNZiI
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="rule: BODY_ARGS_NAMES" tx_id=xWZBajjxoRZZRleNZiI
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=5 test="rule: BODY_ARGS_NAMES" tx_id=xWZBajjxoRZZRleNZiI
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="rule: BODY_ARGS_NAMES" tx_id=xWZBajjxoRZZRleNZiI
time="2024-12-19T07:29:03-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330080)({\n    Capacity: (*int32)(0x246ddcac)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x243b3630)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x243b3640)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1585621256\"\n       }),\n       (*models.MetaItems0)(0x243b3650)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1585621256\"\n       }),\n       (*models.MetaItems0)(0x243b3660)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x243b3680)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=1) \"/\"\n       }),\n       (*models.MetaItems0)(0x243b3690)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=22) \"ARGS_POST_NAMES.foobar\"\n       }),\n       (*models.MetaItems0)(0x243b36a0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule2\"\n       })\n      },\n      Timestamp: (*string)(0x243b1de8)((len=20) \"2024-12-19T12:29:03Z\")\n     })\n    },\n    EventsCount: (*int32)(0x246ddcfc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x243b1e38)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x243b1e58)((len=45) \"AppSec block: native_rule:1585621256 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x243b36c0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1585621256\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b36e0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b3700)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=5) \"[\\\"/\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b3730)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=26) \"[\\\"ARGS_POST_NAMES.foobar\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b3750)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule2\\\"]\"\n     }),\n     (*models.MetaItems0)(0x243b3770)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1585621256\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x243b1e40)((len=22) \"native_rule:1585621256\"),\n    ScenarioHash: (*string)(0x243b1e48)(\"\"),\n    ScenarioVersion: (*string)(0x243b1e50)(\"\"),\n    Simulated: (*bool)(0x246ddd20)(false),\n    Source: (*models.Source)(0x23eb1600)(ip ),\n    StartAt: (*string)(0x243b1e68)((len=20) \"2024-12-19T12:29:03Z\"),\n    StopAt: (*string)(0x243b1e70)((len=20) \"2024-12-19T12:29:03Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x246ddcac)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x243b3630)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x243b3640)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1585621256\"\n        }),\n        (*models.MetaItems0)(0x243b3650)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1585621256\"\n        }),\n        (*models.MetaItems0)(0x243b3660)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x243b3680)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=1) \"/\"\n        }),\n        (*models.MetaItems0)(0x243b3690)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=22) \"ARGS_POST_NAMES.foobar\"\n        }),\n        (*models.MetaItems0)(0x243b36a0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule2\"\n        })\n       },\n       Timestamp: (*string)(0x243b1de8)((len=20) \"2024-12-19T12:29:03Z\")\n      })\n     },\n     EventsCount: (*int32)(0x246ddcfc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x243b1e38)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x243b1e58)((len=45) \"AppSec block: native_rule:1585621256 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x243b36c0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1585621256\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b36e0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b3700)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=5) \"[\\\"/\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b3730)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=26) \"[\\\"ARGS_POST_NAMES.foobar\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b3750)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule2\\\"]\"\n      }),\n      (*models.MetaItems0)(0x243b3770)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1585621256\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x243b1e40)((len=22) \"native_rule:1585621256\"),\n     ScenarioHash: (*string)(0x243b1e48)(\"\"),\n     ScenarioVersion: (*string)(0x243b1e50)(\"\"),\n     Simulated: (*bool)(0x246ddd20)(false),\n     Source: (*models.Source)(0x23eb1600)(ip ),\n     StartAt: (*string)(0x243b1e68)((len=20) \"2024-12-19T12:29:03Z\"),\n     StopAt: (*string)(0x243b1e70)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:03.102018832 -0500 EST m=+3.355929182,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=1) \"/\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"GYtBoXOUKeZSeVfLBOC\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=2) \"id\": (int) 1585621256,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule2\"\n     },\n     (string) (len=3) \"msg\": (string) (len=5) \"rule2\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=22) \"ARGS_POST_NAMES.foobar\"\n     },\n     (string) (len=3) \"uri\": (string) (len=1) \"/\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=9) \"file_line\": (int) 2,\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1585621256\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\",\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\"\n  }\n }\n}\n"
time="2024-12-19T07:29:03-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleZones/rule:_HEADERS
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x240fc040}" test="rule: HEADERS"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: HEADERS"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: HEADERS"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_HEADERS \"@streq toto\" \"id:3205657045,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: HEADERS"
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "3205657045": value out of range
=== RUN   TestAppsecRuleZones/rule:_HEADERS_NAMES
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x240fc340}" test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_HEADERS_NAMES \"@streq toto\" \"id:721319818,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_HEADERS_NAMES \"@streq foobar\" \"id:1178802654,phase:2,deny,log,msg:'rule2',tag:'crowdsec-rule2'\"" test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:721319818 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule REQUEST_HEADERS_NAMES \"@streq toto\" \"id:721319818,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\" SecMark_:} variables:[{Count:false Variable:40 KeyRx: KeyStr: Exceptions:[]}] operator:0x23eacbe0 transformations:[] transformationsID:0 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false} {RuleMetadata:{ID_:1178802654 File_: Line_:2 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule2] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule REQUEST_HEADERS_NAMES \"@streq foobar\" \"id:1178802654,phase:2,deny,log,msg:'rule2',tag:'crowdsec-rule2'\" SecMark_:} variables:[{Count:false Variable:40 KeyRx: KeyStr: Exceptions:[]}] operator:0x23eacd20 transformations:[] transformationsID:0 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule2 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded outband rules: []" test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="Request received in runner" request_uuid= test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=inband test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=1 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating rule" band=inband rule_id=721319818 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=721319818 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC variable=REQUEST_HEADERS_NAMES
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=721319818 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=721319818 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: NO MATCH" arg=foobar band=inband operator_data=toto operator_function=@streq rule_id=721319818 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=721319818 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1178802654 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1178802654 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC variable=REQUEST_HEADERS_NAMES
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1178802654 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1178802654 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Matching rule" band=inband key=foobar rule_id=1178802654 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC variable_name=REQUEST_HEADERS_NAMES
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: MATCH" arg=foobar band=inband operator_data=foobar operator_function=@streq rule_id=1178802654 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1178802654 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Rule matched" band=inband rule_id=1178802654 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1178802654 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=2 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="rules matched for body : 1178802654" test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=5 test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="rule: HEADERS_NAMES" tx_id=qmqOlgvezZdrkgbuytC
time="2024-12-19T07:29:03-05:00" level=debug msg="inband rules matched : 1178802654" test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="rule: HEADERS_NAMES"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=outband test="rule: HEADERS_NAMES" tx_id=ZoWXzPWJgRJAPpYQcft
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="rule: HEADERS_NAMES" tx_id=ZoWXzPWJgRJAPpYQcft
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=1 test="rule: HEADERS_NAMES" tx_id=ZoWXzPWJgRJAPpYQcft
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="rule: HEADERS_NAMES" tx_id=ZoWXzPWJgRJAPpYQcft
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=2 test="rule: HEADERS_NAMES" tx_id=ZoWXzPWJgRJAPpYQcft
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="rule: HEADERS_NAMES" tx_id=ZoWXzPWJgRJAPpYQcft
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=5 test="rule: HEADERS_NAMES" tx_id=ZoWXzPWJgRJAPpYQcft
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="rule: HEADERS_NAMES" tx_id=ZoWXzPWJgRJAPpYQcft
time="2024-12-19T07:29:03-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330300)({\n    Capacity: (*int32)(0x240d3388)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x2469ebc0)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x2469ebd0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1178802654\"\n       }),\n       (*models.MetaItems0)(0x2469ebe0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1178802654\"\n       }),\n       (*models.MetaItems0)(0x2469ebf0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x2469ec10)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=1) \"/\"\n       }),\n       (*models.MetaItems0)(0x2469ec20)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=28) \"REQUEST_HEADERS_NAMES.foobar\"\n       }),\n       (*models.MetaItems0)(0x2469ec30)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule2\"\n       })\n      },\n      Timestamp: (*string)(0x23e96140)((len=20) \"2024-12-19T12:29:03Z\")\n     })\n    },\n    EventsCount: (*int32)(0x240d33fc)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23e96190)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23e961b0)((len=45) \"AppSec block: native_rule:1178802654 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x2469ec50)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1178802654\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469ec70)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1178802654\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469ec90)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469ecc0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=5) \"[\\\"/\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469ece0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=32) \"[\\\"REQUEST_HEADERS_NAMES.foobar\\\"]\"\n     }),\n     (*models.MetaItems0)(0x2469ed00)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule2\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23e96198)((len=22) \"native_rule:1178802654\"),\n    ScenarioHash: (*string)(0x23e961a0)(\"\"),\n    ScenarioVersion: (*string)(0x23e961a8)(\"\"),\n    Simulated: (*bool)(0x240d3400)(false),\n    Source: (*models.Source)(0x2479c940)(ip ),\n    StartAt: (*string)(0x23e961c0)((len=20) \"2024-12-19T12:29:03Z\"),\n    StopAt: (*string)(0x23e961c8)((len=20) \"2024-12-19T12:29:03Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x240d3388)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x2469ebc0)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x2469ebd0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1178802654\"\n        }),\n        (*models.MetaItems0)(0x2469ebe0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1178802654\"\n        }),\n        (*models.MetaItems0)(0x2469ebf0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x2469ec10)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=1) \"/\"\n        }),\n        (*models.MetaItems0)(0x2469ec20)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=28) \"REQUEST_HEADERS_NAMES.foobar\"\n        }),\n        (*models.MetaItems0)(0x2469ec30)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule2\"\n        })\n       },\n       Timestamp: (*string)(0x23e96140)((len=20) \"2024-12-19T12:29:03Z\")\n      })\n     },\n     EventsCount: (*int32)(0x240d33fc)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23e96190)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23e961b0)((len=45) \"AppSec block: native_rule:1178802654 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x2469ec50)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1178802654\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469ec70)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1178802654\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469ec90)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469ecc0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=5) \"[\\\"/\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469ece0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=32) \"[\\\"REQUEST_HEADERS_NAMES.foobar\\\"]\"\n      }),\n      (*models.MetaItems0)(0x2469ed00)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule2\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23e96198)((len=22) \"native_rule:1178802654\"),\n     ScenarioHash: (*string)(0x23e961a0)(\"\"),\n     ScenarioVersion: (*string)(0x23e961a8)(\"\"),\n     Simulated: (*bool)(0x240d3400)(false),\n     Source: (*models.Source)(0x2479c940)(ip ),\n     StartAt: (*string)(0x23e961c0)((len=20) \"2024-12-19T12:29:03Z\"),\n     StopAt: (*string)(0x23e961c8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:03.157894193 -0500 EST m=+3.411804483,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=1) \"/\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"qmqOlgvezZdrkgbuytC\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=2) \"id\": (int) 1178802654,\n     (string) (len=3) \"uri\": (string) (len=1) \"/\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 2,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule2\"\n     },\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=28) \"REQUEST_HEADERS_NAMES.foobar\"\n     },\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1178802654\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"msg\": (string) (len=5) \"rule2\",\n     (string) (len=4) \"hash\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:03-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleZones/rule:_METHOD
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x2479d180}" test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_METHOD \"@streq GET\" \"id:1327822710,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1327822710 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule REQUEST_METHOD \"@streq GET\" \"id:1327822710,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\" SecMark_:} variables:[{Count:false Variable:25 KeyRx: KeyStr: Exceptions:[]}] operator:0x24100f80 transformations:[] transformationsID:0 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded outband rules: []" test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=debug msg="Request received in runner" request_uuid= test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=inband test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=1 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1327822710 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1327822710 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU variable=REQUEST_METHOD
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1327822710 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1327822710 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Matching rule" band=inband key= rule_id=1327822710 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU variable_name=REQUEST_METHOD
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: MATCH" arg=GET band=inband operator_data=GET operator_function=@streq rule_id=1327822710 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1327822710 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Rule matched" band=inband rule_id=1327822710 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1327822710 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=2 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="rules matched for body : 1327822710" test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=5 test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="rule: METHOD" tx_id=KRnCbAgSBOxdYFbsTeU
time="2024-12-19T07:29:03-05:00" level=debug msg="inband rules matched : 1327822710" test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="rule: METHOD"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=outband test="rule: METHOD" tx_id=BmfpzmsXSSmwGwhNIuH
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="rule: METHOD" tx_id=BmfpzmsXSSmwGwhNIuH
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=1 test="rule: METHOD" tx_id=BmfpzmsXSSmwGwhNIuH
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="rule: METHOD" tx_id=BmfpzmsXSSmwGwhNIuH
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=2 test="rule: METHOD" tx_id=BmfpzmsXSSmwGwhNIuH
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="rule: METHOD" tx_id=BmfpzmsXSSmwGwhNIuH
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=5 test="rule: METHOD" tx_id=BmfpzmsXSSmwGwhNIuH
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="rule: METHOD" tx_id=BmfpzmsXSSmwGwhNIuH
time="2024-12-19T07:29:03-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330680)({\n    Capacity: (*int32)(0x22b1a0c8)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23ea8a90)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23ea8aa0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1327822710\"\n       }),\n       (*models.MetaItems0)(0x23ea8ab0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1327822710\"\n       }),\n       (*models.MetaItems0)(0x23ea8ac0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23ea8ae0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=1) \"/\"\n       }),\n       (*models.MetaItems0)(0x23ea8af0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=14) \"REQUEST_METHOD\"\n       }),\n       (*models.MetaItems0)(0x23ea8b00)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x23e974d0)((len=20) \"2024-12-19T12:29:03Z\")\n     })\n    },\n    EventsCount: (*int32)(0x22b1a14c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x23e97520)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x23e97540)((len=45) \"AppSec block: native_rule:1327822710 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23ea8b20)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1327822710\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea8b40)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1327822710\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea8b60)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea8b90)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=5) \"[\\\"/\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea8bb0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=18) \"[\\\"REQUEST_METHOD\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea8bd0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x23e97528)((len=22) \"native_rule:1327822710\"),\n    ScenarioHash: (*string)(0x23e97530)(\"\"),\n    ScenarioVersion: (*string)(0x23e97538)(\"\"),\n    Simulated: (*bool)(0x22b1a150)(false),\n    Source: (*models.Source)(0x22a97600)(ip ),\n    StartAt: (*string)(0x23e97550)((len=20) \"2024-12-19T12:29:03Z\"),\n    StopAt: (*string)(0x23e97558)((len=20) \"2024-12-19T12:29:03Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x22b1a0c8)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23ea8a90)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23ea8aa0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1327822710\"\n        }),\n        (*models.MetaItems0)(0x23ea8ab0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1327822710\"\n        }),\n        (*models.MetaItems0)(0x23ea8ac0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23ea8ae0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=1) \"/\"\n        }),\n        (*models.MetaItems0)(0x23ea8af0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=14) \"REQUEST_METHOD\"\n        }),\n        (*models.MetaItems0)(0x23ea8b00)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x23e974d0)((len=20) \"2024-12-19T12:29:03Z\")\n      })\n     },\n     EventsCount: (*int32)(0x22b1a14c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x23e97520)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x23e97540)((len=45) \"AppSec block: native_rule:1327822710 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23ea8b20)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1327822710\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea8b40)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1327822710\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea8b60)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea8b90)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=5) \"[\\\"/\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea8bb0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=18) \"[\\\"REQUEST_METHOD\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea8bd0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x23e97528)((len=22) \"native_rule:1327822710\"),\n     ScenarioHash: (*string)(0x23e97530)(\"\"),\n     ScenarioVersion: (*string)(0x23e97538)(\"\"),\n     Simulated: (*bool)(0x22b1a150)(false),\n     Source: (*models.Source)(0x22a97600)(ip ),\n     StartAt: (*string)(0x23e97550)((len=20) \"2024-12-19T12:29:03Z\"),\n     StopAt: (*string)(0x23e97558)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:03.209811631 -0500 EST m=+3.463721981,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=10) \"target_uri\": (string) (len=1) \"/\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"KRnCbAgSBOxdYFbsTeU\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"REQUEST_METHOD\"\n     },\n     (string) (len=3) \"uri\": (string) (len=1) \"/\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1327822710\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=2) \"id\": (int) 1327822710,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:03-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleZones/rule:_PROTOCOL
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x228cea40}" test="rule: PROTOCOL"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: PROTOCOL"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: PROTOCOL"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_PROTOCOL \"@contains 3.1\" \"id:4150911847,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: PROTOCOL"
    appsec_test.go:94: unable to initialize runner : unable to initialize inband engine : invalid WAF config from string: failed to compile the directive "secrule": failed to init action id: strconv.Atoi: parsing "4150911847": value out of range
=== RUN   TestAppsecRuleZones/rule:_URI
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x228cef40}" test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_FILENAME \"@streq /foobar\" \"id:619524779,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:619524779 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule REQUEST_FILENAME \"@streq /foobar\" \"id:619524779,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\" SecMark_:} variables:[{Count:false Variable:23 KeyRx: KeyStr: Exceptions:[]}] operator:0x247957c0 transformations:[] transformationsID:0 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded outband rules: []" test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=debug msg="Request received in runner" request_uuid= test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=inband test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=1 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating rule" band=inband rule_id=619524779 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=619524779 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL variable=REQUEST_FILENAME
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=619524779 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=619524779 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Matching rule" band=inband key= rule_id=619524779 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL variable_name=REQUEST_FILENAME
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: MATCH" arg=/foobar band=inband operator_data=/foobar operator_function=@streq rule_id=619524779 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=619524779 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Rule matched" band=inband rule_id=619524779 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=619524779 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=2 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="rules matched for body : 619524779" test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=5 test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="rule: URI" tx_id=ipZnCMUgnUZMUsgQmXL
time="2024-12-19T07:29:03-05:00" level=debug msg="inband rules matched : 619524779" test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="rule: URI"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=outband test="rule: URI" tx_id=xBwzhRmucszVFdcopej
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="rule: URI" tx_id=xBwzhRmucszVFdcopej
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=1 test="rule: URI" tx_id=xBwzhRmucszVFdcopej
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="rule: URI" tx_id=xBwzhRmucszVFdcopej
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=2 test="rule: URI" tx_id=xBwzhRmucszVFdcopej
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="rule: URI" tx_id=xBwzhRmucszVFdcopej
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=5 test="rule: URI" tx_id=xBwzhRmucszVFdcopej
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="rule: URI" tx_id=xBwzhRmucszVFdcopej
time="2024-12-19T07:29:03-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330900)({\n    Capacity: (*int32)(0x22814130)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x23ea9940)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x23ea9950)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"619524779\"\n       }),\n       (*models.MetaItems0)(0x23ea9960)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:619524779\"\n       }),\n       (*models.MetaItems0)(0x23ea9970)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x23ea9990)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=7) \"/foobar\"\n       }),\n       (*models.MetaItems0)(0x23ea99a0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=16) \"REQUEST_FILENAME\"\n       }),\n       (*models.MetaItems0)(0x23ea99b0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x240c6b70)((len=20) \"2024-12-19T12:29:03Z\")\n     })\n    },\n    EventsCount: (*int32)(0x2281418c)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x240c6bc0)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x240c6be0)((len=44) \"AppSec block: native_rule:619524779 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x23ea99d0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:619524779\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea99f0)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea9a10)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=11) \"[\\\"/foobar\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea9a40)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=20) \"[\\\"REQUEST_FILENAME\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea9a60)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x23ea9a80)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"619524779\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x240c6bc8)((len=21) \"native_rule:619524779\"),\n    ScenarioHash: (*string)(0x240c6bd0)(\"\"),\n    ScenarioVersion: (*string)(0x240c6bd8)(\"\"),\n    Simulated: (*bool)(0x228141b0)(false),\n    Source: (*models.Source)(0x22a28900)(ip ),\n    StartAt: (*string)(0x240c6bf0)((len=20) \"2024-12-19T12:29:03Z\"),\n    StopAt: (*string)(0x240c6bf8)((len=20) \"2024-12-19T12:29:03Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x22814130)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x23ea9940)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x23ea9950)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"619524779\"\n        }),\n        (*models.MetaItems0)(0x23ea9960)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:619524779\"\n        }),\n        (*models.MetaItems0)(0x23ea9970)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x23ea9990)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=7) \"/foobar\"\n        }),\n        (*models.MetaItems0)(0x23ea99a0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=16) \"REQUEST_FILENAME\"\n        }),\n        (*models.MetaItems0)(0x23ea99b0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x240c6b70)((len=20) \"2024-12-19T12:29:03Z\")\n      })\n     },\n     EventsCount: (*int32)(0x2281418c)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x240c6bc0)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x240c6be0)((len=44) \"AppSec block: native_rule:619524779 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x23ea99d0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:619524779\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea99f0)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea9a10)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=11) \"[\\\"/foobar\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea9a40)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=20) \"[\\\"REQUEST_FILENAME\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea9a60)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x23ea9a80)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"619524779\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x240c6bc8)((len=21) \"native_rule:619524779\"),\n     ScenarioHash: (*string)(0x240c6bd0)(\"\"),\n     ScenarioVersion: (*string)(0x240c6bd8)(\"\"),\n     Simulated: (*bool)(0x228141b0)(false),\n     Source: (*models.Source)(0x22a28900)(ip ),\n     StartAt: (*string)(0x240c6bf0)((len=20) \"2024-12-19T12:29:03Z\"),\n     StopAt: (*string)(0x240c6bf8)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:03.263132459 -0500 EST m=+3.517042987,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=7) \"/foobar\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"ipZnCMUgnUZMUsgQmXL\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=3) \"uri\": (string) (len=7) \"/foobar\",\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:619524779\",\n     (string) (len=2) \"id\": (int) 619524779,\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=16) \"REQUEST_FILENAME\"\n     },\n     (string) (len=8) \"revision\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:03-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleZones/rule:_URI_FULL
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22a292c0}" test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_URI \"@streq /foobar?a=b\" \"id:1786703516,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:1786703516 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule REQUEST_URI \"@streq /foobar?a=b\" \"id:1786703516,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\" SecMark_:} variables:[{Count:false Variable:27 KeyRx: KeyStr: Exceptions:[]}] operator:0x22aeb460 transformations:[] transformationsID:0 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:6 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded outband rules: []" test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=debug msg="Request received in runner" request_uuid= test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=inband test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=1 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating rule" band=inband rule_id=1786703516 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=1786703516 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM variable=REQUEST_URI
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=1786703516 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=1786703516 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Matching rule" band=inband key= rule_id=1786703516 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM variable_name=REQUEST_URI
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: MATCH" arg="/foobar?a=b" band=inband operator_data="/foobar?a=b" operator_function=@streq rule_id=1786703516 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=1786703516 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Rule matched" band=inband rule_id=1786703516 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=1786703516 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=2 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="rules matched for body : 1786703516" test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=5 test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="rule: URI_FULL" tx_id=yVBAMsGrlVqTXeSWmFM
time="2024-12-19T07:29:03-05:00" level=debug msg="inband rules matched : 1786703516" test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="rule: URI_FULL"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=outband test="rule: URI_FULL" tx_id=anDXjBweMNmaeBQhXIs
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="rule: URI_FULL" tx_id=anDXjBweMNmaeBQhXIs
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=1 test="rule: URI_FULL" tx_id=anDXjBweMNmaeBQhXIs
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="rule: URI_FULL" tx_id=anDXjBweMNmaeBQhXIs
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=2 test="rule: URI_FULL" tx_id=anDXjBweMNmaeBQhXIs
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="rule: URI_FULL" tx_id=anDXjBweMNmaeBQhXIs
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=5 test="rule: URI_FULL" tx_id=anDXjBweMNmaeBQhXIs
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="rule: URI_FULL" tx_id=anDXjBweMNmaeBQhXIs
time="2024-12-19T07:29:03-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330b80)({\n    Capacity: (*int32)(0x23cfddf8)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x240ca890)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x240ca8a0)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=10) \"1786703516\"\n       }),\n       (*models.MetaItems0)(0x240ca8b0)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=22) \"native_rule:1786703516\"\n       }),\n       (*models.MetaItems0)(0x240ca8c0)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x240ca8e0)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=11) \"/foobar?a=b\"\n       }),\n       (*models.MetaItems0)(0x240ca8f0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=11) \"REQUEST_URI\"\n       }),\n       (*models.MetaItems0)(0x240ca900)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x24796328)((len=20) \"2024-12-19T12:29:03Z\")\n     })\n    },\n    EventsCount: (*int32)(0x23cfdeac)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x24796378)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x24796398)((len=45) \"AppSec block: native_rule:1786703516 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x240ca920)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=14) \"[\\\"1786703516\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240ca9a0)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=26) \"[\\\"native_rule:1786703516\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240caa00)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240caa50)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=15) \"[\\\"/foobar?a=b\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240caa90)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=15) \"[\\\"REQUEST_URI\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240caac0)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x24796380)((len=22) \"native_rule:1786703516\"),\n    ScenarioHash: (*string)(0x24796388)(\"\"),\n    ScenarioVersion: (*string)(0x24796390)(\"\"),\n    Simulated: (*bool)(0x23cfdeb0)(false),\n    Source: (*models.Source)(0x22a2ef40)(ip ),\n    StartAt: (*string)(0x247963a8)((len=20) \"2024-12-19T12:29:03Z\"),\n    StopAt: (*string)(0x247963b0)((len=20) \"2024-12-19T12:29:03Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x23cfddf8)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x240ca890)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x240ca8a0)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=10) \"1786703516\"\n        }),\n        (*models.MetaItems0)(0x240ca8b0)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=22) \"native_rule:1786703516\"\n        }),\n        (*models.MetaItems0)(0x240ca8c0)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x240ca8e0)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=11) \"/foobar?a=b\"\n        }),\n        (*models.MetaItems0)(0x240ca8f0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=11) \"REQUEST_URI\"\n        }),\n        (*models.MetaItems0)(0x240ca900)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x24796328)((len=20) \"2024-12-19T12:29:03Z\")\n      })\n     },\n     EventsCount: (*int32)(0x23cfdeac)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x24796378)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x24796398)((len=45) \"AppSec block: native_rule:1786703516 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x240ca920)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=14) \"[\\\"1786703516\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240ca9a0)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=26) \"[\\\"native_rule:1786703516\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240caa00)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240caa50)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=15) \"[\\\"/foobar?a=b\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240caa90)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=15) \"[\\\"REQUEST_URI\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240caac0)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x24796380)((len=22) \"native_rule:1786703516\"),\n     ScenarioHash: (*string)(0x24796388)(\"\"),\n     ScenarioVersion: (*string)(0x24796390)(\"\"),\n     Simulated: (*bool)(0x23cfdeb0)(false),\n     Source: (*models.Source)(0x22a2ef40)(ip ),\n     StartAt: (*string)(0x247963a8)((len=20) \"2024-12-19T12:29:03Z\"),\n     StopAt: (*string)(0x247963b0)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:03.318582898 -0500 EST m=+3.572493308,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"yVBAMsGrlVqTXeSWmFM\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\",\n   (string) (len=10) \"target_uri\": (string) (len=11) \"/foobar?a=b\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=22) \"native_rule:1786703516\",\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=7) \"version\": (string) \"\",\n     (string) (len=3) \"uri\": (string) (len=11) \"/foobar?a=b\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=11) \"REQUEST_URI\"\n     },\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=2) \"id\": (int) 1786703516\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:03-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
=== RUN   TestAppsecRuleZones/rule:_RAW_BODY
time="2024-12-19T07:29:03-05:00" level=trace msg="Loading config &{Name: OutOfBandRules:[] InBandRules:[] DefaultRemediation:ban DefaultPassAction:allow BouncerBlockedHTTPCode:403 BouncerPassedHTTPCode:200 UserBlockedHTTPCode:403 UserPassedHTTPCode:200 OnLoad:[] PreEval:[] PostEval:[] OnMatch:[] VariablesTracking:[] InbandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} OutOfBandOptions:{DisableBodyInspection:false RequestBodyInMemoryLimit:} LogLevel: Logger:0x22a2f900}" test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 outofband rules" test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=info msg="Loaded 0 inband rules" test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=debug msg="Parsing directive" band=inband line="SecRule REQUEST_BODY \"@streq foobar=42421\" \"id:340391671,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\"" test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded inband rules: [{RuleMetadata:{ID_:340391671 File_: Line_:1 Rev_: Severity_:emergency Version_: Tags_:[crowdsec-rule1] Maturity_:0 Accuracy_:0 Operator_: Phase_:2 Raw_:SecRule REQUEST_BODY \"@streq foobar=42421\" \"id:340391671,phase:2,deny,log,msg:'rule1',tag:'crowdsec-rule1'\" SecMark_:} variables:[{Count:false Variable:21 KeyRx: KeyStr: Exceptions:[]}] operator:0x234b6780 transformations:[] transformationsID:0 actions:[{Name:log Function:0x20d0fe0} {Name:auditlog Function:0x20d0fe0} {Name:deny Function:0x20d0fe0} {Name:log Function:0x20d0fe0}] ParentID_:0 Capture:false Chain: DisruptiveStatus:0 Msg:rule1 LogData: Log:true Audit:true MultiMatch:false HasChain:false inferredPhases:4 chainMinPhase:0 withPhaseUnknownVariable:false}]" test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=trace msg="Loaded outband rules: []" test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=debug msg="Request received in runner" request_uuid= test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=inband test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=inband test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=1 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=1 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Attempting to process request body" band=inband body_processor=urlencoded test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=2 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating rule" band=inband rule_id=340391671 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Expanding arguments for rule" band=inband rule_id=340391671 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH variable=REQUEST_BODY
time="2024-12-19T07:29:03-05:00" level=debug msg="Transforming argument for rule" band=inband rule_id=340391671 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Arguments transformed for rule" band=inband rule_id=340391671 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Matching rule" band=inband key= rule_id=340391671 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH variable_name=REQUEST_BODY
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=auditlog band=inband test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating action" action=log band=inband test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating operator: MATCH" arg="foobar=42421" band=inband operator_data="foobar=42421" operator_function=@streq rule_id=340391671 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Executing disruptive action for rule" action=deny band=inband rule_id=340391671 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Rule matched" band=inband rule_id=340391671 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Finish evaluating rule" band=inband rule_id=340391671 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=2 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="rules matched for body : 340391671" test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=inband phase=5 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=inband phase=5 test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=inband test="rule: RAW_BODY" tx_id=uEAUSuPTFhlwaqABWWH
time="2024-12-19T07:29:03-05:00" level=debug msg="inband rules matched : 340391671" test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=warning msg="Empty ID passed for new transaction" band=outband test="rule: RAW_BODY"
time="2024-12-19T07:29:03-05:00" level=debug msg="New transaction created" band=outband test="rule: RAW_BODY" tx_id=EmrTiAfQJFtYQlLFlFe
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=1 test="rule: RAW_BODY" tx_id=EmrTiAfQJFtYQlLFlFe
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=1 test="rule: RAW_BODY" tx_id=EmrTiAfQJFtYQlLFlFe
time="2024-12-19T07:29:03-05:00" level=debug msg="Attempting to process request body" band=outband body_processor=urlencoded test="rule: RAW_BODY" tx_id=EmrTiAfQJFtYQlLFlFe
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=2 test="rule: RAW_BODY" tx_id=EmrTiAfQJFtYQlLFlFe
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=2 test="rule: RAW_BODY" tx_id=EmrTiAfQJFtYQlLFlFe
time="2024-12-19T07:29:03-05:00" level=debug msg="Evaluating phase" band=outband phase=5 test="rule: RAW_BODY" tx_id=EmrTiAfQJFtYQlLFlFe
time="2024-12-19T07:29:03-05:00" level=debug msg="Finished phase" band=outband phase=5 test="rule: RAW_BODY" tx_id=EmrTiAfQJFtYQlLFlFe
time="2024-12-19T07:29:03-05:00" level=debug msg="Transaction marked for audit logging" band=outband test="rule: RAW_BODY" tx_id=EmrTiAfQJFtYQlLFlFe
time="2024-12-19T07:29:03-05:00" level=info msg="events : ([]types.Event) (len=2 cap=2) {\n (types.Event) {\n  Type: (int) 2,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) \"\",\n  Line: (types.Line) {\n   Raw: (string) \"\",\n   Src: (string) \"\",\n   Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n   Labels: (map[string]string) ,\n   Process: (bool) false,\n   Module: (string) \"\"\n  },\n  Parsed: (map[string]string) ,\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) (len=1) {\n    (string) \"\": (models.Source) ip \n   },\n   Alert: (*models.Alert)(0x24330e80)({\n    Capacity: (*int32)(0x234c6b28)(1),\n    CreatedAt: (string) \"\",\n    Decisions: ([]*models.Decision) ,\n    Events: ([]*models.Event) (len=1 cap=2) {\n     (*models.Event)(0x240cbb40)({\n      Meta: (models.Meta) (len=6 cap=8) {\n       (*models.MetaItems0)(0x240cbb50)({\n        Key: (string) (len=2) \"id\",\n        Value: (string) (len=9) \"340391671\"\n       }),\n       (*models.MetaItems0)(0x240cbb60)({\n        Key: (string) (len=4) \"name\",\n        Value: (string) (len=21) \"native_rule:340391671\"\n       }),\n       (*models.MetaItems0)(0x240cbb70)({\n        Key: (string) (len=6) \"method\",\n        Value: (string) (len=3) \"GET\"\n       }),\n       (*models.MetaItems0)(0x240cbb90)({\n        Key: (string) (len=3) \"uri\",\n        Value: (string) (len=1) \"/\"\n       }),\n       (*models.MetaItems0)(0x240cbba0)({\n        Key: (string) (len=13) \"matched_zones\",\n        Value: (string) (len=12) \"REQUEST_BODY\"\n       }),\n       (*models.MetaItems0)(0x240cbbb0)({\n        Key: (string) (len=3) \"msg\",\n        Value: (string) (len=5) \"rule1\"\n       })\n      },\n      Timestamp: (*string)(0x24797588)((len=20) \"2024-12-19T12:29:03Z\")\n     })\n    },\n    EventsCount: (*int32)(0x234c6bd0)(1),\n    ID: (int64) 0,\n    Labels: ([]string) ,\n    Leakspeed: (*string)(0x247975d8)(\"\"),\n    MachineID: (string) \"\",\n    Message: (*string)(0x247975f8)((len=44) \"AppSec block: native_rule:340391671 from  ()\"),\n    Meta: (models.Meta) (len=6 cap=8) {\n     (*models.MetaItems0)(0x240cbbd0)({\n      Key: (string) (len=3) \"uri\",\n      Value: (string) (len=5) \"[\\\"/\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240cbbf0)({\n      Key: (string) (len=13) \"matched_zones\",\n      Value: (string) (len=16) \"[\\\"REQUEST_BODY\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240cbc10)({\n      Key: (string) (len=3) \"msg\",\n      Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240cbc40)({\n      Key: (string) (len=2) \"id\",\n      Value: (string) (len=13) \"[\\\"340391671\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240cbc60)({\n      Key: (string) (len=4) \"name\",\n      Value: (string) (len=25) \"[\\\"native_rule:340391671\\\"]\"\n     }),\n     (*models.MetaItems0)(0x240cbc80)({\n      Key: (string) (len=6) \"method\",\n      Value: (string) (len=7) \"[\\\"GET\\\"]\"\n     })\n    },\n    Remediation: (bool) false,\n    Scenario: (*string)(0x247975e0)((len=21) \"native_rule:340391671\"),\n    ScenarioHash: (*string)(0x247975e8)(\"\"),\n    ScenarioVersion: (*string)(0x247975f0)(\"\"),\n    Simulated: (*bool)(0x234c6bd4)(false),\n    Source: (*models.Source)(0x22a35840)(ip ),\n    StartAt: (*string)(0x24797608)((len=20) \"2024-12-19T12:29:03Z\"),\n    StopAt: (*string)(0x24797610)((len=20) \"2024-12-19T12:29:03Z\"),\n    UUID: (string) \"\"\n   }),\n   APIAlerts: ([]models.Alert) (len=1 cap=1) {\n    (models.Alert) {\n     Capacity: (*int32)(0x234c6b28)(1),\n     CreatedAt: (string) \"\",\n     Decisions: ([]*models.Decision) ,\n     Events: ([]*models.Event) (len=1 cap=2) {\n      (*models.Event)(0x240cbb40)({\n       Meta: (models.Meta) (len=6 cap=8) {\n        (*models.MetaItems0)(0x240cbb50)({\n         Key: (string) (len=2) \"id\",\n         Value: (string) (len=9) \"340391671\"\n        }),\n        (*models.MetaItems0)(0x240cbb60)({\n         Key: (string) (len=4) \"name\",\n         Value: (string) (len=21) \"native_rule:340391671\"\n        }),\n        (*models.MetaItems0)(0x240cbb70)({\n         Key: (string) (len=6) \"method\",\n         Value: (string) (len=3) \"GET\"\n        }),\n        (*models.MetaItems0)(0x240cbb90)({\n         Key: (string) (len=3) \"uri\",\n         Value: (string) (len=1) \"/\"\n        }),\n        (*models.MetaItems0)(0x240cbba0)({\n         Key: (string) (len=13) \"matched_zones\",\n         Value: (string) (len=12) \"REQUEST_BODY\"\n        }),\n        (*models.MetaItems0)(0x240cbbb0)({\n         Key: (string) (len=3) \"msg\",\n         Value: (string) (len=5) \"rule1\"\n        })\n       },\n       Timestamp: (*string)(0x24797588)((len=20) \"2024-12-19T12:29:03Z\")\n      })\n     },\n     EventsCount: (*int32)(0x234c6bd0)(1),\n     ID: (int64) 0,\n     Labels: ([]string) ,\n     Leakspeed: (*string)(0x247975d8)(\"\"),\n     MachineID: (string) \"\",\n     Message: (*string)(0x247975f8)((len=44) \"AppSec block: native_rule:340391671 from  ()\"),\n     Meta: (models.Meta) (len=6 cap=8) {\n      (*models.MetaItems0)(0x240cbbd0)({\n       Key: (string) (len=3) \"uri\",\n       Value: (string) (len=5) \"[\\\"/\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240cbbf0)({\n       Key: (string) (len=13) \"matched_zones\",\n       Value: (string) (len=16) \"[\\\"REQUEST_BODY\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240cbc10)({\n       Key: (string) (len=3) \"msg\",\n       Value: (string) (len=9) \"[\\\"rule1\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240cbc40)({\n       Key: (string) (len=2) \"id\",\n       Value: (string) (len=13) \"[\\\"340391671\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240cbc60)({\n       Key: (string) (len=4) \"name\",\n       Value: (string) (len=25) \"[\\\"native_rule:340391671\\\"]\"\n      }),\n      (*models.MetaItems0)(0x240cbc80)({\n       Key: (string) (len=6) \"method\",\n       Value: (string) (len=7) \"[\\\"GET\\\"]\"\n      })\n     },\n     Remediation: (bool) false,\n     Scenario: (*string)(0x247975e0)((len=21) \"native_rule:340391671\"),\n     ScenarioHash: (*string)(0x247975e8)(\"\"),\n     ScenarioVersion: (*string)(0x247975f0)(\"\"),\n     Simulated: (*bool)(0x234c6bd4)(false),\n     Source: (*models.Source)(0x22a35840)(ip ),\n     StartAt: (*string)(0x24797608)((len=20) \"2024-12-19T12:29:03Z\"),\n     StopAt: (*string)(0x24797610)(),\n     UUID: (string) \"\"\n    }\n   }\n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) false,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) ,\n   Vars: (map[string]string) \n  },\n  Meta: (map[string]string) \n },\n (types.Event) {\n  Type: (int) 0,\n  ExpectMode: (int) 0,\n  Whitelisted: (bool) false,\n  WhitelistReason: (string) \"\",\n  Stage: (string) (len=7) \"s00-raw\",\n  Line: (types.Line) {\n   Raw: (string) (len=17) \"dummy-appsec-data\",\n   Src: (string) (len=6) \"appsec\",\n   Time: (time.Time) 2024-12-19 07:29:03.374112433 -0500 EST m=+3.628022843,\n   Labels: (map[string]string) (len=1) {\n    (string) (len=3) \"foo\": (string) (len=3) \"bar\"\n   },\n   Process: (bool) true,\n   Module: (string) (len=6) \"appsec\"\n  },\n  Parsed: (map[string]string) (len=9) {\n   (string) (len=6) \"method\": (string) (len=3) \"GET\",\n   (string) (len=11) \"target_host\": (string) \"\",\n   (string) (len=9) \"source_ip\": (string) \"\",\n   (string) (len=10) \"target_uri\": (string) (len=1) \"/\",\n   (string) (len=8) \"req_uuid\": (string) (len=19) \"uEAUSuPTFhlwaqABWWH\",\n   (string) (len=19) \"remediation_cmpt_ip\": (string) \"\",\n   (string) (len=18) \"inband_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"inband_action\": (string) (len=4) \"deny\",\n   (string) (len=6) \"source\": (string) (len=15) \"crowdsec-appsec\"\n  },\n  Enriched: (map[string]string) ,\n  Unmarshaled: (map[string]interface {}) ,\n  Overflow: (types.RuntimeAlert) {\n   Mapkey: (string) \"\",\n   BucketId: (string) \"\",\n   Whitelisted: (bool) false,\n   Reprocess: (bool) false,\n   Sources: (map[string]models.Source) ,\n   Alert: (*models.Alert)(),\n   APIAlerts: ([]models.Alert) \n  },\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  StrTime: (string) \"\",\n  StrTimeFormat: (string) \"\",\n  MarshaledTime: (string) \"\",\n  Process: (bool) true,\n  Appsec: (types.AppsecEvent) {\n   HasInBandMatches: (bool) true,\n   HasOutBandMatches: (bool) false,\n   MatchedRules: (types.MatchedRules) (len=1 cap=2) {\n    (map[string]interface {}) (len=17) {\n     (string) (len=3) \"uri\": (string) (len=1) \"/\",\n     (string) (len=10) \"disruptive\": (bool) true,\n     (string) (len=3) \"msg\": (string) (len=5) \"rule1\",\n     (string) (len=13) \"matched_zones\": ([]string) (len=1 cap=1) {\n      (string) (len=12) \"REQUEST_BODY\"\n     },\n     (string) (len=4) \"hash\": (string) \"\",\n     (string) (len=4) \"tags\": ([]string) (len=1 cap=1) {\n      (string) (len=14) \"crowdsec-rule1\"\n     },\n     (string) (len=9) \"file_line\": (int) 1,\n     (string) (len=7) \"secmark\": (string) \"\",\n     (string) (len=8) \"accuracy\": (int) 0,\n     (string) (len=8) \"severity\": (string) (len=9) \"emergency\",\n     (string) (len=4) \"name\": (string) (len=21) \"native_rule:340391671\",\n     (string) (len=2) \"id\": (int) 340391671,\n     (string) (len=9) \"rule_type\": (string) (len=6) \"inband\",\n     (string) (len=6) \"method\": (string) (len=3) \"GET\",\n     (string) (len=4) \"file\": (string) \"\",\n     (string) (len=8) \"revision\": (string) \"\",\n     (string) (len=7) \"version\": (string) \"\"\n    }\n   },\n   Vars: (map[string]string) {\n   }\n  },\n  Meta: (map[string]string) (len=2) {\n   (string) (len=18) \"appsec_interrupted\": (string) (len=4) \"true\",\n   (string) (len=13) \"appsec_action\": (string) (len=4) \"deny\"\n  }\n }\n}\n"
time="2024-12-19T07:29:03-05:00" level=info msg="responses : ([]appsec.AppsecTempResponse) (len=1 cap=1) {\n (appsec.AppsecTempResponse) {\n  InBandInterrupt: (bool) true,\n  OutOfBandInterrupt: (bool) false,\n  Action: (string) (len=3) \"ban\",\n  UserHTTPResponseCode: (int) 403,\n  BouncerHTTPResponseCode: (int) 403,\n  SendEvent: (bool) true,\n  SendAlert: (bool) true\n }\n}\n"
--- FAIL: TestAppsecRuleZones (0.33s)
    --- FAIL: TestAppsecRuleZones/rule:_ARGS (0.00s)
    --- FAIL: TestAppsecRuleZones/rule:_ARGS_NAMES (0.00s)
    --- FAIL: TestAppsecRuleZones/rule:_BODY_ARGS (0.00s)
    --- PASS: TestAppsecRuleZones/rule:_BODY_ARGS_NAMES (0.06s)
    --- FAIL: TestAppsecRuleZones/rule:_HEADERS (0.00s)
    --- PASS: TestAppsecRuleZones/rule:_HEADERS_NAMES (0.05s)
    --- PASS: TestAppsecRuleZones/rule:_METHOD (0.05s)
    --- FAIL: TestAppsecRuleZones/rule:_PROTOCOL (0.00s)
    --- PASS: TestAppsecRuleZones/rule:_URI (0.06s)
    --- PASS: TestAppsecRuleZones/rule:_URI_FULL (0.06s)
    --- PASS: TestAppsecRuleZones/rule:_RAW_BODY (0.06s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec	3.702s
time="2024-12-19T07:29:00-05:00" level=fatal msg="local stack error : missing aws endpoint for tests : AWS_ENDPOINT_FORCE"
FAIL	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/cloudwatch	0.096s
=== RUN   TestConfigure
time="2024-12-19T07:29:00-05:00" level=info msg="Test 'TestConfigure'"
    docker_test.go:63: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/vendor/github.com/crowdsecurity/go-cs-lib/cstest/errors.go:25
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/docker/docker_test.go:63
        	Error:      	Received unexpected error:
        	            	failed to configure docker datasource : Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
        	Test:       	TestConfigure
--- FAIL: TestConfigure (0.00s)
=== RUN   TestConfigureDSN
time="2024-12-19T07:29:00-05:00" level=info msg="Test 'TestConfigureDSN'"
--- PASS: TestConfigureDSN (0.00s)
=== RUN   TestStreamingAcquisition
time="2024-12-19T07:29:00-05:00" level=info msg="Test 'TestStreamingAcquisition'"
    docker_test.go:180: Unexpected error : failed to configure docker datasource : Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
--- FAIL: TestStreamingAcquisition (0.00s)
=== RUN   TestOneShot
time="2024-12-19T07:29:00-05:00" level=info msg="Test 'TestOneShot'"
time="2024-12-19T07:29:00-05:00" level=info msg="reading logs from container docker_test" type=docker
--- PASS: TestOneShot (0.00s)
=== RUN   TestParseLabels
=== RUN   TestParseLabels/bad_label
=== RUN   TestParseLabels/simple_label
=== RUN   TestParseLabels/multiple_simple_labels
=== RUN   TestParseLabels/multiple_simple_labels_2
=== RUN   TestParseLabels/end_with_dot
=== RUN   TestParseLabels/consecutive_dots
=== RUN   TestParseLabels/crowdsec_labels
--- PASS: TestParseLabels (0.00s)
    --- PASS: TestParseLabels/bad_label (0.00s)
    --- PASS: TestParseLabels/simple_label (0.00s)
    --- PASS: TestParseLabels/multiple_simple_labels (0.00s)
    --- PASS: TestParseLabels/multiple_simple_labels_2 (0.00s)
    --- PASS: TestParseLabels/end_with_dot (0.00s)
    --- PASS: TestParseLabels/consecutive_dots (0.00s)
    --- PASS: TestParseLabels/crowdsec_labels (0.00s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/docker	0.031s
?   	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/syslog/internal/parser/utils	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/syslog/internal/server	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/wineventlog	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/apiclient/useragent	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/apiserver/controllers	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/apiserver/middlewares/v1	[no test files]
=== RUN   TestBadConfiguration
=== RUN   TestBadConfiguration/extra_configuration_key
=== RUN   TestBadConfiguration/missing_filenames
=== RUN   TestBadConfiguration/glob_syntax_error
=== RUN   TestBadConfiguration/bad_exclude_regexp
--- PASS: TestBadConfiguration (0.00s)
    --- PASS: TestBadConfiguration/extra_configuration_key (0.00s)
    --- PASS: TestBadConfiguration/missing_filenames (0.00s)
    --- PASS: TestBadConfiguration/glob_syntax_error (0.00s)
    --- PASS: TestBadConfiguration/bad_exclude_regexp (0.00s)
=== RUN   TestConfigureDSN
=== RUN   TestConfigureDSN/asd://
=== RUN   TestConfigureDSN/file://
=== RUN   TestConfigureDSN/file:///etc/passwd?log_level=warn
=== RUN   TestConfigureDSN/file:///etc/passwd?log_level=foobar
--- PASS: TestConfigureDSN (0.00s)
    --- PASS: TestConfigureDSN/asd:// (0.00s)
    --- PASS: TestConfigureDSN/file:// (0.00s)
    --- PASS: TestConfigureDSN/file:///etc/passwd?log_level=warn (0.00s)
    --- PASS: TestConfigureDSN/file:///etc/passwd?log_level=foobar (0.00s)
=== RUN   TestOneShot
=== RUN   TestOneShot/permission_denied
    file_test.go:228: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/vendor/github.com/crowdsecurity/go-cs-lib/cstest/errors.go:49
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/file/file_test.go:228
        	Error:      	An error is expected but got nil.
        	Test:       	TestOneShot/permission_denied
=== RUN   TestOneShot/ignored_directory
=== RUN   TestOneShot/glob_syntax_error
=== RUN   TestOneShot/no_matching_files
=== RUN   TestOneShot/test.log
=== RUN   TestOneShot/test.log.gz
=== RUN   TestOneShot/unexpected_end_of_gzip_stream
=== RUN   TestOneShot/deleted_file
--- FAIL: TestOneShot (0.00s)
    --- FAIL: TestOneShot/permission_denied (0.00s)
    --- PASS: TestOneShot/ignored_directory (0.00s)
    --- PASS: TestOneShot/glob_syntax_error (0.00s)
    --- PASS: TestOneShot/no_matching_files (0.00s)
    --- PASS: TestOneShot/test.log (0.00s)
    --- PASS: TestOneShot/test.log.gz (0.00s)
    --- PASS: TestOneShot/unexpected_end_of_gzip_stream (0.00s)
    --- PASS: TestOneShot/deleted_file (0.00s)
=== RUN   TestLiveAcquisition
=== RUN   TestLiveAcquisition/PermissionDenied
    file_test.go:424: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/file/file_test.go:424
        	Error:      	"No matching files for pattern /etc/shadow" does not contain "unable to read /etc/shadow : open /etc/shadow: permission denied"
        	Test:       	TestLiveAcquisition/PermissionDenied
=== RUN   TestLiveAcquisition/Directory
=== RUN   TestLiveAcquisition/badPattern
=== RUN   TestLiveAcquisition/basicGlob
=== RUN   TestLiveAcquisition/GlobInotify
=== RUN   TestLiveAcquisition/GlobInotifyChmod
=== RUN   TestLiveAcquisition/InotifyMkDir
2024/12/19 07:29:08 Re-opening moved/deleted file test_files/stream.log ...
2024/12/19 07:29:08 Waiting for test_files/stream.log to appear...
2024/12/19 07:29:08 Re-opening moved/deleted file test_files/a.log ...
2024/12/19 07:29:08 Waiting for test_files/a.log to appear...
2024/12/19 07:29:11 Re-opening moved/deleted file test_files/stream.log ...
--- FAIL: TestLiveAcquisition (11.11s)
    --- FAIL: TestLiveAcquisition/PermissionDenied (0.00s)
    --- PASS: TestLiveAcquisition/Directory (0.00s)
    --- PASS: TestLiveAcquisition/badPattern (0.00s)
    --- PASS: TestLiveAcquisition/basicGlob (3.01s)
    --- PASS: TestLiveAcquisition/GlobInotify (1.06s)
    --- PASS: TestLiveAcquisition/GlobInotifyChmod (4.02s)
    --- PASS: TestLiveAcquisition/InotifyMkDir (3.01s)
=== RUN   TestExclusion
2024/12/19 07:29:11 Waiting for test_files/stream.log to appear...
--- PASS: TestExclusion (0.00s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/file	11.128s
=== RUN   TestBadConfiguration
--- PASS: TestBadConfiguration (0.00s)
=== RUN   TestConfigureDSN
--- PASS: TestConfigureDSN (0.00s)
=== RUN   TestOneShot
    journalctl_test.go:168: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/vendor/github.com/crowdsecurity/go-cs-lib/cstest/errors.go:25
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/journalctl/journalctl_test.go:168
        	Error:      	Received unexpected error:
        	            	exec: "journalctl": executable file not found in $PATH
        	Test:       	TestOneShot
time="2024-12-19T07:29:00-05:00" level=error msg="could not start journalctl command : exec: \"journalctl\": executable file not found in $PATH" src="journalctl-_SYSTEMD_UNIT=ssh.service" type=journalctl
    journalctl_test.go:168: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/vendor/github.com/crowdsecurity/go-cs-lib/cstest/errors.go:25
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/journalctl/journalctl_test.go:168
        	Error:      	Received unexpected error:
        	            	exec: "journalctl": executable file not found in $PATH
        	Test:       	TestOneShot
--- FAIL: TestOneShot (0.00s)
=== RUN   TestStreaming
time="2024-12-19T07:29:00-05:00" level=error msg="could not start journalctl command : exec: \"journalctl\": executable file not found in $PATH" src="journalctl-_SYSTEMD_UNIT=ssh.service" type=journalctl
    journalctl_test.go:262: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/journalctl/journalctl_test.go:262
        	Error:      	Not equal: 
        	            	expected: 14
        	            	actual  : 0
        	Test:       	TestStreaming
--- FAIL: TestStreaming (1.01s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/journalctl	1.020s
=== RUN   TestConfigure
time="2024-12-19T07:29:01-05:00" level=warning msg="no group_id specified, crowdsec will only read from the 1st partition of the topic" type=kafka
--- PASS: TestConfigure (0.00s)
=== RUN   TestStreamingAcquisition
--- FAIL: TestStreamingAcquisition (0.00s)
panic: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connect: connection refused [recovered]
	panic: failed to dial: failed to open connection to localhost:9092: dial tcp [::1]:9092: connect: connection refused

goroutine 35 [running]:
testing.tRunner.func1.2({0x87487e0, 0x29b983e0})
	/usr/local/go122/src/testing/testing.go:1631 +0x29d
testing.tRunner.func1()
	/usr/local/go122/src/testing/testing.go:1634 +0x42e
panic({0x87487e0, 0x29b983e0})
	/usr/local/go122/src/runtime/panic.go:770 +0xf7
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/kafka.createTopic({0x87daca6, 0x11}, {0x87d8d99, 0xe})
	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/kafka/kafka_test.go:99 +0x35e
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/kafka.TestStreamingAcquisition(0x29bbc308)
	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/kafka/kafka_test.go:154 +0x114
testing.tRunner(0x29bbc308, 0x880a470)
	/usr/local/go122/src/testing/testing.go:1689 +0x11f
created by testing.(*T).Run in goroutine 1
	/usr/local/go122/src/testing/testing.go:1742 +0x3b3
FAIL	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/kafka	0.021s
=== RUN   TestBadConfiguration
--- PASS: TestBadConfiguration (0.00s)
=== RUN   TestReadFromStream
time="2024-12-19T07:29:01-05:00" level=info msg="starting kinesis acquisition from shards" stream=stream-1-shard type=kinesis
Error writing to stream: RequestError: send request failed
caused by: Post "http://localhost:4566/": dial tcp [::1]:4566: connect: connection refused
time="2024-12-19T07:29:05-05:00" level=fatal msg="RequestError: send request failed\ncaused by: Post \"http://localhost:4566/\": dial tcp [::1]:4566: connect: connection refused"
FAIL	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/kinesis	4.395s
=== RUN   TestBadConfiguration
=== RUN   TestBadConfiguration/unknown_field
=== RUN   TestBadConfiguration/missing_listen_addr
=== RUN   TestBadConfiguration/missing_listen_port
--- PASS: TestBadConfiguration (0.00s)
    --- PASS: TestBadConfiguration/unknown_field (0.00s)
    --- PASS: TestBadConfiguration/missing_listen_addr (0.00s)
    --- PASS: TestBadConfiguration/missing_listen_port (0.00s)
=== RUN   TestInvalidConfig
=== RUN   TestInvalidConfig/invalid_port
time="2024-12-19T07:29:01-05:00" level=info msg="Starting k8s-audit server on 127.0.0.1:9999999/k8s-audit" type=k8s-audit
time="2024-12-19T07:29:01-05:00" level=info msg="Stopping k8s-audit server on 127.0.0.1:9999999/k8s-audit" type=k8s-audit
--- PASS: TestInvalidConfig (1.01s)
    --- PASS: TestInvalidConfig/invalid_port (1.01s)
=== RUN   TestHandler
=== RUN   TestHandler/valid_json
time="2024-12-19T07:29:02-05:00" level=info msg="Starting k8s-audit server on 127.0.0.1:49234/k8s-audit" type=k8s-audit
time="2024-12-19T07:29:02-05:00" level=info msg="Stopping k8s-audit server on 127.0.0.1:49234/k8s-audit" type=k8s-audit
=== RUN   TestHandler/invalid_json
time="2024-12-19T07:29:02-05:00" level=error msg="Error decoding audit events: invalid character 'i' looking for beginning of value" type=k8s-audit
time="2024-12-19T07:29:02-05:00" level=info msg="Starting k8s-audit server on 127.0.0.1:49234/k8s-audit" type=k8s-audit
time="2024-12-19T07:29:02-05:00" level=info msg="Stopping k8s-audit server on 127.0.0.1:49234/k8s-audit" type=k8s-audit
=== RUN   TestHandler/invalid_method
time="2024-12-19T07:29:02-05:00" level=info msg="Starting k8s-audit server on 127.0.0.1:49234/k8s-audit" type=k8s-audit
time="2024-12-19T07:29:02-05:00" level=info msg="Stopping k8s-audit server on 127.0.0.1:49234/k8s-audit" type=k8s-audit
--- PASS: TestHandler (0.01s)
    --- PASS: TestHandler/valid_json (0.00s)
    --- PASS: TestHandler/invalid_json (0.00s)
    --- PASS: TestHandler/invalid_method (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/kubernetesaudit	1.031s
?   	github.com/crowdsecurity/crowdsec/pkg/cticlient/example	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/cwversion	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/alert	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/bouncer	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/configitem	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/decision	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/enttest	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/event	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/hook	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/lock	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/machine	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/meta	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/metric	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/migrate	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/predicate	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/runtime	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/database/ent/schema	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/dumps	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/emoji	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/longpollclient	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/metabase	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/models	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/modelscapi	[no test files]
?   	github.com/crowdsecurity/crowdsec/pkg/protobufs	[no test files]
=== RUN   TestTimestampFail
--- PASS: TestTimestampFail (0.00s)
=== RUN   TestTimestampTime
--- PASS: TestTimestampTime (0.00s)
=== RUN   TestTimestampDuration
t 2024-12-19T04:29:02-05:00
--- PASS: TestTimestampDuration (0.00s)
=== RUN   TestConfiguration
time="2024-12-19T07:29:02-05:00" level=info msg="Test 'TestConfigure'"
=== RUN   TestConfiguration/Unknown_field
=== RUN   TestConfiguration/Missing_url
=== RUN   TestConfiguration/Missing_query
=== RUN   TestConfiguration/Correct_config
time="2024-12-19T07:29:02-05:00" level=info msg="Resetting since" type=loki
time="2024-12-19T07:29:02-05:00" level=info msg="Since value: 0s" type=loki
=== RUN   TestConfiguration/Correct_config_with_wait_for_ready
time="2024-12-19T07:29:02-05:00" level=info msg="Resetting since" type=loki
time="2024-12-19T07:29:02-05:00" level=info msg="Since value: 0s" type=loki
=== RUN   TestConfiguration/Correct_config_with_delay_for
time="2024-12-19T07:29:02-05:00" level=info msg="Resetting since" type=loki
time="2024-12-19T07:29:02-05:00" level=info msg="Since value: 0s" type=loki
=== RUN   TestConfiguration/Correct_config_with_password
time="2024-12-19T07:29:02-05:00" level=info msg="Resetting since" type=loki
time="2024-12-19T07:29:02-05:00" level=info msg="Since value: 0s" type=loki
=== RUN   TestConfiguration/Invalid_DelayFor
--- PASS: TestConfiguration (0.00s)
    --- PASS: TestConfiguration/Unknown_field (0.00s)
    --- PASS: TestConfiguration/Missing_url (0.00s)
    --- PASS: TestConfiguration/Missing_query (0.00s)
    --- PASS: TestConfiguration/Correct_config (0.00s)
    --- PASS: TestConfiguration/Correct_config_with_wait_for_ready (0.00s)
    --- PASS: TestConfiguration/Correct_config_with_delay_for (0.00s)
    --- PASS: TestConfiguration/Correct_config_with_password (0.00s)
    --- PASS: TestConfiguration/Invalid_DelayFor (0.00s)
=== RUN   TestConfigureDSN
time="2024-12-19T07:29:02-05:00" level=info msg="Test 'TestConfigureDSN'"
    loki_test.go:225: Test : Wrong scheme
    loki_test.go:225: Test : Correct DSN
    loki_test.go:225: Test : Empty host
    loki_test.go:225: Test : Invalid DSN
    loki_test.go:225: Test : Invalid Delay
    loki_test.go:225: Test : Bad since param
    loki_test.go:225: Test : Basic Auth
    loki_test.go:225: Test : Correct DSN
    loki_test.go:225: Test : SSL DSN
--- PASS: TestConfigureDSN (0.00s)
=== RUN   TestOneShotAcquisition
time="2024-12-19T07:29:02-05:00" level=info msg="Test 'TestStreamingAcquisition'"
time="2024-12-19T07:29:02-05:00" level=info msg="Since value: 1h0m0s" type=loki
    loki_test.go:354: Unexpected error : Post "http://127.0.0.1:3100/loki/api/v1/push": dial tcp 127.0.0.1:3100: connect: connection refused
--- FAIL: TestOneShotAcquisition (0.00s)
=== RUN   TestStreamingAcquisition
time="2024-12-19T07:29:02-05:00" level=info msg="Test 'TestStreamingAcquisition'"
=== RUN   TestStreamingAcquisition/Bad_port
time="2024-12-19T07:29:02-05:00" level=info msg="Resetting since" name="Bad port" type=loki
time="2024-12-19T07:29:02-05:00" level=info msg="Since value: 0s" name="Bad port" type=loki
time="2024-12-19T07:29:02-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:03-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:03-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:04-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:04-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:05-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:05-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:06-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:06-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:07-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:07-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:08-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:08-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:09-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:09-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:10-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:10-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:11-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:11-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
time="2024-12-19T07:29:12-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3101/ready\": dial tcp 127.0.0.1:3101: connect: connection refused" component=lokiclient name="Bad port" source="http://127.0.0.1:3101" type=loki
=== RUN   TestStreamingAcquisition/ok
time="2024-12-19T07:29:12-05:00" level=info msg="Resetting since" name=ok type=loki
time="2024-12-19T07:29:12-05:00" level=info msg="Since value: 0s" name=ok type=loki
time="2024-12-19T07:29:12-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:13-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:13-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:14-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:14-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:15-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:15-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:16-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:16-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:17-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:17-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:18-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:18-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:19-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:19-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:20-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:20-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:21-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:21-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:22-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient name=ok source="http://127.0.0.1:3100" type=loki
    loki_test.go:442: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/vendor/github.com/crowdsecurity/go-cs-lib/cstest/errors.go:25
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/loki/loki_test.go:442
        	Error:      	Received unexpected error:
        	            	loki is not ready: context deadline exceeded
        	Test:       	TestStreamingAcquisition/ok
    loki_test.go:477: Unexpected error : Post "http://127.0.0.1:3100/loki/api/v1/push": dial tcp 127.0.0.1:3100: connect: connection refused
--- FAIL: TestStreamingAcquisition (22.03s)
    --- PASS: TestStreamingAcquisition/Bad_port (10.01s)
    --- FAIL: TestStreamingAcquisition/ok (12.02s)
=== RUN   TestStopStreaming
time="2024-12-19T07:29:24-05:00" level=info msg="Resetting since" type=loki
time="2024-12-19T07:29:24-05:00" level=info msg="Since value: 0s" type=loki
time="2024-12-19T07:29:24-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:25-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:25-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:26-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:26-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:27-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:27-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:28-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:28-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:29-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:29-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:30-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:30-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:31-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:31-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:32-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:32-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:33-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:33-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
time="2024-12-19T07:29:34-05:00" level=warning msg="Error checking if Loki is ready: Get \"http://127.0.0.1:3100/ready\": dial tcp 127.0.0.1:3100: connect: connection refused" component=lokiclient source="http://127.0.0.1:3100" type=loki
    loki_test.go:523: Unexpected error : loki is not ready: context deadline exceeded
--- FAIL: TestStopStreaming (10.04s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/loki	32.085s
=== RUN   TestBadConfiguration
=== RUN   TestBadConfiguration/no_bucket
=== RUN   TestBadConfiguration/invalid_polling_method
=== RUN   TestBadConfiguration/no_sqs_name
=== RUN   TestBadConfiguration/both_bucket_and_sqs
--- PASS: TestBadConfiguration (0.00s)
    --- PASS: TestBadConfiguration/no_bucket (0.00s)
    --- PASS: TestBadConfiguration/invalid_polling_method (0.00s)
    --- PASS: TestBadConfiguration/no_sqs_name (0.00s)
    --- PASS: TestBadConfiguration/both_bucket_and_sqs (0.00s)
=== RUN   TestGoodConfiguration
=== RUN   TestGoodConfiguration/basic
time="2024-12-19T07:29:03-05:00" level=warning msg="use_time_machine is not set to true in the datasource configuration. This will likely lead to false positives as S3 logs are not processed in real time." bucket=foobar prefix=
time="2024-12-19T07:29:03-05:00" level=warning msg="Polling method is set to list. This is not recommended as it will not scale well. Consider using SQS instead." bucket=foobar prefix=
=== RUN   TestGoodConfiguration/polling_method
time="2024-12-19T07:29:03-05:00" level=warning msg="use_time_machine is not set to true in the datasource configuration. This will likely lead to false positives as S3 logs are not processed in real time." queue=foobar
=== RUN   TestGoodConfiguration/list_method
time="2024-12-19T07:29:03-05:00" level=warning msg="use_time_machine is not set to true in the datasource configuration. This will likely lead to false positives as S3 logs are not processed in real time." bucket=foobar prefix=
time="2024-12-19T07:29:03-05:00" level=warning msg="Polling method is set to list. This is not recommended as it will not scale well. Consider using SQS instead." bucket=foobar prefix=
--- PASS: TestGoodConfiguration (0.00s)
    --- PASS: TestGoodConfiguration/basic (0.00s)
    --- PASS: TestGoodConfiguration/polling_method (0.00s)
    --- PASS: TestGoodConfiguration/list_method (0.00s)
=== RUN   TestDSNAcquis
=== RUN   TestDSNAcquis/basic
time="2024-12-19T07:29:03-05:00" level=info msg="starting acquisition of bucket_no_prefix//foo.log" bucket= prefix=
got line foo
got line bar
=== RUN   TestDSNAcquis/with_prefix
time="2024-12-19T07:29:05-05:00" level=info msg="starting acquisition of bucket_with_prefix/prefix//" bucket= prefix=
time="2024-12-19T07:29:05-05:00" level=info msg="returning mock list output for bucket_with_prefix, [{\n  Key: \"prefix/foo.log\",\n  LastModified: 2024-12-19 08:29:03.712949814 -0500 EST m=+3600.006479138\n} {\n  Key: \"prefix/bar.log\",\n  LastModified: 2024-12-19 08:29:03.712956013 -0500 EST m=+3600.006485218\n}]"
got line foo
got line bar
got line foo
got line bar
--- PASS: TestDSNAcquis (4.02s)
    --- PASS: TestDSNAcquis/basic (2.00s)
    --- PASS: TestDSNAcquis/with_prefix (2.02s)
=== RUN   TestListPolling
=== RUN   TestListPolling/basic
time="2024-12-19T07:29:07-05:00" level=warning msg="use_time_machine is not set to true in the datasource configuration. This will likely lead to false positives as S3 logs are not processed in real time." bucket=bucket_no_prefix prefix=
time="2024-12-19T07:29:07-05:00" level=warning msg="Polling method is set to list. This is not recommended as it will not scale well. Consider using SQS instead." bucket=bucket_no_prefix prefix=
time="2024-12-19T07:29:07-05:00" level=info msg="starting acquisition of bucket_no_prefix/" bucket=bucket_no_prefix prefix=
time="2024-12-19T07:29:08-05:00" level=debug msg="Getting bucket content for bucket_no_prefix" bucket=bucket_no_prefix method=getBucketContent prefix=
time="2024-12-19T07:29:08-05:00" level=info msg="returning mock list output for bucket_no_prefix, [{\n  Key: \"foo.log\",\n  LastModified: 2024-12-19 08:29:03.71293986 -0500 EST m=+3600.006469184\n}]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Found new object foo.log" bucket=bucket_no_prefix method=listPoll prefix=
time="2024-12-19T07:29:08-05:00" level=debug msg="Reading file bucket_no_prefix/foo.log" bucket=bucket_no_prefix method=readManager prefix=
time="2024-12-19T07:29:08-05:00" level=info msg="Setting max buffer size to 65536" bucket=bucket_no_prefix prefix=
time="2024-12-19T07:29:08-05:00" level=trace msg="Read line foo" bucket=bucket_no_prefix key=foo.log method=readFile prefix=
time="2024-12-19T07:29:08-05:00" level=trace msg="Read line bar" bucket=bucket_no_prefix key=foo.log method=readFile prefix=
got line foo
got line bar
time="2024-12-19T07:29:09-05:00" level=debug msg="Getting bucket content for bucket_no_prefix" bucket=bucket_no_prefix method=getBucketContent prefix=
time="2024-12-19T07:29:09-05:00" level=info msg="Shutting down S3 read manager" bucket=bucket_no_prefix method=readManager prefix=
time="2024-12-19T07:29:09-05:00" level=info msg="returning mock list output for bucket_no_prefix, [{\n  Key: \"foo.log\",\n  LastModified: 2024-12-19 08:29:03.71293986 -0500 EST m=+3600.006469184\n}]"
time="2024-12-19T07:29:09-05:00" level=info msg="Shutting down list poller" bucket=bucket_no_prefix method=listPoll prefix=
=== RUN   TestListPolling/with_prefix
time="2024-12-19T07:29:09-05:00" level=warning msg="use_time_machine is not set to true in the datasource configuration. This will likely lead to false positives as S3 logs are not processed in real time." bucket=bucket_with_prefix prefix=foo/
time="2024-12-19T07:29:09-05:00" level=warning msg="Polling method is set to list. This is not recommended as it will not scale well. Consider using SQS instead." bucket=bucket_with_prefix prefix=foo/
time="2024-12-19T07:29:09-05:00" level=info msg="starting acquisition of bucket_with_prefix/foo/" bucket=bucket_with_prefix prefix=foo/
time="2024-12-19T07:29:10-05:00" level=debug msg="Getting bucket content for bucket_with_prefix" bucket=bucket_with_prefix method=getBucketContent prefix=foo/
time="2024-12-19T07:29:10-05:00" level=info msg="returning mock list output for bucket_with_prefix, [{\n  Key: \"prefix/foo.log\",\n  LastModified: 2024-12-19 08:29:03.712949814 -0500 EST m=+3600.006479138\n} {\n  Key: \"prefix/bar.log\",\n  LastModified: 2024-12-19 08:29:03.712956013 -0500 EST m=+3600.006485218\n}]"
time="2024-12-19T07:29:10-05:00" level=debug msg="Found new object prefix/bar.log" bucket=bucket_with_prefix method=listPoll prefix=foo/
time="2024-12-19T07:29:10-05:00" level=debug msg="Found new object prefix/foo.log" bucket=bucket_with_prefix method=listPoll prefix=foo/
time="2024-12-19T07:29:10-05:00" level=debug msg="Reading file bucket_with_prefix/prefix/bar.log" bucket=bucket_with_prefix method=readManager prefix=foo/
time="2024-12-19T07:29:10-05:00" level=info msg="Setting max buffer size to 65536" bucket=bucket_with_prefix prefix=foo/
time="2024-12-19T07:29:10-05:00" level=trace msg="Read line foo" bucket=bucket_with_prefix key=prefix/bar.log method=readFile prefix=foo/
time="2024-12-19T07:29:10-05:00" level=trace msg="Read line bar" bucket=bucket_with_prefix key=prefix/bar.log method=readFile prefix=foo/
got line foo
got line bar
time="2024-12-19T07:29:10-05:00" level=debug msg="Reading file bucket_with_prefix/prefix/foo.log" bucket=bucket_with_prefix method=readManager prefix=foo/
time="2024-12-19T07:29:10-05:00" level=info msg="Setting max buffer size to 65536" bucket=bucket_with_prefix prefix=foo/
time="2024-12-19T07:29:10-05:00" level=trace msg="Read line foo" bucket=bucket_with_prefix key=prefix/foo.log method=readFile prefix=foo/
time="2024-12-19T07:29:10-05:00" level=trace msg="Read line bar" bucket=bucket_with_prefix key=prefix/foo.log method=readFile prefix=foo/
got line foo
got line bar
time="2024-12-19T07:29:11-05:00" level=debug msg="Getting bucket content for bucket_with_prefix" bucket=bucket_with_prefix method=getBucketContent prefix=foo/
time="2024-12-19T07:29:11-05:00" level=info msg="returning mock list output for bucket_with_prefix, [{\n  Key: \"prefix/foo.log\",\n  LastModified: 2024-12-19 08:29:03.712949814 -0500 EST m=+3600.006479138\n} {\n  Key: \"prefix/bar.log\",\n  LastModified: 2024-12-19 08:29:03.712956013 -0500 EST m=+3600.006485218\n}]"
time="2024-12-19T07:29:11-05:00" level=info msg="Shutting down list poller" bucket=bucket_with_prefix method=listPoll prefix=foo/
time="2024-12-19T07:29:11-05:00" level=info msg="Shutting down S3 read manager" bucket=bucket_with_prefix method=readManager prefix=foo/
--- PASS: TestListPolling (4.01s)
    --- PASS: TestListPolling/basic (2.01s)
    --- PASS: TestListPolling/with_prefix (2.00s)
=== RUN   TestSQSPoll
=== RUN   TestSQSPoll/eventbridge
time="2024-12-19T07:29:11-05:00" level=warning msg="use_time_machine is not set to true in the datasource configuration. This will likely lead to false positives as S3 logs are not processed in real time." queue=test
time="2024-12-19T07:29:11-05:00" level=info msg="starting acquisition of /" queue=test
time="2024-12-19T07:29:11-05:00" level=info msg="Setting max buffer size to 65536" queue=test
got line foo
got line bar
time="2024-12-19T07:29:13-05:00" level=info msg="Shutting down SQS poller" method=sqsPoll queue=test
time="2024-12-19T07:29:13-05:00" level=info msg="Shutting down S3 read manager" method=readManager queue=test
=== RUN   TestSQSPoll/notification
time="2024-12-19T07:29:13-05:00" level=warning msg="use_time_machine is not set to true in the datasource configuration. This will likely lead to false positives as S3 logs are not processed in real time." queue=test
time="2024-12-19T07:29:13-05:00" level=info msg="starting acquisition of /" queue=test
time="2024-12-19T07:29:13-05:00" level=info msg="Setting max buffer size to 65536" queue=test
got line foo
got line bar
time="2024-12-19T07:29:15-05:00" level=info msg="Shutting down S3 read manager" method=readManager queue=test
time="2024-12-19T07:29:15-05:00" level=info msg="Shutting down SQS poller" method=sqsPoll queue=test
--- PASS: TestSQSPoll (4.02s)
    --- PASS: TestSQSPoll/eventbridge (2.02s)
    --- PASS: TestSQSPoll/notification (2.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/s3	12.093s
=== RUN   TestConfigure
time="2024-12-19T07:29:03-05:00" level=info msg="Starting syslog datasource configuration" type=syslog
time="2024-12-19T07:29:03-05:00" level=info msg="Starting syslog datasource configuration" type=syslog
time="2024-12-19T07:29:03-05:00" level=info msg="Starting syslog datasource configuration" type=syslog
time="2024-12-19T07:29:03-05:00" level=info msg="Starting syslog datasource configuration" type=syslog
time="2024-12-19T07:29:03-05:00" level=info msg="Starting syslog datasource configuration" type=syslog
--- PASS: TestConfigure (0.00s)
=== RUN   TestStreamingAcquisition
=== RUN   TestStreamingAcquisition/invalid_msgs
time="2024-12-19T07:29:03-05:00" level=info msg="Starting syslog datasource configuration" type=syslog
time="2024-12-19T07:29:03-05:00" level=error msg="could not parse message: PRI must start with '<'" client=127.0.0.1 type=syslog
time="2024-12-19T07:29:03-05:00" level=error msg="could not parse message: PRI must start with '<'" client=127.0.0.1 type=syslog
time="2024-12-19T07:29:03-05:00" level=error msg="could not parse message: PRI must start with '<'" client=127.0.0.1 type=syslog
time="2024-12-19T07:29:05-05:00" level=info msg="Syslog datasource is dying" type=syslog
time="2024-12-19T07:29:05-05:00" level=info msg="Syslog server tomb is dying" syslog=internal type=syslog
time="2024-12-19T07:29:05-05:00" level=error msg="could not parse message: syslog line is empty" client= type=syslog
time="2024-12-19T07:29:05-05:00" level=info msg="Syslog server has exited" type=syslog
=== RUN   TestStreamingAcquisition/RFC5424
time="2024-12-19T07:29:05-05:00" level=info msg="Starting syslog datasource configuration" type=syslog
time="2024-12-19T07:29:07-05:00" level=info msg="Syslog datasource is dying" type=syslog
time="2024-12-19T07:29:08-05:00" level=info msg="Syslog server tomb is dying" syslog=internal type=syslog
time="2024-12-19T07:29:08-05:00" level=error msg="could not parse message: syslog line is empty" client= type=syslog
time="2024-12-19T07:29:08-05:00" level=info msg="Syslog server has exited" type=syslog
=== RUN   TestStreamingAcquisition/RFC3164
time="2024-12-19T07:29:08-05:00" level=info msg="Starting syslog datasource configuration" type=syslog
time="2024-12-19T07:29:08-05:00" level=error msg="could not parse message: version must be 1" client=127.0.0.1 type=syslog
time="2024-12-19T07:29:10-05:00" level=info msg="Syslog datasource is dying" type=syslog
time="2024-12-19T07:29:10-05:00" level=info msg="Syslog server tomb is dying" syslog=internal type=syslog
time="2024-12-19T07:29:10-05:00" level=error msg="could not parse message: syslog line is empty" client= type=syslog
time="2024-12-19T07:29:10-05:00" level=info msg="Syslog server has exited" type=syslog
=== RUN   TestStreamingAcquisition/privileged_port
time="2024-12-19T07:29:10-05:00" level=info msg="Starting syslog datasource configuration" type=syslog
    syslog_test.go:143: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/vendor/github.com/crowdsecurity/go-cs-lib/cstest/errors.go:21
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/acquisition/modules/syslog/syslog_test.go:143
        	Error:      	Error "could not start syslog server: could not listen on port 514: listen udp 127.0.0.1:514: bind: address already in use" does not contain "could not start syslog server: could not listen on port 514: listen udp 127.0.0.1:514: bind: permission denied"
        	Test:       	TestStreamingAcquisition/privileged_port
--- FAIL: TestStreamingAcquisition (6.19s)
    --- PASS: TestStreamingAcquisition/invalid_msgs (2.01s)
    --- PASS: TestStreamingAcquisition/RFC5424 (2.09s)
    --- PASS: TestStreamingAcquisition/RFC3164 (2.09s)
    --- FAIL: TestStreamingAcquisition/privileged_port (0.00s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/syslog	6.201s
=== RUN   TestPri
=== RUN   TestPri/<0>
=== RUN   TestPri/<19>
=== RUN   TestPri/<200>
=== RUN   TestPri/<4999>
=== RUN   TestPri/<123
=== RUN   TestPri/123>
=== RUN   TestPri/
--- PASS: TestPri (0.00s)
    --- PASS: TestPri/<0> (0.00s)
    --- PASS: TestPri/<19> (0.00s)
    --- PASS: TestPri/<200> (0.00s)
    --- PASS: TestPri/<4999> (0.00s)
    --- PASS: TestPri/<123 (0.00s)
    --- PASS: TestPri/123> (0.00s)
    --- PASS: TestPri/ (0.00s)
=== RUN   TestTimestamp
=== RUN   TestTimestamp/May_20_09:33:54
=== RUN   TestTimestamp/May_20_09:33:54#01
=== RUN   TestTimestamp/May_20_09:33:54_2022
=== RUN   TestTimestamp/May__1_09:33:54_2022
=== RUN   TestTimestamp/May_01_09:33:54_2021
=== RUN   TestTimestamp/foobar
--- PASS: TestTimestamp (0.00s)
    --- PASS: TestTimestamp/May_20_09:33:54 (0.00s)
    --- PASS: TestTimestamp/May_20_09:33:54#01 (0.00s)
    --- PASS: TestTimestamp/May_20_09:33:54_2022 (0.00s)
    --- PASS: TestTimestamp/May__1_09:33:54_2022 (0.00s)
    --- PASS: TestTimestamp/May_01_09:33:54_2021 (0.00s)
    --- PASS: TestTimestamp/foobar (0.00s)
=== RUN   TestHostname
=== RUN   TestHostname/127.0.0.1
=== RUN   TestHostname/::1
=== RUN   TestHostname/foo.-bar
=== RUN   TestHostname/foo-.bar
=== RUN   TestHostname/foo123.bar
=== RUN   TestHostname/a..
=== RUN   TestHostname/foo.bar
=== RUN   TestHostname/foo,bar
=== RUN   TestHostname/foo,bar#01
=== RUN   TestHostname/#00
=== RUN   TestHostname/.
=== RUN   TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
=== RUN   TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bla
=== RUN   TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bla#01
=== RUN   TestHostname/a.foo-
--- PASS: TestHostname (0.00s)
    --- PASS: TestHostname/127.0.0.1 (0.00s)
    --- PASS: TestHostname/::1 (0.00s)
    --- PASS: TestHostname/foo.-bar (0.00s)
    --- PASS: TestHostname/foo-.bar (0.00s)
    --- PASS: TestHostname/foo123.bar (0.00s)
    --- PASS: TestHostname/a.. (0.00s)
    --- PASS: TestHostname/foo.bar (0.00s)
    --- PASS: TestHostname/foo,bar (0.00s)
    --- PASS: TestHostname/foo,bar#01 (0.00s)
    --- PASS: TestHostname/#00 (0.00s)
    --- PASS: TestHostname/. (0.00s)
    --- PASS: TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (0.00s)
    --- PASS: TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bla (0.00s)
    --- PASS: TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bla#01 (0.00s)
    --- PASS: TestHostname/a.foo- (0.00s)
=== RUN   TestTag
=== RUN   TestTag/foobar
=== RUN   TestTag/foobar[42]
=== RUN   TestTag/#00
=== RUN   TestTag/foobar[
=== RUN   TestTag/foobar[42
=== RUN   TestTag/foobar[asd]
--- PASS: TestTag (0.00s)
    --- PASS: TestTag/foobar (0.00s)
    --- PASS: TestTag/foobar[42] (0.00s)
    --- PASS: TestTag/#00 (0.00s)
    --- PASS: TestTag/foobar[ (0.00s)
    --- PASS: TestTag/foobar[42 (0.00s)
    --- PASS: TestTag/foobar[asd] (0.00s)
=== RUN   TestMessage
=== RUN   TestMessage/foobar:_pouet
=== RUN   TestMessage/foobar[42]:_test
=== RUN   TestMessage/foobar[123]:_this_is_a_test
=== RUN   TestMessage/foobar[123]:_
=== RUN   TestMessage/foobar[123]:
--- PASS: TestMessage (0.00s)
    --- PASS: TestMessage/foobar:_pouet (0.00s)
    --- PASS: TestMessage/foobar[42]:_test (0.00s)
    --- PASS: TestMessage/foobar[123]:_this_is_a_test (0.00s)
    --- PASS: TestMessage/foobar[123]:_ (0.00s)
    --- PASS: TestMessage/foobar[123]: (0.00s)
=== RUN   TestParse
=== RUN   TestParse/<12>May_20_09:33:54_UDMPRO,a2edd0c6ae48,udm-1.10.0.3686_kernel:_foo
=== RUN   TestParse/<12>May_20_09:33:54_UDMPRO,a2edd0c6ae48,udm-1.10.0.3686_kernel:_foo#01
=== RUN   TestParse/<12>May_20_09:33:54_UDMPRO,a2edd0c6ae48,udm-1.10.0.3686_kernel:_foo#02
=== RUN   TestParse/foobar
=== RUN   TestParse/<12>
=== RUN   TestParse/<12_May_02_09:33:54_foo.bar
=== RUN   TestParse/<12>May_02_09:33:54
=== RUN   TestParse/<12>May_02_09:33:54_foo.bar
=== RUN   TestParse/<12>May_02_09:33:54_foo.bar_bla[42
=== RUN   TestParse/<12>May_02_09:33:54_foo.bar_bla[42]
=== RUN   TestParse/<12>May_02_09:33:54_foo.bar_bla[42]:___
=== RUN   TestParse/<12>May_02_09:33:54_foo.bar_bla
=== RUN   TestParse/<12>May_02_09:33:54_foo.bar_bla:
=== RUN   TestParse/#00
=== RUN   TestParse/<13>1_2021-05-18T11:58:40.828081+02:00_mantis_sshd_49340_-_[timeQuality_isSynced="0"_tzKnown="1"]_blabla
=== RUN   TestParse/<46>Jun__2_06:55:39_localhost_haproxy[27213]:_Connect_from_100.100.100.99:52611_to_100.100.100.99:443_(https_shared-merged/HTTP)\\n_10.0.0.1}
=== RUN   TestParse/<46>Jun__2_06:55:39_2022_localhost_haproxy[27213]:_Connect_from_100.100.100.99:52611_to_100.100.100.99:443_(https_shared-merged/HTTP)\\n_10.0.0.1}
--- PASS: TestParse (0.00s)
    --- PASS: TestParse/<12>May_20_09:33:54_UDMPRO,a2edd0c6ae48,udm-1.10.0.3686_kernel:_foo (0.00s)
    --- PASS: TestParse/<12>May_20_09:33:54_UDMPRO,a2edd0c6ae48,udm-1.10.0.3686_kernel:_foo#01 (0.00s)
    --- PASS: TestParse/<12>May_20_09:33:54_UDMPRO,a2edd0c6ae48,udm-1.10.0.3686_kernel:_foo#02 (0.00s)
    --- PASS: TestParse/foobar (0.00s)
    --- PASS: TestParse/<12> (0.00s)
    --- PASS: TestParse/<12_May_02_09:33:54_foo.bar (0.00s)
    --- PASS: TestParse/<12>May_02_09:33:54 (0.00s)
    --- PASS: TestParse/<12>May_02_09:33:54_foo.bar (0.00s)
    --- PASS: TestParse/<12>May_02_09:33:54_foo.bar_bla[42 (0.00s)
    --- PASS: TestParse/<12>May_02_09:33:54_foo.bar_bla[42] (0.00s)
    --- PASS: TestParse/<12>May_02_09:33:54_foo.bar_bla[42]:___ (0.00s)
    --- PASS: TestParse/<12>May_02_09:33:54_foo.bar_bla (0.00s)
    --- PASS: TestParse/<12>May_02_09:33:54_foo.bar_bla: (0.00s)
    --- PASS: TestParse/#00 (0.00s)
    --- PASS: TestParse/<13>1_2021-05-18T11:58:40.828081+02:00_mantis_sshd_49340_-_[timeQuality_isSynced="0"_tzKnown="1"]_blabla (0.00s)
    --- PASS: TestParse/<46>Jun__2_06:55:39_localhost_haproxy[27213]:_Connect_from_100.100.100.99:52611_to_100.100.100.99:443_(https_shared-merged/HTTP)\\n_10.0.0.1} (0.00s)
    --- PASS: TestParse/<46>Jun__2_06:55:39_2022_localhost_haproxy[27213]:_Connect_from_100.100.100.99:52611_to_100.100.100.99:443_(https_shared-merged/HTTP)\\n_10.0.0.1} (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/syslog/internal/parser/rfc3164	0.017s
=== RUN   TestPri
=== RUN   TestPri/<0>
=== RUN   TestPri/<19>
=== RUN   TestPri/<200>
=== RUN   TestPri/<4999>
=== RUN   TestPri/<123
=== RUN   TestPri/123>
=== RUN   TestPri/
--- PASS: TestPri (0.00s)
    --- PASS: TestPri/<0> (0.00s)
    --- PASS: TestPri/<19> (0.00s)
    --- PASS: TestPri/<200> (0.00s)
    --- PASS: TestPri/<4999> (0.00s)
    --- PASS: TestPri/<123 (0.00s)
    --- PASS: TestPri/123> (0.00s)
    --- PASS: TestPri/ (0.00s)
=== RUN   TestHostname
=== RUN   TestHostname/127.0.0.1
=== RUN   TestHostname/::1
=== RUN   TestHostname/-
=== RUN   TestHostname/foo.-bar
=== RUN   TestHostname/foo-.bar
=== RUN   TestHostname/foo123.bar
=== RUN   TestHostname/a..
=== RUN   TestHostname/foo.bar
=== RUN   TestHostname/foo,bar
=== RUN   TestHostname/foo,bar#01
=== RUN   TestHostname/.
=== RUN   TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
=== RUN   TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bla
=== RUN   TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bla#01
=== RUN   TestHostname/a.foo-
--- PASS: TestHostname (0.00s)
    --- PASS: TestHostname/127.0.0.1 (0.00s)
    --- PASS: TestHostname/::1 (0.00s)
    --- PASS: TestHostname/- (0.00s)
    --- PASS: TestHostname/foo.-bar (0.00s)
    --- PASS: TestHostname/foo-.bar (0.00s)
    --- PASS: TestHostname/foo123.bar (0.00s)
    --- PASS: TestHostname/a.. (0.00s)
    --- PASS: TestHostname/foo.bar (0.00s)
    --- PASS: TestHostname/foo,bar (0.00s)
    --- PASS: TestHostname/foo,bar#01 (0.00s)
    --- PASS: TestHostname/. (0.00s)
    --- PASS: TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (0.00s)
    --- PASS: TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bla (0.00s)
    --- PASS: TestHostname/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bla#01 (0.00s)
    --- PASS: TestHostname/a.foo- (0.00s)
=== RUN   TestParse
=== RUN   TestParse/valid_msg
=== RUN   TestParse/valid_msg_with_msgid
=== RUN   TestParse/valid_msg_with_repeating_SD
=== RUN   TestParse/invalid_SD
=== RUN   TestParse/invalid_version
=== RUN   TestParse/invalid_message
=== RUN   TestParse/valid_msg_with_empty_fields
=== RUN   TestParse/valid_msg_with_empty_fields#01
=== RUN   TestParse/valid_msg_with_escaped_SD
=== RUN   TestParse/valid_complex_msg
=== RUN   TestParse/partial_message
=== RUN   TestParse/partial_message#01
--- PASS: TestParse (0.00s)
    --- PASS: TestParse/valid_msg (0.00s)
    --- PASS: TestParse/valid_msg_with_msgid (0.00s)
    --- PASS: TestParse/valid_msg_with_repeating_SD (0.00s)
    --- PASS: TestParse/invalid_SD (0.00s)
    --- PASS: TestParse/invalid_version (0.00s)
    --- PASS: TestParse/invalid_message (0.00s)
    --- PASS: TestParse/valid_msg_with_empty_fields (0.00s)
    --- PASS: TestParse/valid_msg_with_empty_fields#01 (0.00s)
    --- PASS: TestParse/valid_msg_with_escaped_SD (0.00s)
    --- PASS: TestParse/valid_complex_msg (0.00s)
    --- PASS: TestParse/partial_message (0.00s)
    --- PASS: TestParse/partial_message#01 (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/syslog/internal/parser/rfc5424	0.008s
=== RUN   TestNewAlertContext
Running test 'basic config test'
--- PASS: TestNewAlertContext (0.00s)
=== RUN   TestEventToContext
Running test 'basic test'
Running test 'test many events'
Running test 'test many events with result above max length (need truncate, keep only 2 on 3 elements)'
Running test 'test one events with result above max length (need truncate on one element)'
--- PASS: TestEventToContext (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/alertcontext	0.060s
=== RUN   TestAlertsListAsMachine
time="2024-12-19T07:29:06-05:00" level=info msg="URL is http://127.0.0.1:52069"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] GET http://127.0.0.1:52069/v1/alerts"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52069/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="token oklol will expire on 2030-01-02 15:04:05 +0000 UTC"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [1414]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 1414\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n[\n\t\t\t{\"capacity\":5,\"created_at\":\"2020-11-28T10:20:47+01:00\",\n\t\t\t \"decisions\":[\n\t\t\t\t  {\"duration\":\"59m49.264032632s\",\n\t\t\t\t  \"id\":1,\n\t\t\t\t  \"origin\":\"crowdsec\",\n\t\t\t\t  \"scenario\":\"crowdsecurity/ssh-bf\",\n\t\t\t\t  \"scope\":\"Ip\",\n\t\t\t\t  \"simulated\":false,\n\t\t\t\t  \"type\":\"ban\",\n\t\t\t\t  \"value\":\"1.1.1.172\"}\n\t\t\t\t  ],\n\t\t\t \"events\":[\n\t\t\t\t {\"meta\":[\n\t\t\t\t\t  {\"key\":\"target_user\",\"value\":\"netflix\"},\n\t\t\t\t\t  {\"key\":\"service\",\"value\":\"ssh\"}\n\t\t\t\t\t],\n\t\t\t\t\t\"timestamp\":\"2020-11-28 10:20:46 +0000 UTC\"},\n\t\t\t\t {\"meta\":[\n\t\t\t\t\t {\"key\":\"target_user\",\"value\":\"netflix\"},\n\t\t\t\t\t {\"key\":\"service\",\"value\":\"ssh\"}\n\t\t\t\t\t ],\n\t\t\t\t\t \"timestamp\":\"2020-11-28 10:20:46 +0000 UTC\"}\n\t\t\t\t],\n\t\t\t\t\"events_count\":6,\n\t\t\t\t\"id\":1,\n\t\t\t\t\"labels\":null,\n\t\t\t\t\"leakspeed\":\"10s\",\n\t\t\t\t\"machine_id\":\"test\",\n\t\t\t\t\"message\":\"Ip 1.1.1.172 performed 'crowdsecurity/ssh-bf' (6 events over 2.920062ms) at 2020-11-28 10:20:46.845619968 +0100 CET m=+5.903899761\",\n\t\t\t\t\"scenario\":\"crowdsecurity/ssh-bf\",\n\t\t\t\t\"scenario_hash\":\"4441dcff07020f6690d998b7101e642359ba405c2abb83565bbbdcee36de280f\",\n\t\t\t\t\"scenario_version\":\"0.1\",\n\t\t\t\t\"simulated\":false,\n\t\t\t\t\"source\":{\n\t\t\t\t\t\"as_name\":\"Cloudflare Inc\",\n\t\t\t\t\t\"cn\":\"AU\",\n\t\t\t\t\t\"ip\":\"1.1.1.172\",\n\t\t\t\t\t\"latitude\":-37.7,\n\t\t\t\t\t\"longitude\":145.1833,\n\t\t\t\t\t\"range\":\"1.1.1.0/24\",\n\t\t\t\t\t\"scope\":\"Ip\",\n\t\t\t\t\t\"value\":\"1.1.1.172\"\n\t\t\t\t\t},\n\t\t\t\t\"start_at\":\"2020-11-28 10:20:46.842701127 +0100 +0100\",\n\t\t\t\t\"stop_at\":\"2020-11-28 10:20:46.845621385 +0100 +0100\"\n\t\t\t}\n\t\t]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] GET http://127.0.0.1:52069/v1/alerts?ip=1.2.3.4"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [4]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 4\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\nnull"
--- PASS: TestAlertsListAsMachine (0.00s)
=== RUN   TestAlertsGetAsMachine
time="2024-12-19T07:29:06-05:00" level=info msg="URL is http://127.0.0.1:52071"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] GET http://127.0.0.1:52071/v1/alerts/1"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52071/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="token oklol will expire on 2030-01-02 15:04:05 +0000 UTC"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [1457]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 1457\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n{\"capacity\":5,\"created_at\":\"2020-11-28T10:20:47+01:00\",\n\t\t\t \"decisions\":[\n\t\t\t\t  {\"duration\":\"59m49.264032632s\",\n\t\t\t\t  \"end_ip\":16843180,\n\t\t\t\t  \"id\":1,\n\t\t\t\t  \"origin\":\"crowdsec\",\n\t\t\t\t  \"scenario\":\"crowdsecurity/ssh-bf\",\n\t\t\t\t  \"scope\":\"Ip\",\n\t\t\t\t  \"simulated\":false,\n\t\t\t\t  \"start_ip\":16843180,\n\t\t\t\t  \"type\":\"ban\",\n\t\t\t\t  \"value\":\"1.1.1.172\"}\n\t\t\t\t  ],\n\t\t\t \"events\":[\n\t\t\t\t {\"meta\":[\n\t\t\t\t\t  {\"key\":\"target_user\",\"value\":\"netflix\"},\n\t\t\t\t\t  {\"key\":\"service\",\"value\":\"ssh\"}\n\t\t\t\t\t],\n\t\t\t\t\t\"timestamp\":\"2020-11-28 10:20:46 +0000 UTC\"},\n\t\t\t\t {\"meta\":[\n\t\t\t\t\t {\"key\":\"target_user\",\"value\":\"netflix\"},\n\t\t\t\t\t {\"key\":\"service\",\"value\":\"ssh\"}\n\t\t\t\t\t ],\n\t\t\t\t\t \"timestamp\":\"2020-11-28 10:20:46 +0000 UTC\"}\n\t\t\t\t],\n\t\t\t\t\"events_count\":6,\n\t\t\t\t\"id\":1,\n\t\t\t\t\"labels\":null,\n\t\t\t\t\"leakspeed\":\"10s\",\n\t\t\t\t\"machine_id\":\"test\",\n\t\t\t\t\"message\":\"Ip 1.1.1.172 performed 'crowdsecurity/ssh-bf' (6 events over 2.920062ms) at 2020-11-28 10:20:46.845619968 +0100 CET m=+5.903899761\",\n\t\t\t\t\"scenario\":\"crowdsecurity/ssh-bf\",\n\t\t\t\t\"scenario_hash\":\"4441dcff07020f6690d998b7101e642359ba405c2abb83565bbbdcee36de280f\",\n\t\t\t\t\"scenario_version\":\"0.1\",\n\t\t\t\t\"simulated\":false,\n\t\t\t\t\"source\":{\n\t\t\t\t\t\"as_name\":\"Cloudflare Inc\",\n\t\t\t\t\t\"cn\":\"AU\",\n\t\t\t\t\t\"ip\":\"1.1.1.172\",\n\t\t\t\t\t\"latitude\":-37.7,\n\t\t\t\t\t\"longitude\":145.1833,\n\t\t\t\t\t\"range\":\"1.1.1.0/24\",\n\t\t\t\t\t\"scope\":\"Ip\",\n\t\t\t\t\t\"value\":\"1.1.1.172\"\n\t\t\t\t\t},\n\t\t\t\t\"start_at\":\"2020-11-28 10:20:46.842701127 +0100 +0100\",\n\t\t\t\t\"stop_at\":\"2020-11-28 10:20:46.845621385 +0100 +0100\"\n\t\t\t}"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] GET http://127.0.0.1:52071/v1/alerts/2"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 404"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [30]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 404 Not Found\r\nContent-Length: 30\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n{\"message\":\"object not found\"}"
--- PASS: TestAlertsGetAsMachine (0.00s)
=== RUN   TestAlertsCreateAsMachine
time="2024-12-19T07:29:06-05:00" level=info msg="URL is http://127.0.0.1:52073"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52073/v1/alerts"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52073/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="token oklol will expire on 2030-01-02 15:04:05 +0000 UTC"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [5]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 5\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n[\"3\"]"
--- PASS: TestAlertsCreateAsMachine (0.00s)
=== RUN   TestAlertsDeleteAsMachine
time="2024-12-19T07:29:06-05:00" level=info msg="URL is http://127.0.0.1:52075"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] DELETE http://127.0.0.1:52075/v1/alerts?ip=1.2.3.4"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52075/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="token oklol will expire on 2030-01-02 15:04:05 +0000 UTC"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [30]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 30\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n{\"message\":\"0 deleted alerts\"}"
--- PASS: TestAlertsDeleteAsMachine (0.00s)
=== RUN   TestApiAuth
time="2024-12-19T07:29:06-05:00" level=info msg="URL is http://127.0.0.1:52077"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] GET http://127.0.0.1:52077/v1/decisions?ip=1.2.3.4"
time="2024-12-19T07:29:06-05:00" level=debug msg="req-api: GET http://127.0.0.1:52077/v1/decisions?ip=1.2.3.4"
time="2024-12-19T07:29:06-05:00" level=trace msg="auth-api request: GET /v1/decisions?ip=1.2.3.4 HTTP/1.1\r\nHost: 127.0.0.1:52077\r\nUser-Agent: toto\r\nX-Api-Key: ixu\r\n\r\n"
time="2024-12-19T07:29:06-05:00" level=trace msg="auth-api response: HTTP/1.1 200 OK\r\nContent-Length: 4\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\nnull"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-api: http 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [4]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 4\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\nnull"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] GET http://127.0.0.1:52077/v1/decisions?ip=1.2.3.4"
time="2024-12-19T07:29:06-05:00" level=debug msg="req-api: GET http://127.0.0.1:52077/v1/decisions?ip=1.2.3.4"
time="2024-12-19T07:29:06-05:00" level=trace msg="auth-api request: GET /v1/decisions?ip=1.2.3.4 HTTP/1.1\r\nHost: 127.0.0.1:52077\r\nUser-Agent: toto\r\nX-Api-Key: bad\r\n\r\n"
time="2024-12-19T07:29:06-05:00" level=trace msg="auth-api response: HTTP/1.1 403 Forbidden\r\nContent-Length: 30\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n{\"message\":\"access forbidden\"}"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-api: http 403"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [30]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 403 Forbidden\r\nContent-Length: 30\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n{\"message\":\"access forbidden\"}"
time="2024-12-19T07:29:06-05:00" level=info msg="--> API error: access forbidden"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] GET http://127.0.0.1:52077/v1/decisions?ip=1.2.3.4"
time="2024-12-19T07:29:06-05:00" level=info msg="--> Get \"http://127.0.0.1:52077/v1/decisions?ip=1.2.3.4\": APIKey is empty"
--- PASS: TestApiAuth (0.00s)
=== RUN   TestWatcherRegister
time="2024-12-19T07:29:06-05:00" level=info msg="URL is http://127.0.0.1:52079"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52079/v1/watchers"
time="2024-12-19T07:29:06-05:00" level=info msg="MockServerReceived > {\"machine_id\":\"test_login\",\"password\":\"test_password\"}\n // Login : [test_login] => Mux response [200]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [64]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 64\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n{\"code\":200,\"expire\":\"2029-11-30T14:14:24+01:00\",\"token\":\"toto\"}"
time="2024-12-19T07:29:06-05:00" level=info msg="->*apiclient.ApiClient"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52079/v1/watchers"
time="2024-12-19T07:29:06-05:00" level=info msg="MockServerReceived > {\"machine_id\":\"login_400\",\"password\":\"test_password\"}\n // Login : [login_400] => Mux response [400]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [9]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 400 Bad Request\r\nContent-Length: 9\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\nError 400"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52079/v1/watchers"
time="2024-12-19T07:29:06-05:00" level=info msg="MockServerReceived > {\"machine_id\":\"login_409\",\"password\":\"test_password\"}\n // Login : [login_409] => Mux response [409]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [9]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 409 Conflict\r\nContent-Length: 9\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\nError 409"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52079/v1/watchers"
time="2024-12-19T07:29:06-05:00" level=info msg="MockServerReceived > {\"machine_id\":\"login_500\",\"password\":\"test_password\"}\n // Login : [login_500] => Mux response [500]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [9]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 500 Internal Server Error\r\nContent-Length: 9\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\nError 500"
--- PASS: TestWatcherRegister (0.00s)
=== RUN   TestWatcherAuth
time="2024-12-19T07:29:06-05:00" level=info msg="URL is http://127.0.0.1:52081"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52081/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=info msg="MockServerReceived > {\"machine_id\":\"test_login\",\"password\":\"test_password\",\"scenarios\":[\"crowdsecurity/test\"]}\n // Login : [test_login] => Mux response [200]"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [64]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 64\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n{\"code\":200,\"expire\":\"2029-11-30T14:14:24+01:00\",\"token\":\"toto\"}"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52081/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=info msg="MockServerReceived > {\"machine_id\":\"login_400\",\"password\":\"test_password\",\"scenarios\":null}\n // Login : [login_400] => Mux response [400]"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 400"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [9]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 400 Bad Request\r\nContent-Length: 9\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\nError 400"
time="2024-12-19T07:29:06-05:00" level=info msg="The AuthenticateWatcher function handled the error code 400 as expected \n\r"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52081/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=info msg="MockServerReceived > {\"machine_id\":\"login_409\",\"password\":\"test_password\",\"scenarios\":null}\n // Login : [login_409] => Mux response [409]"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 409"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [9]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 409 Conflict\r\nContent-Length: 9\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\nError 409"
time="2024-12-19T07:29:06-05:00" level=info msg="The AuthenticateWatcher function handled the error code 409 as expected \n\r"
--- PASS: TestWatcherAuth (0.00s)
=== RUN   TestWatcherUnregister
time="2024-12-19T07:29:06-05:00" level=info msg="URL is http://127.0.0.1:52085"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] DELETE http://127.0.0.1:52085/v1/watchers"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52085/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="token toto will expire on 2029-11-30 14:14:24 +0100 +0100"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [0]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\nContent-Length: 0\r\n\r\n"
time="2024-12-19T07:29:06-05:00" level=info msg="->*apiclient.ApiClient"
--- PASS: TestWatcherUnregister (0.00s)
=== RUN   TestWatcherEnroll
time="2024-12-19T07:29:06-05:00" level=info msg="URL is http://127.0.0.1:52087"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52087/v1/watchers/enroll"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52087/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="token toto will expire on 2029-11-30 14:14:24 +0100 +0100"
time="2024-12-19T07:29:06-05:00" level=debug msg="body -> {\"attachment_key\":\"goodkey\",\"name\":\"\",\"tags\":[],\"overwrite\":false}\n"
time="2024-12-19T07:29:06-05:00" level=info msg="good key"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [36]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 36\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n{\"statusCode\": 200, \"message\": \"OK\"}"
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] POST http://127.0.0.1:52087/v1/watchers/enroll"
time="2024-12-19T07:29:06-05:00" level=debug msg="body -> {\"attachment_key\":\"badkey\",\"name\":\"\",\"tags\":[],\"overwrite\":false}\n"
time="2024-12-19T07:29:06-05:00" level=info msg="bad key"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 403"
time="2024-12-19T07:29:06-05:00" level=debug msg="invalidating token for status code 403"
time="2024-12-19T07:29:06-05:00" level=debug msg="resetting jwt token"
time="2024-12-19T07:29:06-05:00" level=debug msg="retrying request to http://127.0.0.1:52087/v1/watchers/enroll"
time="2024-12-19T07:29:06-05:00" level=info msg="attempt 1 out of 2"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52087/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="token toto will expire on 2029-11-30 14:14:24 +0100 +0100"
time="2024-12-19T07:29:06-05:00" level=debug msg="body -> {\"attachment_key\":\"badkey\",\"name\":\"\",\"tags\":[],\"overwrite\":false}\n"
time="2024-12-19T07:29:06-05:00" level=info msg="bad key"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 403"
time="2024-12-19T07:29:06-05:00" level=debug msg="invalidating token for status code 403"
time="2024-12-19T07:29:06-05:00" level=debug msg="resetting jwt token"
time="2024-12-19T07:29:06-05:00" level=debug msg="retrying request to http://127.0.0.1:52087/v1/watchers/enroll"
time="2024-12-19T07:29:06-05:00" level=info msg="attempt 2 out of 2"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52087/v1/watchers/login"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:06-05:00" level=debug msg="token toto will expire on 2029-11-30 14:14:24 +0100 +0100"
time="2024-12-19T07:29:06-05:00" level=debug msg="body -> {\"attachment_key\":\"badkey\",\"name\":\"\",\"tags\":[],\"overwrite\":false}\n"
time="2024-12-19T07:29:06-05:00" level=info msg="bad key"
time="2024-12-19T07:29:06-05:00" level=debug msg="resp-jwt: 403"
time="2024-12-19T07:29:06-05:00" level=info msg="max attempts reached for status code 403"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:06 GMT]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Length: [54]"
time="2024-12-19T07:29:06-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:06-05:00" level=debug msg="Response: HTTP/1.1 403 Forbidden\r\nContent-Length: 54\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:06 GMT\r\n\r\n{\"message\":\"the attachment key provided is not valid\"}"
--- PASS: TestWatcherEnroll (0.00s)
=== RUN   TestNewRequestInvalid
--- PASS: TestNewRequestInvalid (0.00s)
=== RUN   TestNewRequestTimeout
time="2024-12-19T07:29:06-05:00" level=debug msg="[URL] GET http://127.0.0.1:52092/v1/alerts"
time="2024-12-19T07:29:06-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52092/v1/watchers/login"
time="2024-12-19T07:29:08-05:00" level=debug msg="auth-jwt : http 200"
--- PASS: TestNewRequestTimeout (2.03s)
=== RUN   TestNewClientOk
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52098/v1/alerts"
time="2024-12-19T07:29:08-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52098/v1/watchers/login"
time="2024-12-19T07:29:08-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="token oklol will expire on 2030-01-02 15:04:05 +0000 UTC"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [0]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\nContent-Length: 0\r\n\r\n"
--- PASS: TestNewClientOk (0.00s)
=== RUN   TestNewClientOk_UnixSocket
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://unix/v1/alerts"
time="2024-12-19T07:29:08-05:00" level=debug msg="auth-jwt(auth): POST http://unix/v1/watchers/login"
time="2024-12-19T07:29:08-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="token oklol will expire on 2030-01-02 15:04:05 +0000 UTC"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [0]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\nContent-Length: 0\r\n\r\n"
--- PASS: TestNewClientOk_UnixSocket (0.00s)
=== RUN   TestNewClientKo
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52101/v1/alerts"
time="2024-12-19T07:29:08-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52101/v1/watchers/login"
time="2024-12-19T07:29:08-05:00" level=debug msg="auth-jwt : http 401"
time="2024-12-19T07:29:08-05:00" level=debug msg="received response status \"401 Unauthorized\" when fetching http://127.0.0.1:52101/v1/watchers/login"
time="2024-12-19T07:29:08-05:00" level=info msg="err-> performing request: Get \"http://127.0.0.1:52101/v1/alerts\": API error: bad login/password"
--- PASS: TestNewClientKo (0.00s)
=== RUN   TestNewDefaultClient
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52103/v1/alerts"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [32]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 401 Unauthorized\r\nContent-Length: 32\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n{\"code\": 401, \"message\" : \"brr\"}"
time="2024-12-19T07:29:08-05:00" level=info msg="err-> performing request: API error: brr"
--- PASS: TestNewDefaultClient (0.00s)
=== RUN   TestNewDefaultClient_UnixSocket
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://unix/v1/alerts"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [32]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 401 Unauthorized\r\nContent-Length: 32\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n{\"code\": 401, \"message\" : \"brr\"}"
time="2024-12-19T07:29:08-05:00" level=info msg="err-> performing request: API error: brr"
--- PASS: TestNewDefaultClient_UnixSocket (0.00s)
=== RUN   TestNewClientRegisterKO
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] POST http://127.0.0.1:4242/v1/watchers"
--- PASS: TestNewClientRegisterKO (0.00s)
=== RUN   TestNewClientRegisterOK
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] POST http://127.0.0.1:52107/v1/watchers"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [65]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 65\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n{\"code\": 200, \"expire\": \"2030-01-02T15:04:05Z\", \"token\": \"oklol\"}"
time="2024-12-19T07:29:08-05:00" level=info msg="->*apiclient.ApiClient"
--- PASS: TestNewClientRegisterOK (0.00s)
=== RUN   TestNewClientRegisterOK_UnixSocket
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] POST http://unix/v1/watchers"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [65]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 65\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n{\"code\": 200, \"expire\": \"2030-01-02T15:04:05Z\", \"token\": \"oklol\"}"
time="2024-12-19T07:29:08-05:00" level=info msg="->*apiclient.ApiClient"
--- PASS: TestNewClientRegisterOK_UnixSocket (0.00s)
=== RUN   TestNewClientBadAnswer
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] POST http://127.0.0.1:52110/v1/watchers"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [3]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 401 Unauthorized\r\nContent-Length: 3\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\nbad"
--- PASS: TestNewClientBadAnswer (0.00s)
=== RUN   TestDecisionsList
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52112/v1/decisions?ip=1.2.3.4"
time="2024-12-19T07:29:08-05:00" level=debug msg="req-api: GET http://127.0.0.1:52112/v1/decisions?ip=1.2.3.4"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-api: http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [185]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 185\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n[{\"duration\":\"3h59m55.756182786s\",\"id\":4,\"origin\":\"cscli\",\"scenario\":\"manual 'ban' from '82929df7ee394b73b81252fe3b4e50203yaT2u6nXiaN7Ix9'\",\"scope\":\"Ip\",\"type\":\"ban\",\"value\":\"1.2.3.4\"}]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52112/v1/decisions?ip=1.2.3.5"
time="2024-12-19T07:29:08-05:00" level=debug msg="req-api: GET http://127.0.0.1:52112/v1/decisions?ip=1.2.3.5"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-api: http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [4]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 4\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\nnull"
--- PASS: TestDecisionsList (0.00s)
=== RUN   TestDecisionsStream
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52114/v1/decisions/stream?startup=true"
time="2024-12-19T07:29:08-05:00" level=debug msg="req-api: GET http://127.0.0.1:52114/v1/decisions/stream?startup=true"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-api: http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [208]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 208\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n{\"deleted\":null,\"new\":[{\"duration\":\"3h59m55.756182786s\",\"id\":4,\"origin\":\"cscli\",\"scenario\":\"manual 'ban' from '82929df7ee394b73b81252fe3b4e50203yaT2u6nXiaN7Ix9'\",\"scope\":\"Ip\",\"type\":\"ban\",\"value\":\"1.2.3.4\"}]}"
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52114/v1/decisions/stream?"
time="2024-12-19T07:29:08-05:00" level=debug msg="req-api: GET http://127.0.0.1:52114/v1/decisions/stream?"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-api: http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [27]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 27\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n{\"deleted\":null,\"new\":null}"
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] DELETE http://127.0.0.1:52114/v1/decisions"
time="2024-12-19T07:29:08-05:00" level=debug msg="req-api: DELETE http://127.0.0.1:52114/v1/decisions"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-api: http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [0]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\nContent-Length: 0\r\n\r\n"
--- PASS: TestDecisionsStream (0.00s)
=== RUN   TestDecisionsStreamV3Compatibility
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52116/v3/decisions/stream?startup=true"
time="2024-12-19T07:29:08-05:00" level=debug msg="req-api: GET http://127.0.0.1:52116/v3/decisions/stream?startup=true"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-api: http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [226]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 226\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n{\"deleted\":[{\"scope\":\"ip\",\"decisions\":[\"1.2.3.5\"]}],\"new\":[{\"scope\":\"ip\", \"scenario\": \"manual 'ban' from '82929df7ee394b73b81252fe3b4e50203yaT2u6nXiaN7Ix9'\", \"decisions\":[{\"duration\":\"3h59m55.756182786s\",\"value\":\"1.2.3.4\"}]}]}"
--- PASS: TestDecisionsStreamV3Compatibility (0.00s)
=== RUN   TestDecisionsStreamV3
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52118/v3/decisions/stream?startup=true"
time="2024-12-19T07:29:08-05:00" level=debug msg="req-api: GET http://127.0.0.1:52118/v3/decisions/stream?startup=true"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-api: http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [354]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 354\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n{\"deleted\":[{\"scope\":\"ip\",\"decisions\":[\"1.2.3.5\"]}],\n\t\t\t\"new\":[{\"scope\":\"ip\", \"scenario\": \"manual 'ban' from '82929df7ee394b73b81252fe3b4e50203yaT2u6nXiaN7Ix9'\", \"decisions\":[{\"duration\":\"3h59m55.756182786s\",\"value\":\"1.2.3.4\"}]}],\n\t\t\t\"links\": {\"blocklists\":[{\"name\":\"blocklist1\",\"url\":\"/v3/blocklist\",\"scope\":\"ip\",\"remediation\":\"ban\",\"duration\":\"24h\"}]}}"
--- PASS: TestDecisionsStreamV3 (0.00s)
=== RUN   TestDecisionsFromBlocklist
time="2024-12-19T07:29:08-05:00" level=debug msg="Fetching blocklist http://127.0.0.1:52120/v3/blocklist"
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52120/v3/blocklist"
time="2024-12-19T07:29:08-05:00" level=info msg="decision1: &{Duration:0x29700e50 ID:0 Origin:0x296c90f0 Scenario:0x29700e58 Scope:0x29700e68 Simulated: Type:0x29700e60 Until: UUID: Value:0x296c90e8}"
time="2024-12-19T07:29:08-05:00" level=info msg="expected1: &{Duration:0x29700e50 ID:0 Origin:0x29700e78 Scenario:0x29700e58 Scope:0x29700e68 Simulated: Type:0x29700e60 Until: UUID: Value:0x29700e80}"
time="2024-12-19T07:29:08-05:00" level=info msg="decisions: 1.2.3.4, 24h, blocklist1, ip, ban, lists"
time="2024-12-19T07:29:08-05:00" level=info msg="expected : 1.2.3.4, 24h, blocklist1, ip, ban"
time="2024-12-19T07:29:08-05:00" level=info msg="decisions: 1.2.3.5, 24h, blocklist1, ip, ban"
time="2024-12-19T07:29:08-05:00" level=debug msg="Fetching blocklist http://127.0.0.1:52120/v3/blocklist"
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52120/v3/blocklist"
time="2024-12-19T07:29:08-05:00" level=debug msg="Blocklist http://127.0.0.1:52120/v3/blocklist has not been modified since Sun, 01 Jan 2023 01:01:01 GMT"
time="2024-12-19T07:29:08-05:00" level=debug msg="Fetching blocklist http://127.0.0.1:52120/v3/blocklist"
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] GET http://127.0.0.1:52120/v3/blocklist"
--- PASS: TestDecisionsFromBlocklist (0.00s)
=== RUN   TestDeleteDecisions
time="2024-12-19T07:29:08-05:00" level=info msg="URL is http://127.0.0.1:52122"
time="2024-12-19T07:29:08-05:00" level=debug msg="[URL] DELETE http://127.0.0.1:52122/v1/decisions?ip=1.2.3.4"
time="2024-12-19T07:29:08-05:00" level=debug msg="auth-jwt(auth): POST http://127.0.0.1:52122/v1/watchers/login"
time="2024-12-19T07:29:08-05:00" level=debug msg="auth-jwt : http 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="token oklol will expire on 2030-01-02 15:04:05 +0000 UTC"
time="2024-12-19T07:29:08-05:00" level=debug msg="resp-jwt: 200"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Date: [Thu, 19 Dec 2024 12:29:08 GMT]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Length: [17]"
time="2024-12-19T07:29:08-05:00" level=debug msg="[headers] Content-Type: [text/plain; charset=utf-8]"
time="2024-12-19T07:29:08-05:00" level=debug msg="Response: HTTP/1.1 200 OK\r\nContent-Length: 17\r\nContent-Type: text/plain; charset=utf-8\r\nDate: Thu, 19 Dec 2024 12:29:08 GMT\r\n\r\n{\"nbDeleted\":\"1\"}"
--- PASS: TestDeleteDecisions (0.00s)
=== RUN   TestDecisionsStreamOpts_addQueryParamsToURL
=== RUN   TestDecisionsStreamOpts_addQueryParamsToURL/no_filter
=== RUN   TestDecisionsStreamOpts_addQueryParamsToURL/startup=true
=== RUN   TestDecisionsStreamOpts_addQueryParamsToURL/set_all_params
--- PASS: TestDecisionsStreamOpts_addQueryParamsToURL (0.00s)
    --- PASS: TestDecisionsStreamOpts_addQueryParamsToURL/no_filter (0.00s)
    --- PASS: TestDecisionsStreamOpts_addQueryParamsToURL/startup=true (0.00s)
    --- PASS: TestDecisionsStreamOpts_addQueryParamsToURL/set_all_params (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/apiclient	2.068s
=== RUN   TestSimulatedAlert
time="2024-12-19T07:29:08-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:08-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestSimulatedAlert (0.16s)
=== RUN   TestCreateAlert
time="2024-12-19T07:29:08-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:08-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestCreateAlert (0.16s)
=== RUN   TestCreateAlertChannels
time="2024-12-19T07:29:08-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:08-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestCreateAlertChannels (0.15s)
=== RUN   TestAlertListFilters
time="2024-12-19T07:29:08-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:08-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestAlertListFilters (0.16s)
=== RUN   TestAlertBulkInsert
time="2024-12-19T07:29:09-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:09-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestAlertBulkInsert (0.25s)
=== RUN   TestListAlert
time="2024-12-19T07:29:09-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:09-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestListAlert (0.18s)
=== RUN   TestCreateAlertErrors
time="2024-12-19T07:29:09-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:09-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestCreateAlertErrors (0.15s)
=== RUN   TestDeleteAlert
time="2024-12-19T07:29:09-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:09-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestDeleteAlert (0.15s)
=== RUN   TestDeleteAlertByID
time="2024-12-19T07:29:09-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:09-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestDeleteAlertByID (0.16s)
=== RUN   TestDeleteAlertTrustedIPS
time="2024-12-19T07:29:09-05:00" level=warning msg="Failed to parse client IP for watcher self registration: "
--- PASS: TestDeleteAlertTrustedIPS (0.18s)
=== RUN   TestAPIKey
time="2024-12-19T07:29:10-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:10-05:00" level=error msg="API key not found" ip=
time="2024-12-19T07:29:10-05:00" level=error msg="while fetching bouncer info: ent: bouncer not found" ip=
--- PASS: TestAPIKey (0.02s)
=== RUN   TestAPICSendMetrics
=== RUN   TestAPICSendMetrics/basic
time="2024-12-19T07:29:10-05:00" level=info msg="Start sending metrics to CrowdSec Central API (interval: 0s once, then 20ms)"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
=== RUN   TestAPICSendMetrics/with_some_metrics
time="2024-12-19T07:29:10-05:00" level=info msg="Start sending metrics to CrowdSec Central API (interval: 0s once, then 20ms)"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
time="2024-12-19T07:29:10-05:00" level=info msg="capi metrics: sending"
--- PASS: TestAPICSendMetrics (0.25s)
    --- PASS: TestAPICSendMetrics/basic (0.13s)
    --- PASS: TestAPICSendMetrics/with_some_metrics (0.13s)
=== RUN   TestAPICCAPIPullIsOld
    apic_test.go:140: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/apiserver/apic_test.go:140
        	Error:      	Should be false
        	Test:       	TestAPICCAPIPullIsOld
--- FAIL: TestAPICCAPIPullIsOld (0.01s)
=== RUN   TestAPICFetchScenariosListFromDB
=== RUN   TestAPICFetchScenariosListFromDB/Simple_one_machine_with_two_scenarios
=== RUN   TestAPICFetchScenariosListFromDB/Multi_machine_with_custom+hub_scenarios
--- PASS: TestAPICFetchScenariosListFromDB (0.01s)
    --- PASS: TestAPICFetchScenariosListFromDB/Simple_one_machine_with_two_scenarios (0.00s)
    --- PASS: TestAPICFetchScenariosListFromDB/Multi_machine_with_custom+hub_scenarios (0.01s)
=== RUN   TestNewAPIC
=== RUN   TestNewAPIC/simple
=== RUN   TestNewAPIC/error_in_parsing_URL
--- PASS: TestNewAPIC (0.01s)
    --- PASS: TestNewAPIC/simple (0.00s)
    --- PASS: TestNewAPIC/error_in_parsing_URL (0.00s)
=== RUN   TestAPICHandleDeletedDecisions
    apic_test.go:288: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/apiserver/apic_test.go:288
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 0
        	Test:       	TestAPICHandleDeletedDecisions
    apic_test.go:289: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/apiserver/apic_test.go:289
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 0
        	Test:       	TestAPICHandleDeletedDecisions
--- FAIL: TestAPICHandleDeletedDecisions (0.00s)
=== RUN   TestAPICGetMetrics
=== RUN   TestAPICGetMetrics/no_bouncers_nor_machines_should_still_have_bouncers/machines_keys_in_output
=== RUN   TestAPICGetMetrics/simple
--- PASS: TestAPICGetMetrics (0.01s)
    --- PASS: TestAPICGetMetrics/no_bouncers_nor_machines_should_still_have_bouncers/machines_keys_in_output (0.00s)
    --- PASS: TestAPICGetMetrics/simple (0.01s)
=== RUN   TestCreateAlertsForDecision
=== RUN   TestCreateAlertsForDecision/2_decisions_CAPI_List_Decisions_should_create_2_alerts
=== RUN   TestCreateAlertsForDecision/2_decisions_CAPI_List_same_scenario_decisions_should_create_1_alert
=== RUN   TestCreateAlertsForDecision/5_decisions_from_community_list_should_create_1_alert
--- PASS: TestCreateAlertsForDecision (0.00s)
    --- PASS: TestCreateAlertsForDecision/2_decisions_CAPI_List_Decisions_should_create_2_alerts (0.00s)
    --- PASS: TestCreateAlertsForDecision/2_decisions_CAPI_List_same_scenario_decisions_should_create_1_alert (0.00s)
    --- PASS: TestCreateAlertsForDecision/5_decisions_from_community_list_should_create_1_alert (0.00s)
=== RUN   TestFillAlertsWithDecisions
=== RUN   TestFillAlertsWithDecisions/1_CAPI_alert_should_pair_up_with_n_CAPI_decisions
=== RUN   TestFillAlertsWithDecisions/List_alert_should_pair_up_only_with_decisions_having_same_scenario
--- PASS: TestFillAlertsWithDecisions (0.00s)
    --- PASS: TestFillAlertsWithDecisions/1_CAPI_alert_should_pair_up_with_n_CAPI_decisions (0.00s)
    --- PASS: TestFillAlertsWithDecisions/List_alert_should_pair_up_only_with_decisions_having_same_scenario (0.00s)
=== RUN   TestAPICWhitelists
time="2024-12-19T07:29:10-05:00" level=info msg="Starting community-blocklist update"
time="2024-12-19T07:29:10-05:00" level=info msg="capi/community-blocklist : 0 explicit deletions"
time="2024-12-19T07:29:10-05:00" level=info msg="13.2.3.4 from crowdsecurity/test1 is whitelisted by 13.2.3.0/24"
time="2024-12-19T07:29:10-05:00" level=info msg="13.2.3.5 from crowdsecurity/test2 is whitelisted by 13.2.3.0/24"
time="2024-12-19T07:29:10-05:00" level=info msg="9.2.3.4 from crowdsecurity/test1 is whitelisted by 9.2.3.4"
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="crowdsecurity/community-blocklist : added 2 entries, deleted 0 entries (alert:1)"
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="lists:blocklist1 : added 1 entries, deleted 0 entries (alert:2)"
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="lists:blocklist2 : added 1 entries, deleted 0 entries (alert:3)"
    apic_test.go:96: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/apiserver/apic_test.go:96
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/apiserver/apic_test.go:688
        	Error:      	"[Decision(id=1, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Thu Dec 19 08:29:10 2024, scenario=crowdsecurity/ssh-bf, type=ban, start_ip=0, end_ip=0, start_suffix=0, end_suffix=0, ip_size=0, scope=Ip, value=9.9.9.9, origin=CAPI, simulated=false, uuid=, alert_decisions=0) Decision(id=2, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Fri Dec 20 12:29:10 2024, scenario=crowdsecurity/test1, type=ban, start_ip=-9223372036821089531, end_ip=-9223372036821089531, start_suffix=-9223372036854775807, end_suffix=-9223372036854775807, ip_size=4, scope=Ip, value=2.2.3.4, origin=CAPI, simulated=false, uuid=, alert_decisions=1) Decision(id=3, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Fri Dec 20 12:29:10 2024, scenario=crowdsecurity/test1, type=ban, start_ip=-9223372036753980667, end_ip=-9223372036753980667, start_suffix=-9223372036854775807, end_suffix=-9223372036854775807, ip_size=4, scope=Ip, value=6.2.3.4, origin=CAPI, simulated=false, uuid=, alert_decisions=1) Decision(id=4, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Fri Dec 20 12:29:10 2024, scenario=blocklist1, type=ban, start_ip=-9223372036837866745, end_ip=-9223372036837866745, start_suffix=-9223372036854775807, end_suffix=-9223372036854775807, ip_size=4, scope=Ip, value=1.2.3.6, origin=lists, simulated=false, uuid=, alert_decisions=2) Decision(id=5, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Fri Dec 20 12:29:10 2024, scenario=blocklist2, type=ban, start_ip=-9223372036837866744, end_ip=-9223372036837866744, start_suffix=-9223372036854775807, end_suffix=-9223372036854775807, ip_size=4, scope=Ip, value=1.2.3.7, origin=lists, simulated=false, uuid=, alert_decisions=3)]" should have 4 item(s), but has 5
        	Test:       	TestAPICWhitelists
--- FAIL: TestAPICWhitelists (0.03s)
=== RUN   TestAPICPullTop
time="2024-12-19T07:29:10-05:00" level=info msg="Starting community-blocklist update"
time="2024-12-19T07:29:10-05:00" level=info msg="capi/community-blocklist : 0 explicit deletions"
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="crowdsecurity/community-blocklist : added 2 entries, deleted 0 entries (alert:1)"
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="lists:blocklist1 : added 1 entries, deleted 0 entries (alert:2)"
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="lists:blocklist2 : added 1 entries, deleted 0 entries (alert:3)"
    apic_test.go:96: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/apiserver/apic_test.go:96
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/apiserver/apic_test.go:829
        	Error:      	"[Decision(id=1, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Thu Dec 19 08:29:10 2024, scenario=crowdsecurity/ssh-bf, type=ban, start_ip=0, end_ip=0, start_suffix=0, end_suffix=0, ip_size=0, scope=Ip, value=9.9.9.9, origin=CAPI, simulated=false, uuid=, alert_decisions=0) Decision(id=2, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Fri Dec 20 12:29:10 2024, scenario=crowdsecurity/test1, type=ban, start_ip=-9223372036837866747, end_ip=-9223372036837866747, start_suffix=-9223372036854775807, end_suffix=-9223372036854775807, ip_size=4, scope=Ip, value=1.2.3.4, origin=CAPI, simulated=false, uuid=, alert_decisions=1) Decision(id=3, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Fri Dec 20 12:29:10 2024, scenario=crowdsecurity/test2, type=ban, start_ip=-9223372036837866746, end_ip=-9223372036837866746, start_suffix=-9223372036854775807, end_suffix=-9223372036854775807, ip_size=4, scope=Ip, value=1.2.3.5, origin=CAPI, simulated=false, uuid=, alert_decisions=1) Decision(id=4, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Fri Dec 20 12:29:10 2024, scenario=blocklist1, type=ban, start_ip=-9223372036837866745, end_ip=-9223372036837866745, start_suffix=-9223372036854775807, end_suffix=-9223372036854775807, ip_size=4, scope=Ip, value=1.2.3.6, origin=lists, simulated=false, uuid=, alert_decisions=2) Decision(id=5, created_at=Thu Dec 19 12:29:10 2024, updated_at=Thu Dec 19 12:29:10 2024, until=Fri Dec 20 12:29:10 2024, scenario=blocklist2, type=ban, start_ip=-9223372036837866744, end_ip=-9223372036837866744, start_suffix=-9223372036854775807, end_suffix=-9223372036854775807, ip_size=4, scope=Ip, value=1.2.3.7, origin=lists, simulated=false, uuid=, alert_decisions=3)]" should have 4 item(s), but has 5
        	Test:       	TestAPICPullTop
--- FAIL: TestAPICPullTop (0.01s)
=== RUN   TestAPICPullTopBLCacheFirstCall
time="2024-12-19T07:29:10-05:00" level=info msg="Starting community-blocklist update"
time="2024-12-19T07:29:10-05:00" level=info msg="capi/community-blocklist : 0 explicit deletions"
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="crowdsecurity/community-blocklist : added 1 entries, deleted 0 entries (alert:1)"
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="lists:blocklist1 : added 1 entries, deleted 0 entries (alert:2)"
time="2024-12-19T07:29:10-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
--- PASS: TestAPICPullTopBLCacheFirstCall (0.01s)
=== RUN   TestAPICPullTopBLCacheForceCall
time="2024-12-19T07:29:10-05:00" level=info msg="Starting community-blocklist update"
time="2024-12-19T07:29:10-05:00" level=info msg="capi/community-blocklist : 0 explicit deletions"
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="crowdsecurity/community-blocklist : added 1 entries, deleted 0 entries (alert:2)"
time="2024-12-19T07:29:10-05:00" level=info msg="blocklist blocklist1 hasn't been modified or there was an error reading it, skipping"
--- PASS: TestAPICPullTopBLCacheForceCall (0.01s)
=== RUN   TestAPICPullBlocklistCall
time="2024-12-19T07:29:10-05:00" level=warning msg="sqlite is not using WAL mode, LAPI might become unresponsive when inserting the community blocklist"
time="2024-12-19T07:29:10-05:00" level=info msg="lists:blocklist1 : added 1 entries, deleted 0 entries (alert:1)"
--- PASS: TestAPICPullBlocklistCall (0.01s)
=== RUN   TestAPICPush
=== RUN   TestAPICPush/simple_single_alert
time="2024-12-19T07:29:10-05:00" level=info msg="Start push to CrowdSec Central API (interval: 0s once, then 1ms)"
time="2024-12-19T07:29:10-05:00" level=info msg="Signal push: 1 signals to push"
time="2024-12-19T07:29:11-05:00" level=info msg="push tomb is dying, sending cache (0 elements) before exiting"
=== RUN   TestAPICPush/simulated_alert_is_not_pushed
time="2024-12-19T07:29:11-05:00" level=info msg="Start push to CrowdSec Central API (interval: 0s once, then 1ms)"
time="2024-12-19T07:29:12-05:00" level=info msg="push tomb is dying, sending cache (0 elements) before exiting"
=== RUN   TestAPICPush/1_request_per_50_alerts
time="2024-12-19T07:29:12-05:00" level=info msg="Start push to CrowdSec Central API (interval: 0s once, then 1ms)"
time="2024-12-19T07:29:12-05:00" level=info msg="Signal push: 100 signals to push"
time="2024-12-19T07:29:13-05:00" level=info msg="push tomb is dying, sending cache (0 elements) before exiting"
--- PASS: TestAPICPush (3.02s)
    --- PASS: TestAPICPush/simple_single_alert (1.01s)
    --- PASS: TestAPICPush/simulated_alert_is_not_pushed (1.00s)
    --- PASS: TestAPICPush/1_request_per_50_alerts (1.01s)
=== RUN   TestAPICPull
=== RUN   TestAPICPull/test_pull_if_no_scenarios_are_present
=== RUN   TestAPICPull/test_pull
--- PASS: TestAPICPull (1.05s)
    --- PASS: TestAPICPull/test_pull_if_no_scenarios_are_present (0.54s)
    --- PASS: TestAPICPull/test_pull (0.51s)
=== RUN   TestShouldShareAlert
=== RUN   TestShouldShareAlert/custom_alert_should_be_shared_if_config_enables_it
=== RUN   TestShouldShareAlert/custom_alert_should_not_be_shared_if_config_disables_it
=== RUN   TestShouldShareAlert/manual_alert_should_be_shared_if_config_enables_it
=== RUN   TestShouldShareAlert/manual_alert_should_not_be_shared_if_config_disables_it
=== RUN   TestShouldShareAlert/manual_alert_should_be_shared_if_config_enables_it#01
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
=== RUN   TestShouldShareAlert/manual_alert_should_not_be_shared_if_config_disables_it#01
--- PASS: TestShouldShareAlert (0.00s)
    --- PASS: TestShouldShareAlert/custom_alert_should_be_shared_if_config_enables_it (0.00s)
    --- PASS: TestShouldShareAlert/custom_alert_should_not_be_shared_if_config_disables_it (0.00s)
    --- PASS: TestShouldShareAlert/manual_alert_should_be_shared_if_config_enables_it (0.00s)
    --- PASS: TestShouldShareAlert/manual_alert_should_not_be_shared_if_config_disables_it (0.00s)
    --- PASS: TestShouldShareAlert/manual_alert_should_be_shared_if_config_enables_it#01 (0.00s)
    --- PASS: TestShouldShareAlert/manual_alert_should_not_be_shared_if_config_disables_it#01 (0.00s)
=== RUN   TestWithWrongDBConfig
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
--- PASS: TestWithWrongDBConfig (0.00s)
=== RUN   TestWithWrongFlushConfig
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
--- PASS: TestWithWrongFlushConfig (0.01s)
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
=== RUN   TestUnknownPath
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
time="2024-12-19T07:29:14-05:00" level=info msg="Creating new API server"
time="2024-12-19T07:29:14-05:00" level=info msg="last CAPI pull is newer than 1h30, skip."
--- PASS: TestUnknownPath (0.01s)
=== RUN   TestLoggingDebugToFileConfig
--- PASS: TestLoggingDebugToFileConfig (0.51s)
=== RUN   TestLoggingErrorToFileConfig
--- PASS: TestLoggingErrorToFileConfig (0.51s)
=== RUN   TestDeleteDecisionRange
--- PASS: TestDeleteDecisionRange (0.20s)
=== RUN   TestDeleteDecisionFilter
--- PASS: TestDeleteDecisionFilter (0.20s)
=== RUN   TestDeleteDecisionFilterByScenario
--- PASS: TestDeleteDecisionFilterByScenario (0.18s)
=== RUN   TestGetDecisionFilters
--- PASS: TestGetDecisionFilters (0.19s)
=== RUN   TestGetDecision
--- PASS: TestGetDecision (0.20s)
=== RUN   TestDeleteDecisionByID
--- PASS: TestDeleteDecisionByID (0.22s)
=== RUN   TestDeleteDecision
--- PASS: TestDeleteDecision (0.21s)
=== RUN   TestStreamStartDecisionDedup
--- PASS: TestStreamStartDecisionDedup (0.22s)
=== RUN   TestHeartBeat
--- PASS: TestHeartBeat (0.19s)
=== RUN   TestLogin
--- PASS: TestLogin (0.29s)
=== RUN   TestCreateMachine
--- PASS: TestCreateMachine (0.07s)
=== RUN   TestCreateMachineWithForwardedFor
--- PASS: TestCreateMachineWithForwardedFor (0.08s)
=== RUN   TestCreateMachineWithForwardedForNoConfig
--- PASS: TestCreateMachineWithForwardedForNoConfig (0.09s)
=== RUN   TestCreateMachineWithoutForwardedFor
--- PASS: TestCreateMachineWithoutForwardedFor (0.08s)
=== RUN   TestCreateMachineAlreadyExist
--- PASS: TestCreateMachineAlreadyExist (0.22s)
=== RUN   TestAutoRegistration
--- PASS: TestAutoRegistration (0.14s)
=== RUN   TestLPMetrics
=== RUN   TestLPMetrics/empty_metrics_for_LP
=== RUN   TestLPMetrics/basic_metrics_with_empty_dynamic_metrics_for_LP
=== RUN   TestLPMetrics/basic_metrics_with_dynamic_metrics_for_LP
=== RUN   TestLPMetrics/wrong_auth_type_for_LP
=== RUN   TestLPMetrics/missing_OS_field_for_LP
=== RUN   TestLPMetrics/missing_datasources_for_LP
=== RUN   TestLPMetrics/missing_feature_flags_for_LP
=== RUN   TestLPMetrics/missing_OS_name
--- PASS: TestLPMetrics (1.47s)
    --- PASS: TestLPMetrics/empty_metrics_for_LP (0.16s)
    --- PASS: TestLPMetrics/basic_metrics_with_empty_dynamic_metrics_for_LP (0.19s)
    --- PASS: TestLPMetrics/basic_metrics_with_dynamic_metrics_for_LP (0.18s)
    --- PASS: TestLPMetrics/wrong_auth_type_for_LP (0.22s)
    --- PASS: TestLPMetrics/missing_OS_field_for_LP (0.18s)
    --- PASS: TestLPMetrics/missing_datasources_for_LP (0.19s)
    --- PASS: TestLPMetrics/missing_feature_flags_for_LP (0.18s)
    --- PASS: TestLPMetrics/missing_OS_name (0.17s)
=== RUN   TestRCMetrics
=== RUN   TestRCMetrics/empty_metrics_for_RC
=== RUN   TestRCMetrics/basic_metrics_with_empty_dynamic_metrics_for_RC
=== RUN   TestRCMetrics/basic_metrics_with_dynamic_metrics_for_RC
=== RUN   TestRCMetrics/wrong_auth_type_for_RC
=== RUN   TestRCMetrics/missing_OS_field_for_RC
=== RUN   TestRCMetrics/missing_feature_flags_for_RC
=== RUN   TestRCMetrics/missing_OS_name
--- PASS: TestRCMetrics (1.42s)
    --- PASS: TestRCMetrics/empty_metrics_for_RC (0.18s)
    --- PASS: TestRCMetrics/basic_metrics_with_empty_dynamic_metrics_for_RC (0.18s)
    --- PASS: TestRCMetrics/basic_metrics_with_dynamic_metrics_for_RC (0.33s)
    --- PASS: TestRCMetrics/wrong_auth_type_for_RC (0.20s)
    --- PASS: TestRCMetrics/missing_OS_field_for_RC (0.20s)
    --- PASS: TestRCMetrics/missing_feature_flags_for_RC (0.18s)
    --- PASS: TestRCMetrics/missing_OS_name (0.16s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/apiserver	12.933s
=== RUN   TestCollapseRepeatedPrefix
=== RUN   TestCollapseRepeatedPrefix/aaabbbcccaaa
=== RUN   TestCollapseRepeatedPrefix/hellohellohello_world
=== RUN   TestCollapseRepeatedPrefix/ababababxyz
=== RUN   TestCollapseRepeatedPrefix/xyzxyzxyzxyzxyz
=== RUN   TestCollapseRepeatedPrefix/123123123456
--- PASS: TestCollapseRepeatedPrefix (0.00s)
    --- PASS: TestCollapseRepeatedPrefix/aaabbbcccaaa (0.00s)
    --- PASS: TestCollapseRepeatedPrefix/hellohellohello_world (0.00s)
    --- PASS: TestCollapseRepeatedPrefix/ababababxyz (0.00s)
    --- PASS: TestCollapseRepeatedPrefix/xyzxyzxyzxyzxyz (0.00s)
    --- PASS: TestCollapseRepeatedPrefix/123123123456 (0.00s)
=== RUN   TestRepeatedPrefixError
--- PASS: TestRepeatedPrefixError (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/apiserver/controllers/v1	0.058s
=== RUN   TestParseQuery
=== RUN   TestParseQuery/Simple_query
=== RUN   TestParseQuery/Multiple_values
=== RUN   TestParseQuery/Empty_value
=== RUN   TestParseQuery/Empty_key
=== RUN   TestParseQuery/Empty_query
=== RUN   TestParseQuery/Multiple_keys
=== RUN   TestParseQuery/Multiple_keys_with_empty_value
=== RUN   TestParseQuery/Multiple_keys_with_empty_value_and_empty_key
=== RUN   TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values
=== RUN   TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters
=== RUN   TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters_and_semicolon
=== RUN   TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters_and_semicolon_and_ampersand
=== RUN   TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters_and_semicolon_and_ampersand_and_equals
=== RUN   TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters_and_semicolon_and_ampersand_and_equals_and_question_mark
=== RUN   TestParseQuery/keys_with_escaped_characters
=== RUN   TestParseQuery/hexadecimal_characters
=== RUN   TestParseQuery/hexadecimal_characters_upper_and_lower_case
=== RUN   TestParseQuery/hexadecimal_characters_with_invalid_characters
=== RUN   TestParseQuery/hexadecimal_characters_with_invalid_hex_characters
=== RUN   TestParseQuery/hexadecimal_characters_with_invalid_2nd_hex_character
=== RUN   TestParseQuery/url_+
=== RUN   TestParseQuery/url_&&
--- PASS: TestParseQuery (0.00s)
    --- PASS: TestParseQuery/Simple_query (0.00s)
    --- PASS: TestParseQuery/Multiple_values (0.00s)
    --- PASS: TestParseQuery/Empty_value (0.00s)
    --- PASS: TestParseQuery/Empty_key (0.00s)
    --- PASS: TestParseQuery/Empty_query (0.00s)
    --- PASS: TestParseQuery/Multiple_keys (0.00s)
    --- PASS: TestParseQuery/Multiple_keys_with_empty_value (0.00s)
    --- PASS: TestParseQuery/Multiple_keys_with_empty_value_and_empty_key (0.00s)
    --- PASS: TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values (0.00s)
    --- PASS: TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters (0.00s)
    --- PASS: TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters_and_semicolon (0.00s)
    --- PASS: TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters_and_semicolon_and_ampersand (0.00s)
    --- PASS: TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters_and_semicolon_and_ampersand_and_equals (0.00s)
    --- PASS: TestParseQuery/Multiple_keys_with_empty_value_and_empty_key_and_multiple_values_and_escaped_characters_and_semicolon_and_ampersand_and_equals_and_question_mark (0.00s)
    --- PASS: TestParseQuery/keys_with_escaped_characters (0.00s)
    --- PASS: TestParseQuery/hexadecimal_characters (0.00s)
    --- PASS: TestParseQuery/hexadecimal_characters_upper_and_lower_case (0.00s)
    --- PASS: TestParseQuery/hexadecimal_characters_with_invalid_characters (0.00s)
    --- PASS: TestParseQuery/hexadecimal_characters_with_invalid_hex_characters (0.00s)
    --- PASS: TestParseQuery/hexadecimal_characters_with_invalid_2nd_hex_character (0.00s)
    --- PASS: TestParseQuery/url_+ (0.00s)
    --- PASS: TestParseQuery/url_&& (0.00s)
=== RUN   TestBodyDumper
=== RUN   TestBodyDumper/default_filter_(cookie+authorization_stripped_+_no_body)
=== RUN   TestBodyDumper/explicit_empty_filter
time="2024-12-19T07:29:10-05:00" level=warning msg="no filters, returning original request"
=== RUN   TestBodyDumper/filter_header
=== RUN   TestBodyDumper/filter_header_content
=== RUN   TestBodyDumper/with_headers
=== RUN   TestBodyDumper/drop_headers
=== RUN   TestBodyDumper/with_body
=== RUN   TestBodyDumper/with_empty_args_filter
=== RUN   TestBodyDumper/with_args_name_filter
=== RUN   TestBodyDumper/WithEmptyHeadersFilters
=== RUN   TestBodyDumper/WithArgsContentFilters
--- PASS: TestBodyDumper (0.00s)
    --- PASS: TestBodyDumper/default_filter_(cookie+authorization_stripped_+_no_body) (0.00s)
    --- PASS: TestBodyDumper/explicit_empty_filter (0.00s)
    --- PASS: TestBodyDumper/filter_header (0.00s)
    --- PASS: TestBodyDumper/filter_header_content (0.00s)
    --- PASS: TestBodyDumper/with_headers (0.00s)
    --- PASS: TestBodyDumper/drop_headers (0.00s)
    --- PASS: TestBodyDumper/with_body (0.00s)
    --- PASS: TestBodyDumper/with_empty_args_filter (0.00s)
    --- PASS: TestBodyDumper/with_args_name_filter (0.00s)
    --- PASS: TestBodyDumper/WithEmptyHeadersFilters (0.00s)
    --- PASS: TestBodyDumper/WithArgsContentFilters (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/appsec	0.065s
=== RUN   TestVPatchRuleString
=== RUN   TestVPatchRuleString/Collection_count
=== RUN   TestVPatchRuleString/Base_Rule
=== RUN   TestVPatchRuleString/One_zone,_multi_var
=== RUN   TestVPatchRuleString/Base_Rule_#2
=== RUN   TestVPatchRuleString/Base_Negative_Rule
=== RUN   TestVPatchRuleString/Multiple_Zones
=== RUN   TestVPatchRuleString/Multiple_Zones_Multi_Var
=== RUN   TestVPatchRuleString/Multiple_Zones_No_Vars
=== RUN   TestVPatchRuleString/Basic_AND
=== RUN   TestVPatchRuleString/Basic_OR
=== RUN   TestVPatchRuleString/OR_AND_mix
--- PASS: TestVPatchRuleString (0.00s)
    --- PASS: TestVPatchRuleString/Collection_count (0.00s)
    --- PASS: TestVPatchRuleString/Base_Rule (0.00s)
    --- PASS: TestVPatchRuleString/One_zone,_multi_var (0.00s)
    --- PASS: TestVPatchRuleString/Base_Rule_#2 (0.00s)
    --- PASS: TestVPatchRuleString/Base_Negative_Rule (0.00s)
    --- PASS: TestVPatchRuleString/Multiple_Zones (0.00s)
    --- PASS: TestVPatchRuleString/Multiple_Zones_Multi_Var (0.00s)
    --- PASS: TestVPatchRuleString/Multiple_Zones_No_Vars (0.00s)
    --- PASS: TestVPatchRuleString/Basic_AND (0.00s)
    --- PASS: TestVPatchRuleString/Basic_OR (0.00s)
    --- PASS: TestVPatchRuleString/OR_AND_mix (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/appsec/appsec_rule	0.008s
=== RUN   TestCreateSetGet
--- PASS: TestCreateSetGet (1.51s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/cache	1.517s
=== RUN   TestLoadLocalApiClientCfg
=== RUN   TestLoadLocalApiClientCfg/basic_valid_configuration
=== RUN   TestLoadLocalApiClientCfg/invalid_configuration
=== RUN   TestLoadLocalApiClientCfg/invalid_configuration_filepath
=== RUN   TestLoadLocalApiClientCfg/valid_configuration_with_insecure_skip_verify
--- PASS: TestLoadLocalApiClientCfg (0.00s)
    --- PASS: TestLoadLocalApiClientCfg/basic_valid_configuration (0.00s)
    --- PASS: TestLoadLocalApiClientCfg/invalid_configuration (0.00s)
    --- PASS: TestLoadLocalApiClientCfg/invalid_configuration_filepath (0.00s)
    --- PASS: TestLoadLocalApiClientCfg/valid_configuration_with_insecure_skip_verify (0.00s)
=== RUN   TestLoadOnlineApiClientCfg
=== RUN   TestLoadOnlineApiClientCfg/basic_valid_configuration
=== RUN   TestLoadOnlineApiClientCfg/invalid_configuration
=== RUN   TestLoadOnlineApiClientCfg/missing_field_configuration
time="2024-12-19T07:29:11-05:00" level=warning msg="can't load CAPI credentials from './testdata/bad_online-api-secrets.yaml' (missing password field)"
=== RUN   TestLoadOnlineApiClientCfg/invalid_configuration_filepath
--- PASS: TestLoadOnlineApiClientCfg (0.00s)
    --- PASS: TestLoadOnlineApiClientCfg/basic_valid_configuration (0.00s)
    --- PASS: TestLoadOnlineApiClientCfg/invalid_configuration (0.00s)
    --- PASS: TestLoadOnlineApiClientCfg/missing_field_configuration (0.00s)
    --- PASS: TestLoadOnlineApiClientCfg/invalid_configuration_filepath (0.00s)
=== RUN   TestLoadAPIServer
=== RUN   TestLoadAPIServer/basic_valid_configuration
=== RUN   TestLoadAPIServer/basic_invalid_configuration
time="2024-12-19T07:29:11-05:00" level=info msg="push and pull to Central API disabled"
--- PASS: TestLoadAPIServer (0.00s)
    --- PASS: TestLoadAPIServer/basic_valid_configuration (0.00s)
    --- PASS: TestLoadAPIServer/basic_invalid_configuration (0.00s)
=== RUN   TestParseCapiWhitelists
=== RUN   TestParseCapiWhitelists/empty_file
=== RUN   TestParseCapiWhitelists/empty_ip_and_cidr
=== RUN   TestParseCapiWhitelists/some_ip
=== RUN   TestParseCapiWhitelists/some_cidr
--- PASS: TestParseCapiWhitelists (0.00s)
    --- PASS: TestParseCapiWhitelists/empty_file (0.00s)
    --- PASS: TestParseCapiWhitelists/empty_ip_and_cidr (0.00s)
    --- PASS: TestParseCapiWhitelists/some_ip (0.00s)
    --- PASS: TestParseCapiWhitelists/some_cidr (0.00s)
=== RUN   TestNormalLoad
--- PASS: TestNormalLoad (0.00s)
=== RUN   TestNewCrowdSecConfig
=== RUN   TestNewCrowdSecConfig/new_configuration:_basic
--- PASS: TestNewCrowdSecConfig (0.00s)
    --- PASS: TestNewCrowdSecConfig/new_configuration:_basic (0.00s)
=== RUN   TestDefaultConfig
--- PASS: TestDefaultConfig (0.00s)
=== RUN   TestLoadCrowdsec
=== RUN   TestLoadCrowdsec/basic_valid_configuration
=== RUN   TestLoadCrowdsec/basic_valid_configuration_with_acquisition_dir
=== RUN   TestLoadCrowdsec/no_acquisition_file_and_dir
time="2024-12-19T07:29:11-05:00" level=warning msg="no acquisition_path or acquisition_dir specified"
time="2024-12-19T07:29:11-05:00" level=warning msg="no acquisition file found"
=== RUN   TestLoadCrowdsec/non_existing_acquisition_file
=== RUN   TestLoadCrowdsec/agent_disabled
time="2024-12-19T07:29:11-05:00" level=warning msg="crowdsec agent is disabled"
--- PASS: TestLoadCrowdsec (0.00s)
    --- PASS: TestLoadCrowdsec/basic_valid_configuration (0.00s)
    --- PASS: TestLoadCrowdsec/basic_valid_configuration_with_acquisition_dir (0.00s)
    --- PASS: TestLoadCrowdsec/no_acquisition_file_and_dir (0.00s)
    --- PASS: TestLoadCrowdsec/non_existing_acquisition_file (0.00s)
    --- PASS: TestLoadCrowdsec/agent_disabled (0.00s)
=== RUN   TestLoadCSCLI
=== RUN   TestLoadCSCLI/basic_valid_configuration
--- PASS: TestLoadCSCLI (0.00s)
    --- PASS: TestLoadCSCLI/basic_valid_configuration (0.00s)
=== RUN   TestLoadDBConfig
=== RUN   TestLoadDBConfig/basic_valid_configuration
=== RUN   TestLoadDBConfig/no_configuration_path
--- PASS: TestLoadDBConfig (0.00s)
    --- PASS: TestLoadDBConfig/basic_valid_configuration (0.00s)
    --- PASS: TestLoadDBConfig/no_configuration_path (0.00s)
=== RUN   TestLoadHub
=== RUN   TestLoadHub/basic_valid_configuration
--- PASS: TestLoadHub (0.00s)
    --- PASS: TestLoadHub/basic_valid_configuration (0.00s)
=== RUN   TestSimulationLoading
=== RUN   TestSimulationLoading/basic_valid_simulation
=== RUN   TestSimulationLoading/basic_nil_config
=== RUN   TestSimulationLoading/basic_bad_file_name
=== RUN   TestSimulationLoading/basic_bad_file_content
=== RUN   TestSimulationLoading/basic_bad_file_content#01
--- PASS: TestSimulationLoading (0.00s)
    --- PASS: TestSimulationLoading/basic_valid_simulation (0.00s)
    --- PASS: TestSimulationLoading/basic_nil_config (0.00s)
    --- PASS: TestSimulationLoading/basic_bad_file_name (0.00s)
    --- PASS: TestSimulationLoading/basic_bad_file_content (0.00s)
    --- PASS: TestSimulationLoading/basic_bad_file_content#01 (0.00s)
=== RUN   TestIsSimulated
=== RUN   TestIsSimulated/No_simulation_except_(in_exclusion)
=== RUN   TestIsSimulated/All_simulation_(not_in_exclusion)
=== RUN   TestIsSimulated/All_simulation_(in_exclusion)
--- PASS: TestIsSimulated (0.00s)
    --- PASS: TestIsSimulated/No_simulation_except_(in_exclusion) (0.00s)
    --- PASS: TestIsSimulated/All_simulation_(not_in_exclusion) (0.00s)
    --- PASS: TestIsSimulated/All_simulation_(in_exclusion) (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/csconfig	0.015s
=== RUN   TestPluginSuite
=== RUN   TestPluginSuite/TestBrokerInit
=== RUN   TestPluginSuite/TestBrokerInit/valid_config
time="2024-12-19T07:29:14-05:00" level=debug msg="starting plugin" args="[/tmp/cs_plugin_test1994258686/bin/notification-dummy]" path=/tmp/cs_plugin_test1994258686/bin/notification-dummy
time="2024-12-19T07:29:14-05:00" level=debug msg="plugin started" path=/tmp/cs_plugin_test1994258686/bin/notification-dummy pid=51898
time="2024-12-19T07:29:14-05:00" level=debug msg="waiting for RPC address" path=/tmp/cs_plugin_test1994258686/bin/notification-dummy
time="2024-12-19T07:29:14-05:00" level=debug msg="using plugin" version=1
time="2024-12-19T07:29:14-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:14-05:00" level=info msg="registered plugin dummy_default"
time="2024-12-19T07:29:14-05:00" level=debug msg="received EOF, stopping recv loop" err="rpc error: code = Unavailable desc = error reading from server: EOF"
time="2024-12-19T07:29:14-05:00" level=info msg="plugin process exited" path=/tmp/cs_plugin_test1994258686/bin/notification-dummy pid=51898
time="2024-12-19T07:29:14-05:00" level=debug msg="plugin exited"
=== RUN   TestPluginSuite/TestBrokerInit/group_writable_binary
=== RUN   TestPluginSuite/TestBrokerInit/group_writable_binary#01
=== RUN   TestPluginSuite/TestBrokerInit/no_plugin_dir
=== RUN   TestPluginSuite/TestBrokerInit/no_plugin_binary
=== RUN   TestPluginSuite/TestBrokerInit/only_specify_user
=== RUN   TestPluginSuite/TestBrokerInit/only_specify_group
=== RUN   TestPluginSuite/TestBrokerInit/Fails_to_run_as_root
    broker_test.go:139: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/vendor/github.com/crowdsecurity/go-cs-lib/cstest/errors.go:49
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/csplugin/broker_test.go:139
        	            				/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/vendor/github.com/stretchr/testify/suite/suite.go:112
        	Error:      	Error "while loading plugin: while getting process attributes: group: unknown group root" does not contain "operation not permitted"
        	Test:       	TestPluginSuite/TestBrokerInit/Fails_to_run_as_root
=== RUN   TestPluginSuite/TestBrokerInit/Invalid_user_and_group
=== RUN   TestPluginSuite/TestBrokerInit/Valid_user_and_invalid_group
=== RUN   TestPluginSuite/TestBrokerNoThreshold
time="2024-12-19T07:29:15-05:00" level=debug msg="starting plugin" args="[/tmp/cs_plugin_test3558896100/bin/notification-dummy]" path=/tmp/cs_plugin_test3558896100/bin/notification-dummy
time="2024-12-19T07:29:15-05:00" level=debug msg="plugin started" path=/tmp/cs_plugin_test3558896100/bin/notification-dummy pid=51901
time="2024-12-19T07:29:15-05:00" level=debug msg="waiting for RPC address" path=/tmp/cs_plugin_test3558896100/bin/notification-dummy
time="2024-12-19T07:29:15-05:00" level=debug msg="using plugin" version=1
time="2024-12-19T07:29:15-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:15-05:00" level=info msg="registered plugin dummy_default"
time="2024-12-19T07:29:15-05:00" level=info msg="received signal for dummy_default config" @module=dummy-plugin
time="2024-12-19T07:29:15-05:00" level=trace msg="received data" channel=STDOUT len=241
time="2024-12-19T07:29:15-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:15-05:00" level=info msg="second send"
time="2024-12-19T07:29:15-05:00" level=info msg="received signal for dummy_default config" @module=dummy-plugin
time="2024-12-19T07:29:15-05:00" level=trace msg="received data" channel=STDOUT len=241
time="2024-12-19T07:29:15-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:15-05:00" level=info msg="content-> [{\"capacity\":null,\"decisions\":null,\"events\":null,\"events_count\":null,\"labels\":null,\"leakspeed\":null,\"message\":null,\"scenario\":null,\"scenario_hash\":null,\"scenario_version\":null,\"simulated\":null,\"source\":null,\"start_at\":null,\"stop_at\":null}]\n\n"
time="2024-12-19T07:29:15-05:00" level=debug msg="received EOF, stopping recv loop" err="rpc error: code = Unavailable desc = error reading from server: EOF"
time="2024-12-19T07:29:15-05:00" level=info msg="plugin process exited" path=/tmp/cs_plugin_test3558896100/bin/notification-dummy pid=51901
time="2024-12-19T07:29:15-05:00" level=debug msg="plugin exited"
=== RUN   TestPluginSuite/TestBrokerRunGroupAndTimeThreshold_CountFirst
time="2024-12-19T07:29:15-05:00" level=debug msg="starting plugin" args="[/tmp/cs_plugin_test93587713/bin/notification-dummy]" path=/tmp/cs_plugin_test93587713/bin/notification-dummy
time="2024-12-19T07:29:15-05:00" level=debug msg="plugin started" path=/tmp/cs_plugin_test93587713/bin/notification-dummy pid=51902
time="2024-12-19T07:29:15-05:00" level=debug msg="waiting for RPC address" path=/tmp/cs_plugin_test93587713/bin/notification-dummy
time="2024-12-19T07:29:15-05:00" level=debug msg="using plugin" version=1
time="2024-12-19T07:29:15-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:15-05:00" level=info msg="registered plugin dummy_default"
time="2024-12-19T07:29:15-05:00" level=info msg="received signal for dummy_default config" @module=dummy-plugin
time="2024-12-19T07:29:15-05:00" level=trace msg="received data" channel=STDOUT len=955
time="2024-12-19T07:29:15-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:15-05:00" level=debug msg="received EOF, stopping recv loop" err="rpc error: code = Unavailable desc = error reading from server: EOF"
time="2024-12-19T07:29:15-05:00" level=info msg="plugin process exited" path=/tmp/cs_plugin_test93587713/bin/notification-dummy pid=51902
time="2024-12-19T07:29:15-05:00" level=debug msg="plugin exited"
=== RUN   TestPluginSuite/TestBrokerRunGroupAndTimeThreshold_TimeFirst
time="2024-12-19T07:29:15-05:00" level=debug msg="starting plugin" args="[/tmp/cs_plugin_test3574685095/bin/notification-dummy]" path=/tmp/cs_plugin_test3574685095/bin/notification-dummy
time="2024-12-19T07:29:15-05:00" level=debug msg="plugin started" path=/tmp/cs_plugin_test3574685095/bin/notification-dummy pid=51918
time="2024-12-19T07:29:15-05:00" level=debug msg="waiting for RPC address" path=/tmp/cs_plugin_test3574685095/bin/notification-dummy
time="2024-12-19T07:29:15-05:00" level=debug msg="using plugin" version=1
time="2024-12-19T07:29:15-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:15-05:00" level=info msg="registered plugin dummy_default"
time="2024-12-19T07:29:16-05:00" level=info msg="received signal for dummy_default config" @module=dummy-plugin
time="2024-12-19T07:29:16-05:00" level=trace msg="received data" channel=STDOUT len=717
time="2024-12-19T07:29:16-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:17-05:00" level=debug msg="received EOF, stopping recv loop" err="rpc error: code = Unavailable desc = error reading from server: EOF"
time="2024-12-19T07:29:17-05:00" level=info msg="plugin process exited" path=/tmp/cs_plugin_test3574685095/bin/notification-dummy pid=51918
time="2024-12-19T07:29:17-05:00" level=debug msg="plugin exited"
=== RUN   TestPluginSuite/TestBrokerRunGroupThreshold
time="2024-12-19T07:29:17-05:00" level=debug msg="starting plugin" args="[/tmp/cs_plugin_test3046779749/bin/notification-dummy]" path=/tmp/cs_plugin_test3046779749/bin/notification-dummy
time="2024-12-19T07:29:17-05:00" level=debug msg="plugin started" path=/tmp/cs_plugin_test3046779749/bin/notification-dummy pid=51954
time="2024-12-19T07:29:17-05:00" level=debug msg="waiting for RPC address" path=/tmp/cs_plugin_test3046779749/bin/notification-dummy
time="2024-12-19T07:29:17-05:00" level=debug msg="using plugin" version=1
time="2024-12-19T07:29:17-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:17-05:00" level=info msg="registered plugin dummy_default"
time="2024-12-19T07:29:18-05:00" level=info msg="received signal for dummy_default config" @module=dummy-plugin
time="2024-12-19T07:29:18-05:00" level=trace msg="received data" channel=STDOUT len=955
time="2024-12-19T07:29:18-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:18-05:00" level=info msg="received signal for dummy_default config" @module=dummy-plugin
time="2024-12-19T07:29:18-05:00" level=trace msg="received data" channel=STDOUT len=479
time="2024-12-19T07:29:18-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:19-05:00" level=info msg="plugin process exited" path=/tmp/cs_plugin_test3046779749/bin/notification-dummy pid=51954
time="2024-12-19T07:29:19-05:00" level=debug msg="received EOF, stopping recv loop" err="rpc error: code = Unavailable desc = error reading from server: EOF"
time="2024-12-19T07:29:19-05:00" level=debug msg="plugin exited"
=== RUN   TestPluginSuite/TestBrokerRunSimple
time="2024-12-19T07:29:19-05:00" level=debug msg="starting plugin" args="[/tmp/cs_plugin_test3560892110/bin/notification-dummy]" path=/tmp/cs_plugin_test3560892110/bin/notification-dummy
time="2024-12-19T07:29:19-05:00" level=debug msg="plugin started" path=/tmp/cs_plugin_test3560892110/bin/notification-dummy pid=51986
time="2024-12-19T07:29:19-05:00" level=debug msg="waiting for RPC address" path=/tmp/cs_plugin_test3560892110/bin/notification-dummy
time="2024-12-19T07:29:19-05:00" level=debug msg="using plugin" version=1
time="2024-12-19T07:29:19-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:19-05:00" level=info msg="registered plugin dummy_default"
time="2024-12-19T07:29:19-05:00" level=info msg="received signal for dummy_default config" @module=dummy-plugin
time="2024-12-19T07:29:19-05:00" level=trace msg="received data" channel=STDOUT len=241
time="2024-12-19T07:29:19-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:19-05:00" level=info msg="received signal for dummy_default config" @module=dummy-plugin
time="2024-12-19T07:29:19-05:00" level=trace msg="received data" channel=STDOUT len=241
time="2024-12-19T07:29:19-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:20-05:00" level=debug msg="received EOF, stopping recv loop" err="rpc error: code = Unavailable desc = error reading from server: EOF"
time="2024-12-19T07:29:20-05:00" level=info msg="plugin process exited" path=/tmp/cs_plugin_test3560892110/bin/notification-dummy pid=51986
time="2024-12-19T07:29:20-05:00" level=debug msg="plugin exited"
=== RUN   TestPluginSuite/TestBrokerRunTimeThreshold
time="2024-12-19T07:29:20-05:00" level=debug msg="starting plugin" args="[/tmp/cs_plugin_test2258342865/bin/notification-dummy]" path=/tmp/cs_plugin_test2258342865/bin/notification-dummy
time="2024-12-19T07:29:20-05:00" level=debug msg="plugin started" path=/tmp/cs_plugin_test2258342865/bin/notification-dummy pid=51996
time="2024-12-19T07:29:20-05:00" level=debug msg="waiting for RPC address" path=/tmp/cs_plugin_test2258342865/bin/notification-dummy
time="2024-12-19T07:29:20-05:00" level=debug msg="using plugin" version=1
time="2024-12-19T07:29:20-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:20-05:00" level=info msg="registered plugin dummy_default"
time="2024-12-19T07:29:21-05:00" level=info msg="received signal for dummy_default config" @module=dummy-plugin
time="2024-12-19T07:29:21-05:00" level=trace msg="received data" channel=STDOUT len=241
time="2024-12-19T07:29:21-05:00" level=trace msg="waiting for stdio data"
time="2024-12-19T07:29:21-05:00" level=debug msg="received EOF, stopping recv loop" err="rpc error: code = Unavailable desc = error reading from server: EOF"
time="2024-12-19T07:29:21-05:00" level=info msg="plugin process exited" path=/tmp/cs_plugin_test2258342865/bin/notification-dummy pid=51996
time="2024-12-19T07:29:21-05:00" level=debug msg="plugin exited"
--- FAIL: TestPluginSuite (8.53s)
    --- FAIL: TestPluginSuite/TestBrokerInit (0.58s)
        --- PASS: TestPluginSuite/TestBrokerInit/valid_config (0.01s)
        --- PASS: TestPluginSuite/TestBrokerInit/group_writable_binary (0.00s)
        --- PASS: TestPluginSuite/TestBrokerInit/group_writable_binary#01 (0.00s)
        --- PASS: TestPluginSuite/TestBrokerInit/no_plugin_dir (0.00s)
        --- PASS: TestPluginSuite/TestBrokerInit/no_plugin_binary (0.00s)
        --- PASS: TestPluginSuite/TestBrokerInit/only_specify_user (0.00s)
        --- PASS: TestPluginSuite/TestBrokerInit/only_specify_group (0.00s)
        --- FAIL: TestPluginSuite/TestBrokerInit/Fails_to_run_as_root (0.00s)
        --- PASS: TestPluginSuite/TestBrokerInit/Invalid_user_and_group (0.00s)
        --- PASS: TestPluginSuite/TestBrokerInit/Valid_user_and_invalid_group (0.00s)
    --- PASS: TestPluginSuite/TestBrokerNoThreshold (0.48s)
    --- PASS: TestPluginSuite/TestBrokerRunGroupAndTimeThreshold_CountFirst (0.25s)
    --- PASS: TestPluginSuite/TestBrokerRunGroupAndTimeThreshold_TimeFirst (1.57s)
    --- PASS: TestPluginSuite/TestBrokerRunGroupThreshold (2.04s)
    --- PASS: TestPluginSuite/TestBrokerRunSimple (1.05s)
    --- PASS: TestPluginSuite/TestBrokerRunTimeThreshold (1.25s)
=== RUN   TestListFilesAtPath
=== RUN   TestListFilesAtPath/valid_directory
=== RUN   TestListFilesAtPath/invalid_directory
--- PASS: TestListFilesAtPath (0.00s)
    --- PASS: TestListFilesAtPath/valid_directory (0.00s)
    --- PASS: TestListFilesAtPath/invalid_directory (0.00s)
=== RUN   TestGetPluginNameAndTypeFromPath
=== RUN   TestGetPluginNameAndTypeFromPath/valid_plugin_name,_single_dash
=== RUN   TestGetPluginNameAndTypeFromPath/invalid_plugin_name
=== RUN   TestGetPluginNameAndTypeFromPath/valid_plugin_name,_multiple_dash
--- PASS: TestGetPluginNameAndTypeFromPath (0.00s)
    --- PASS: TestGetPluginNameAndTypeFromPath/valid_plugin_name,_single_dash (0.00s)
    --- PASS: TestGetPluginNameAndTypeFromPath/invalid_plugin_name (0.00s)
    --- PASS: TestGetPluginNameAndTypeFromPath/valid_plugin_name,_multiple_dash (0.00s)
=== RUN   TestPluginWatcherInterval
2024/12/19 07:29:21 received -> testPlugin
--- PASS: TestPluginWatcherInterval (0.00s)
=== RUN   TestPluginAlertCountWatcher
2024/12/19 07:29:23 received -> testPlugin
--- PASS: TestPluginAlertCountWatcher (2.05s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/csplugin	10.678s
=== RUN   TestNewProfile
=== RUN   TestNewProfile/filter_ok_and_duration_expr_ok
expected : 1 | result : 1=== RUN   TestNewProfile/filter_NOK_and_duration_expr_ok
expected : 0 | result : 0=== RUN   TestNewProfile/filter_ok_and_duration_expr_NOK
expected : 0 | result : 0=== RUN   TestNewProfile/filter_ok_and_duration_expr_ok_+_DEBUG
expected : 1 | result : 1=== RUN   TestNewProfile/filter_ok_and_no_duration
time="2024-12-19T07:29:13-05:00" level=warning msg="No duration specified for , using default duration 4h" name= type=profile
expected : 1 | result : 1--- PASS: TestNewProfile (0.00s)
    --- PASS: TestNewProfile/filter_ok_and_duration_expr_ok (0.00s)
    --- PASS: TestNewProfile/filter_NOK_and_duration_expr_ok (0.00s)
    --- PASS: TestNewProfile/filter_ok_and_duration_expr_NOK (0.00s)
    --- PASS: TestNewProfile/filter_ok_and_duration_expr_ok_+_DEBUG (0.00s)
    --- PASS: TestNewProfile/filter_ok_and_no_duration (0.00s)
=== RUN   TestEvaluateProfile
=== RUN   TestEvaluateProfile/simple_pass_single_expr
=== RUN   TestEvaluateProfile/simple_fail_single_expr
=== RUN   TestEvaluateProfile/1_expr_fail_1_expr_pass_should_still_eval_to_match
=== RUN   TestEvaluateProfile/simple_filter_with__2_decision
=== RUN   TestEvaluateProfile/simple_filter_with_decision_expr
--- PASS: TestEvaluateProfile (0.00s)
    --- PASS: TestEvaluateProfile/simple_pass_single_expr (0.00s)
    --- PASS: TestEvaluateProfile/simple_fail_single_expr (0.00s)
    --- PASS: TestEvaluateProfile/1_expr_fail_1_expr_pass_should_still_eval_to_match (0.00s)
    --- PASS: TestEvaluateProfile/simple_filter_with__2_decision (0.00s)
    --- PASS: TestEvaluateProfile/simple_filter_with_decision_expr (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/csprofiles	0.089s
=== RUN   TestBadFireAuth
time="2024-12-19T07:29:13-05:00" level=warning msg="invalid api key: asdasd"
--- PASS: TestBadFireAuth (0.00s)
=== RUN   TestFireOk
--- PASS: TestFireOk (0.00s)
=== RUN   TestFirePaginator
time="2024-12-19T07:29:13-05:00" level=warning msg=" page too big 3 vs 2"
--- PASS: TestFirePaginator (0.00s)
=== RUN   TestBadSmokeAuth
--- PASS: TestBadSmokeAuth (0.00s)
=== RUN   TestSmokeInfoValidIP
--- PASS: TestSmokeInfoValidIP (0.00s)
=== RUN   TestSmokeUnknownIP
--- PASS: TestSmokeUnknownIP (0.00s)
=== RUN   TestRateLimit
--- PASS: TestRateLimit (0.00s)
=== RUN   TestSearchIPs
--- PASS: TestSearchIPs (0.00s)
=== RUN   TestFireInit
--- PASS: TestFireInit (0.00s)
=== RUN   TestBasicSmokeItem
--- PASS: TestBasicSmokeItem (0.00s)
=== RUN   TestEmptySmokeItem
--- PASS: TestEmptySmokeItem (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/cticlient	0.015s
=== RUN   TestInitHubUpdate
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub115607856/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub115607856/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/testhub115607856/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub115607856/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub115607856/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub115607856/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Content is the same, not replacing /tmp/testhub115607856/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="hub index is up to date"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub115607856/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
--- PASS: TestInitHubUpdate (0.02s)
=== RUN   TestUpdateIndex
Test 'bad URL'
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3074662066/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub3074662066/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/testhub3074662066/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub3074662066/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
Test 'bad domain'
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/index.json1218980355" url="https://baddomain/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/index.json1218980355" url="https://baddomain/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/index.json1218980355"
Test 'bad target path'
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /does/not/exist/index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
--- PASS: TestUpdateIndex (0.02s)
=== RUN   TestItemStatus
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2759414118/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub2759414118/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/testhub2759414118/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub2759414118/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
--- PASS: TestItemStatus (0.00s)
=== RUN   TestGetters
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub4073816560/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub4073816560/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/testhub4073816560/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub4073816560/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
--- PASS: TestGetters (0.00s)
=== RUN   TestInstallParser
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3654749528/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub3654749528/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/testhub3654749528/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub3654749528/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
time="2024-12-19T07:29:14-05:00" level=debug msg="Downloading parsers crowdsecurity/foobar_parser"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3654749528/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 206 bytes to /tmp/testhub3654749528/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar_parser"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled parsers: crowdsecurity/foobar_parser"
time="2024-12-19T07:29:14-05:00" level=debug msg="crowdsecurity/foobar_parser is tainted by parsers:crowdsecurity/foobar_parser"
time="2024-12-19T07:29:14-05:00" level=debug msg="crowdsecurity/foobar is tainted by parsers:crowdsecurity/foobar_parser"
time="2024-12-19T07:29:14-05:00" level=debug msg="Downloading parsers crowdsecurity/foobar_parser"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3654749528/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 206 bytes to /tmp/testhub3654749528/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar_parser"
time="2024-12-19T07:29:14-05:00" level=info msg="Removed symlink [crowdsecurity/foobar_parser]: /tmp/testhub3654749528/crowdsec/parsers/s01-parse/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Removed source file [crowdsecurity/foobar_parser]: /tmp/testhub3654749528/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
--- PASS: TestInstallParser (0.01s)
=== RUN   TestInstallCollection
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub2867766040/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/testhub2867766040/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub2867766040/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
time="2024-12-19T07:29:14-05:00" level=debug msg="Downloading collections crowdsecurity/foobar"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/foobar sub-item: parsers crowdsecurity/foobar_parser (false -> false)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 206 bytes to /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar_parser"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled parsers: crowdsecurity/foobar_parser"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/foobar sub-item: scenarios crowdsecurity/foobar_scenario (false -> false)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 48 bytes to /tmp/testhub2867766040/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar_scenario"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled scenarios: crowdsecurity/foobar_scenario"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/foobar sub-item: collections crowdsecurity/foobar_subcollection (false -> false)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Downloading collections crowdsecurity/foobar_subcollection"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/foobar_subcollection sub-item: parsers crowdsecurity/foobar_subparser (false -> false)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 206 bytes to /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar_subparser"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled parsers: crowdsecurity/foobar_subparser"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 29 bytes to /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar_subcollection"
time="2024-12-19T07:29:14-05:00" level=debug msg="crowdsecurity/foobar_subcollection: up-to-date, not updated"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 29 bytes to /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Content is the same, not replacing /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 29 bytes to /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled collections: crowdsecurity/foobar_subcollection"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled collections: crowdsecurity/foobar"
time="2024-12-19T07:29:14-05:00" level=debug msg="installed (crowdsecurity/foobar) - status: 0 | installed: 0.1 | latest: 0.1 | full: map[0.1:{Digest:786c9490e4dd234453e53aa9bb7d28c60668e31c3c0c71a7dd6d0abbfa60261a Deprecated:false}]"
time="2024-12-19T07:29:14-05:00" level=debug msg="installed (crowdsecurity/foobar_subcollection) - status: 0 | installed: 0.1 | latest: 0.1 | full: map[0.1:{Digest:786c9490e4dd234453e53aa9bb7d28c60668e31c3c0c71a7dd6d0abbfa60261a Deprecated:false}]"
time="2024-12-19T07:29:14-05:00" level=debug msg="crowdsecurity/foobar is tainted by collections:crowdsecurity/foobar"
time="2024-12-19T07:29:14-05:00" level=debug msg="installed (crowdsecurity/foobar) - status: 2 | installed: ? | latest: 0.1 | full: map[0.1:{Digest:786c9490e4dd234453e53aa9bb7d28c60668e31c3c0c71a7dd6d0abbfa60261a Deprecated:false}]"
time="2024-12-19T07:29:14-05:00" level=debug msg="installed (crowdsecurity/foobar_subcollection) - status: 0 | installed: 0.1 | latest: 0.1 | full: map[0.1:{Digest:786c9490e4dd234453e53aa9bb7d28c60668e31c3c0c71a7dd6d0abbfa60261a Deprecated:false}]"
time="2024-12-19T07:29:14-05:00" level=debug msg="Downloading collections crowdsecurity/foobar"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/foobar sub-item: parsers crowdsecurity/foobar_parser (true -> true)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 206 bytes to /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Content is the same, not replacing /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_parser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_parser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/foobar sub-item: scenarios crowdsecurity/foobar_scenario (true -> true)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 48 bytes to /tmp/testhub2867766040/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Content is the same, not replacing /tmp/testhub2867766040/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/foobar sub-item: collections crowdsecurity/foobar_subcollection (true -> true)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Downloading collections crowdsecurity/foobar_subcollection"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/foobar_subcollection sub-item: parsers crowdsecurity/foobar_subparser (true -> true)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 206 bytes to /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Content is the same, not replacing /tmp/testhub2867766040/crowdsec/hub/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/parsers/s01-parse/crowdsecurity/foobar_subparser.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 29 bytes to /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Content is the same, not replacing /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 29 bytes to /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Content is the same, not replacing /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar_subcollection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar_subcollection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 29 bytes to /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar"
time="2024-12-19T07:29:14-05:00" level=debug msg="installed (crowdsecurity/foobar) - status: 0 | installed: 0.1 | latest: 0.1 | full: map[0.1:{Digest:786c9490e4dd234453e53aa9bb7d28c60668e31c3c0c71a7dd6d0abbfa60261a Deprecated:false}]"
time="2024-12-19T07:29:14-05:00" level=debug msg="installed (crowdsecurity/foobar_subcollection) - status: 0 | installed: 0.1 | latest: 0.1 | full: map[0.1:{Digest:786c9490e4dd234453e53aa9bb7d28c60668e31c3c0c71a7dd6d0abbfa60261a Deprecated:false}]"
time="2024-12-19T07:29:14-05:00" level=info msg="Removed symlink [crowdsecurity/foobar]: /tmp/testhub2867766040/crowdsec/collections/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="installed (crowdsecurity/foobar_subcollection) - status: 0 | installed: 0.1 | latest: 0.1 | full: map[0.1:{Digest:786c9490e4dd234453e53aa9bb7d28c60668e31c3c0c71a7dd6d0abbfa60261a Deprecated:false}]"
time="2024-12-19T07:29:14-05:00" level=info msg="Removed source file [crowdsecurity/foobar]: /tmp/testhub2867766040/crowdsec/hub/collections/crowdsecurity/foobar.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="installed (crowdsecurity/foobar_subcollection) - status: 0 | installed: 0.1 | latest: 0.1 | full: map[0.1:{Digest:786c9490e4dd234453e53aa9bb7d28c60668e31c3c0c71a7dd6d0abbfa60261a Deprecated:false}]"
--- PASS: TestInstallCollection (0.03s)
=== RUN   TestUpgradeItemNewScenarioInCollection
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2588691802/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub2588691802/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/testhub2588691802/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub2588691802/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
time="2024-12-19T07:29:14-05:00" level=debug msg="Downloading collections crowdsecurity/test_collection"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/test_collection sub-item: scenarios crowdsecurity/foobar_scenario (false -> true)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2588691802/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 48 bytes to /tmp/testhub2588691802/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar_scenario"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled scenarios: crowdsecurity/foobar_scenario"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2588691802/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 44 bytes to /tmp/testhub2588691802/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/test_collection"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled collections: crowdsecurity/test_collection"
installed crowdsecurity/test_collection
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled crowdsecurity/test_collection"
time="2024-12-19T07:29:14-05:00" level=debug msg="crowdsecurity/test_collection dependencies not checked: not up-to-date"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2588691802/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 5029 bytes to /tmp/testhub2588691802/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2588691802/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 48 bytes to /tmp/testhub2588691802/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Content is the same, not replacing /tmp/testhub2588691802/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2588691802/crowdsec/hub/scenarios/crowdsecurity/barfoo_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/barfoo_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/barfoo_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/barfoo_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 48 bytes to /tmp/testhub2588691802/crowdsec/hub/scenarios/crowdsecurity/barfoo_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/barfoo_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub2588691802/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 78 bytes to /tmp/testhub2588691802/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
updated crowdsecurity/test_collection
--- PASS: TestUpgradeItemNewScenarioInCollection (0.01s)
=== RUN   TestUpgradeItemInDisabledScenarioShouldNotBeInstalled
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub1426263796/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub1426263796/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/testhub1426263796/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub1426263796/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
time="2024-12-19T07:29:14-05:00" level=debug msg="Downloading collections crowdsecurity/test_collection"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/test_collection sub-item: scenarios crowdsecurity/foobar_scenario (false -> true)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub1426263796/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 48 bytes to /tmp/testhub1426263796/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar_scenario"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled scenarios: crowdsecurity/foobar_scenario"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub1426263796/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 44 bytes to /tmp/testhub1426263796/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/test_collection"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled collections: crowdsecurity/test_collection"
installed crowdsecurity/test_collection
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled crowdsecurity/test_collection"
time="2024-12-19T07:29:14-05:00" level=debug msg="crowdsecurity/test_collection dependencies not checked: not up-to-date"
time="2024-12-19T07:29:14-05:00" level=info msg="Removed symlink [crowdsecurity/foobar_scenario]: /tmp/testhub1426263796/crowdsec/scenarios/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub1426263796/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub1426263796/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Content is the same, not replacing /tmp/testhub1426263796/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
--- PASS: TestUpgradeItemInDisabledScenarioShouldNotBeInstalled (0.02s)
=== RUN   TestUpgradeItemNewScenarioIsInstalledWhenReferencedScenarioIsDisabled
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3743675582/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 4097 bytes to /tmp/testhub3743675582/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="Wrote index to /tmp/testhub3743675582/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="loading hub idx /tmp/testhub3743675582/crowdsec/hub/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="7 item types in hub index"
time="2024-12-19T07:29:14-05:00" level=debug msg="Downloading collections crowdsecurity/test_collection"
time="2024-12-19T07:29:14-05:00" level=debug msg="Download crowdsecurity/test_collection sub-item: scenarios crowdsecurity/foobar_scenario (false -> true)"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3743675582/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 48 bytes to /tmp/testhub3743675582/crowdsec/hub/scenarios/crowdsecurity/foobar_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/foobar_scenario"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled scenarios: crowdsecurity/foobar_scenario"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3743675582/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 44 bytes to /tmp/testhub3743675582/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="Downloaded crowdsecurity/test_collection"
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled collections: crowdsecurity/test_collection"
installed crowdsecurity/test_collection
time="2024-12-19T07:29:14-05:00" level=info msg="Enabled crowdsecurity/test_collection"
time="2024-12-19T07:29:14-05:00" level=debug msg="crowdsecurity/test_collection dependencies not checked: not up-to-date"
time="2024-12-19T07:29:14-05:00" level=info msg="Removed symlink [crowdsecurity/foobar_scenario]: /tmp/testhub3743675582/crowdsec/scenarios/foobar_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3743675582/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 5029 bytes to /tmp/testhub3743675582/crowdsec/hub/.index.json" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/.index.json"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3743675582/crowdsec/hub/scenarios/crowdsecurity/barfoo_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/barfoo_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/barfoo_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/scenarios/crowdsecurity/barfoo_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 48 bytes to /tmp/testhub3743675582/crowdsec/hub/scenarios/crowdsecurity/barfoo_scenario.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/scenarios/crowdsecurity/barfoo_scenario.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Checking /tmp/testhub3743675582/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=info msg="---> /crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
time="2024-12-19T07:29:14-05:00" level=debug msg="Written 78 bytes to /tmp/testhub3743675582/crowdsec/hub/collections/crowdsecurity/test_collection.yaml" url="https://cdn-hub.crowdsec.net/crowdsecurity/master/collections/crowdsecurity/test_collection.yaml"
updated crowdsecurity/test_collection
--- PASS: TestUpgradeItemNewScenarioIsInstalledWhenReferencedScenarioIsDisabled (0.02s)
=== RUN   TestRelativePathComponents
=== RUN   TestRelativePathComponents/Path_within_baseDir
=== RUN   TestRelativePathComponents/Path_is_baseDir
=== RUN   TestRelativePathComponents/Path_outside_baseDir
=== RUN   TestRelativePathComponents/Path_is_subdirectory_of_baseDir
=== RUN   TestRelativePathComponents/Relative_paths
=== RUN   TestRelativePathComponents/BaseDir_with_trailing_slash
=== RUN   TestRelativePathComponents/Empty_baseDir
=== RUN   TestRelativePathComponents/Empty_path
--- PASS: TestRelativePathComponents (0.00s)
    --- PASS: TestRelativePathComponents/Path_within_baseDir (0.00s)
    --- PASS: TestRelativePathComponents/Path_is_baseDir (0.00s)
    --- PASS: TestRelativePathComponents/Path_outside_baseDir (0.00s)
    --- PASS: TestRelativePathComponents/Path_is_subdirectory_of_baseDir (0.00s)
    --- PASS: TestRelativePathComponents/Relative_paths (0.00s)
    --- PASS: TestRelativePathComponents/BaseDir_with_trailing_slash (0.00s)
    --- PASS: TestRelativePathComponents/Empty_baseDir (0.00s)
    --- PASS: TestRelativePathComponents/Empty_path (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/cwhub	0.172s
=== RUN   TestNilClient
time="2024-12-19T07:29:16-05:00" level=warning msg="CTI API key not set or empty, CTI will not be available"
--- PASS: TestNilClient (0.00s)
=== RUN   TestInvalidAuth
time="2024-12-19T07:29:16-05:00" level=info msg="cti call for 1.2.3.4"
time="2024-12-19T07:29:16-05:00" level=error msg="Invalid API key provided, disabling CTI API"
--- PASS: TestInvalidAuth (0.00s)
=== RUN   TestNoKey
time="2024-12-19T07:29:16-05:00" level=warning msg="CTI API key not set or empty, CTI will not be available"
--- PASS: TestNoKey (0.00s)
=== RUN   TestCache
time="2024-12-19T07:29:16-05:00" level=info msg="cti call for 1.2.3.4"
time="2024-12-19T07:29:18-05:00" level=info msg="cti call for 1.2.3.4"
--- PASS: TestCache (2.02s)
=== RUN   TestBaseDbg
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=): Upper('1') == '1' && nilvar.Foo == '42'" test=exprhelpers
    debugger_test.go:336: failed test nil deref
    debugger_test.go:337: []exprhelpers.OpOutput{}
    debugger_test.go:340: test nil deref : expected 3 outputs, got 0
--- FAIL: TestBaseDbg (0.00s)
=== RUN   TestVisitor
--- PASS: TestVisitor (0.00s)
=== RUN   TestMatch
--- PASS: TestMatch (0.00s)
=== RUN   TestDistanceHelper
=== RUN   TestDistanceHelper/valid
=== RUN   TestDistanceHelper/invalid_lat1
time="2024-12-19T07:29:18-05:00" level=warning msg="lat1 is not a float : strconv.ParseFloat: parsing \"lol\": invalid syntax"
=== RUN   TestDistanceHelper/empty_coord
time="2024-12-19T07:29:18-05:00" level=warning msg="one of the coordinates is 0,0, returning 0"
--- PASS: TestDistanceHelper (0.00s)
    --- PASS: TestDistanceHelper/valid (0.00s)
    --- PASS: TestDistanceHelper/invalid_lat1 (0.00s)
    --- PASS: TestDistanceHelper/empty_coord (0.00s)
=== RUN   TestRegexpCacheBehavior
time="2024-12-19T07:29:18-05:00" level=debug msg="init (folder:tests) (file:test_data_re.txt) (type:regex)"
--- PASS: TestRegexpCacheBehavior (1.01s)
=== RUN   TestRegexpInFile
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_data_re.txt) (type:regex)"
--- PASS: TestRegexpInFile (0.00s)
=== RUN   TestFileInit
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_data.txt) (type:string)"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'file with type:string' : OK"
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_empty_line.txt) (type:string)"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'file with type:string and empty lines + commentaries' : OK"
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_data_re.txt) (type:regex)"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'file with type:re' : OK"
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_data_no_type.txt) (type:)"
time="2024-12-19T07:29:19-05:00" level=debug msg="ignored file teststest_data_no_type.txt because no type specified"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'file without type' : OK"
--- PASS: TestFileInit (0.00s)
=== RUN   TestFile
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_data.txt) (type:string)"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'File() test: word in file' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'File() test: word in file but different case' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'File() test: word not in file' : OK"
time="2024-12-19T07:29:19-05:00" level=error msg="file 'non_existing_data.txt' (type:string) not found in expr library"
time="2024-12-19T07:29:19-05:00" level=error msg="expr library : (map[string][]string) (len=1) {\n (string) (len=13) \"test_data.txt\": ([]string) (len=3 cap=4) {\n  (string) (len=8) \"Crowdsec\",\n  (string) (len=13) \"Crowdsecurity\",\n  (string) (len=8) \"CrowdSec\"\n }\n}\n"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'File() test: filepath provided doesn't exist' : OK"
--- PASS: TestFile (0.00s)
=== RUN   TestIpInRange
time="2024-12-19T07:29:19-05:00" level=info msg="test 'IpInRange() test: basic test' : OK"
time="2024-12-19T07:29:19-05:00" level=debug msg="'192.168.0' is not a valid IP"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'IpInRange() test: malformed IP' : OK"
time="2024-12-19T07:29:19-05:00" level=debug msg="'192.168.0.0/255' is not a valid IP"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'IpInRange() test: malformed IP range' : OK"
--- PASS: TestIpInRange (0.00s)
=== RUN   TestIpToRange
time="2024-12-19T07:29:19-05:00" level=info msg="test 'IpToRange() test: IPv4' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'IpToRange() test: IPv6' : OK"
time="2024-12-19T07:29:19-05:00" level=error msg="bad cidr 'test': strconv.Atoi: parsing \"test\": invalid syntax"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'IpToRange() test: malformed netmask' : OK"
time="2024-12-19T07:29:19-05:00" level=error msg="can't parse IP address 'a.b.c.d'"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'IpToRange() test: malformed IP' : OK"
time="2024-12-19T07:29:19-05:00" level=error msg="can't get cidr '35' of '192.168.1.1'"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'IpToRange() test: too high netmask' : OK"
--- PASS: TestIpToRange (0.00s)
=== RUN   TestAtof
time="2024-12-19T07:29:19-05:00" level=debug msg="debug atof 1.5"
time="2024-12-19T07:29:19-05:00" level=debug msg="debug atof 1aaa.5"
time="2024-12-19T07:29:19-05:00" level=warning msg="Atof : can't convert float '1aaa.5' : strconv.ParseFloat: parsing \"1aaa.5\": invalid syntax"
--- PASS: TestAtof (0.00s)
=== RUN   TestUpper
--- PASS: TestUpper (0.00s)
=== RUN   TestTimeNow
time="2024-12-19T07:29:19-05:00" level=info msg="test 'TimeNow()' : OK"
--- PASS: TestTimeNow (0.00s)
=== RUN   TestParseUri
time="2024-12-19T07:29:19-05:00" level=info msg="test 'ParseUri() test: basic test' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'ParseUri() test: no param' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'ParseUri() test: extra question mark' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'ParseUri() test: weird params' : OK"
time="2024-12-19T07:29:19-05:00" level=error msg="Could not parse query uri : invalid URL escape \"%%F\""
time="2024-12-19T07:29:19-05:00" level=info msg="test 'ParseUri() test: bad encoding' : OK"
--- PASS: TestParseUri (0.00s)
=== RUN   TestQueryEscape
time="2024-12-19T07:29:19-05:00" level=info msg="test 'QueryEscape() test: basic test' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'QueryEscape() test: basic test' : OK"
--- PASS: TestQueryEscape (0.00s)
=== RUN   TestPathEscape
time="2024-12-19T07:29:19-05:00" level=info msg="test 'PathEscape() test: basic test' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'PathEscape() test: basic test with more special chars' : OK"
--- PASS: TestPathEscape (0.00s)
=== RUN   TestPathUnescape
time="2024-12-19T07:29:19-05:00" level=info msg="test 'PathUnescape() test: basic test' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'PathUnescape() test: basic test with more special chars' : OK"
--- PASS: TestPathUnescape (0.00s)
=== RUN   TestQueryUnescape
time="2024-12-19T07:29:19-05:00" level=info msg="test 'QueryUnescape() test: basic test' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'QueryUnescape() test: basic test with more special chars' : OK"
--- PASS: TestQueryUnescape (0.00s)
=== RUN   TestLower
time="2024-12-19T07:29:19-05:00" level=info msg="test 'Lower() test: basic test' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'Lower() test: basic test with more special chars' : OK"
--- PASS: TestLower (0.00s)
=== RUN   TestGetDecisionsCount
time="2024-12-19T07:29:19-05:00" level=info msg="test 'GetDecisionsCount() test: existing IP count' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'GetDecisionsCount() test: unknown IP count' : OK"
--- PASS: TestGetDecisionsCount (0.01s)
=== RUN   TestGetDecisionsSinceCount
    exprlib_test.go:1118: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/exprhelpers/exprlib_test.go:1118
        	Error:      	Not equal: 
        	            	expected: "2"
        	            	actual  : "1"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-2
        	            	+1
        	Test:       	TestGetDecisionsSinceCount
--- FAIL: TestGetDecisionsSinceCount (0.01s)
=== RUN   TestGetActiveDecisionsCount
time="2024-12-19T07:29:19-05:00" level=info msg="test 'GetActiveDecisionsCount() test: existing IP count' : OK"
time="2024-12-19T07:29:19-05:00" level=info msg="test 'GetActiveDecisionsCount() test: unknown IP count' : OK"
--- PASS: TestGetActiveDecisionsCount (0.01s)
=== RUN   TestGetActiveDecisionsTimeLeft
--- PASS: TestGetActiveDecisionsTimeLeft (0.01s)
=== RUN   TestParseUnixTime
=== RUN   TestParseUnixTime/ParseUnix()_test:_valid_value_with_milli
=== RUN   TestParseUnixTime/ParseUnix()_test:_valid_value_without_milli
=== RUN   TestParseUnixTime/ParseUnix()_test:_invalid_input
=== RUN   TestParseUnixTime/ParseUnix()_test:_negative_value
--- PASS: TestParseUnixTime (0.00s)
    --- PASS: TestParseUnixTime/ParseUnix()_test:_valid_value_with_milli (0.00s)
    --- PASS: TestParseUnixTime/ParseUnix()_test:_valid_value_without_milli (0.00s)
    --- PASS: TestParseUnixTime/ParseUnix()_test:_invalid_input (0.00s)
    --- PASS: TestParseUnixTime/ParseUnix()_test:_negative_value (0.00s)
=== RUN   TestIsIp
=== RUN   TestIsIp/IsIPV4()_test:_valid_IPv4
=== RUN   TestIsIp/IsIPV6()_test:_valid_IPv6
=== RUN   TestIsIp/IsIPV6()_test:_valid_IPv6#01
=== RUN   TestIsIp/IsIPV4()_test:_valid_IPv6
=== RUN   TestIsIp/IsIP()_test:_invalid_IP
time="2024-12-19T07:29:19-05:00" level=debug msg="'foo.bar' is not a valid IP"
=== RUN   TestIsIp/IsIP()_test:_valid_IPv4
=== RUN   TestIsIp/IsIP()_test:_valid_IPv6
=== RUN   TestIsIp/IsIPV4()_test:_invalid_IPv4
time="2024-12-19T07:29:19-05:00" level=debug msg="'foo.bar' is not a valid IP"
=== RUN   TestIsIp/IsIPV6()_test:_invalid_IPv6
time="2024-12-19T07:29:19-05:00" level=debug msg="'foo.bar' is not a valid IP"
=== RUN   TestIsIp/IsIPV4()_test:_invalid_type
=== RUN   TestIsIp/IsIP()_test:_invalid_type
=== RUN   TestIsIp/IsIPV6()_test:_invalid_type
--- PASS: TestIsIp (0.00s)
    --- PASS: TestIsIp/IsIPV4()_test:_valid_IPv4 (0.00s)
    --- PASS: TestIsIp/IsIPV6()_test:_valid_IPv6 (0.00s)
    --- PASS: TestIsIp/IsIPV6()_test:_valid_IPv6#01 (0.00s)
    --- PASS: TestIsIp/IsIPV4()_test:_valid_IPv6 (0.00s)
    --- PASS: TestIsIp/IsIP()_test:_invalid_IP (0.00s)
    --- PASS: TestIsIp/IsIP()_test:_valid_IPv4 (0.00s)
    --- PASS: TestIsIp/IsIP()_test:_valid_IPv6 (0.00s)
    --- PASS: TestIsIp/IsIPV4()_test:_invalid_IPv4 (0.00s)
    --- PASS: TestIsIp/IsIPV6()_test:_invalid_IPv6 (0.00s)
    --- PASS: TestIsIp/IsIPV4()_test:_invalid_type (0.00s)
    --- PASS: TestIsIp/IsIP()_test:_invalid_type (0.00s)
    --- PASS: TestIsIp/IsIPV6()_test:_invalid_type (0.00s)
=== RUN   TestToString
=== RUN   TestToString/ToString()_test:_valid_string
=== RUN   TestToString/ToString()_test:_valid_string#01
=== RUN   TestToString/ToString()_test:_invalid_type
=== RUN   TestToString/ToString()_test:_invalid_type_2
--- PASS: TestToString (0.00s)
    --- PASS: TestToString/ToString()_test:_valid_string (0.00s)
    --- PASS: TestToString/ToString()_test:_valid_string#01 (0.00s)
    --- PASS: TestToString/ToString()_test:_invalid_type (0.00s)
    --- PASS: TestToString/ToString()_test:_invalid_type_2 (0.00s)
=== RUN   TestB64Decode
=== RUN   TestB64Decode/B64Decode()_test:_valid_string
=== RUN   TestB64Decode/B64Decode()_test:_invalid_string
=== RUN   TestB64Decode/B64Decode()_test:_invalid_type
--- PASS: TestB64Decode (0.00s)
    --- PASS: TestB64Decode/B64Decode()_test:_valid_string (0.00s)
    --- PASS: TestB64Decode/B64Decode()_test:_invalid_string (0.00s)
    --- PASS: TestB64Decode/B64Decode()_test:_invalid_type (0.00s)
=== RUN   TestParseKv
=== RUN   TestParseKv/ParseKv()_test:_valid_string
=== RUN   TestParseKv/ParseKv()_test:_valid_string#01
=== RUN   TestParseKv/ParseKv()_test:_valid_string#02
=== RUN   TestParseKv/ParseKV()_test:_quoted_string
=== RUN   TestParseKv/ParseKV()_test:_empty_unquoted_string
=== RUN   TestParseKv/ParseKV()_test:_empty_quoted_string_
--- PASS: TestParseKv (0.00s)
    --- PASS: TestParseKv/ParseKv()_test:_valid_string (0.00s)
    --- PASS: TestParseKv/ParseKv()_test:_valid_string#01 (0.00s)
    --- PASS: TestParseKv/ParseKv()_test:_valid_string#02 (0.00s)
    --- PASS: TestParseKv/ParseKV()_test:_quoted_string (0.00s)
    --- PASS: TestParseKv/ParseKV()_test:_empty_unquoted_string (0.00s)
    --- PASS: TestParseKv/ParseKV()_test:_empty_quoted_string_ (0.00s)
=== RUN   TestJsonExtract
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_data_re.txt) (type:regex)"
=== RUN   TestJsonExtract/basic_json_extract
=== RUN   TestJsonExtract/basic_json_extract_with_non_existing_field
time="2024-12-19T07:29:19-05:00" level=debug msg="[non_existing_field] doesn't exist"
=== RUN   TestJsonExtract/extract_subfield
--- PASS: TestJsonExtract (0.00s)
    --- PASS: TestJsonExtract/basic_json_extract (0.00s)
    --- PASS: TestJsonExtract/basic_json_extract_with_non_existing_field (0.00s)
    --- PASS: TestJsonExtract/extract_subfield (0.00s)
=== RUN   TestJsonExtractUnescape
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_data_re.txt) (type:regex)"
=== RUN   TestJsonExtractUnescape/basic_json_extract
=== RUN   TestJsonExtractUnescape/basic_json_extract_with_non_existing_field
time="2024-12-19T07:29:19-05:00" level=debug msg="non_existing_field doesn't exist"
--- PASS: TestJsonExtractUnescape (0.00s)
    --- PASS: TestJsonExtractUnescape/basic_json_extract (0.00s)
    --- PASS: TestJsonExtractUnescape/basic_json_extract_with_non_existing_field (0.00s)
=== RUN   TestJsonExtractSlice
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_data_re.txt) (type:regex)"
=== RUN   TestJsonExtractSlice/try_to_extract_a_string_as_a_slice
time="2024-12-19T07:29:19-05:00" level=error msg="jsonExtractType : expected type array for target test but found string"
time="2024-12-19T07:29:19-05:00" level=error msg="JsonExtractSlice : jsonExtractType: expected type array for target test but found string"
=== RUN   TestJsonExtractSlice/basic_json_slice_extract
=== RUN   TestJsonExtractSlice/extract_with_complex_expression
=== RUN   TestJsonExtractSlice/extract_non-existing_key
time="2024-12-19T07:29:19-05:00" level=debug msg="Key foo doesn't exist"
time="2024-12-19T07:29:19-05:00" level=error msg="JsonExtractSlice : key foo does not exist"
--- PASS: TestJsonExtractSlice (0.00s)
    --- PASS: TestJsonExtractSlice/try_to_extract_a_string_as_a_slice (0.00s)
    --- PASS: TestJsonExtractSlice/basic_json_slice_extract (0.00s)
    --- PASS: TestJsonExtractSlice/extract_with_complex_expression (0.00s)
    --- PASS: TestJsonExtractSlice/extract_non-existing_key (0.00s)
=== RUN   TestJsonExtractObject
time="2024-12-19T07:29:19-05:00" level=debug msg="init (folder:tests) (file:test_data_re.txt) (type:regex)"
=== RUN   TestJsonExtractObject/try_to_extract_a_string_as_an_object
time="2024-12-19T07:29:19-05:00" level=error msg="jsonExtractType : expected type object for target test but found string"
time="2024-12-19T07:29:19-05:00" level=error msg="JsonExtractObject: jsonExtractType: expected type object for target test but found string"
=== RUN   TestJsonExtractObject/basic_json_object_extract
=== RUN   TestJsonExtractObject/extract_with_complex_expression
--- PASS: TestJsonExtractObject (0.00s)
    --- PASS: TestJsonExtractObject/try_to_extract_a_string_as_an_object (0.00s)
    --- PASS: TestJsonExtractObject/basic_json_object_extract (0.00s)
    --- PASS: TestJsonExtractObject/extract_with_complex_expression (0.00s)
=== RUN   TestToJson
=== RUN   TestToJson/convert_int
=== RUN   TestToJson/convert_slice
=== RUN   TestToJson/convert_map
=== RUN   TestToJson/convert_struct
=== RUN   TestToJson/convert_complex_struct
=== RUN   TestToJson/convert_invalid_type
time="2024-12-19T07:29:19-05:00" level=error msg="ToJson : json: unsupported type: func()"
--- PASS: TestToJson (0.00s)
    --- PASS: TestToJson/convert_int (0.00s)
    --- PASS: TestToJson/convert_slice (0.00s)
    --- PASS: TestToJson/convert_map (0.00s)
    --- PASS: TestToJson/convert_struct (0.00s)
    --- PASS: TestToJson/convert_complex_struct (0.00s)
    --- PASS: TestToJson/convert_invalid_type (0.00s)
=== RUN   TestUnmarshalJSON
=== RUN   TestUnmarshalJSON/convert_int
=== RUN   TestUnmarshalJSON/convert_slice
=== RUN   TestUnmarshalJSON/convert_map
=== RUN   TestUnmarshalJSON/convert_struct
=== RUN   TestUnmarshalJSON/convert_complex_struct
--- PASS: TestUnmarshalJSON (0.00s)
    --- PASS: TestUnmarshalJSON/convert_int (0.00s)
    --- PASS: TestUnmarshalJSON/convert_slice (0.00s)
    --- PASS: TestUnmarshalJSON/convert_map (0.00s)
    --- PASS: TestUnmarshalJSON/convert_struct (0.00s)
    --- PASS: TestUnmarshalJSON/convert_complex_struct (0.00s)
=== RUN   TestLibinjectionHelpers
=== RUN   TestLibinjectionHelpers/LibInjectionIsSQLI
=== RUN   TestLibinjectionHelpers/LibInjectionIsSQLI_-_no_match
=== RUN   TestLibinjectionHelpers/LibInjectionIsSQLI_-_no_match_2
=== RUN   TestLibinjectionHelpers/LibInjectionIsXSS
=== RUN   TestLibinjectionHelpers/LibInjectionIsXSS_-_no_match
=== RUN   TestLibinjectionHelpers/LibInjectionIsXSS_-_no_match_2
--- PASS: TestLibinjectionHelpers (0.00s)
    --- PASS: TestLibinjectionHelpers/LibInjectionIsSQLI (0.00s)
    --- PASS: TestLibinjectionHelpers/LibInjectionIsSQLI_-_no_match (0.00s)
    --- PASS: TestLibinjectionHelpers/LibInjectionIsSQLI_-_no_match_2 (0.00s)
    --- PASS: TestLibinjectionHelpers/LibInjectionIsXSS (0.00s)
    --- PASS: TestLibinjectionHelpers/LibInjectionIsXSS_-_no_match (0.00s)
    --- PASS: TestLibinjectionHelpers/LibInjectionIsXSS_-_no_match_2 (0.00s)
=== RUN   TestXMLGetAttributeValue
2024/12/19 07:29:19 test 'XMLGetAttributeValue' : OK
time="2024-12-19T07:29:19-05:00" level=debug msg="Could not find attribute asdasd"
2024/12/19 07:29:19 test 'Non existing attribute for XMLGetAttributeValue' : OK
time="2024-12-19T07:29:19-05:00" level=debug msg="Could not find element /foo/bar"
2024/12/19 07:29:19 test 'Non existing path for XMLGetAttributeValue' : OK
2024/12/19 07:29:19 test 'Invalid XML for XMLGetAttributeValue' : OK
time="2024-12-19T07:29:19-05:00" level=error msg="Could not compile path /foo/bar[@: etree: path has invalid filter [brackets]."
2024/12/19 07:29:19 test 'Invalid path for XMLGetAttributeValue' : OK
--- PASS: TestXMLGetAttributeValue (0.00s)
=== RUN   TestXMLGetNodeValue
2024/12/19 07:29:19 test 'XMLGetNodeValue' : OK
time="2024-12-19T07:29:19-05:00" level=debug msg="Could not find element /foo/bar"
2024/12/19 07:29:19 test 'Non existing path for XMLGetNodeValue' : OK
2024/12/19 07:29:19 test 'Invalid XML for XMLGetNodeValue' : OK
time="2024-12-19T07:29:19-05:00" level=error msg="Could not compile path /foo/bar[@: etree: path has invalid filter [brackets]."
2024/12/19 07:29:19 test 'Invalid path for XMLGetNodeValue' : OK
--- PASS: TestXMLGetNodeValue (0.00s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/exprhelpers	3.151s
=== RUN   TestRegisterFeature
=== RUN   TestRegisterFeature/#00
=== RUN   TestRegisterFeature/#01
=== RUN   TestRegisterFeature/#02
=== RUN   TestRegisterFeature/#03
--- PASS: TestRegisterFeature (0.00s)
    --- PASS: TestRegisterFeature/#00 (0.00s)
    --- PASS: TestRegisterFeature/#01 (0.00s)
    --- PASS: TestRegisterFeature/#02 (0.00s)
    --- PASS: TestRegisterFeature/#03 (0.00s)
=== RUN   TestGetFeature
=== RUN   TestGetFeature/just_a_feature
=== RUN   TestGetFeature/feature_that_does_not_exist
--- PASS: TestGetFeature (0.00s)
    --- PASS: TestGetFeature/just_a_feature (0.00s)
    --- PASS: TestGetFeature/feature_that_does_not_exist (0.00s)
=== RUN   TestIsEnabled
=== RUN   TestIsEnabled/feature_that_was_not_enabled
=== RUN   TestIsEnabled/feature_that_was_enabled
--- PASS: TestIsEnabled (0.00s)
    --- PASS: TestIsEnabled/feature_that_was_not_enabled (0.00s)
    --- PASS: TestIsEnabled/feature_that_was_enabled (0.00s)
=== RUN   TestFeatureSet
=== RUN   TestFeatureSet/enable_a_feature_to_try_something_new
=== RUN   TestFeatureSet/disable_the_feature_that_was_enabled
=== RUN   TestFeatureSet/enable_a_feature_that_will_be_retired_in_v2
=== RUN   TestFeatureSet/enable_a_feature_that_was_retired_in_v1.5
=== RUN   TestFeatureSet/enable_a_feature_that_does_not_exist
--- PASS: TestFeatureSet (0.00s)
    --- PASS: TestFeatureSet/enable_a_feature_to_try_something_new (0.00s)
    --- PASS: TestFeatureSet/disable_the_feature_that_was_enabled (0.00s)
    --- PASS: TestFeatureSet/enable_a_feature_that_will_be_retired_in_v2 (0.00s)
    --- PASS: TestFeatureSet/enable_a_feature_that_was_retired_in_v1.5 (0.00s)
    --- PASS: TestFeatureSet/enable_a_feature_that_does_not_exist (0.00s)
=== RUN   TestSetFromEnv
=== RUN   TestSetFromEnv/variable_that_does_not_start_with_FFLAG_TEST_
=== RUN   TestSetFromEnv/enable_a_feature_flag
=== RUN   TestSetFromEnv/invalid_value_(not_true_or_false)
=== RUN   TestSetFromEnv/feature_flag_that_is_unknown
=== RUN   TestSetFromEnv/enable_a_feature_flag_with_a_description
=== RUN   TestSetFromEnv/enable_a_deprecated_feature
=== RUN   TestSetFromEnv/enable_a_feature_that_was_retired_in_v1.5
=== RUN   TestSetFromEnv/disable_a_feature_flag_already_set
--- PASS: TestSetFromEnv (0.00s)
    --- PASS: TestSetFromEnv/variable_that_does_not_start_with_FFLAG_TEST_ (0.00s)
    --- PASS: TestSetFromEnv/enable_a_feature_flag (0.00s)
    --- PASS: TestSetFromEnv/invalid_value_(not_true_or_false) (0.00s)
    --- PASS: TestSetFromEnv/feature_flag_that_is_unknown (0.00s)
    --- PASS: TestSetFromEnv/enable_a_feature_flag_with_a_description (0.00s)
    --- PASS: TestSetFromEnv/enable_a_deprecated_feature (0.00s)
    --- PASS: TestSetFromEnv/enable_a_feature_that_was_retired_in_v1.5 (0.00s)
    --- PASS: TestSetFromEnv/disable_a_feature_flag_already_set (0.00s)
=== RUN   TestSetFromYaml
=== RUN   TestSetFromYaml/empty_file
=== RUN   TestSetFromYaml/invalid_yaml
=== RUN   TestSetFromYaml/invalid_feature_flag_name
=== RUN   TestSetFromYaml/invalid_value_(must_be_a_list)
=== RUN   TestSetFromYaml/enable_a_feature_flag
=== RUN   TestSetFromYaml/enable_a_deprecated_feature
=== RUN   TestSetFromYaml/enable_a_retired_feature
--- PASS: TestSetFromYaml (0.00s)
    --- PASS: TestSetFromYaml/empty_file (0.00s)
    --- PASS: TestSetFromYaml/invalid_yaml (0.00s)
    --- PASS: TestSetFromYaml/invalid_feature_flag_name (0.00s)
    --- PASS: TestSetFromYaml/invalid_value_(must_be_a_list) (0.00s)
    --- PASS: TestSetFromYaml/enable_a_feature_flag (0.00s)
    --- PASS: TestSetFromYaml/enable_a_deprecated_feature (0.00s)
    --- PASS: TestSetFromYaml/enable_a_retired_feature (0.00s)
=== RUN   TestSetFromYamlFile
--- PASS: TestSetFromYamlFile (0.00s)
=== RUN   TestGetEnabledFeatures
--- PASS: TestGetEnabledFeatures (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/fflag	0.014s
=== RUN   TestCheckPathNotContained
--- PASS: TestCheckPathNotContained (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/hubtest	0.099s
=== RUN   TestBucket
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/conditional-bucket"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/guillotine-bayesian-bucket"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/leaky-fixedqueue"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/leaky-scope-range-expression"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/multiple-bayesian-bucket"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/overflow-with-meta"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/overflow-with-meta-and-information"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-bayesian-bucket"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-counter"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-counter-bh"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/leaky-scope-range-expression (tests/leaky-scope-range-expression/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/multiple-bayesian (tests/multiple-bayesian-bucket/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-leaky (tests/leaky-fixedqueue/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/guillotine-bayesian (tests/guillotine-bayesian-bucket/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding bayesian bucket" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-bayesian (tests/simple-bayesian-bucket/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding bayesian bucket" cfg=dawn-waterfall name=test/guillotine-bayesian
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=billowing-dew name=test/leaky-scope-range-expression
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-trigger (tests/overflow-with-meta/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding trigger bucket" cfg=withered-night name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/conditional (tests/conditional-bucket/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-counter (tests/simple-counter/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding conditional bucket" cfg=dark-feather name=test/conditional
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding counter bucket" cfg=late-snowflake name=test/simple-counter
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-counter-timeout"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-leaky-blackhole"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-leaky-cancel_on"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-trigger (tests/overflow-with-meta-and-information/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-leaky-overflow"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-leaky-ovflwfilter"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-leaky-underflow"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-leaky-uniq"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-leaky-uniq-cachesize"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-leaky-uniq-w-buckets_state"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-trigger (tests/simple-counter-bh/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-trigger"
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-trigger-external-data"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding trigger bucket" cfg=floral-dawn name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=info msg="Running test on tests/simple-trigger-reprocess"
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding bayesian bucket" cfg=misty-haze name=test/simple-bayesian
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-leaky (tests/simple-leaky-overflow/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-leaky (tests/simple-leaky-underflow/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-leaky (tests/simple-leaky-uniq/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-leaky (tests/simple-leaky-uniq-cachesize/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-leaky (tests/simple-leaky-uniq-w-buckets_state/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=red-water name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Adding counter bucket" cfg=polished-star name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=black-surf name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-leaky (tests/simple-leaky-blackhole/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-trigger-reprocess (tests/simple-trigger-reprocess/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding trigger bucket" cfg=autumn-dawn name=test/simple-trigger-reprocess
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-trigger (tests/simple-counter-timeout/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Restored 1 buckets from dump"
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 40s" bucket_id=autumn-lake cfg=delicate-butterfly name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/filter-discard (tests/simple-leaky-ovflwfilter/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-trigger (tests/simple-trigger/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=red-river name=test/filter-discard
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding trigger bucket" cfg=young-cherry name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/filter-ok (tests/simple-leaky-ovflwfilter/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-leaky-cancel (tests/simple-leaky-cancel_on/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding leaky bucket" cfg=polished-feather name=test/filter-ok
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 2 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding counter bucket" cfg=fragrant-sky name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-postoverflow-scenario (tests/simple-trigger-reprocess/reprocess.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=error msg="scenario test/simple-trigger (tests/simple-trigger-external-data/bucket.yaml) could not be found in hub (ignore if in unit tests)"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding trigger bucket" cfg=wispy-shadow name=test/simple-postoverflow-scenario
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 2 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Adding trigger bucket" cfg=wandering-mountain name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=info msg="Loaded 1 scenarios"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) (len=3) {\n  (string) (len=8) \"ASNumber\": (string) (len=4) \"1234\",\n  (string) (len=7) \"IsoCode\": (string) (len=2) \"FR\",\n  (string) (len=6) \"ASNOrg\": (string) (len=9) \"random AS\"\n },\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=11) \"192.168.1.1\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=withered-night name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=billowing-dew name=test/leaky-scope-range-expression
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=192.168.1.1): evt.Meta.source_ip" cfg=billowing-dew name=test/leaky-scope-range-expression
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=billowing-dew name=test/leaky-scope-range-expression
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=withered-night name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) (len=3) {\n  (string) (len=8) \"ASNumber\": (string) (len=4) \"1234\",\n  (string) (len=7) \"IsoCode\": (string) (len=2) \"FR\",\n  (string) (len=6) \"ASNOrg\": (string) (len=9) \"random AS\"\n },\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=floral-dawn name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=10) \"don't care\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=5) \"nginx\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=3) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=8) \"log_type\": (string) (len=15) \"http_access-log\",\n  (string) (len=9) \"http_path\": (string) (len=1) \"/\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 0s" bucket_id=divine-smoke cfg=withered-night name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket b4d360df5fb58c792f6750c54886fed3f319efc8" cfg=withered-night name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-trigger' is poured" cfg=withered-night name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=silent-sea cfg=billowing-dew name=test/leaky-scope-range-expression partition=756c125fe99ffa4e8e6ac5e976a5038aaacf3bfc
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket 756c125fe99ffa4e8e6ac5e976a5038aaacf3bfc" cfg=billowing-dew name=test/leaky-scope-range-expression
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 1m0s" bucket_id=old-surf cfg=bitter-firefly name=test/simple-leaky partition=d70e6a1d89e829fdf1ed8981ade246fa9992e5e5
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket d70e6a1d89e829fdf1ed8981ade246fa9992e5e5" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/leaky-scope-range-expression' is poured" cfg=billowing-dew name=test/leaky-scope-range-expression
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 UTC" bucket_id=old-surf cfg=bitter-firefly name=test/simple-leaky partition=d70e6a1d89e829fdf1ed8981ade246fa9992e5e5
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=floral-dawn name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=silent-sea cfg=billowing-dew name=test/leaky-scope-range-expression partition=756c125fe99ffa4e8e6ac5e976a5038aaacf3bfc
time="2024-12-19T07:29:17-05:00" level=debug msg="yay timemachine overflow time : 2020-01-01 10:00:00 +0000 UTC --> 2020-01-01T10:00:00.000Z" bucket_id=divine-smoke cfg=withered-night name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=info msg="Bucket overflow" bucket_id=divine-smoke cfg=withered-night name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 0s" bucket_id=bold-paper cfg=floral-dawn name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket b4d360df5fb58c792f6750c54886fed3f319efc8" cfg=floral-dawn name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-trigger' is poured" cfg=floral-dawn name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="yay timemachine overflow time : 2020-01-01 10:00:00 +0000 UTC --> 2020-01-01T10:00:00.000Z" bucket_id=bold-paper cfg=floral-dawn name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=info msg="Bucket overflow" bucket_id=bold-paper cfg=floral-dawn name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.log_type == 'http_access-log' || evt.Meta.log_type == 'ssh_access-log'" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=10) \"don't care\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=5) \"nginx\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=3) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=8) \"log_type\": (string) (len=15) \"http_access-log\",\n  (string) (len=9) \"http_path\": (string) (len=1) \"/\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket 76a0306ef364170959d0630004dc8e4d874c2cae" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 30s" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/multiple-bayesian' is poured" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 UTC" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:17-05:00" level=debug msg="starting bayesian evaluation with prior: 0.5" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: evt.Meta.http_path == \"/\"" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.http_path == \"/\"" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: evt.Meta.ssh_user == \"admin\"" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=false): evt.Meta.ssh_user == \"admin\"" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:17-05:00" level=debug msg="value of posterior after events : 0.44444454" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\",\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=black-surf name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=black-surf name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=black-surf name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 1.5s" bucket_id=misty-sky cfg=black-surf name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63" cfg=black-surf name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=10) \"don't care\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=5) \"nginx\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=3) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=8) \"log_type\": (string) (len=15) \"http_access-log\",\n  (string) (len=9) \"http_path\": (string) (len=1) \"/\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.log_type == 'http_access-log' || evt.Meta.log_type == 'ssh_access-log'" cfg=dawn-waterfall name=test/guillotine-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=dawn-waterfall name=test/guillotine-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=black-surf name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=misty-sky cfg=black-surf name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE3 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:06+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"baa\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=5) \"entry\": (string) (len=1) \"1\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=young-cherry name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) (len=1) {\n  (string) (len=12) \"random_value\": (string) (len=2) \"41\"\n },\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=summer-sea cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=10) \"don't care\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=5) \"nginx\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=3) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=8) \"log_type\": (string) (len=15) \"http_access-log\",\n  (string) (len=9) \"http_path\": (string) (len=1) \"/\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.log_type == 'http_access-log' || evt.Meta.log_type == 'ssh_access-log'" cfg=misty-haze name=test/simple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=summer-sea cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="Uniq(baa) : ok" bucket_id=autumn-lake cfg=delicate-butterfly name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=9) \"specvalue\": (string) (len=1) \"1\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=cold-fog cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=late-bush cfg=holy-darkness name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=dawn-waterfall name=test/guillotine-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Uniq(aaa) : ok" bucket_id=late-bush cfg=holy-darkness name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=late-bush cfg=holy-darkness name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=young-cherry name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=young-cherry name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 0s" bucket_id=lingering-sun cfg=young-cherry name=test/simple-trigger partition=9658eacf5cfd80e4e05e1ce6b454d02390aab752
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket 9658eacf5cfd80e4e05e1ce6b454d02390aab752" cfg=young-cherry name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-trigger' is poured" cfg=young-cherry name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="yay timemachine overflow time : 2020-01-01 10:00:00 +0000 +0000 --> 2020-01-01T10:00:00+00:00" bucket_id=lingering-sun cfg=young-cherry name=test/simple-trigger partition=9658eacf5cfd80e4e05e1ce6b454d02390aab752
time="2024-12-19T07:29:17-05:00" level=info msg="Bucket overflow" bucket_id=lingering-sun cfg=young-cherry name=test/simple-trigger partition=9658eacf5cfd80e4e05e1ce6b454d02390aab752
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 30s" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=red-river name=test/filter-discard
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\",\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket 87bea9b9d5cfd4f9e9138e6eb56e22d95187623b" cfg=dawn-waterfall name=test/guillotine-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/guillotine-bayesian' is poured" cfg=dawn-waterfall name=test/guillotine-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket 24eaec6bc8c1855990d7e3c18ada0689f50ef9c6" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky-cancel' is poured" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=red-water name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=red-water name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=red-water name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=false): evt.Parsed.random_value == '42'" bucket_id=cold-fog cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:17-05:00" level=debug msg="reset_filter didn't match" bucket_id=cold-fog cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=dry-thunder cfg=red-water name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=cold-fog cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 UTC" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=autumn-dawn name=test/simple-trigger-reprocess
time="2024-12-19T07:29:17-05:00" level=debug msg="starting bayesian evaluation with prior: 0.5" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=autumn-dawn name=test/simple-trigger-reprocess
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: evt.Meta.http_path == \"/\"" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=autumn-dawn name=test/simple-trigger-reprocess
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63" cfg=red-water name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.http_path == \"/\"" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: evt.Meta.ssh_user == \"admin\"" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=red-water name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=misty-haze name=test/simple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=misty-haze name=test/simple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket f4e9c298decf8bf3fcd39e299390fccba340e61b" cfg=misty-haze name=test/simple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=dry-thunder cfg=red-water name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=red-river name=test/filter-discard
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=red-river name=test/filter-discard
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 0s" bucket_id=dry-resonance cfg=autumn-dawn name=test/simple-trigger-reprocess partition=2e8d7db9c16f84424dfb12c1bc26bbd345493588
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket 2e8d7db9c16f84424dfb12c1bc26bbd345493588" cfg=autumn-dawn name=test/simple-trigger-reprocess
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=icy-fire cfg=red-river name=test/filter-discard partition=5e4dd6fc19fb871b459f4ca78192aa4445fbdf66
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-trigger-reprocess' is poured" cfg=autumn-dawn name=test/simple-trigger-reprocess
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket 5e4dd6fc19fb871b459f4ca78192aa4445fbdf66" cfg=red-river name=test/filter-discard
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/filter-discard' is poured" cfg=red-river name=test/filter-discard
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=false): evt.Overflow.Alert != nil && evt.Overflow.Alert.Scenario != nil" cfg=wispy-shadow name=test/simple-postoverflow-scenario
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=polished-feather name=test/filter-ok
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=false): evt.Meta.ssh_user == \"admin\"" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=polished-feather name=test/filter-ok
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=polished-feather name=test/filter-ok
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 1m20s" bucket_id=broken-silence cfg=dawn-sound name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=icy-fire cfg=red-river name=test/filter-discard partition=5e4dd6fc19fb871b459f4ca78192aa4445fbdf66
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=red-thunder cfg=polished-feather name=test/filter-ok partition=e7e1d6034515101b9706784cf57f156e8c59f9cd
time="2024-12-19T07:29:17-05:00" level=debug msg="value of posterior after events : 0.44444454" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="Event leaving node : ko (filter mismatch)" cfg=wispy-shadow name=test/simple-postoverflow-scenario
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket e7e1d6034515101b9706784cf57f156e8c59f9cd" cfg=polished-feather name=test/filter-ok
time="2024-12-19T07:29:17-05:00" level=debug msg="yay timemachine overflow time : 2020-01-01 10:00:00 +0000 +0000 --> 2020-01-01T10:00:00+00:00" bucket_id=dry-resonance cfg=autumn-dawn name=test/simple-trigger-reprocess partition=2e8d7db9c16f84424dfb12c1bc26bbd345493588
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/filter-ok' is poured" cfg=polished-feather name=test/filter-ok
time="2024-12-19T07:29:17-05:00" level=info msg="Bucket overflow" bucket_id=dry-resonance cfg=autumn-dawn name=test/simple-trigger-reprocess partition=2e8d7db9c16f84424dfb12c1bc26bbd345493588
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=red-thunder cfg=polished-feather name=test/filter-ok partition=e7e1d6034515101b9706784cf57f156e8c59f9cd
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 30s" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="Uniq(aaa) : ok" bucket_id=broken-silence cfg=dawn-sound name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-bayesian' is poured" cfg=misty-haze name=test/simple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=broken-silence cfg=dawn-sound name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 UTC" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="starting bayesian evaluation with prior: 0.5" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: any(queue.Queue, {.Meta.http_path == \"/\"})" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) (len=1) {\n  (string) (len=12) \"tainted_data\": (string) (len=19) \"AAAABBBBBBB11111XXX\"\n },\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog' && evt.Parsed.tainted_data in File('simple-trigger-external-data/simple_patterns.txt')" cfg=wandering-mountain name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): any(queue.Queue, {.Meta.http_path == \"/\"})" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: any(queue.Queue, {.Meta.ssh_user == \"admin\"})" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=wandering-mountain name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=wandering-mountain name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=false): any(queue.Queue, {.Meta.ssh_user == \"admin\"})" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 0s" bucket_id=autumn-river cfg=wandering-mountain name=test/simple-trigger partition=7242c50e20a27680c90f4f4b56e55e3917a26b8d
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket 7242c50e20a27680c90f4f4b56e55e3917a26b8d" cfg=wandering-mountain name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="value of posterior after events : 0.44444454" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-trigger' is poured" cfg=wandering-mountain name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="yay timemachine overflow time : 2020-01-01 10:00:00 +0000 +0000 --> 2020-01-01T10:00:00+00:00" bucket_id=autumn-river cfg=wandering-mountain name=test/simple-trigger partition=7242c50e20a27680c90f4f4b56e55e3917a26b8d
time="2024-12-19T07:29:17-05:00" level=info msg="Bucket overflow" bucket_id=autumn-river cfg=wandering-mountain name=test/simple-trigger partition=7242c50e20a27680c90f4f4b56e55e3917a26b8d
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) (len=3) {\n  (string) (len=8) \"ASNumber\": (string) (len=4) \"1234\",\n  (string) (len=7) \"IsoCode\": (string) (len=2) \"FR\",\n  (string) (len=6) \"ASNOrg\": (string) (len=9) \"random AS\"\n },\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:05.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=withered-night name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=withered-night name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:05+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=11) \"192.168.1.1\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 0s" bucket_id=young-night cfg=withered-night name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket b4d360df5fb58c792f6750c54886fed3f319efc8" cfg=withered-night name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-trigger' is poured" cfg=withered-night name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) (len=3) {\n  (string) (len=8) \"ASNumber\": (string) (len=4) \"1234\",\n  (string) (len=7) \"IsoCode\": (string) (len=2) \"FR\",\n  (string) (len=6) \"ASNOrg\": (string) (len=9) \"random AS\"\n },\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\",\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="yay timemachine overflow time : 2020-01-01 10:00:00 +0000 UTC --> 2020-01-01T10:00:00.000Z" bucket_id=young-night cfg=withered-night name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=info msg="Bucket overflow" bucket_id=young-night cfg=withered-night name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=10) \"don't care\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=5) \"nginx\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=3) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=8) \"log_type\": (string) (len=15) \"http_access-log\",\n  (string) (len=9) \"http_path\": (string) (len=4) \"/foo\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=billowing-dew name=test/leaky-scope-range-expression
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=192.168.1.1): evt.Meta.source_ip" cfg=billowing-dew name=test/leaky-scope-range-expression
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/leaky-scope-range-expression' is poured" cfg=billowing-dew name=test/leaky-scope-range-expression
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=floral-dawn name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=floral-dawn name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 0s" bucket_id=misty-haze cfg=floral-dawn name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:05 +0000 +0000" bucket_id=silent-sea cfg=billowing-dew name=test/leaky-scope-range-expression partition=756c125fe99ffa4e8e6ac5e976a5038aaacf3bfc
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=192.168.0.0/16): IpToRange(evt.Meta.source_ip, \"/16\")" bucket_id=silent-sea cfg=billowing-dew name=test/leaky-scope-range-expression partition=756c125fe99ffa4e8e6ac5e976a5038aaacf3bfc
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=10) \"don't care\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=5) \"nginx\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=3) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"log_type\": (string) (len=14) \"ssh_access-log\",\n  (string) (len=8) \"ssh_user\": (string) (len=5) \"admin\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=192.168.0.0/16): IpToRange(evt.Meta.source_ip, \"/16\")" bucket_id=silent-sea cfg=billowing-dew name=test/leaky-scope-range-expression partition=756c125fe99ffa4e8e6ac5e976a5038aaacf3bfc
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.log_type == 'http_access-log' || evt.Meta.log_type == 'ssh_access-log'" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket b4d360df5fb58c792f6750c54886fed3f319efc8" cfg=floral-dawn name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="Creating TimeMachine bucket" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="Leaky routine starting, lifetime : 30s" bucket_id=sparkling-frost cfg=quiet-fire name=test/multiple-bayesian partition=89026782ffef78f17327d6e86a68cbded67b00cd
time="2024-12-19T07:29:17-05:00" level=debug msg="Created new bucket 89026782ffef78f17327d6e86a68cbded67b00cd" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-trigger' is poured" cfg=floral-dawn name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/multiple-bayesian' is poured" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="yay timemachine overflow time : 2020-01-01 10:00:00 +0000 UTC --> 2020-01-01T10:00:00.000Z" bucket_id=misty-haze cfg=floral-dawn name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=info msg="Bucket overflow" bucket_id=misty-haze cfg=floral-dawn name=test/simple-trigger partition=b4d360df5fb58c792f6750c54886fed3f319efc8
time="2024-12-19T07:29:17-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 UTC" bucket_id=sparkling-frost cfg=quiet-fire name=test/multiple-bayesian partition=89026782ffef78f17327d6e86a68cbded67b00cd
time="2024-12-19T07:29:17-05:00" level=debug msg="starting bayesian evaluation with prior: 0.5" bucket_id=sparkling-frost cfg=quiet-fire name=test/multiple-bayesian partition=89026782ffef78f17327d6e86a68cbded67b00cd
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: evt.Meta.http_path == \"/\"" bucket_id=sparkling-frost cfg=quiet-fire name=test/multiple-bayesian partition=89026782ffef78f17327d6e86a68cbded67b00cd
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=false): evt.Meta.http_path == \"/\"" bucket_id=sparkling-frost cfg=quiet-fire name=test/multiple-bayesian partition=89026782ffef78f17327d6e86a68cbded67b00cd
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: evt.Meta.ssh_user == \"admin\"" bucket_id=sparkling-frost cfg=quiet-fire name=test/multiple-bayesian partition=89026782ffef78f17327d6e86a68cbded67b00cd
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.ssh_user == \"admin\"" bucket_id=sparkling-frost cfg=quiet-fire name=test/multiple-bayesian partition=89026782ffef78f17327d6e86a68cbded67b00cd
time="2024-12-19T07:29:17-05:00" level=debug msg="value of posterior after events : 0.3103448" bucket_id=sparkling-frost cfg=quiet-fire name=test/multiple-bayesian partition=89026782ffef78f17327d6e86a68cbded67b00cd
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:04+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=5) \"entry\": (string) (len=1) \"2\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE3 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:07+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"baa\",\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Uniq(baa) : ko, discard event" bucket_id=autumn-lake cfg=delicate-butterfly name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:04 +0000 +0000" bucket_id=summer-sea cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="Adding overflow to blackhole (2020-01-01 10:00:00 +0000 +0000)" bucket_id=summer-sea cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:01+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Uniq(aaa) : ko, discard event" bucket_id=late-bush cfg=holy-darkness name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=10) \"don't care\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=5) \"nginx\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=3) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=8) \"log_type\": (string) (len=14) \"ssh_access-log\",\n  (string) (len=8) \"ssh_user\": (string) (len=5) \"admin\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) (len=1) {\n  (string) (len=12) \"random_value\": (string) (len=2) \"42\"\n },\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:05+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.log_type == 'http_access-log' || evt.Meta.log_type == 'ssh_access-log'" cfg=dawn-waterfall name=test/guillotine-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=dawn-waterfall name=test/guillotine-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/guillotine-bayesian' is poured" cfg=dawn-waterfall name=test/guillotine-bayesian
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:05+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=red-water name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=red-water name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=red-water name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:05 +0000 +0000" bucket_id=dry-thunder cfg=red-water name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky-cancel' is poured" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Parsed.random_value == '42'" bucket_id=cold-fog cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:17-05:00" level=debug msg="reset_filter matched, kill bucket" bucket_id=cold-fog cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:17-05:00" level=debug msg="Suicide triggered" bucket_id=cold-fog cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:17-05:00" level=debug msg="starting bayesian evaluation with prior: 0.5" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: evt.Meta.ssh_user == \"admin\"" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.ssh_user == \"admin\"" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="value of posterior after events : 0.87804884" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=debug msg="Bayesian bucket overflow" bucket_id=dry-frog cfg=dawn-waterfall name=test/guillotine-bayesian partition=87bea9b9d5cfd4f9e9138e6eb56e22d95187623b
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:01+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=9) \"specvalue\": (string) (len=1) \"2\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=red-river name=test/filter-discard
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:01+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aab\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=red-river name=test/filter-discard
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/filter-discard' is poured" cfg=red-river name=test/filter-discard
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=polished-feather name=test/filter-ok
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=10) \"don't care\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=5) \"nginx\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=3) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=8) \"log_type\": (string) (len=14) \"ssh_access-log\",\n  (string) (len=8) \"ssh_user\": (string) (len=5) \"admin\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): evt.Meta.log_type == 'http_access-log' || evt.Meta.log_type == 'ssh_access-log'" cfg=misty-haze name=test/simple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:17-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:01 +0000 +0000" bucket_id=icy-fire cfg=red-river name=test/filter-discard partition=5e4dd6fc19fb871b459f4ca78192aa4445fbdf66
time="2024-12-19T07:29:17-05:00" level=debug msg="Uniq(aab) : ok" bucket_id=broken-silence cfg=dawn-sound name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=polished-feather name=test/filter-ok
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/filter-ok' is poured" cfg=polished-feather name=test/filter-ok
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:01 +0000 +0000" bucket_id=red-thunder cfg=polished-feather name=test/filter-ok partition=e7e1d6034515101b9706784cf57f156e8c59f9cd
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): any(queue.Queue, { Atof(.Meta.specvalue) > 1})" bucket_id=red-thunder cfg=polished-feather name=test/filter-ok partition=e7e1d6034515101b9706784cf57f156e8c59f9cd
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=false): any(queue.Queue, { Atof(.Meta.specvalue) > 3})" bucket_id=icy-fire cfg=red-river name=test/filter-discard partition=5e4dd6fc19fb871b459f4ca78192aa4445fbdf66
time="2024-12-19T07:29:17-05:00" level=info msg="Event is discarded by overflow filter (any(queue.Queue, { Atof(.Meta.specvalue) > 3}))" bucket_id=icy-fire cfg=red-river name=test/filter-discard partition=5e4dd6fc19fb871b459f4ca78192aa4445fbdf66
time="2024-12-19T07:29:17-05:00" level=debug msg="Overflow has been discarded (*leakybucket.OverflowFilter)" bucket_id=icy-fire cfg=red-river name=test/filter-discard partition=5e4dd6fc19fb871b459f4ca78192aa4445fbdf66
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=misty-haze name=test/simple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="bucket 'test/simple-bayesian' is poured" cfg=misty-haze name=test/simple-bayesian
time="2024-12-19T07:29:17-05:00" level=debug msg="starting bayesian evaluation with prior: 0.5" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: any(queue.Queue, {.Meta.http_path == \"/\"})" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) (len=1) {\n  (string) (len=12) \"tainted_data\": (string) (len=18) \"ZZZBBBBBBB11111XXX\"\n },\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.5\"\n }\n}\n"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): any(queue.Queue, {.Meta.http_path == \"/\"})" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="running condition expression: any(queue.Queue, {.Meta.ssh_user == \"admin\"})" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=false): evt.Line.Labels.type =='testlog' && evt.Parsed.tainted_data in File('simple-trigger-external-data/simple_patterns.txt')" cfg=wandering-mountain name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="Event leaving node : ko (filter mismatch)" cfg=wandering-mountain name=test/simple-trigger
time="2024-12-19T07:29:17-05:00" level=warning msg="Event wasn't poured"
time="2024-12-19T07:29:17-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:17-05:00" level=debug msg="dbg(result=true): any(queue.Queue, {.Meta.ssh_user == \"admin\"})" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="value of posterior after events : 0.87804884" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:17-05:00" level=debug msg="Bayesian bucket overflow" bucket_id=billowing-waterfall cfg=misty-haze name=test/simple-bayesian partition=f4e9c298decf8bf3fcd39e299390fccba340e61b
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE3 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:05.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=6) \"ratata\": (string) (len=7) \"foobar2\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=10) \"don't care\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=5) \"nginx\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:00.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=3) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=8) \"log_type\": (string) (len=14) \"ssh_access-log\",\n  (string) (len=8) \"ssh_user\": (string) (len=5) \"admin\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Meta.log_type == 'http_access-log' || evt.Meta.log_type == 'ssh_access-log'" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/multiple-bayesian' is poured" cfg=quiet-fire name=test/multiple-bayesian
time="2024-12-19T07:29:18-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="starting bayesian evaluation with prior: 0.5" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:18-05:00" level=debug msg="running condition expression: evt.Meta.ssh_user == \"admin\"" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Meta.ssh_user == \"admin\"" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:18-05:00" level=debug msg="value of posterior after events : 0.87804884" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:18-05:00" level=debug msg="Bayesian bucket overflow" bucket_id=lingering-cloud cfg=quiet-fire name=test/multiple-bayesian partition=76a0306ef364170959d0630004dc8e4d874c2cae
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE4 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:08+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"bab\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE3 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:15+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=5) \"entry\": (string) (len=1) \"3\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Creating TimeMachine bucket" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=delicate-butterfly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(bab) : ok" bucket_id=autumn-lake cfg=delicate-butterfly name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=ancient-pond cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:08 +0000 +0000" bucket_id=autumn-lake cfg=delicate-butterfly name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="Created new bucket cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:15 +0000 +0000" bucket_id=ancient-pond cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:02+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aab\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=holy-darkness name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aab) : ok" bucket_id=late-bush cfg=holy-darkness name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:02 +0000 +0000" bucket_id=late-bush cfg=holy-darkness name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) (len=1) {\n  (string) (len=12) \"random_value\": (string) (len=2) \"41\"\n },\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="Creating TimeMachine bucket" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=nameless-water cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:18-05:00" level=debug msg="Created new bucket 24eaec6bc8c1855990d7e3c18ada0689f50ef9c6" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky-cancel' is poured" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="reset_filter didn't match" bucket_id=nameless-water cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:18-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=nameless-water cfg=young-silence name=test/simple-leaky-cancel partition=24eaec6bc8c1855990d7e3c18ada0689f50ef9c6
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:01+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aac\",\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aac) : ok" bucket_id=broken-silence cfg=dawn-sound name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE4 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:05.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=6) \"ratata\": (string) (len=7) \"foobar0\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE4 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:16+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=5) \"entry\": (string) (len=1) \"4\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:16 +0000 +0000" bucket_id=ancient-pond cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="Overflow discarded, still blackholed for 48s" bucket_id=ancient-pond cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="Overflow has been discarded (*leakybucket.Blackhole)" bucket_id=ancient-pond cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) (len=1) {\n  (string) (len=12) \"random_value\": (string) (len=2) \"41\"\n },\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"2.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=2.2.3.4): evt.Meta.source_ip" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="Creating TimeMachine bucket" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=little-flower cfg=young-silence name=test/simple-leaky-cancel partition=3d9ff784a8e38dd358492a853068c2573459c9b8
time="2024-12-19T07:29:18-05:00" level=debug msg="Created new bucket 3d9ff784a8e38dd358492a853068c2573459c9b8" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky-cancel' is poured" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="reset_filter didn't match" bucket_id=little-flower cfg=young-silence name=test/simple-leaky-cancel partition=3d9ff784a8e38dd358492a853068c2573459c9b8
time="2024-12-19T07:29:18-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=little-flower cfg=young-silence name=test/simple-leaky-cancel partition=3d9ff784a8e38dd358492a853068c2573459c9b8
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:02+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aaa) : ko, discard event" bucket_id=broken-silence cfg=dawn-sound name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE5 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:05.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=6) \"ratata\": (string) (len=7) \"foobar1\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE5 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:01:15+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=5) \"entry\": (string) (len=1) \"5\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Creating TimeMachine bucket" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=autumn-thunder cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="Created new bucket cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:01:15 +0000 +0000" bucket_id=autumn-thunder cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) (len=1) {\n  (string) (len=12) \"random_value\": (string) (len=2) \"41\"\n },\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"2.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=2.2.3.4): evt.Meta.source_ip" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky-cancel' is poured" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="reset_filter didn't match" bucket_id=little-flower cfg=young-silence name=test/simple-leaky-cancel partition=3d9ff784a8e38dd358492a853068c2573459c9b8
time="2024-12-19T07:29:18-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:00 +0000 +0000" bucket_id=little-flower cfg=young-silence name=test/simple-leaky-cancel partition=3d9ff784a8e38dd358492a853068c2573459c9b8
time="2024-12-19T07:29:18-05:00" level=debug msg="Adding overflow to blackhole (2020-01-01 10:00:00 +0000 +0000)" bucket_id=little-flower cfg=young-silence name=test/simple-leaky-cancel partition=3d9ff784a8e38dd358492a853068c2573459c9b8
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:02+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aaa) : ko, discard event" bucket_id=broken-silence cfg=dawn-sound name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE6 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:01:16+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\",\n  (string) (len=5) \"entry\": (string) (len=1) \"6\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE6 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=24) \"2020-01-01T10:00:05.000Z\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=24) \"2a00:1450:4007:816::200e\",\n  (string) (len=6) \"ratata\": (string) (len=6) \"foobar\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=empty-sunset name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:18-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:01:16 +0000 +0000" bucket_id=autumn-thunder cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63 left blackhole 12s ago" bucket_id=autumn-thunder cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="Adding overflow to blackhole (2020-01-01 10:01:15 +0000 +0000)" bucket_id=autumn-thunder cfg=empty-sunset name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=2a00:1450:4007:816::200e): evt.Meta.source_ip" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=bitter-firefly name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:18-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:05 +0000 UTC" bucket_id=old-surf cfg=bitter-firefly name=test/simple-leaky partition=d70e6a1d89e829fdf1ed8981ade246fa9992e5e5
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE1 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) (len=1) {\n  (string) (len=12) \"random_value\": (string) (len=2) \"41\"\n },\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:00+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=1) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"2.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=2.2.3.4): evt.Meta.source_ip" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="Creating TimeMachine bucket" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="Leaky routine starting, lifetime : 20s" bucket_id=silent-snow cfg=young-silence name=test/simple-leaky-cancel partition=3d9ff784a8e38dd358492a853068c2573459c9b8
time="2024-12-19T07:29:18-05:00" level=debug msg="Created new bucket 3d9ff784a8e38dd358492a853068c2573459c9b8" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky-cancel' is poured" cfg=young-silence name=test/simple-leaky-cancel
time="2024-12-19T07:29:18-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:18-05:00" level=debug msg="reset_filter didn't match" bucket_id=silent-snow cfg=young-silence name=test/simple-leaky-cancel partition=3d9ff784a8e38dd358492a853068c2573459c9b8
time="2024-12-19T07:29:18-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:00 +0000 +0000" bucket_id=silent-snow cfg=young-silence name=test/simple-leaky-cancel partition=3d9ff784a8e38dd358492a853068c2573459c9b8
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:03+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aab\",\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.4\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.4): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aab) : ko, discard event" bucket_id=broken-silence cfg=dawn-sound name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:03+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.5\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.5): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Creating TimeMachine bucket" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Leaky routine starting, lifetime : 1m20s" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=debug msg="Created new bucket 53e77e47cfe0d5f868527c944c9f79909fef8ac1" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aaa) : ok" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=debug msg="First event, bucket creation time : 2020-01-01 10:00:03 +0000 +0000" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:04+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.5\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aab\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.5): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aab) : ok" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:04+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.5\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aac\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.5): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aac) : ok" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:05+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.5\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aaa\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.5): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aaa) : ko, discard event" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:05+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.5\",\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aab\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.5): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aab) : ko, discard event" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:06+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aac\",\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.5\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.5): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aac) : ko, discard event" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=info msg="Buckets input : (types.Event) {\n Type: (int) 0,\n ExpectMode: (int) 1,\n Whitelisted: (bool) false,\n WhitelistReason: (string) \"\",\n Stage: (string) \"\",\n Line: (types.Line) {\n  Raw: (string) (len=30) \"xxheader VALUE2 trailing stuff\",\n  Src: (string) \"\",\n  Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n  Labels: (map[string]string) (len=1) {\n   (string) (len=4) \"type\": (string) (len=7) \"testlog\"\n  },\n  Process: (bool) false,\n  Module: (string) \"\"\n },\n Parsed: (map[string]string) ,\n Enriched: (map[string]string) ,\n Unmarshaled: (map[string]interface {}) ,\n Overflow: (types.RuntimeAlert) {\n  Mapkey: (string) \"\",\n  BucketId: (string) \"\",\n  Whitelisted: (bool) false,\n  Reprocess: (bool) false,\n  Sources: (map[string]models.Source) ,\n  Alert: (*models.Alert)(),\n  APIAlerts: ([]models.Alert) \n },\n Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,\n StrTime: (string) \"\",\n StrTimeFormat: (string) \"\",\n MarshaledTime: (string) (len=25) \"2020-01-01T10:00:06+00:00\",\n Process: (bool) false,\n Appsec: (types.AppsecEvent) {\n  HasInBandMatches: (bool) false,\n  HasOutBandMatches: (bool) false,\n  MatchedRules: (types.MatchedRules) ,\n  Vars: (map[string]string) \n },\n Meta: (map[string]string) (len=2) {\n  (string) (len=8) \"uniq_key\": (string) (len=3) \"aad\",\n  (string) (len=9) \"source_ip\": (string) (len=7) \"1.2.3.5\"\n }\n}\n"
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type =='testlog'" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=1.2.3.5): evt.Meta.source_ip" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-leaky' is poured" cfg=dawn-sound name=test/simple-leaky
time="2024-12-19T07:29:18-05:00" level=warning msg="Done pouring !"
time="2024-12-19T07:29:18-05:00" level=debug msg="Uniq(aad) : ok" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=debug msg="Bucket overflow at 2020-01-01 10:00:06 +0000 +0000" bucket_id=empty-bush cfg=dawn-sound name=test/simple-leaky partition=53e77e47cfe0d5f868527c944c9f79909fef8ac1
time="2024-12-19T07:29:18-05:00" level=info msg="Timed Overflow" bucket_id=polished-waterfall cfg=late-snowflake name=test/simple-counter partition=9fa78fcbaa08702107f887d4d3b8ef7d020595de
time="2024-12-19T07:29:18-05:00" level=info msg="Event is discarded by overflow filter (any(queue.Queue, {.Meta.source_ip != '1.2.3.4'} ))" bucket_id=withered-dust cfg=polished-star name=test/simple-trigger partition=9658eacf5cfd80e4e05e1ce6b454d02390aab752
time="2024-12-19T07:29:18-05:00" level=info msg="Timed Overflow" bucket_id=withered-dust cfg=polished-star name=test/simple-trigger partition=9658eacf5cfd80e4e05e1ce6b454d02390aab752
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=error msg="Overflow being reprocessed."
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=false): evt.Line.Labels.type =='testlog'" cfg=autumn-dawn name=test/simple-trigger-reprocess
time="2024-12-19T07:29:18-05:00" level=debug msg="Event leaving node : ko (filter mismatch)" cfg=autumn-dawn name=test/simple-trigger-reprocess
time="2024-12-19T07:29:18-05:00" level=debug msg="dbg(result=true): evt.Overflow.Alert != nil && evt.Overflow.Alert.Scenario != nil" cfg=wispy-shadow name=test/simple-postoverflow-scenario
time="2024-12-19T07:29:18-05:00" level=debug msg="Creating Live bucket" cfg=wispy-shadow name=test/simple-postoverflow-scenario
time="2024-12-19T07:29:18-05:00" level=debug msg="Leaky routine starting, lifetime : 0s" bucket_id=solitary-snow cfg=wispy-shadow name=test/simple-postoverflow-scenario partition=91248b28253209fd9d7aa165b3a39157b686247a
time="2024-12-19T07:29:18-05:00" level=debug msg="Created new bucket 91248b28253209fd9d7aa165b3a39157b686247a" cfg=wispy-shadow name=test/simple-postoverflow-scenario
time="2024-12-19T07:29:18-05:00" level=debug msg="bucket 'test/simple-postoverflow-scenario' is poured" cfg=wispy-shadow name=test/simple-postoverflow-scenario
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=info msg="Bucket overflow" bucket_id=solitary-snow cfg=wispy-shadow name=test/simple-postoverflow-scenario partition=91248b28253209fd9d7aa165b3a39157b686247a
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:18-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:18-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=debug msg="bucket underflow, destroy" bucket_id=misty-sky cfg=black-surf name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="got one result"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:19-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/simple-trigger == test/simple-trigger"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 1 == 1"
time="2024-12-19T07:29:20-05:00" level=warning msg="no more results"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/leaky-scope-range-expression == test/leaky-scope-range-expression"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=14) \"192.168.0.0/16\": (models.Source) range 192.168.0.0/16\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=14) \"192.168.0.0/16\": (models.Source) range 192.168.0.0/16\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 2 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="2 results to check against 2 expected results"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/simple-trigger == test/simple-trigger"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/conditional == test/conditional"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 1 == 1"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/simple-counter == test/simple-counter"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4 (FR/1234)\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4 (FR/1234)\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/simple-trigger == test/simple-trigger"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 1 == 1"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4 (FR/1234)\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4 (FR/1234)\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 2 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="2 results to check against 2 expected results"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/simple-trigger == test/simple-trigger"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 1 == 1"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4 (FR/1234)\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4 (FR/1234)\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/simple-trigger == test/simple-trigger"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 1 == 1"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4 (FR/1234)\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4 (FR/1234)\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/guillotine-bayesian == test/guillotine-bayesian"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/simple-leaky == test/simple-leaky"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 0 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 2 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="2 results to check against 2 expected results"
time="2024-12-19T07:29:20-05:00" level=info msg="Here ?"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/filter-ok == test/filter-ok"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 1 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:20-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:20-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/simple-bayesian == test/simple-bayesian"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:20-05:00" level=info msg="(scenario) test/simple-trigger == test/simple-trigger"
time="2024-12-19T07:29:20-05:00" level=info msg="(EventsCount) 1 == 1"
time="2024-12-19T07:29:20-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:20-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:20-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:20-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:21-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:21-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/multiple-bayesian == test/multiple-bayesian"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:21-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:21-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:21-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/simple-leaky == test/simple-leaky"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 4 == 4"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:21-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:21-05:00" level=info msg="Dumping buckets state at 2020-01-01 10:00:08 +0000 +0000"
time="2024-12-19T07:29:21-05:00" level=debug msg="overflowed at 2020-01-01 10:00:08 +0000 +0000." bucket_id=autumn-lake cfg=delicate-butterfly name=test/simple-leaky partition=cdf58e6ae48e79ac3ae0f006e1a2e627eccd8b63
time="2024-12-19T07:29:21-05:00" level=info msg="Serialized 0 live buckets (+1 expired) in 2 bytes to /tmp/crowdsec-buckets-dump-100995622"
time="2024-12-19T07:29:21-05:00" level=info msg="dumped bucket to /tmp/crowdsec-buckets-dump-100995622"
time="2024-12-19T07:29:21-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:21-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/simple-leaky == test/simple-leaky"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:21-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:21-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:21-05:00" level=warning msg="Got 3 overflows from run"
time="2024-12-19T07:29:21-05:00" level=warning msg="3 results to check against 3 expected results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/simple-leaky == test/simple-leaky"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/simple-leaky == test/simple-leaky"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 6 == 6"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=24) \"2a00:1450:4007:816::200e\": (models.Source) ip 2a00:1450:4007:816::200e\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/simple-leaky == test/simple-leaky"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:21-05:00" level=warning msg="Got 2 overflows from run"
time="2024-12-19T07:29:21-05:00" level=warning msg="2 results to check against 2 expected results"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/simple-leaky-cancel == test/simple-leaky-cancel"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 2 == 2"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"2.2.3.4\": (models.Source) ip 2.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"2.2.3.4\": (models.Source) ip 2.2.3.4\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:21-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:21-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:21-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:21-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:21-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/simple-leaky == test/simple-leaky"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 4 == 4"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.5\": (models.Source) ip 1.2.3.5\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.5\": (models.Source) ip 1.2.3.5\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:21-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:21-05:00" level=warning msg="Got 1 overflows from run"
time="2024-12-19T07:29:21-05:00" level=warning msg="1 results to check against 1 expected results"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:21-05:00" level=warning msg="Test is successful"
time="2024-12-19T07:29:21-05:00" level=warning msg="Got 2 overflows from run"
time="2024-12-19T07:29:21-05:00" level=warning msg="2 results to check against 2 expected results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/simple-trigger-reprocess == test/simple-trigger-reprocess"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 1 == 1"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=info msg="(scenario) test/simple-postoverflow-scenario == test/simple-postoverflow-scenario"
time="2024-12-19T07:29:21-05:00" level=info msg="(EventsCount) 1 == 1"
time="2024-12-19T07:29:21-05:00" level=info msg="(Sources: (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n == (map[string]models.Source) (len=1) {\n (string) (len=7) \"1.2.3.4\": (models.Source) ip 1.2.3.4\n}\n)"
time="2024-12-19T07:29:21-05:00" level=warning msg="The test is valid, remove entry 0 from expects, and 0 from t.Results"
time="2024-12-19T07:29:21-05:00" level=warning msg="entry valid at end of loop"
time="2024-12-19T07:29:21-05:00" level=warning msg="Test is successful"
--- PASS: TestBucket (4.08s)
=== RUN   TestBadBucketsConfig
time="2024-12-19T07:29:21-05:00" level=warning msg="Bucket without filter, abort." cfg= name=
time="2024-12-19T07:29:21-05:00" level=warning msg="Bucket without filter, abort." cfg= name=test
time="2024-12-19T07:29:21-05:00" level=warning msg="Bucket without filter, abort." cfg= name=test
time="2024-12-19T07:29:21-05:00" level=warning msg="Bucket without filter, abort." cfg= name=test
--- PASS: TestBadBucketsConfig (0.00s)
=== RUN   TestLeakyBucketsConfig
time="2024-12-19T07:29:21-05:00" level=warning msg="Bucket without filter, abort." cfg= name=test
time="2024-12-19T07:29:21-05:00" level=warning msg="Bucket without filter, abort." cfg= name=test
time="2024-12-19T07:29:21-05:00" level=warning msg="Bucket without filter, abort." cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding leaky bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding leaky bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding leaky bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=error msg="Unable to compile filter : unknown name xu (1:1)\n | xu\n | ^" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=error msg="Error creating overflow_filter : unable to compile filter : unknown name xu (1:1)\n | xu\n | ^" cfg= name=test
--- PASS: TestLeakyBucketsConfig (0.00s)
=== RUN   TestBlackholeConfig
time="2024-12-19T07:29:21-05:00" level=info msg="Adding trigger bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding trigger bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=warning msg="Blackhole duration not valid, using 1h" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=error msg="Error creating blackhole : blackhole duration not valid 'abc'" cfg= name=test
--- PASS: TestBlackholeConfig (0.00s)
=== RUN   TestTriggerBucketsConfig
time="2024-12-19T07:29:21-05:00" level=info msg="Adding trigger bucket" cfg= name=test
--- PASS: TestTriggerBucketsConfig (0.00s)
=== RUN   TestCounterBucketsConfig
time="2024-12-19T07:29:21-05:00" level=info msg="Adding counter bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding counter bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding counter bucket" cfg= name=test
--- PASS: TestCounterBucketsConfig (0.00s)
=== RUN   TestBayesianBucketsConfig
time="2024-12-19T07:29:21-05:00" level=info msg="Adding bayesian bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding bayesian bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding bayesian bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding bayesian bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding bayesian bucket" cfg= name=test
time="2024-12-19T07:29:21-05:00" level=info msg="Adding bayesian bucket" cfg= name=test
--- PASS: TestBayesianBucketsConfig (0.00s)
=== RUN   TestGCandDump
time="2024-12-19T07:29:21-05:00" level=info msg="Adding counter bucket" cfg= name=test_counter_fast
time="2024-12-19T07:29:21-05:00" level=info msg="Adding counter bucket" cfg= name=test_counter_slow
time="2024-12-19T07:29:21-05:00" level=info msg="Adding leaky bucket" cfg= name=test_leaky_slow
time="2024-12-19T07:29:21-05:00" level=info msg="Pouring to bucket"
time="2024-12-19T07:29:21-05:00" level=debug msg="dbg(result=true): true" cfg= name=test_counter_fast
time="2024-12-19T07:29:21-05:00" level=debug msg="Creating Live bucket" cfg= name=test_counter_fast
time="2024-12-19T07:29:21-05:00" level=debug msg="Leaky routine starting, lifetime : 500ms" bucket_id=ancient-glade cfg= name=test_counter_fast partition=71aa86d327f5d3869f76cbd0a9bfe047630b7d31
time="2024-12-19T07:29:21-05:00" level=debug msg="Created new bucket 71aa86d327f5d3869f76cbd0a9bfe047630b7d31" cfg= name=test_counter_fast
time="2024-12-19T07:29:21-05:00" level=debug msg="bucket 'test_counter_fast' is poured" cfg= name=test_counter_fast
time="2024-12-19T07:29:21-05:00" level=debug msg="dbg(result=true): true" cfg= name=test_counter_slow
time="2024-12-19T07:29:21-05:00" level=debug msg="Creating Live bucket" cfg= name=test_counter_slow
time="2024-12-19T07:29:21-05:00" level=debug msg="Leaky routine starting, lifetime : 10m0s" bucket_id=holy-snowflake cfg= name=test_counter_slow partition=7eb7efcbba045223ebb2953b4a784e6f0860e726
time="2024-12-19T07:29:21-05:00" level=debug msg="Created new bucket 7eb7efcbba045223ebb2953b4a784e6f0860e726" cfg= name=test_counter_slow
time="2024-12-19T07:29:21-05:00" level=debug msg="bucket 'test_counter_slow' is poured" cfg= name=test_counter_slow
time="2024-12-19T07:29:21-05:00" level=debug msg="dbg(result=true): true" cfg= name=test_leaky_slow
time="2024-12-19T07:29:21-05:00" level=debug msg="Creating Live bucket" cfg= name=test_leaky_slow
time="2024-12-19T07:29:21-05:00" level=debug msg="Leaky routine starting, lifetime : 1h0m0s" bucket_id=dawn-butterfly cfg= name=test_leaky_slow partition=234605bbacd618ed1e2d940bd58a235ec7c2a790
time="2024-12-19T07:29:21-05:00" level=debug msg="Created new bucket 234605bbacd618ed1e2d940bd58a235ec7c2a790" cfg= name=test_leaky_slow
time="2024-12-19T07:29:21-05:00" level=debug msg="bucket 'test_leaky_slow' is poured" cfg= name=test_leaky_slow
time="2024-12-19T07:29:22-05:00" level=error msg="unable to collect sources from bucket: while extracting scope from bucket test_counter_fast: scope is Ip but Meta[source_ip] doesn't exist"
time="2024-12-19T07:29:22-05:00" level=debug msg="Adding overflow to blackhole (2024-12-19 12:29:21.930374835 +0000 UTC)" bucket_id=ancient-glade cfg= name=test_counter_fast partition=71aa86d327f5d3869f76cbd0a9bfe047630b7d31
time="2024-12-19T07:29:22-05:00" level=info msg="Timed Overflow" bucket_id=ancient-glade cfg= name=test_counter_fast partition=71aa86d327f5d3869f76cbd0a9bfe047630b7d31
time="2024-12-19T07:29:23-05:00" level=info msg="Bucket GC"
time="2024-12-19T07:29:23-05:00" level=debug msg="overflowed at 2024-12-19 12:29:22.436888546 +0000 UTC." bucket_id=ancient-glade cfg= name=test_counter_fast partition=71aa86d327f5d3869f76cbd0a9bfe047630b7d31
time="2024-12-19T07:29:23-05:00" level=debug msg="UNDERFLOW : first_ts:2024-12-19 12:29:21.930954966 +0000 UTC tokens_at:2147483647.000000 capcity:-1.000000" bucket_id=holy-snowflake cfg= name=test_counter_slow partition=7eb7efcbba045223ebb2953b4a784e6f0860e726
time="2024-12-19T07:29:23-05:00" level=debug msg="Bucket externally killed, return" bucket_id=dawn-butterfly cfg= name=test_leaky_slow partition=234605bbacd618ed1e2d940bd58a235ec7c2a790
time="2024-12-19T07:29:23-05:00" level=info msg="Cleaned 2 buckets"
time="2024-12-19T07:29:23-05:00" level=debug msg="Bucket externally killed, return" bucket_id=holy-snowflake cfg= name=test_counter_slow partition=7eb7efcbba045223ebb2953b4a784e6f0860e726
time="2024-12-19T07:29:23-05:00" level=info msg="Dumping buckets state"
time="2024-12-19T07:29:23-05:00" level=info msg="Dumping buckets state at 2024-12-19 12:29:23.936982016 +0000 UTC"
time="2024-12-19T07:29:23-05:00" level=debug msg="(2024-12-19 12:29:21.931522164 +0000 UTC) not dead, count:4.000000 capacity:5.000000" bucket_id=dawn-butterfly cfg= name=test_leaky_slow partition=234605bbacd618ed1e2d940bd58a235ec7c2a790
time="2024-12-19T07:29:23-05:00" level=info msg="Serialized 1 live buckets (+0 expired) in 1944 bytes to /tmp/crowdsec-buckets-dump-2770254707"
--- PASS: TestGCandDump (2.01s)
=== RUN   TestShutdownBuckets
time="2024-12-19T07:29:23-05:00" level=info msg="Adding counter bucket" cfg= name=test_counter_slow
time="2024-12-19T07:29:23-05:00" level=info msg="Adding leaky bucket" cfg= name=test_leaky_slow
time="2024-12-19T07:29:23-05:00" level=info msg="Pouring to bucket"
time="2024-12-19T07:29:23-05:00" level=debug msg="dbg(result=true): true" cfg= name=test_counter_slow
time="2024-12-19T07:29:23-05:00" level=debug msg="Creating Live bucket" cfg= name=test_counter_slow
time="2024-12-19T07:29:23-05:00" level=debug msg="Leaky routine starting, lifetime : 10m0s" bucket_id=lively-haze cfg= name=test_counter_slow partition=7eb7efcbba045223ebb2953b4a784e6f0860e726
time="2024-12-19T07:29:23-05:00" level=debug msg="Created new bucket 7eb7efcbba045223ebb2953b4a784e6f0860e726" cfg= name=test_counter_slow
time="2024-12-19T07:29:23-05:00" level=debug msg="bucket 'test_counter_slow' is poured" cfg= name=test_counter_slow
time="2024-12-19T07:29:23-05:00" level=debug msg="dbg(result=true): true" cfg= name=test_leaky_slow
time="2024-12-19T07:29:23-05:00" level=debug msg="Creating Live bucket" cfg= name=test_leaky_slow
time="2024-12-19T07:29:23-05:00" level=debug msg="Leaky routine starting, lifetime : 1h0m0s" bucket_id=dry-wildflower cfg= name=test_leaky_slow partition=234605bbacd618ed1e2d940bd58a235ec7c2a790
time="2024-12-19T07:29:23-05:00" level=debug msg="Created new bucket 234605bbacd618ed1e2d940bd58a235ec7c2a790" cfg= name=test_leaky_slow
time="2024-12-19T07:29:23-05:00" level=debug msg="bucket 'test_leaky_slow' is poured" cfg= name=test_leaky_slow
time="2024-12-19T07:29:24-05:00" level=info msg="killed 7eb7efcbba045223ebb2953b4a784e6f0860e726"
time="2024-12-19T07:29:24-05:00" level=debug msg="Bucket externally killed, return" bucket_id=dry-wildflower cfg= name=test_leaky_slow partition=234605bbacd618ed1e2d940bd58a235ec7c2a790
time="2024-12-19T07:29:24-05:00" level=info msg="killed 234605bbacd618ed1e2d940bd58a235ec7c2a790"
time="2024-12-19T07:29:24-05:00" level=debug msg="Bucket externally killed, return" bucket_id=lively-haze cfg= name=test_counter_slow partition=7eb7efcbba045223ebb2953b4a784e6f0860e726
--- PASS: TestShutdownBuckets (3.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/leakybucket	9.180s
=== RUN   TestDateParse
=== RUN   TestDateParse/RFC3339
=== RUN   TestDateParse/02/Jan/2006:15:04:05_-0700
=== RUN   TestDateParse/Dec_17_08:17:43
--- PASS: TestDateParse (0.00s)
    --- PASS: TestDateParse/RFC3339 (0.00s)
    --- PASS: TestDateParse/02/Jan/2006:15:04:05_-0700 (0.00s)
    --- PASS: TestDateParse/Dec_17_08:17:43 (0.00s)
=== RUN   TestParserConfigs
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=aged-dew
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=crimson-silence
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=white-wind
time="2024-12-19T07:29:19-05:00" level=error msg="Node is empty or invalid, abort" id=white-wind name= stage=s00
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=wispy-water
time="2024-12-19T07:29:19-05:00" level=error msg="Unable to compile subpattern FOOBAR : error parsing regexp: invalid character class range: `a-$`" id=wispy-water name= stage=s00
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=bold-sea
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=little-star
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=empty-sun
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=bold-rain
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=lingering-morning
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=green-resonance
time="2024-12-19T07:29:19-05:00" level=info msg=" has debug enabled" id=still-voice
time="2024-12-19T07:29:19-05:00" level=error msg="Unable to compile subpattern SUBGROKBIS : the 'MYGROKBIS' pattern doesn't exist" id=still-voice name= stage=s00
--- PASS: TestParserConfigs (0.28s)
=== RUN   TestParser
time="2024-12-19T07:29:19-05:00" level=info msg="Successfully registered enricher 'GeoIpCity'"
time="2024-12-19T07:29:19-05:00" level=info msg="Successfully registered enricher 'GeoIpASN'"
time="2024-12-19T07:29:19-05:00" level=info msg="Successfully registered enricher 'IpToRange'"
time="2024-12-19T07:29:19-05:00" level=info msg="Successfully registered enricher 'reverse_dns'"
time="2024-12-19T07:29:19-05:00" level=info msg="Successfully registered enricher 'ParseDate'"
time="2024-12-19T07:29:19-05:00" level=info msg="Successfully registered enricher 'UnmarshalJSON'"
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded -> {Registered:map[GeoIpASN:0x22abd610 GeoIpCity:0x22abd600 IpToRange:0x22abd630 ParseDate:0x22abd660 UnmarshalJSON:0x22abd670 reverse_dns:0x22abd640]}"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/base-grok"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/base-grok"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok has debug enabled" id=little-wind
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok has debug enabled" id=cold-resonance
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/base-grok/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=cold-resonance name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE1'" id=cold-resonance name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=cold-resonance name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=cold-resonance name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE2'" id=cold-resonance name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=cold-resonance name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=little-wind name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE1 == VALUE1\n\tok Meta[log_type] parsed_testlog == parsed_testlog"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE2 == VALUE2\n\tok Meta[log_type] parsed_testlog == parsed_testlog"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/base-grok-expression"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/base-grok-expression"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok has debug enabled" id=frosty-sky
time="2024-12-19T07:29:19-05:00" level=warning msg="grok 'MYCAP1' already registred" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok has debug enabled" id=quiet-bird
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/base-grok-expression/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=xxheader VALUE1 trailing stuff): evt.Line.Raw" id=quiet-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=quiet-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE1'" id=quiet-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=quiet-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=xxheader VALUE2 trailing stuff): evt.Line.Raw" id=quiet-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=quiet-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE2'" id=quiet-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=quiet-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=frosty-sky name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE1 == VALUE1\n\tok Meta[log_type] parsed_testlog == parsed_testlog"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE2 == VALUE2\n\tok Meta[log_type] parsed_testlog == parsed_testlog"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/base-grok-external-data"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/base-grok-external-data"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok has debug enabled" id=snowy-moon
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok has debug enabled" id=long-flower
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/base-grok-external-data/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=long-flower name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE1'" id=long-flower name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=long-flower name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 2 statics" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Parsed.extracted_value in File(\"./sample_strings.txt\") ? \"true\" : \"false\"" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[is_it_in_file] = 'true'" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=long-flower name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE2'" id=long-flower name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=long-flower name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 2 statics" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=false): evt.Parsed.extracted_value in File(\"./sample_strings.txt\") ? \"true\" : \"false\"" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[is_it_in_file] = 'false'" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=snowy-moon name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE1 == VALUE1\n\tok Meta[log_type] parsed_testlog == parsed_testlog\n\tok Meta[is_it_in_file] true == true"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE2 == VALUE2\n\tok Meta[log_type] parsed_testlog == parsed_testlog\n\tok Meta[is_it_in_file] false == false"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/base-grok-import"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/base-grok-import"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok has debug enabled" id=young-dream
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok has debug enabled" id=dry-bird
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/base-grok-import/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'SYSLOGFACILITY' returned 2 entries to merge in Parsed" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['facility'] = '123'" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['priority'] = '120'" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Enriched[subgrok_static_why_is_it_still_here] = 'because'" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'SYSLOGFACILITY' returned 2 entries to merge in Parsed" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['facility'] = '123'" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['priority'] = '121'" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Enriched[subgrok_static_why_is_it_still_here] = 'because'" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'SYSLOGFACILITY' didn't return data on 'XXXX'" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ko" id=dry-bird name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ko" id=young-dream name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 3 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 3 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/3 matches result 0/3"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[facility] 123 == 123\n\tok Parsed[priority] 120 == 120\n\tok Meta[log_type] parsed_testlog == parsed_testlog\n\tok Enriched[subgrok_static_why_is_it_still_here] because == because"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process false == false\n\tok whitelist false == false"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[facility] 123 == 123\n\tok Parsed[priority] 121 == 121\n\tok Meta[log_type] parsed_testlog == parsed_testlog\n\tok Enriched[subgrok_static_why_is_it_still_here] because == because"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/base-grok-no-subnode"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/base-grok-no-subnode"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok has debug enabled" id=hidden-brook
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/base-grok-no-subnode/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE1'" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE2'" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=hidden-brook name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE1 == VALUE1\n\tok Meta[log_type] parsed_testlog == parsed_testlog"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE2 == VALUE2\n\tok Meta[log_type] parsed_testlog == parsed_testlog"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/base-grok-stash"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/base-grok-stash"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok-stash has debug enabled" id=winter-butterfly
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok-stash has debug enabled" id=red-wind
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok-stash has debug enabled" id=bitter-frog
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/base-grok-stash/base-grok-stash.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'TEST_START' returned 2 entries to merge in Parsed" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['program'] = 'foobar'" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['pid'] = '12'" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'test_start'" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=foobar): evt.Parsed.program" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=12): evt.Parsed.pid" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Setting key 12 to foobar with expiration 30s" cache=test_program_pid_assoc
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'TEST_START' returned 2 entries to merge in Parsed" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['program'] = 'toto'" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['pid'] = '42'" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'test_start'" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=toto): evt.Parsed.program" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=42): evt.Parsed.pid" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Setting key 42 to toto with expiration 30s" cache=test_program_pid_assoc
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'TEST_START' didn't return data on 'pid 12 did a forbidden thing'" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ko" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'TEST_CONTINUED' returned 1 entries to merge in Parsed" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['pid'] = '12'" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'test_continue'" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=foobar): GetFromStash(\"test_program_pid_assoc\", evt.Parsed.pid)" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[associated_prog_name] = 'foobar'" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'TEST_START' didn't return data on 'pid 42 did a forbidden thing'" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ko" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'TEST_CONTINUED' returned 1 entries to merge in Parsed" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['pid'] = '42'" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'test_continue'" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=toto): GetFromStash(\"test_program_pid_assoc\", evt.Parsed.pid)" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[associated_prog_name] = 'toto'" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'TEST_START' didn't return data on 'pid 45 did a forbidden thing'" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ko" id=red-wind name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok 'TEST_CONTINUED' returned 1 entries to merge in Parsed" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['pid'] = '45'" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'test_continue'" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=): GetFromStash(\"test_program_pid_assoc\", evt.Parsed.pid)" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Empty value for .Meta[associated_prog_name], skip." id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=bitter-frog name=child-tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=winter-butterfly name=tests/base-grok-stash stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 5 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 5 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/5 matches result 0/5"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[pid] 12 == 12\n\tok Parsed[program] foobar == foobar\n\tok Meta[log_type] test_start == test_start"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/4 matches result 0/4"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[pid] 45 == 45\n\tok Meta[log_type] test_continue == test_continue"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/3 matches result 0/3"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[pid] 42 == 42\n\tok Meta[log_type] test_continue == test_continue\n\tok Meta[associated_prog_name] toto == toto"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[pid] 12 == 12\n\tok Meta[log_type] test_continue == test_continue\n\tok Meta[associated_prog_name] foobar == foobar"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[program] toto == toto\n\tok Parsed[pid] 42 == 42\n\tok Meta[log_type] test_start == test_start"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/base-json-extract"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/base-json-extract"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-json-extract has debug enabled" id=shy-fire
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/base-json-extract/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok has debug enabled" id=crimson-snow
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok has debug enabled" id=still-dew
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/base-json-extract/base-grok2.yaml stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 2 nodes from 2 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'json-1'" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 5 statics" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=xxheader VALUE1 trailing stuff): JsonExtract(evt.Line.Raw, \"log\")" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Parsed[message] = 'xxheader VALUE1 trailing stuff'" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=some stuff): JsonExtract(evt.Line.Raw, \"testfield\")" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[other_field] = 'some stuff'" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=my_test_prog): evt.Line.Labels.progrname" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[program] = 'my_test_prog'" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=[\"foo\",\"bar\",\"xx1\"]): JsonExtract(evt.Line.Raw, \"nested_1.anarray\")" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Parsed[extracted_array] = '[\"foo\",\"bar\",\"xx1\"]'" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=foo): JsonExtract(evt.Line.Raw, \"nested_1.anarray[0]\")" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Parsed[extracted_array_field] = 'foo'" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="move Event from stage s00-raw to s01-parse" id=shy-fire name=tests/base-json-extract stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Meta.program == 'my_test_prog'" id=crimson-snow name=tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=still-dew name=child-tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE1'" id=still-dew name=child-tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=still-dew name=child-tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=crimson-snow name=tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 2 statics" id=crimson-snow name=tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=crimson-snow name=tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=bar): JsonExtract(evt.Parsed.extracted_array, '[1]')" id=crimson-snow name=tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg=".Parsed[extracted_arrayfield_from_object] = 'bar'" id=crimson-snow name=tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=crimson-snow name=tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s01-parse" id=crimson-snow name=tests/base-grok stage=s01-parse
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 1 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 1 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[message] xxheader VALUE1 trailing stuff == xxheader VALUE1 trailing stuff\n\tok Parsed[extracted_value] VALUE1 == VALUE1\n\tok Parsed[extracted_array_field] foo == foo\n\tok Parsed[extracted_array] [\"foo\",\"bar\",\"xx1\"] == [\"foo\",\"bar\",\"xx1\"]\n\tok Parsed[extracted_arrayfield_from_object] bar == bar\n\tok Meta[program] my_test_prog == my_test_prog\n\tok Meta[other_field] some stuff == some stuff"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/base-tree"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/base-tree"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok-root has debug enabled" id=icy-sunset
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok-leafs has debug enabled" id=still-frost
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok-leafs has debug enabled" id=solitary-bush
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok-leafs has debug enabled" id=blue-bird
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 2 parser nodes" file=./tests/base-tree/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 2 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'type1'" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE1'" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 2 statics" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[state] = 'root-done'" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=VALUE1): evt.Parsed.extracted_value" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[state_sub] = 'VALUE1'" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'type1' && evt.Meta.state == 'root-done'" id=still-frost name=tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Parsed.extracted_value == 'VALUE1'" id=solitary-bush name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=solitary-bush name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[final_state] = 'leaf1'" id=solitary-bush name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=solitary-bush name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=still-frost name=tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=still-frost name=tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=still-frost name=tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'type1'" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE2'" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 2 statics" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[state] = 'root-done'" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=VALUE2): evt.Parsed.extracted_value" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[state_sub] = 'VALUE2'" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=icy-sunset name=tests/base-grok-root stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'type1' && evt.Meta.state == 'root-done'" id=still-frost name=tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=false): evt.Parsed.extracted_value == 'VALUE1'" id=solitary-bush name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ko (failed filter)" id=solitary-bush name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Parsed.extracted_value == 'VALUE2'" id=blue-bird name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=blue-bird name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[final_state] = 'leaf2'" id=blue-bird name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=blue-bird name=child-tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=still-frost name=tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=still-frost name=tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s00-raw" id=still-frost name=tests/base-grok-leafs stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE1 == VALUE1\n\tok Meta[final_state] leaf1 == leaf1\n\tok Meta[state_sub] VALUE1 == VALUE1"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE2 == VALUE2\n\tok Meta[final_state] leaf2 == leaf2\n\tok Meta[state_sub] VALUE2 == VALUE2"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/dateparser-enrich"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/dateparser-enrich"
time="2024-12-19T07:29:19-05:00" level=info msg="test/dateparse has debug enabled" id=rough-moon
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/dateparser-enrich/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.StrTime != ''" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 2 statics" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=2012/11/01): evt.StrTime" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Method ParseDate('2012/11/01') returned 1 entries to merge in .Enriched\n" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[MarshaledTime] = '2012-11-01T00:00:00Z'\n" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=2012-11-01T00:00:00Z): evt.Enriched.MarshaledTime" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="MarshaledTime = '2012-11-01T00:00:00Z'" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.StrTime != ''" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 2 statics" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=11/02/2012 13:37:05): evt.StrTime" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Method ParseDate('11/02/2012 13:37:05') returned 1 entries to merge in .Enriched\n" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[MarshaledTime] = '2012-11-02T13:37:05Z'\n" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=2012-11-02T13:37:05Z): evt.Enriched.MarshaledTime" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="MarshaledTime = '2012-11-02T13:37:05Z'" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=rough-moon name=test/dateparse stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[test] format1 == format1\n\tok Enriched[MarshaledTime] 2012-11-01T00:00:00Z == 2012-11-01T00:00:00Z"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[test] format2 == format2\n\tok Enriched[MarshaledTime] 2012-11-02T13:37:05Z == 2012-11-02T13:37:05Z"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/geoip-enrich"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/geoip-enrich"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/geoip-enrich has debug enabled" id=hidden-pond
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/geoip-enrich/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): 'source_ip' in evt.Meta" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 9 statics" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=1.0.0.1): evt.Meta.source_ip" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Method GeoIpCity('1.0.0.1') returned 4 entries to merge in .Enriched\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[IsInEU] = 'false'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[Latitude] = '0.000000'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[Longitude] = '0.000000'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[IsoCode] = ''\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=): evt.Enriched.IsoCode" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Empty value for .Meta[IsoCode], skip." id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=false): evt.Enriched.IsInEU" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[IsInEU] = 'false'" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=): evt.Enriched.GeoCoords" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Empty value for .Meta[GeoCoords], skip." id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=1.0.0.1): evt.Meta.source_ip" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Method GeoIpASN('1.0.0.1') returned 3 entries to merge in .Enriched\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[ASNNumber] = '15169'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[ASNumber] = '15169'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[ASNOrg] = 'Google Inc.'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=15169): evt.Enriched.ASNNumber" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[ASNNumber] = '15169'" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=Google Inc.): evt.Enriched.ASNOrg" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[ASNOrg] = 'Google Inc.'" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=1.0.0.1): evt.Meta.source_ip" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Method IpToRange('1.0.0.1') returned 1 entries to merge in .Enriched\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[SourceRange] = '1.0.0.0/24'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=1.0.0.0/24): evt.Enriched.SourceRange" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[SourceRange] = '1.0.0.0/24'" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): 'source_ip' in evt.Meta" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 9 statics" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=192.168.0.1): evt.Meta.source_ip" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Method GeoIpCity('192.168.0.1') returned 4 entries to merge in .Enriched\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[IsoCode] = ''\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[IsInEU] = 'false'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[Latitude] = '0.000000'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[Longitude] = '0.000000'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=): evt.Enriched.IsoCode" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Empty value for .Meta[IsoCode], skip." id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=false): evt.Enriched.IsInEU" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[IsInEU] = 'false'" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=): evt.Enriched.GeoCoords" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Empty value for .Meta[GeoCoords], skip." id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=192.168.0.1): evt.Meta.source_ip" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Method GeoIpASN('192.168.0.1') returned 3 entries to merge in .Enriched\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[ASNNumber] = '0'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[ASNumber] = '0'\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Enriched[ASNOrg] = ''\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=0): evt.Enriched.ASNNumber" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[ASNNumber] = '0'" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=): evt.Enriched.ASNOrg" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Empty value for .Meta[ASNOrg], skip." id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=192.168.0.1): evt.Meta.source_ip" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="No range found for ip '192.168.0.1'" id=hidden-pond method=IpToRange name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Method IpToRange('192.168.0.1') returned 0 entries to merge in .Enriched\n" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Method 'IpToRange' empty response on '192.168.0.1'" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=): evt.Enriched.SourceRange" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Empty value for .Meta[SourceRange], skip." id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=hidden-pond name=tests/geoip-enrich stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok process true == true\n\tok whitelist false == false\n\tok Meta[source_ip] 1.0.0.1 == 1.0.0.1\n\tok Enriched[IsInEU] false == false\n\tok Enriched[ASNOrg] Google Inc. == Google Inc."
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok process true == true\n\tok whitelist false == false\n\tok Meta[source_ip] 192.168.0.1 == 192.168.0.1\n\tok Enriched[IsInEU] false == false\n\tok Enriched[IsoCode]  == \n\tok Enriched[ASNOrg]  == "
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/json-unmarshal"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/json-unmarshal"
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/json-unmarshal/base-parser.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=error msg="could not unmarshal JSON: invalid character 'x' looking for beginning of value" id=floral-paper method=UnmarshalJSON name=tests/unmarshalJSON stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=error msg="method 'UnmarshalJSON' returned an error : invalid character 'x' looking for beginning of value" id=floral-paper name=tests/unmarshalJSON stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/multi-stage-grok"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/multi-stage-grok"
time="2024-12-19T07:29:19-05:00" level=info msg="tests/base-grok has debug enabled" id=frosty-glitter
time="2024-12-19T07:29:19-05:00" level=info msg="child-tests/base-grok has debug enabled" id=little-violet
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/multi-stage-grok/base-grok-s00.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="tests/second-stage-grok has debug enabled" id=bold-feather
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/multi-stage-grok/base-grok-s01.yaml stage=s01-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 2 nodes from 2 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=little-violet name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE1'" id=little-violet name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=little-violet name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="move Event from stage s00-raw to s01-raw" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Parsed.extracted_value == 'VALUE1'" id=bold-feather name=tests/second-stage-grok stage=s01-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 2 statics" id=bold-feather name=tests/second-stage-grok stage=s01-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[did_second_stage] = 'yes'" id=bold-feather name=tests/second-stage-grok stage=s01-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="evt.Parsed.test_bis = 'lolilol'" id=bold-feather name=tests/second-stage-grok stage=s01-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=bold-feather name=tests/second-stage-grok stage=s01-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="node reached the last stage : s01-raw" id=bold-feather name=tests/second-stage-grok stage=s01-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): evt.Line.Labels.type == 'testlog'" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Grok '^xxhe...' returned 1 entries to merge in Parsed" id=little-violet name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="\t.Parsed['extracted_value'] = 'VALUE2'" id=little-violet name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=little-violet name=child-tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="child is success, OnSuccess=next_stage, skip" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[log_type] = 'parsed_testlog'" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="move Event from stage s00-raw to s01-raw" id=frosty-glitter name=tests/base-grok stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=false): evt.Parsed.extracted_value == 'VALUE1'" id=bold-feather name=tests/second-stage-grok stage=s01-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ko (failed filter)" id=bold-feather name=tests/second-stage-grok stage=s01-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s01-raw == s01-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE1 == VALUE1\n\tok Parsed[test_bis] lolilol == lolilol\n\tok Meta[log_type] parsed_testlog == parsed_testlog"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s01-raw == s01-raw\n\tok process false == false\n\tok whitelist false == false\n\tok Parsed[extracted_value] VALUE2 == VALUE2\n\tok Meta[log_type] parsed_testlog == parsed_testlog"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/reverse-dns-enrich"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/reverse-dns-enrich"
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/reverse-dns-enrich/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 2 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 2 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Meta[did_dns_succeeded] yes == yes\n\tok Enriched[reverse_dns] one.one.one.one. == one.one.one.one.\n\tok Enriched[IpToResolve] 1.1.1.1 == 1.1.1.1"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok stage s00-raw == s00-raw\n\tok process true == true\n\tok whitelist false == false\n\tok Meta[did_dns_succeeded] no == no\n\tok Enriched[IpToResolve] 1.2.3.4 == 1.2.3.4"
time="2024-12-19T07:29:19-05:00" level=info msg="Running test on ./tests/whitelist-base"
time="2024-12-19T07:29:19-05:00" level=warning msg="testing ./tests/whitelist-base"
time="2024-12-19T07:29:19-05:00" level=info msg="test/whitelists has debug enabled" id=restless-bush
time="2024-12-19T07:29:19-05:00" level=debug msg="adding ip 1.1.1.1 to whitelists" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="adding cidr 1.2.3.0/24 to whitelists" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="adding expression 'supertoken1234' == evt.Enriched.test_token to whitelists" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 parser nodes" file=./tests/whitelist-base/base-grok.yaml stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="Loaded 1 nodes from 1 stages"
time="2024-12-19T07:29:19-05:00" level=warning msg="Going to process one test set"
time="2024-12-19T07:29:19-05:00" level=debug msg="Event from [1.1.1.1] is whitelisted by IP (1.1.1.1), reason [Whitelist tests]" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[statics] = 'success'" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event from [1.2.3.4] is whitelisted by CIDR (1.2.3.0/24), reason [Whitelist tests]" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[statics] = 'success'" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=false): 'supertoken1234' == evt.Enriched.test_token" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=false): 'supertoken1234' == evt.Enriched.test_token" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="dbg(result=true): 'supertoken1234' == evt.Enriched.test_token" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event is whitelisted by expr, reason [Whitelist tests]" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="+ Processing 1 statics" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg=".Meta[statics] = 'success'" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=debug msg="Event leaving node : ok" id=restless-bush name=test/whitelists stage=s00-raw
time="2024-12-19T07:29:19-05:00" level=info msg="parsed 5 lines"
time="2024-12-19T07:29:19-05:00" level=info msg="got 5 results"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/5 matches result 0/5"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok process true == true\n\tok whitelist true == true\n\tok Meta[test] test1 == test1\n\tok Meta[statics] success == success"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/4 matches result 0/4"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok process true == true\n\tok whitelist true == true\n\tok Meta[test] test5 == test5\n\tok Meta[statics] success == success"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/3 matches result 0/3"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok process true == true\n\tok whitelist false == false\n\tok Meta[statics] toto == toto\n\tok Meta[test] test4 == test4"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/2 matches result 0/2"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok process true == true\n\tok whitelist false == false\n\tok Meta[test] test3 == test3\n\tok Meta[statics] toto == toto"
time="2024-12-19T07:29:19-05:00" level=info msg="expected 0/1 matches result 0/1"
time="2024-12-19T07:29:19-05:00" level=info msg="-> OK ! \n\tok process true == true\n\tok whitelist true == true\n\tok Meta[test] test2 == test2\n\tok Meta[statics] success == success"
--- PASS: TestParser (0.32s)
=== RUN   TestGeneratePatternsDoc
--- PASS: TestGeneratePatternsDoc (0.00s)
=== RUN   TestWhitelistCompile
=== RUN   TestWhitelistCompile/Valid_CIDR_whitelist
=== RUN   TestWhitelistCompile/Invalid_CIDR_whitelist
=== RUN   TestWhitelistCompile/Valid_EXPR_whitelist
=== RUN   TestWhitelistCompile/Invalid_EXPR_whitelist
--- PASS: TestWhitelistCompile (0.00s)
    --- PASS: TestWhitelistCompile/Valid_CIDR_whitelist (0.00s)
    --- PASS: TestWhitelistCompile/Invalid_CIDR_whitelist (0.00s)
    --- PASS: TestWhitelistCompile/Valid_EXPR_whitelist (0.00s)
    --- PASS: TestWhitelistCompile/Invalid_EXPR_whitelist (0.00s)
=== RUN   TestWhitelistCheck
=== RUN   TestWhitelistCheck/IP_Whitelisted
=== RUN   TestWhitelistCheck/IP_Not_Whitelisted
=== RUN   TestWhitelistCheck/CIDR_Whitelisted
=== RUN   TestWhitelistCheck/CIDR_Not_Whitelisted
=== RUN   TestWhitelistCheck/EXPR_Whitelisted
=== RUN   TestWhitelistCheck/EXPR_Not_Whitelisted
=== RUN   TestWhitelistCheck/Postoverflow_IP_Whitelisted
=== RUN   TestWhitelistCheck/Postoverflow_IP_Not_Whitelisted
=== RUN   TestWhitelistCheck/Postoverflow_CIDR_Whitelisted
=== RUN   TestWhitelistCheck/Postoverflow_CIDR_Not_Whitelisted
=== RUN   TestWhitelistCheck/Postoverflow_EXPR_Whitelisted
=== RUN   TestWhitelistCheck/Postoverflow_EXPR_Not_Whitelisted
--- PASS: TestWhitelistCheck (0.00s)
    --- PASS: TestWhitelistCheck/IP_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/IP_Not_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/CIDR_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/CIDR_Not_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/EXPR_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/EXPR_Not_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/Postoverflow_IP_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/Postoverflow_IP_Not_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/Postoverflow_CIDR_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/Postoverflow_CIDR_Not_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/Postoverflow_EXPR_Whitelisted (0.00s)
    --- PASS: TestWhitelistCheck/Postoverflow_EXPR_Not_Whitelisted (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/parser	0.666s
=== RUN   TestSetupHelperProcess
--- PASS: TestSetupHelperProcess (0.00s)
=== RUN   TestPathExists
=== PAUSE TestPathExists
=== RUN   TestVersionCheck
=== PAUSE TestVersionCheck
=== RUN   TestListSupported
=== PAUSE TestListSupported
=== RUN   TestApplyRules
=== PAUSE TestApplyRules
=== RUN   TestUnitFound
--- PASS: TestUnitFound (0.08s)
=== RUN   TestDetectSimpleRule
--- PASS: TestDetectSimpleRule (0.00s)
=== RUN   TestDetectUnitError
=== RUN   TestDetectUnitError/error_is_reported_if_systemctl_does_not_exist
--- PASS: TestDetectUnitError (0.00s)
    --- PASS: TestDetectUnitError/error_is_reported_if_systemctl_does_not_exist (0.00s)
=== RUN   TestDetectUnit
=== RUN   TestDetectUnit/detect_unit_and_pick_up_acquisistion_filter
--- PASS: TestDetectUnit (0.07s)
    --- PASS: TestDetectUnit/detect_unit_and_pick_up_acquisistion_filter (0.07s)
=== RUN   TestDetectForcedUnit
--- PASS: TestDetectForcedUnit (0.07s)
=== RUN   TestDetectForcedProcess
    detect_test.go:587: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/setup/detect_test.go:587
        	Error:      	Received unexpected error:
        	            	while looking for service wizard: rule 'ProcessRunning("foobar")': while looking up running processes: errno 0 (1:1)
        	            	 | ProcessRunning("foobar")
        	            	 | ^
        	Test:       	TestDetectForcedProcess
--- FAIL: TestDetectForcedProcess (0.01s)
=== RUN   TestDetectSkipService
    detect_test.go:617: 
        	Error Trace:	/magus/work/usr/mports/security/crowdsec/work/github.com/crowdsecurity/crowdsec@v1.6.3/pkg/setup/detect_test.go:617
        	Error:      	Received unexpected error:
        	            	while looking for service wizard: rule 'ProcessRunning("foobar")': while looking up running processes: errno 0 (1:1)
        	            	 | ProcessRunning("foobar")
        	            	 | ^
        	Test:       	TestDetectSkipService
--- FAIL: TestDetectSkipService (0.01s)
=== RUN   TestDetectForcedOS
=== RUN   TestDetectForcedOS/detect_OS_-_force_linux
=== RUN   TestDetectForcedOS/detect_OS_-_force_windows
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_(no_match)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_(match)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_(match_with_version)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_>=_20.04_(no_match:_no_version_detected)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_>=_20.04_(no_match:_version_is_lower)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_>=_20.04_(match:_same_version)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_>=_20.04_(match:_version_is_higher)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_<_20.04_(no_match:_no_version_detected)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_<_20.04_(no_match:_version_is_higher)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_<_20.04_(no_match:_same_version)
=== RUN   TestDetectForcedOS/detect_OS_-_ubuntu_<_20.04_(match:_version_is_lower)
--- PASS: TestDetectForcedOS (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_force_linux (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_force_windows (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_(no_match) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_(match) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_(match_with_version) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_>=_20.04_(no_match:_no_version_detected) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_>=_20.04_(no_match:_version_is_lower) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_>=_20.04_(match:_same_version) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_>=_20.04_(match:_version_is_higher) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_<_20.04_(no_match:_no_version_detected) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_<_20.04_(no_match:_version_is_higher) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_<_20.04_(no_match:_same_version) (0.00s)
    --- PASS: TestDetectForcedOS/detect_OS_-_ubuntu_<_20.04_(match:_version_is_lower) (0.00s)
=== RUN   TestDetectDatasourceValidation
=== RUN   TestDetectDatasourceValidation/source_is_empty
=== RUN   TestDetectDatasourceValidation/source_is_unknown
=== RUN   TestDetectDatasourceValidation/source_is_misplaced
=== RUN   TestDetectDatasourceValidation/source_is_mismatched
=== RUN   TestDetectDatasourceValidation/source_file:_required_fields
=== RUN   TestDetectDatasourceValidation/source_journalctl:_required_fields
=== RUN   TestDetectDatasourceValidation/source_cloudwatch:_required_fields
=== RUN   TestDetectDatasourceValidation/source_syslog:_all_fields_are_optional
=== RUN   TestDetectDatasourceValidation/source_docker:_required_fields
=== RUN   TestDetectDatasourceValidation/source_kinesis:_required_fields_(enhanced_fanout=false)
=== RUN   TestDetectDatasourceValidation/source_kinesis:_required_fields_(enhanced_fanout=true)
=== RUN   TestDetectDatasourceValidation/source_kafka:_required_fields
=== RUN   TestDetectDatasourceValidation/source_loki:_required_fields
--- PASS: TestDetectDatasourceValidation (0.01s)
    --- PASS: TestDetectDatasourceValidation/source_is_empty (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_is_unknown (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_is_misplaced (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_is_mismatched (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_file:_required_fields (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_journalctl:_required_fields (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_cloudwatch:_required_fields (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_syslog:_all_fields_are_optional (0.01s)
    --- PASS: TestDetectDatasourceValidation/source_docker:_required_fields (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_kinesis:_required_fields_(enhanced_fanout=false) (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_kinesis:_required_fields_(enhanced_fanout=true) (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_kafka:_required_fields (0.00s)
    --- PASS: TestDetectDatasourceValidation/source_loki:_required_fields (0.00s)
=== RUN   TestSystemdUnitList
--- PASS: TestSystemdUnitList (0.08s)
=== CONT  TestPathExists
=== CONT  TestListSupported
=== RUN   TestListSupported/list_configured_services
=== RUN   TestPathExists//this-should-not-exist
=== PAUSE TestPathExists//this-should-not-exist
=== PAUSE TestListSupported/list_configured_services
=== RUN   TestListSupported/invalid_yaml:_blahblah
=== PAUSE TestListSupported/invalid_yaml:_blahblah
=== RUN   TestListSupported/invalid_yaml:_tabs_are_not_allowed
=== PAUSE TestListSupported/invalid_yaml:_tabs_are_not_allowed
=== CONT  TestApplyRules
=== RUN   TestListSupported/invalid_yaml:_no_version
=== CONT  TestVersionCheck
=== PAUSE TestListSupported/invalid_yaml:_no_version
=== RUN   TestApplyRules/empty_list_is_always_true
=== PAUSE TestApplyRules/empty_list_is_always_true
=== RUN   TestListSupported/invalid_yaml:_bad_version
=== RUN   TestApplyRules/simple_true_expression
=== PAUSE TestListSupported/invalid_yaml:_bad_version
=== RUN   TestVersionCheck/Check(1,=1)
=== RUN   TestPathExists//tmp
=== CONT  TestListSupported/list_configured_services
=== CONT  TestListSupported/invalid_yaml:_no_version
=== PAUSE TestVersionCheck/Check(1,=1)
=== CONT  TestListSupported/invalid_yaml:_tabs_are_not_allowed
=== PAUSE TestPathExists//tmp
=== CONT  TestListSupported/invalid_yaml:_bad_version
=== PAUSE TestApplyRules/simple_true_expression
=== RUN   TestApplyRules/simple_false_expression
=== PAUSE TestApplyRules/simple_false_expression
=== RUN   TestApplyRules/all_expressions_are_true
=== PAUSE TestApplyRules/all_expressions_are_true
=== CONT  TestListSupported/invalid_yaml:_blahblah
=== RUN   TestVersionCheck/Check(1,!=1)
=== PAUSE TestVersionCheck/Check(1,!=1)
=== RUN   TestVersionCheck/Check(1,<=1)
=== RUN   TestApplyRules/all_expressions_must_be_true
=== PAUSE TestApplyRules/all_expressions_must_be_true
=== CONT  TestPathExists//this-should-not-exist
=== RUN   TestApplyRules/each_expression_must_be_a_boolan
=== PAUSE TestVersionCheck/Check(1,<=1)
=== PAUSE TestApplyRules/each_expression_must_be_a_boolan
=== RUN   TestApplyRules/each_expression_must_be_a_boolan_(no_short_circuit)
=== RUN   TestVersionCheck/Check(1,>1)
=== PAUSE TestApplyRules/each_expression_must_be_a_boolan_(no_short_circuit)
=== RUN   TestApplyRules/unknown_variable
=== PAUSE TestApplyRules/unknown_variable
--- PASS: TestListSupported (0.00s)
    --- PASS: TestListSupported/invalid_yaml:_no_version (0.00s)
    --- PASS: TestListSupported/list_configured_services (0.00s)
    --- PASS: TestListSupported/invalid_yaml:_bad_version (0.00s)
    --- PASS: TestListSupported/invalid_yaml:_tabs_are_not_allowed (0.00s)
    --- PASS: TestListSupported/invalid_yaml:_blahblah (0.00s)
=== PAUSE TestVersionCheck/Check(1,>1)
=== CONT  TestPathExists//tmp
=== RUN   TestApplyRules/unknown_expression
=== PAUSE TestApplyRules/unknown_expression
=== RUN   TestVersionCheck/Check(1,>=1)
=== PAUSE TestVersionCheck/Check(1,>=1)
=== RUN   TestVersionCheck/Check(1.0,<1.0)
=== PAUSE TestVersionCheck/Check(1.0,<1.0)
=== RUN   TestVersionCheck/Check(1,<1)
--- PASS: TestPathExists (0.00s)
    --- PASS: TestPathExists//this-should-not-exist (0.00s)
    --- PASS: TestPathExists//tmp (0.00s)
=== PAUSE TestVersionCheck/Check(1,<1)
=== RUN   TestVersionCheck/Check(1.3.5,1.3)
=== PAUSE TestVersionCheck/Check(1.3.5,1.3)
=== RUN   TestVersionCheck/Check(1.0,<1.0)#01
=== PAUSE TestVersionCheck/Check(1.0,<1.0)#01
=== RUN   TestVersionCheck/Check(1.0,<=1.0)
=== PAUSE TestVersionCheck/Check(1.0,<=1.0)
=== RUN   TestVersionCheck/Check(2,>1,_<3)
=== PAUSE TestVersionCheck/Check(2,>1,_<3)
=== RUN   TestVersionCheck/Check(2,<=2,_>=2.2)
=== CONT  TestApplyRules/empty_list_is_always_true
=== PAUSE TestVersionCheck/Check(2,<=2,_>=2.2)
=== RUN   TestVersionCheck/Check(2.3,~2)
=== CONT  TestApplyRules/unknown_expression
=== CONT  TestApplyRules/all_expressions_must_be_true
=== PAUSE TestVersionCheck/Check(2.3,~2)
=== RUN   TestVersionCheck/Check(2.3,=2)
=== CONT  TestApplyRules/all_expressions_are_true
=== PAUSE TestVersionCheck/Check(2.3,=2)
=== RUN   TestVersionCheck/Check(1.1.1,=1.1)
=== CONT  TestApplyRules/each_expression_must_be_a_boolan
=== PAUSE TestVersionCheck/Check(1.1.1,=1.1)
=== CONT  TestApplyRules/simple_false_expression
=== CONT  TestApplyRules/unknown_variable
=== CONT  TestApplyRules/each_expression_must_be_a_boolan_(no_short_circuit)
=== CONT  TestApplyRules/simple_true_expression
=== RUN   TestVersionCheck/Check(1.1.1,1.1)
=== PAUSE TestVersionCheck/Check(1.1.1,1.1)
=== RUN   TestVersionCheck/Check(1.1,!=1.1.1)
=== PAUSE TestVersionCheck/Check(1.1,!=1.1.1)
=== RUN   TestVersionCheck/Check(1.1,~1.1.1)
--- PASS: TestApplyRules (0.00s)
    --- PASS: TestApplyRules/empty_list_is_always_true (0.00s)
    --- PASS: TestApplyRules/unknown_expression (0.00s)
    --- PASS: TestApplyRules/all_expressions_must_be_true (0.00s)
    --- PASS: TestApplyRules/all_expressions_are_true (0.00s)
    --- PASS: TestApplyRules/each_expression_must_be_a_boolan (0.00s)
    --- PASS: TestApplyRules/each_expression_must_be_a_boolan_(no_short_circuit) (0.00s)
    --- PASS: TestApplyRules/simple_true_expression (0.00s)
    --- PASS: TestApplyRules/simple_false_expression (0.00s)
    --- PASS: TestApplyRules/unknown_variable (0.00s)
=== PAUSE TestVersionCheck/Check(1.1,~1.1.1)
=== RUN   TestVersionCheck/Check(1.1.1,~1.1)
=== PAUSE TestVersionCheck/Check(1.1.1,~1.1)
=== RUN   TestVersionCheck/Check(1.1.3,~1.1)
=== PAUSE TestVersionCheck/Check(1.1.3,~1.1)
=== RUN   TestVersionCheck/Check(19.04,<19.10)
=== PAUSE TestVersionCheck/Check(19.04,<19.10)
=== RUN   TestVersionCheck/Check(19.04,>=19.10)
=== PAUSE TestVersionCheck/Check(19.04,>=19.10)
=== RUN   TestVersionCheck/Check(19.04,=19.4)
=== PAUSE TestVersionCheck/Check(19.04,=19.4)
=== RUN   TestVersionCheck/Check(19.04,~19.4)
=== PAUSE TestVersionCheck/Check(19.04,~19.4)
=== RUN   TestVersionCheck/Check(1.2.3,~1.2)
=== PAUSE TestVersionCheck/Check(1.2.3,~1.2)
=== RUN   TestVersionCheck/Check(1.2.3,!=1.2)
=== PAUSE TestVersionCheck/Check(1.2.3,!=1.2)
=== RUN   TestVersionCheck/Check(1.2.3,1.1.1_-_1.3.4)
=== PAUSE TestVersionCheck/Check(1.2.3,1.1.1_-_1.3.4)
=== RUN   TestVersionCheck/Check(1.3.5,1.1.1_-_1.3.4)
=== PAUSE TestVersionCheck/Check(1.3.5,1.1.1_-_1.3.4)
=== RUN   TestVersionCheck/Check(1.3.5,=1)
=== PAUSE TestVersionCheck/Check(1.3.5,=1)
=== RUN   TestVersionCheck/Check(1.3.5,1)
=== PAUSE TestVersionCheck/Check(1.3.5,1)
=== CONT  TestVersionCheck/Check(1.3.5,1)
=== CONT  TestVersionCheck/Check(1,=1)
=== CONT  TestVersionCheck/Check(1.3.5,=1)
=== CONT  TestVersionCheck/Check(2.3,=2)
=== CONT  TestVersionCheck/Check(1,<1)
=== CONT  TestVersionCheck/Check(1.0,<1.0)
=== CONT  TestVersionCheck/Check(1,<=1)
=== CONT  TestVersionCheck/Check(1,!=1)
=== CONT  TestVersionCheck/Check(1.3.5,1.1.1_-_1.3.4)
=== CONT  TestVersionCheck/Check(2.3,~2)
=== CONT  TestVersionCheck/Check(2,>1,_<3)
=== CONT  TestVersionCheck/Check(1.2.3,1.1.1_-_1.3.4)
=== CONT  TestVersionCheck/Check(1.0,<=1.0)
=== CONT  TestVersionCheck/Check(2,<=2,_>=2.2)
=== CONT  TestVersionCheck/Check(1.0,<1.0)#01
=== CONT  TestVersionCheck/Check(19.04,<19.10)
=== CONT  TestVersionCheck/Check(1,>=1)
=== CONT  TestVersionCheck/Check(1.2.3,~1.2)
=== CONT  TestVersionCheck/Check(1.2.3,!=1.2)
=== CONT  TestVersionCheck/Check(19.04,~19.4)
=== CONT  TestVersionCheck/Check(1.1,~1.1.1)
=== CONT  TestVersionCheck/Check(1,>1)
=== CONT  TestVersionCheck/Check(1.1.1,~1.1)
=== CONT  TestVersionCheck/Check(1.1,!=1.1.1)
=== CONT  TestVersionCheck/Check(1.1.1,=1.1)
=== CONT  TestVersionCheck/Check(1.1.3,~1.1)
=== CONT  TestVersionCheck/Check(1.1.1,1.1)
=== CONT  TestVersionCheck/Check(19.04,>=19.10)
=== CONT  TestVersionCheck/Check(1.3.5,1.3)
=== CONT  TestVersionCheck/Check(19.04,=19.4)
--- PASS: TestVersionCheck (0.01s)
    --- PASS: TestVersionCheck/Check(1.3.5,1) (0.00s)
    --- PASS: TestVersionCheck/Check(1.3.5,=1) (0.00s)
    --- PASS: TestVersionCheck/Check(1,=1) (0.00s)
    --- PASS: TestVersionCheck/Check(1,<1) (0.00s)
    --- PASS: TestVersionCheck/Check(2.3,=2) (0.00s)
    --- PASS: TestVersionCheck/Check(1,<=1) (0.00s)
    --- PASS: TestVersionCheck/Check(1.0,<1.0) (0.00s)
    --- PASS: TestVersionCheck/Check(1,!=1) (0.00s)
    --- PASS: TestVersionCheck/Check(2,>1,_<3) (0.00s)
    --- PASS: TestVersionCheck/Check(1.3.5,1.1.1_-_1.3.4) (0.00s)
    --- PASS: TestVersionCheck/Check(2,<=2,_>=2.2) (0.00s)
    --- PASS: TestVersionCheck/Check(1.0,<1.0)#01 (0.00s)
    --- PASS: TestVersionCheck/Check(19.04,<19.10) (0.00s)
    --- PASS: TestVersionCheck/Check(1.0,<=1.0) (0.00s)
    --- PASS: TestVersionCheck/Check(2.3,~2) (0.00s)
    --- PASS: TestVersionCheck/Check(1,>=1) (0.00s)
    --- PASS: TestVersionCheck/Check(1.2.3,~1.2) (0.00s)
    --- PASS: TestVersionCheck/Check(1.2.3,!=1.2) (0.00s)
    --- PASS: TestVersionCheck/Check(19.04,~19.4) (0.00s)
    --- PASS: TestVersionCheck/Check(1.1,~1.1.1) (0.00s)
    --- PASS: TestVersionCheck/Check(1,>1) (0.00s)
    --- PASS: TestVersionCheck/Check(1.1.1,~1.1) (0.00s)
    --- PASS: TestVersionCheck/Check(1.1,!=1.1.1) (0.00s)
    --- PASS: TestVersionCheck/Check(1.1.1,=1.1) (0.00s)
    --- PASS: TestVersionCheck/Check(1.1.3,~1.1) (0.00s)
    --- PASS: TestVersionCheck/Check(1.1.1,1.1) (0.00s)
    --- PASS: TestVersionCheck/Check(19.04,=19.4) (0.00s)
    --- PASS: TestVersionCheck/Check(19.04,>=19.10) (0.00s)
    --- PASS: TestVersionCheck/Check(1.2.3,1.1.1_-_1.3.4) (0.00s)
    --- PASS: TestVersionCheck/Check(1.3.5,1.3) (0.00s)
FAIL
FAIL	github.com/crowdsecurity/crowdsec/pkg/setup	0.445s
=== RUN   TestLimit
--- PASS: TestLimit (0.00s)
=== RUN   TestEvery
--- PASS: TestEvery (0.00s)
=== RUN   TestLimiterBurst1
--- PASS: TestLimiterBurst1 (0.00s)
=== RUN   TestLimiterBurst3
--- PASS: TestLimiterBurst3 (0.00s)
=== RUN   TestLimiterJumpBackwards
--- PASS: TestLimiterJumpBackwards (0.00s)
=== RUN   TestLimiter_noTruncationErrors
--- PASS: TestLimiter_noTruncationErrors (0.00s)
=== RUN   TestSimultaneousRequests
--- PASS: TestSimultaneousRequests (0.00s)
=== RUN   TestLongRunningQPS
--- PASS: TestLongRunningQPS (5.00s)
=== RUN   TestSimpleReserve
--- PASS: TestSimpleReserve (0.00s)
=== RUN   TestMix
--- PASS: TestMix (0.00s)
=== RUN   TestCancelInvalid
--- PASS: TestCancelInvalid (0.00s)
=== RUN   TestCancelLast
--- PASS: TestCancelLast (0.00s)
=== RUN   TestCancelTooLate
--- PASS: TestCancelTooLate (0.00s)
=== RUN   TestCancel0Tokens
--- PASS: TestCancel0Tokens (0.00s)
=== RUN   TestCancel1Token
--- PASS: TestCancel1Token (0.00s)
=== RUN   TestCancelMulti
--- PASS: TestCancelMulti (0.00s)
=== RUN   TestReserveJumpBack
--- PASS: TestReserveJumpBack (0.00s)
=== RUN   TestReserveJumpBackCancel
--- PASS: TestReserveJumpBackCancel (0.00s)
=== RUN   TestReserveSetLimit
--- PASS: TestReserveSetLimit (0.00s)
=== RUN   TestReserveSetBurst
--- PASS: TestReserveSetBurst (0.00s)
=== RUN   TestReserveSetLimitCancel
--- PASS: TestReserveSetLimitCancel (0.00s)
=== RUN   TestReserveMax
--- PASS: TestReserveMax (0.00s)
=== RUN   TestWaitSimple
--- PASS: TestWaitSimple (0.22s)
=== RUN   TestWaitCancel
    rate_test.go:442: tokens:2.0471785799999997 last:2024-12-19 07:29:26.698204714 -0500 EST m=+5.339797944 lastEvent:2024-12-19 07:29:26.79348614 -0500 EST m=+5.435080086
--- PASS: TestWaitCancel (0.11s)
=== RUN   TestWaitTimeout
--- PASS: TestWaitTimeout (0.00s)
=== RUN   TestWaitInf
--- PASS: TestWaitInf (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/time/rate	5.349s
=== RUN   TestSetParsed
=== RUN   TestSetParsed/SetParsed:_Valid
=== RUN   TestSetParsed/SetParsed:_Existing_map
=== RUN   TestSetParsed/SetParsed:_Existing_map+key
--- PASS: TestSetParsed (0.00s)
    --- PASS: TestSetParsed/SetParsed:_Valid (0.00s)
    --- PASS: TestSetParsed/SetParsed:_Existing_map (0.00s)
    --- PASS: TestSetParsed/SetParsed:_Existing_map+key (0.00s)
=== RUN   TestSetMeta
=== RUN   TestSetMeta/SetMeta:_Valid
=== RUN   TestSetMeta/SetMeta:_Existing_map
=== RUN   TestSetMeta/SetMeta:_Existing_map+key
--- PASS: TestSetMeta (0.00s)
    --- PASS: TestSetMeta/SetMeta:_Valid (0.00s)
    --- PASS: TestSetMeta/SetMeta:_Existing_map (0.00s)
    --- PASS: TestSetMeta/SetMeta:_Existing_map+key (0.00s)
=== RUN   TestParseIPSources
=== RUN   TestParseIPSources/ParseIPSources:_Valid_Log_Sources
=== RUN   TestParseIPSources/ParseIPSources:_Valid_Overflow_Sources
=== RUN   TestParseIPSources/ParseIPSources:_Invalid_Log_Sources
=== RUN   TestParseIPSources/ParseIPSources:_Invalid_Overflow_Sources
--- PASS: TestParseIPSources (0.00s)
    --- PASS: TestParseIPSources/ParseIPSources:_Valid_Log_Sources (0.00s)
    --- PASS: TestParseIPSources/ParseIPSources:_Valid_Overflow_Sources (0.00s)
    --- PASS: TestParseIPSources/ParseIPSources:_Invalid_Log_Sources (0.00s)
    --- PASS: TestParseIPSources/ParseIPSources:_Invalid_Overflow_Sources (0.00s)
=== RUN   TestIP2Int
--- PASS: TestIP2Int (0.00s)
=== RUN   TestRange2Int
--- PASS: TestRange2Int (0.00s)
=== RUN   TestAdd2Int
--- PASS: TestAdd2Int (0.00s)
PASS
ok  	github.com/crowdsecurity/crowdsec/pkg/types	0.010s
FAIL
*** Error code 1

Stop.
make: stopped in /usr/mports/security/crowdsec

Links

Depends On

Depend Of

Nothing

Categories

CVEs

  • Loading CVE information...

LLM Analysis