mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
risk validation
This commit is contained in:
+4
-4
@@ -134,17 +134,17 @@ def validate_standard_fields(object, uuids):
|
||||
if not isinstance(v, int):
|
||||
errors.append("ERROR: risk_score not integer value for object: %s" % v)
|
||||
risk_object_type = ["user","system", "other"]
|
||||
|
||||
if k == 'risk_object_type':
|
||||
if not any(s in v for s in risk_object_type):
|
||||
errors.append("ERROR: risk_object_type can only contain user,system, other: %s" % v)
|
||||
if v not in risk_object_type:
|
||||
errors.append("ERROR: risk_object_type can only contain user, system, other: %s" % v)
|
||||
|
||||
if k == 'risk_object':
|
||||
try:
|
||||
v.encode('ascii')
|
||||
except UnicodeEncodeError:
|
||||
errors.append("ERROR: risk_object not ascii for object: %s" % v)
|
||||
|
||||
|
||||
|
||||
return errors, uuids
|
||||
|
||||
|
||||
|
||||
@@ -37,3 +37,6 @@ tags:
|
||||
- DE.AE
|
||||
security_domain: network
|
||||
asset_type: AWS Instance
|
||||
risk_score: 40
|
||||
risk_object_type: user
|
||||
risk_object: userName
|
||||
|
||||
Reference in New Issue
Block a user