coreruleset / coreruleset/crslang

Review "or" format

Open
#40 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
12
Forks
2
PR merge metrics
No merged PRs in 30d

Description

We need to review the condition generation for "or" in collections. E.g. for the following rule:
SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx ...

This is the code generated:

conditions:
  - collections:
      - name: REQUEST_COOKIES
        exclude:
          - /__utm/
      - name: REQUEST_COOKIES_NAMES
      - name: ARGS_NAMES
      - name: ARGS
      - name: XML
        arguments:
          - /*
    operator:
      rx:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing condition generation for collection expressions and compare the issue's SecRule example with the generated YAML. Determine the expected representation of the "or" condition and its exclusion; done means the generated output preserves the intended semantics. No source file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.