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

Fix for invalid JSON output (variable scoping), when we specify multiple rule files, and have hits from multiple rule files. #100

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

wmetcalf
Copy link
Contributor

@wmetcalf wmetcalf commented Feb 3, 2025

If multiple rule files are specified, invalid JSON output is created… if we have hits from each file because the self.first_json_output is currently created in the scope of executeRuleset which is called for each rule file, meaning that we create JSON output with missing comma's between alerts. This fix scopes first_json_output at the class level and fixes the issue.

…if we have hits from each file because the self.first_json_output is currently created in the scope of executeRuleset which is called for each rule file, meaning that we create JSON output with missing comma's between alerts. This fix scopes first_json_output at the class level and fixes the issue.
@wagga40 wagga40 merged commit a1c535b into wagga40:master Feb 4, 2025
2 checks passed
@wagga40
Copy link
Owner

wagga40 commented Feb 4, 2025

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.

2 participants