|
23 | 23 | /// Represents an execution event stored in the events database. |
24 | 24 | @interface SNTStoredExecutionEvent : SNTStoredEvent <NSSecureCoding> |
25 | 25 |
|
26 | | -- (instancetype)initWithFileInfo:(SNTFileInfo *)fileInfo; |
| 26 | +- (nullable instancetype)initWithFileInfo:(nullable SNTFileInfo *)fileInfo; |
27 | 27 |
|
28 | 28 | /// The SHA-256 of the executed file. |
29 | | -@property NSString *fileSHA256; |
| 29 | +@property(nullable) NSString *fileSHA256; |
30 | 30 |
|
31 | 31 | /// The full path of the executed file. |
32 | | -@property NSString *filePath; |
| 32 | +@property(nullable) NSString *filePath; |
33 | 33 |
|
34 | 34 | /// Set to YES if the event is a part of a bundle. When an event is passed to SantaGUI this propery |
35 | 35 | /// will be used as an indicator to to kick off bundle hashing as necessary. Default value is NO. |
36 | 36 | @property BOOL needsBundleHash; |
37 | 37 |
|
38 | 38 | /// If the executed file was part of a bundle, this is the calculated hash of all the nested |
39 | 39 | /// executables within the bundle. |
40 | | -@property NSString *fileBundleHash; |
| 40 | +@property(nullable) NSString *fileBundleHash; |
41 | 41 |
|
42 | 42 | /// If the executed file was part of a bundle, this is the time in ms it took to hash the bundle. |
43 | | -@property NSNumber *fileBundleHashMilliseconds; |
| 43 | +@property(nullable) NSNumber *fileBundleHashMilliseconds; |
44 | 44 |
|
45 | 45 | /// If the executed file was part of a bundle, this is the total count of related mach-o binaries. |
46 | | -@property NSNumber *fileBundleBinaryCount; |
| 46 | +@property(nullable) NSNumber *fileBundleBinaryCount; |
47 | 47 |
|
48 | 48 | /// If the executed file was part of the bundle, this is the CFBundleDisplayName, if it exists |
49 | 49 | /// or the CFBundleName if not. |
50 | | -@property NSString *fileBundleName; |
| 50 | +@property(nullable) NSString *fileBundleName; |
51 | 51 |
|
52 | 52 | /// If the executed file was part of the bundle, this is the path to the bundle. |
53 | | -@property NSString *fileBundlePath; |
| 53 | +@property(nullable) NSString *fileBundlePath; |
54 | 54 |
|
55 | 55 | /// The relative path to the bundle's main executable. |
56 | | -@property NSString *fileBundleExecutableRelPath; |
| 56 | +@property(nullable) NSString *fileBundleExecutableRelPath; |
57 | 57 |
|
58 | 58 | /// If the executed file was part of the bundle, this is the CFBundleID. |
59 | | -@property NSString *fileBundleID; |
| 59 | +@property(nullable) NSString *fileBundleID; |
60 | 60 |
|
61 | 61 | /// If the executed file was part of the bundle, this is the CFBundleVersion. |
62 | | -@property NSString *fileBundleVersion; |
| 62 | +@property(nullable) NSString *fileBundleVersion; |
63 | 63 |
|
64 | 64 | /// If the executed file was part of the bundle, this is the CFBundleShortVersionString. |
65 | | -@property NSString *fileBundleVersionString; |
| 65 | +@property(nullable) NSString *fileBundleVersionString; |
66 | 66 |
|
67 | 67 | /// If the executed file was signed, this is an NSArray of MOLCertificate's |
68 | 68 | /// representing the signing chain. |
69 | | -@property NSArray<MOLCertificate *> *signingChain; |
| 69 | +@property(nullable) NSArray<MOLCertificate *> *signingChain; |
70 | 70 |
|
71 | 71 | /// If the executed file was signed, this is the Team ID if present in the signature information. |
72 | | -@property NSString *teamID; |
| 72 | +@property(nullable) NSString *teamID; |
73 | 73 |
|
74 | 74 | /// If the executed file was signed, this is the Signing ID if present in the signature information. |
75 | | -@property NSString *signingID; |
| 75 | +@property(nullable) NSString *signingID; |
76 | 76 |
|
77 | 77 | /// If the executed file was signed, this is the CDHash of the binary. |
78 | | -@property NSString *cdhash; |
| 78 | +@property(nullable) NSString *cdhash; |
79 | 79 |
|
80 | 80 | /// Codesigning flags for the process (from `<Kernel/kern/cs_blobs.h>`) |
81 | 81 | @property uint32_t codesigningFlags; |
|
84 | 84 | @property SNTSigningStatus signingStatus; |
85 | 85 |
|
86 | 86 | /// The user who executed the binary. |
87 | | -@property NSString *executingUser; |
| 87 | +@property(nullable) NSString *executingUser; |
88 | 88 |
|
89 | 89 | /// The decision santad returned. |
90 | 90 | @property SNTEventState decision; |
91 | 91 |
|
92 | 92 | /// NSArray of logged in users when the decision was made. |
93 | | -@property NSArray *loggedInUsers; |
| 93 | +@property(nullable) NSArray *loggedInUsers; |
94 | 94 |
|
95 | 95 | /// NSArray of sessions when the decision was made (e.g. nobody@console, nobody@ttys000). |
96 | | -@property NSArray *currentSessions; |
| 96 | +@property(nullable) NSArray *currentSessions; |
97 | 97 |
|
98 | 98 | /// The process ID of the binary being executed. |
99 | | -@property NSNumber *pid; |
| 99 | +@property(nullable) NSNumber *pid; |
100 | 100 |
|
101 | 101 | /// The parent process ID of the binary being executed. |
102 | | -@property NSNumber *ppid; |
| 102 | +@property(nullable) NSNumber *ppid; |
103 | 103 |
|
104 | 104 | /// The name of the parent process. |
105 | | -@property NSString *parentName; |
| 105 | +@property(nullable) NSString *parentName; |
106 | 106 |
|
107 | 107 | /// Quarantine data about the executed file, if any. |
108 | | -@property NSString *quarantineDataURL; |
109 | | -@property NSString *quarantineRefererURL; |
110 | | -@property NSDate *quarantineTimestamp; |
111 | | -@property NSString *quarantineAgentBundleID; |
| 108 | +@property(nullable) NSString *quarantineDataURL; |
| 109 | +@property(nullable) NSString *quarantineRefererURL; |
| 110 | +@property(nullable) NSDate *quarantineTimestamp; |
| 111 | +@property(nullable) NSString *quarantineAgentBundleID; |
112 | 112 |
|
113 | 113 | /// A generated string representing the publisher based on the signingChain |
114 | | -@property(readonly) NSString *publisherInfo; |
| 114 | +@property(readonly, nullable) NSString *publisherInfo; |
115 | 115 |
|
116 | 116 | /// Return an array of the underlying SecCertificateRef's of the signingChain |
117 | 117 | /// |
118 | 118 | /// WARNING: If the refs need to be used for a long time be careful to properly |
119 | 119 | /// CFRetain/CFRelease the returned items. |
120 | | -@property(readonly) NSArray *signingChainCertRefs; |
| 120 | +@property(readonly, nullable) NSArray *signingChainCertRefs; |
121 | 121 |
|
122 | 122 | /// If the executed file was entitled, this is the set of key/value pairs of entitlements |
123 | | -@property NSDictionary *entitlements; |
| 123 | +@property(nullable) NSDictionary *entitlements; |
124 | 124 |
|
125 | 125 | /// Whether or not the set of entitlements were filtered (e.g. due to configuration) |
126 | 126 | @property BOOL entitlementsFiltered; |
127 | 127 |
|
128 | 128 | /// The timestamp of when the binary was signed. This timestamp is the secure |
129 | 129 | /// timestamp that was certified by Apple's timestamp authority service and can |
130 | 130 | /// be trusted. |
131 | | -@property NSDate *secureSigningTime; |
| 131 | +@property(nullable) NSDate *secureSigningTime; |
132 | 132 |
|
133 | 133 | /// The timestamp of when the binary was signed. This timestamp is the insecure |
134 | 134 | /// timestamp provided by the developer during signing. It has not been validated |
135 | 135 | /// and could be spoofed. |
136 | | -@property NSDate *signingTime; |
| 136 | +@property(nullable) NSDate *signingTime; |
137 | 137 |
|
138 | 138 | @end |
0 commit comments