Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We were processing every non-commented line in the suricata rules file. Now we're processing every rule and using the comments to indicate if it's enabled or not (not commented = enabled).
Some new complexity was added that's unique to Suricata. Because we manipulate the rules through pillars, we now take advantage of a unique opportunity that will let the ruleset determine if a detection is enabled UNTIL a user modifies the detection at which point the user's preference will forever override the ruleset. The new logic is: if a community rule's sid is not in the enabled pillar or the disabled pillar at the time of import then the sid is left out of the pillars, conversely if the sid is found in a pillar then it should be updated. When not specified in either pillar, the status of a suricata detection will be determined by whether it's commented out or not in the original rule file.
De-linted a line. Readers only throw errors when unreading a non-seekable stream. The stream in use here is always seekable and will never return an error.