Skip to content

refactor: Rules class helper methods as free functions - #195

Merged
MichaelThamm merged 8 commits into
mainfrom
feat/sigma-rules
Jun 26, 2026
Merged

MichaelThamm merged 8 commits into
mainfrom
feat/sigma-rules

Conversation

@MichaelThamm

@MichaelThamm MichaelThamm commented May 8, 2026

Copy link
Copy Markdown
Contributor

Issue

We have some static methods in Rules that we want to move to free functions so that they can be reused in other rules-like classes e.g., SigmaRules.

Solution

Checklist

  • I have added or updated relevant documentation.
  • PR title makes an appropriate release note and follows conventional commits syntax.
  • Merge target is the correct branch, and relevant tandem backport PRs opened.
  • This change warrants a release, so I have updated the project.version field in the pyproject.toml file.

Context

These static methods were private so we have relative confidence that they were not used externally.

Ref to other PRs for context:

Testing Instructions

Use these free functions in the Rules class which is thoroughly tested by the existing unit tests in cosl.

Upgrade Notes

Co-authored-by: Copilot <copilot@github.com>
@MichaelThamm MichaelThamm changed the title feat: Sigma rules rework pt.1 feat: Sigma rules pt.1 May 8, 2026
This was referenced May 8, 2026
@niwamo niwamo mentioned this pull request Jun 18, 2026
4 tasks
Comment thread src/cosl/rules.py Outdated
Signed-off-by: Michael Thamm <mike.thamm@canonical.com>
Comment thread pyproject.toml
@MichaelThamm MichaelThamm changed the title feat: Sigma rules pt.1 refactor: Extract some Rules methods into free functions Jun 26, 2026
@MichaelThamm MichaelThamm changed the title refactor: Extract some Rules methods into free functions refactor: Rules class helper methods as free functions Jun 26, 2026
@MichaelThamm
MichaelThamm marked this pull request as ready for review June 26, 2026 14:57
@MichaelThamm
MichaelThamm requested a review from a team as a code owner June 26, 2026 14:57
@MichaelThamm
MichaelThamm merged commit 0fa13f4 into main Jun 26, 2026
4 checks passed
@MichaelThamm
MichaelThamm deleted the feat/sigma-rules branch June 26, 2026 15:19
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.

2 participants