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

Update threshold rule schema to disallow empty field string #1098

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion detection_rules/schemas/v7_12.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ThresholdCardinality(jsl.Document):
field = jsl.StringField(required=True)
value = jsl.IntField(minimum=1, required=True)

field = jsl.ArrayField(jsl.StringField(required=True, default=""))
field = jsl.ArrayField(jsl.StringField(required=False, min_length=1), required=True)
cardinality = jsl.DocumentField(ThresholdCardinality, required=False)

threshold_scope = ApiSchema711.threshold_scope
Expand Down
4 changes: 2 additions & 2 deletions etc/version.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2521,8 +2521,8 @@
},
"ea248a02-bc47-4043-8e94-2885b19b2636": {
"rule_name": "AWS IAM Brute Force of Assume Role Policy",
"sha256": "9aeb1b1c1c4b9fb39b564774f25afea20210e5789afbde43998e680892678b7c",
"version": 3
"sha256": "9aee800e271c99dfee70b36fbe34a3607ad2b2c9030f77b26db66977cce7621f",
"version": 4
Copy link
Contributor

Choose a reason for hiding this comment

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

😆 the joys of versioning

Copy link
Contributor

Choose a reason for hiding this comment

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

don't forget to pull this lock into main btw

},
"eb079c62-4481-4d6e-9643-3ca499df7aaa": {
"rule_name": "External Alerts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"

[rule.threshold]
field = [""]
field = []
value = 25