1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Security event kind classifications.
use serde::Serialize;
/// The kind/category of a security event.
///
/// # Examples
///
/// ```
/// use security_events::kind::EventKind;
///
/// let kind = EventKind::AuthnFailure;
/// assert_eq!(format!("{kind:?}"), "AuthnFailure");
/// ```
#[non_exhaustive]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize)]
pub enum EventKind {
/// A boundary violation was detected.
BoundaryViolation,
/// An authentication failure occurred.
AuthnFailure,
/// An MFA-related event.
MfaEvent,
/// An authorization denial.
AuthzDeny,
/// An attempted cross-tenant resource access.
CrossTenantAttempt,
/// A secret was accessed.
SecretAccess,
/// A cryptographic key was rotated.
KeyRotation,
/// An administrative action was performed.
AdminAction,
/// A file upload anomaly was detected.
FileUploadAnomaly,
/// A deserialization anomaly was detected.
DeserializationAnomaly,
/// An error was escalated to a security event.
ErrorEscalation,
/// A rate limit block event.
RateLimitBlock,
/// An anti-automation trigger.
AntiAutomation,
/// A TLS policy violation was detected (weak version or cipher).
TlsViolation,
/// A certificate pin mismatch was detected.
CertPinFailure,
/// Cleartext (unencrypted) traffic was blocked.
CleartextBlocked,
/// A mobile storage policy violation was detected.
StoragePolicyViolation,
/// A biometric authentication failure was detected.
BiometricAuthFailure,
/// A step-up authentication failure was detected.
StepUpAuthFailure,
/// A mobile platform safety violation was detected (deep link, WebView, clipboard).
PlatformSafetyViolation,
/// An environment threat was detected (root/jailbreak, emulator, debugger).
EnvironmentThreat,
/// App integrity tampering was detected (signature mismatch, sideloading).
IntegrityViolation,
/// A privacy consent violation was detected (missing/denied/withdrawn consent).
ConsentViolation,
/// A data retention policy expiry was detected.
RetentionExpiry,
}