Skip to content

fix: CIDR & AuditLogPartsValue syntax - #94

Open
touchweb-vincent wants to merge 5 commits into
coreruleset:mainfrom
touchweb-vincent:patch-1
Open

fix: CIDR & AuditLogPartsValue syntax#94
touchweb-vincent wants to merge 5 commits into
coreruleset:mainfrom
touchweb-vincent:patch-1

Conversation

@touchweb-vincent

Copy link
Copy Markdown

Hello,

Here is a proposal to manage this correctly :

SecRule REMOTE_ADDR "!@ipMatch 145.226.0.0/24,2001:4860:4801:3c::/64" "chain"

@touchweb-vincent touchweb-vincent changed the title Handling CIDR correctly Handling CIDR & AuditLogPartsValue correctly Oct 30, 2025
@touchweb-vincent touchweb-vincent changed the title Handling CIDR & AuditLogPartsValue correctly fix: CIDR & AuditLogPartsValue syntax Oct 30, 2025
@airween

airween commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

Hi @touchweb-vincent,

thanks for this contribution!

Could you add some tests which provide that the parser works as we expect with the mentioned tokens?

You can see existing test file for examples. Let us know if you need any help.

Comment thread src/secrules_parsing/model/secrules.tx Outdated
touchweb-vincent and others added 2 commits October 30, 2025 14:10
Co-authored-by: Felipe Zipitría <3012076+fzipi@users.noreply.github.com>
@touchweb-vincent

Copy link
Copy Markdown
Author

HI @airween

I don’t have the level to fully understand what’s expected, and I don’t have time to catch up right now.

I’ve written the rules to be tested - what remains is to complete the desired assertions.

@fzipi

fzipi commented Feb 9, 2026

Copy link
Copy Markdown
Member

@touchweb-vincent Can you rebase to latest main and move the tests to the new https://github.com/coreruleset/secrules_parsing/blob/main/tests/test_operators.py file? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants