-
Notifications
You must be signed in to change notification settings - Fork 516
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
[Bug][FR] Remove Rule Type Change Restriction and Fix Version Lock Bug #2769
Merged
terrancedejesus
merged 5 commits into
main
from
2765-fr-remove-rule-type-change-restriction
May 2, 2023
Merged
[Bug][FR] Remove Rule Type Change Restriction and Fix Version Lock Bug #2769
terrancedejesus
merged 5 commits into
main
from
2765-fr-remove-rule-type-change-restriction
May 2, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terrancedejesus
added
bug
Something isn't working
enhancement
New feature or request
python
Internal python for the repository
labels
May 1, 2023
terrancedejesus
requested review from
brokensound77 and
Mikaayenson
as code owners
May 1, 2023 15:36
Mikaayenson
approved these changes
May 1, 2023
w0rk3r
approved these changes
May 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport: auto
bug
Something isn't working
Domain: Endpoint
enhancement
New feature or request
OS: Windows
windows related rules
python
Internal python for the repository
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.
Issues
Related
Summary
This PR removes the restriction of changing rule types. This was made a restriction due to a bug in the Detection Engine that was resolved in 8.2. Our rules currently only backport to >=8.3 and therefore are clear of the stack version window the bug exists in.
To solve this, we removed an validation error check that compares the
version_lock.json
rule contentstype
value to the existing from the loaded rule.Bug - Version lock route B (forked rule); previous key full semantic
During testing,
dev build-release --update-version-lock
was ran to ensure a proper prebuilt rules package could be built after changing the rule type of an existing rule.The
VersionLockFile
schema inversion_lock.py
failed due to the additionalprevious
entry being fully semantic8.3.0
instead of major and minor8.3
as expected.To solve this a new variable
stripped_latest_locked_stack_version
was added by only assigning the major and minor versions fromlatest_locked_stack_version
as such{latest.major}.{latest.minor}
. This then becomes theprevious
key in theversion_lock.json
file if a rule if forked.