-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False positive "unknown directive" and crash #3389
Comments
@Simbiat: Thanks for opening an issue, it is currently awaiting triage. In the meantime, you can:
DetailsI 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. |
Hi we will triage your issue over the following week please note their is a current bug in latest crowdsec which does happen with custom seclang rules that are multi-line #3350 (comment) Either revert back to |
looks like different symptoms, but I will be able to test a bit tomorrow. I will try removing |
Strange, I tried with just name: simbiat/simbiat-seclang
seclang_rules:
- SecRuleEngine On
- SecRequestBodyAccess On
seclang_files_rules:
- /corerulset/rules/REQUEST-901-INITIALIZATION.conf and somehow got a non-descriptive error instead of one complaining about 901200
So tried name: simbiat/simbiat-seclang
seclang_files_rules:
- 01-coraza-recommended.conf
- 02-crs-setup.conf
- 03-exclusions-before-crs.conf Failed same as before with reference to 900120. There are no references to 901200 in anything else besides Replaced
with
So looked like multi-line was a problem. But I then reverted everything back to my full "expected" config with all the customization, and used 1.6.3 instead of 1.6.4 and... It worked completely fine. So yes it may, indeed, be related to #3350 |
What happened?
I am trying to use a customized setup of appsec CRS rules, specifically, trying to use latest version of CoreRuleSet (since the one bundles in Crowdsec is a year old now, if not more), but I fail. There are 2 issues, and this is ticket for one of them: "unknown directive" errors when using conf files from CoreRuleSet 4.9 and 4.10 (did not test earlier versions). To be more correct a few of the errors are from crs-setup file, but even if that one is disabled - it will be failing on REQUEST-901-INITIALIZATION.conf even. Here are logs (some errors are from another issue I will raise shortly):
Trace files trace.zip
Comparing 901200 directive as example (since it comes from a conf file which is not customized at all, and is technically included in CrowdSec's official collection, the only differences are version and addition of
tag
element, buttag
is available in other configs bundled with CrowdSec, so not sure if that's really the root cause.On the other hand I "split" the CrowdSec's version to multiline for the sake of comparison, so maybe it does not like mutlilines?
What did you expect to happen?
Conf files to be processed normally and CrowdSec to start-up
How can we reproduce it (as minimally and precisely as possible)?
My docker-compose
All CrowdSec relate files for the container
config/crowdsec/yaml/appsec/simbiat-seclang.yaml
file remove/comment the default CrowdSec config and uncomment the custom onedocker-compose.yml
(technically can remove GEOIP dependency)Anything else we need to know?
No response
Crowdsec version
OS version
Enabled collections and parsers
Acquisition config
Config show
Prometheus metrics
Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.
No response
The text was updated successfully, but these errors were encountered: