Detection
A detection handles the result of each audit processed during the analysis in order to provide valuable information about potential violations.
interface Detection {
name: string;
category: DetectionCategory; // "USER_EXPERIENCE" | "USER_SECURITY" | "USER_ADVISORY"
value: string;
reference: string;
condition: DetectionCondition; // "<" | ">" | "<=" | ">=" | "=" | "!="
violation: boolean;
notify: boolean;
alert: boolean;
records: Record[];
}
Fields
Reference
Fields
name
version : 1.0.0
stability: stable
name: string;
The Detection's name (unique identifier).
category
version : 1.0.0
stability: stable
category: DetectionCategory;
enum DetectionCategory {
UserExperience = "USER_EXPERIENCE",
UserSecurity = "USER_SECURITY",
UserAdvisory = "USER_ADVISORY",
}
The Detection's category.
value
version : 1.0.0
stability: stable
value: string;
The value retuned by the Detection. It could be a serialized version of a counter, list, etc...
condition
version : 1.0.0
stability: experimental
condition: DetectionCondition;
enum DetectionCondition {
LessThan = "<",
GreaterThan = ">",
LessThanOrEqualTo = "<=",
GreaterThanOrEqualTo = ">=",
Equal = "=",
NotEqual = "!=",
}
The operator used to validate the records of a Detection.
The operator uses the value and the reference to determine the final result.
Examples:
const value = `3`;
const reference = `0`;
const condition = `>`;
// Pseudo code.
violation = `3 > 0` = true;
reference
version : 1.0.0
stability: stable
reference: string;
The value used as reference to determine if the Detection is a violation.
violation
version : 1.0.0
stability: stable
violation: boolean;
Whether the Detection is a violation.
notify
version : 1.0.0
stability: stable
notify: boolean;
Whether the Detection if positive will be considered as a violation by its owner.
alert
version : 1.0.0
stability: stable
alert: boolean;
Whether the Detection is considered as a violation by its owner.
records
version : 1.0.0
stability: stable
records: Record[];
List of Record that details the data gathered by the Audit during the analysis. All the Audit and Detection's records implement this interface.