Skip to content

Commit

Permalink
Fix error messages for missing attributes in custom rules
Browse files Browse the repository at this point in the history
Signed-off-by: Megha Goyal <[email protected]>
  • Loading branch information
goyamegh committed Mar 5, 2024
1 parent 4dddfbd commit 4356755
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected static SigmaRule fromDict(Map<String, Object> rule, boolean collectErr
ruleId = null;
}
} else {
errors.addError(new SigmaIdentifierError("Sigma rule identifier must be an UUID"));
errors.addError(new SigmaIdentifierError("Sigma rule identifier cannot be null"));
ruleId = null;
}

Expand All @@ -118,7 +118,7 @@ protected static SigmaRule fromDict(Map<String, Object> rule, boolean collectErr
errors.addError(new SigmaLevelError("Value of level not correct"));
}
} else {
errors.addError(new SigmaLevelError("null is no valid Sigma rule level"));
errors.addError(new SigmaLevelError("Sigma rule level cannot be null"));
}

SigmaStatus status = null;
Expand All @@ -129,7 +129,7 @@ protected static SigmaRule fromDict(Map<String, Object> rule, boolean collectErr
errors.addError(new SigmaStatusError("Value of status not correct"));
}
} else {
errors.addError(new SigmaStatusError("null is no valid Sigma rule status"));
errors.addError(new SigmaStatusError("Sigma rule status cannot be null"));
}

Date ruleDate = null;
Expand Down

0 comments on commit 4356755

Please sign in to comment.