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

Organized rulesets #37

Merged
merged 3 commits into from
Nov 15, 2023
Merged

Conversation

deoxykev
Copy link
Contributor

This PR closes out #32 and does the following:

  1. Refactors ruleset loading logic from handlers/types.go and handlers/proxy.go into a separate package in pkg/ruleset/ruleset.go.

  2. Adds ability to load rulesets from nested directories for better organization.

  3. Adds ability to load gzip-compressed rulesets from webservers (for future ruleset distribution efforts)

  4. Test cases for all of the above.

  5. Adds -r or -rulesets cli flag to pass in ruleset path instead of setting env variables.

  6. Warns the user if they forgot to load a ruleset


In addition, it maintains backward compatibility with the older ways of loading rulesets.

A future PR will reorganize the default rulesets.yaml to use this nested directory loading feature. (ie: break out each rule into it's own file, organized in directories)

@mms-gianni mms-gianni merged commit 55284f0 into everywall:main Nov 15, 2023
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.

None yet

2 participants