Skip to content

Add tests to ensure rules are properly deprecated #1050

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

Merged
merged 3 commits into from
Mar 17, 2021

Conversation

brokensound77
Copy link
Contributor

Issues

resolves #959

Summary

Adds test to ensure rules are properly deprecated. Re-added deprecated rule that was previously removed and updated deprecated_rules.json. A readme was also added to provide proper steps to deprecating.

I tried to make this as minimal as possible in order to be the least impactful to #1029, but hope to get this in to prevent any more accidental deletions, such as in #1028

@brokensound77 brokensound77 added Rule: Deprecation removal of a rule test-suite unit and other testing components python Internal python for the repository labels Mar 17, 2021
@brokensound77
Copy link
Contributor Author

Deprecated rules should also skip all validations, ref: https://github.com/elastic/detection-rules/pull/1029/files#r595671970

"deprecation_date": "2021-03-03",
"rule_name": "Setgid Bit Set via chmod",
"stack_version": "7.13"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the name, it's not clear whether this was the first version where this was removed, or the last version this was included

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I think I can better handle this when expanding for #958, so I will punt this to that

Copy link
Contributor

@rw-access rw-access left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few suggestions, no red flags
LGTM

@brokensound77 brokensound77 merged commit d4cc443 into elastic:main Mar 17, 2021
@brokensound77 brokensound77 deleted the tests/add-deprecation-tests branch March 17, 2021 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Internal python for the repository Rule: Deprecation removal of a rule test-suite unit and other testing components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Properly deprecate removed rules
2 participants