You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check Releases to make sure your agent is on the latest version.
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
What happened?
Crowdsec crashes when tries to load a specific seclang rule:
error: attempted to use string with non-selectable collection: REQUEST_COOKIES_NAMES
version: v1.6.5~rc4-debian-pragmatic-amd64-bfed861b
BuildDate: 2025-01-31_14:53:28
GoVersion: 1.23.5
Platform: linux
goroutine 393 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x5e
github.com/crowdsecurity/go-cs-lib/trace.(*traceKeeper).writeStackTrace(0x383f140, {0x1eb93c0, 0xc001dfde80})
github.com/crowdsecurity/[email protected]/trace/trace.go:152 +0x16e
github.com/crowdsecurity/go-cs-lib/trace.(*traceKeeper).catchPanic(0x383f140, {0x2322b3a, 0x22})
github.com/crowdsecurity/[email protected]/trace/trace.go:168 +0x134
github.com/crowdsecurity/go-cs-lib/trace.CatchPanic(...)
github.com/crowdsecurity/[email protected]/trace/trace.go:37
panic({0x1eb93c0?, 0xc001dfde80?})
runtime/panic.go:785 +0x132
github.com/crowdsecurity/coraza/v3/internal/corazawaf.(*Transaction).GetField(0xc001dd2030?, {0x1, 0x3a, 0x0, {0xc00190a2a0, 0x9}, {0x393fdc0, 0x0, 0x0}})
github.com/crowdsecurity/coraza/[email protected]/internal/corazawaf/transaction.go:601 +0x4a5
github.com/crowdsecurity/coraza/v3/internal/corazawaf.(*Rule).doEvaluate(0xc0027189c0, {0x27438d0, 0xc001dd20a8}, 0x2, 0xc000a9cd88, 0xc001fbb6f8, 0x0, 0xc000a29050)
github.com/crowdsecurity/coraza/[email protected]/internal/corazawaf/rule.go:241 +0xe05
github.com/crowdsecurity/coraza/v3/internal/corazawaf.(*Rule).Evaluate(0xc0027189c0, 0x2, {0x2744578, 0xc000a9cd88}, 0xc000a29050)
github.com/crowdsecurity/coraza/[email protected]/internal/corazawaf/rule.go:182 +0x2aa
github.com/crowdsecurity/coraza/v3/internal/corazawaf.(*RuleGroup).Eval(0xc000923010, 0x2, 0xc000a9cd88)
github.com/crowdsecurity/coraza/[email protected]/internal/corazawaf/rulegroup.go:219 +0x30f
github.com/crowdsecurity/coraza/v3/internal/corazawaf.(*Transaction).ProcessRequestBody(0xc000a9cd88)
github.com/crowdsecurity/coraza/[email protected]/internal/corazawaf/transaction.go:1040 +0x545
github.com/crowdsecurity/crowdsec/pkg/appsec.(*ExtendedTransaction).ProcessRequestBody(...)
github.com/crowdsecurity/crowdsec/pkg/appsec/tx.go:68
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec.(*AppsecRunner).processRequest(0xc0005d85a0, {{0xc000923000?, 0xc000d439b0?}}, 0xc00135e900)
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec/appsec_runner.go:201 +0x4c9
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec.(*AppsecRunner).ProcessInBandRules(0xc0005d85a0, 0xc00135e900)
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec/appsec_runner.go:221 +0xbb
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec.(*AppsecRunner).handleRequest(0xc0005d85a0, 0xc00135e900)
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec/appsec_runner.go:340 +0x3b1
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec.(*AppsecRunner).Run(0xc0005d85a0, 0x3912120)
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec/appsec_runner.go:396 +0x85
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec.(*AppsecSource).StreamingAcquisition.func1.1()
github.com/crowdsecurity/crowdsec/pkg/acquisition/modules/appsec/appsec.go:281 +0x3e
gopkg.in/tomb%2ev2.(*Tomb).run(0x3912120, 0xb162c58b162c58b1?)
gopkg.in/[email protected]/tomb.go:163 +0x2b
created by gopkg.in/tomb%2ev2.(*Tomb).Go in goroutine 392
gopkg.in/[email protected]/tomb.go:159 +0xdb
What did you expect to happen?
The rule should have been loaded without a crash or at least, I should have got an error.
How can we reproduce it (as minimally and precisely as possible)?
Have a configuration that loads the culprit seclang rule
Anything else we need to know?
No response
Crowdsec version
OS version
Acquisition config
On Windows:
C:> Get-Content C:\ProgramData\CrowdSec\config\acquis.yaml
paste output here
Config show
Prometheus metrics
Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.
The text was updated successfully, but these errors were encountered: