Skip to content
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

Appsec rule deduplication breaks multilines seclang rules #3343

Open
blotus opened this issue Nov 25, 2024 · 4 comments
Open

Appsec rule deduplication breaks multilines seclang rules #3343

blotus opened this issue Nov 25, 2024 · 4 comments

Comments

@blotus
Copy link
Member

blotus commented Nov 25, 2024

When deduplication is performed on the loaded appsec rules, we do not handle properly multilines seclang rules, for example (from the CRS):

SecAction \
    "id:901200,\
    phase:1,\
    pass,\
    t:none,\
    nolog,\
...

The parser will consider SecAction \ to be its own rule and will remove all duplicated instances, which breaks CRS support.

@blotus blotus changed the title Appsec rule deduplication breaks seclang rules Appsec rule deduplication breaks multilines seclang rules Nov 25, 2024
Copy link

@blotus: Thanks for opening an issue, it is currently awaiting triage.

In the meantime, you can:

  1. Check Crowdsec Documentation to see if your issue can be self resolved.
  2. You can also join our Discord.
  3. 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.

Copy link

@blotus: There are no 'kind' label on this issue. You need a 'kind' label to start the triage process.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind bug
  • /kind packaging
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.

@victoredvardsson
Copy link

Hello, will this be patched in 1.6.4 asap or will it be fixed in a future version?

Currently a blocker for us to upgrade.

@blotus
Copy link
Member Author

blotus commented Nov 26, 2024

Hello,

This will be fixed in a future update.

In the meantime, you can transform your rules into "single line" rules, and crowdsec will be able to load them (if you encounter an error with the secaction directive, make sure you have only a single space after it in your rules).

@blotus blotus added this to the 1.6.5 milestone Nov 26, 2024
buixor added a commit that referenced this issue Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants