@oneuptime/common 14.0.97 → 14.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/CodeRepository.d.mts +3 -0
- package/Models/DatabaseModels/CodeRepository.d.ts +3 -0
- package/Models/DatabaseModels/CodeRepository.js +104 -0
- package/Models/DatabaseModels/Index.js +2 -0
- package/Models/DatabaseModels/SecurityCaseEvidence.d.mts +4 -0
- package/Models/DatabaseModels/SecurityCaseEvidence.d.ts +4 -0
- package/Models/DatabaseModels/SecurityCaseEvidence.js +64 -5
- package/Models/DatabaseModels/SecurityHunt.d.mts +34 -0
- package/Models/DatabaseModels/SecurityHunt.d.ts +34 -0
- package/Models/DatabaseModels/SecurityHunt.js +608 -0
- package/Models/DatabaseModels/SecurityHunt.mjs +2 -0
- package/Types/AI/AIChatTypes.d.mts +1 -0
- package/Types/AI/AIChatTypes.d.ts +1 -0
- package/Types/AI/AIRunEventType.d.mts +1 -0
- package/Types/AI/AIRunEventType.d.ts +1 -0
- package/Types/AI/AIRunEventType.js +8 -0
- package/Types/AI/AiTokenCount.d.mts +22 -1
- package/Types/AI/AiTokenCount.d.ts +22 -1
- package/Types/AI/AiTokenCount.js +126 -57
- package/Types/AI/AiTokenCount.mjs +2 -0
- package/Types/AI/CodeFixTaskContext.d.mts +1 -0
- package/Types/AI/CodeFixTaskContext.d.ts +1 -0
- package/Types/CodeRepository/CodeRepositorySetting.d.mts +1 -0
- package/Types/CodeRepository/CodeRepositorySetting.d.ts +1 -0
- package/Types/CodeRepository/CodeRepositorySetting.js +2 -0
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +2 -0
- package/Types/Link.d.mts +1 -0
- package/Types/Link.d.ts +1 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.d.mts +1 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.d.ts +1 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +9 -0
- package/Types/NotificationSetting/NotificationSettingEventType.d.mts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.d.ts +1 -0
- package/Types/NotificationSetting/NotificationSettingEventType.js +6 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.d.mts +67 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.d.ts +67 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.js +271 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.mjs +13 -0
- package/Types/SecurityCase/SecurityCaseEvidenceKind.d.mts +2 -1
- package/Types/SecurityCase/SecurityCaseEvidenceKind.d.ts +2 -1
- package/Types/SecurityCase/SecurityCaseEvidenceKind.js +11 -1
- package/Types/SecurityEvent/SecurityHunt.d.mts +122 -0
- package/Types/SecurityEvent/SecurityHunt.d.ts +122 -0
- package/Types/SecurityEvent/SecurityHunt.js +391 -0
- package/Types/SecurityEvent/SecurityHunt.mjs +32 -0
- package/Types/Workflow/RunRecord.d.mts +3 -14
- package/Types/Workflow/RunRecord.d.ts +3 -14
- package/Types/Workflow/RunRecord.js +10 -51
- package/Utils/AI/InvestigationLogStall.d.mts +38 -0
- package/Utils/AI/InvestigationLogStall.d.ts +38 -0
- package/Utils/AI/InvestigationLogStall.js +163 -0
- package/Utils/AI/InvestigationLogStall.mjs +11 -0
- package/Utils/Project/RecordNumber.d.mts +43 -0
- package/Utils/Project/RecordNumber.d.ts +43 -0
- package/Utils/Project/RecordNumber.js +151 -0
- package/Utils/Project/RecordNumber.mjs +6 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.d.mts +9 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.d.ts +9 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.js +20 -0
- package/Utils/SecurityCase/SecurityCaseMarkdown.mjs +2 -0
- package/Utils/SecurityEvent/SecurityEventSearch.d.mts +56 -0
- package/Utils/SecurityEvent/SecurityEventSearch.d.ts +56 -0
- package/Utils/SecurityEvent/SecurityEventSearch.js +422 -0
- package/Utils/SecurityEvent/SecurityEventSearch.mjs +21 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.d.mts +12 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.d.ts +12 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.js +51 -0
- package/Utils/SecurityEvent/SecurityHuntSearch.mjs +3 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.d.mts +9 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.d.ts +9 -0
- package/Utils/Suggestions/TracePerformanceFixSuggestion.js +69 -1
- package/Utils/Suggestions/TracePerformanceFixSuggestion.mjs +4 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import CodeRepositoryConnection from "./CodeRepositoryConnection.mjs";
|
|
2
2
|
import Label from "./Label.mjs";
|
|
3
|
+
import LlmProvider from "./LlmProvider.mjs";
|
|
3
4
|
import Project from "./Project.mjs";
|
|
4
5
|
import Runner from "./Runner.mjs";
|
|
5
6
|
import User from "./User.mjs";
|
|
@@ -29,6 +30,8 @@ export default class CodeRepository extends BaseModel {
|
|
|
29
30
|
gitHubTriggerLabel?: string;
|
|
30
31
|
isProductionReviewEnabled?: boolean;
|
|
31
32
|
productionReviewPullRequestContent?: ProductionReviewPullRequestContent;
|
|
33
|
+
productionReviewLlmProvider?: LlmProvider;
|
|
34
|
+
productionReviewLlmProviderId?: ObjectID;
|
|
32
35
|
repositoryUrl?: URL;
|
|
33
36
|
gitHubAppInstallationId?: string;
|
|
34
37
|
codeRepositoryConnection?: CodeRepositoryConnection;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import CodeRepositoryConnection from "./CodeRepositoryConnection";
|
|
2
2
|
import Label from "./Label";
|
|
3
|
+
import LlmProvider from "./LlmProvider";
|
|
3
4
|
import Project from "./Project";
|
|
4
5
|
import Runner from "./Runner";
|
|
5
6
|
import User from "./User";
|
|
@@ -29,6 +30,8 @@ export default class CodeRepository extends BaseModel {
|
|
|
29
30
|
gitHubTriggerLabel?: string;
|
|
30
31
|
isProductionReviewEnabled?: boolean;
|
|
31
32
|
productionReviewPullRequestContent?: ProductionReviewPullRequestContent;
|
|
33
|
+
productionReviewLlmProvider?: LlmProvider;
|
|
34
|
+
productionReviewLlmProviderId?: ObjectID;
|
|
32
35
|
repositoryUrl?: URL;
|
|
33
36
|
gitHubAppInstallationId?: string;
|
|
34
37
|
codeRepositoryConnection?: CodeRepositoryConnection;
|
|
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const CodeRepositoryConnection_1 = __importDefault(require("./CodeRepositoryConnection"));
|
|
16
16
|
const Label_1 = __importDefault(require("./Label"));
|
|
17
|
+
const LlmProvider_1 = __importDefault(require("./LlmProvider"));
|
|
17
18
|
const Project_1 = __importDefault(require("./Project"));
|
|
18
19
|
const Runner_1 = __importDefault(require("./Runner"));
|
|
19
20
|
const User_1 = __importDefault(require("./User"));
|
|
@@ -87,6 +88,18 @@ let CodeRepository = class CodeRepository extends DatabaseBaseModel_1.default {
|
|
|
87
88
|
this.gitHubTriggerLabel = undefined;
|
|
88
89
|
this.isProductionReviewEnabled = undefined;
|
|
89
90
|
this.productionReviewPullRequestContent = undefined;
|
|
91
|
+
/*
|
|
92
|
+
* The LLM provider OneUptime AI reads this repository's pull requests
|
|
93
|
+
* with, in its production reviews: one of the project's own providers, or
|
|
94
|
+
* a global one (ProjectReferencesService refuses another project's). None
|
|
95
|
+
* picked is the project's default provider, else the global one - what
|
|
96
|
+
* every review used before it could be picked, and what Code's other work
|
|
97
|
+
* in the repository uses. A pick that cannot be used falls back the same
|
|
98
|
+
* way (Common/Types/AI/LlmProviderChoice). A provider that is deleted
|
|
99
|
+
* leaves the repository picking none (SET NULL).
|
|
100
|
+
*/
|
|
101
|
+
this.productionReviewLlmProvider = undefined;
|
|
102
|
+
this.productionReviewLlmProviderId = undefined;
|
|
90
103
|
this.repositoryUrl = undefined;
|
|
91
104
|
/*
|
|
92
105
|
* GitHub App specific fields.
|
|
@@ -992,6 +1005,97 @@ __decorate([
|
|
|
992
1005
|
}),
|
|
993
1006
|
__metadata("design:type", String)
|
|
994
1007
|
], CodeRepository.prototype, "productionReviewPullRequestContent", void 0);
|
|
1008
|
+
__decorate([
|
|
1009
|
+
(0, ColumnAccessControl_1.default)({
|
|
1010
|
+
create: [
|
|
1011
|
+
Permission_1.default.ProjectOwner,
|
|
1012
|
+
Permission_1.default.ProjectAdmin,
|
|
1013
|
+
Permission_1.default.ProjectMember,
|
|
1014
|
+
Permission_1.default.SettingsAdmin,
|
|
1015
|
+
Permission_1.default.SettingsMember,
|
|
1016
|
+
Permission_1.default.CreateCodeRepository,
|
|
1017
|
+
],
|
|
1018
|
+
read: [
|
|
1019
|
+
Permission_1.default.ProjectOwner,
|
|
1020
|
+
Permission_1.default.ProjectAdmin,
|
|
1021
|
+
Permission_1.default.ProjectMember,
|
|
1022
|
+
Permission_1.default.Viewer,
|
|
1023
|
+
Permission_1.default.SettingsAdmin,
|
|
1024
|
+
Permission_1.default.SettingsMember,
|
|
1025
|
+
Permission_1.default.SettingsViewer,
|
|
1026
|
+
Permission_1.default.ReadCodeRepository,
|
|
1027
|
+
],
|
|
1028
|
+
update: [
|
|
1029
|
+
Permission_1.default.ProjectOwner,
|
|
1030
|
+
Permission_1.default.ProjectAdmin,
|
|
1031
|
+
Permission_1.default.ProjectMember,
|
|
1032
|
+
Permission_1.default.SettingsAdmin,
|
|
1033
|
+
Permission_1.default.SettingsMember,
|
|
1034
|
+
Permission_1.default.EditCodeRepository,
|
|
1035
|
+
],
|
|
1036
|
+
}),
|
|
1037
|
+
(0, TableColumn_1.default)({
|
|
1038
|
+
manyToOneRelationColumn: "productionReviewLlmProviderId",
|
|
1039
|
+
type: TableColumnType_1.default.Entity,
|
|
1040
|
+
modelType: LlmProvider_1.default,
|
|
1041
|
+
title: "Production Review LLM Provider",
|
|
1042
|
+
description: "The LLM provider OneUptime AI reads this repository's pull requests with in its production reviews: one of the project's providers or a global one. Empty: the project's default provider, else the global one.",
|
|
1043
|
+
}),
|
|
1044
|
+
(0, typeorm_1.ManyToOne)(() => {
|
|
1045
|
+
return LlmProvider_1.default;
|
|
1046
|
+
}, {
|
|
1047
|
+
eager: false,
|
|
1048
|
+
nullable: true,
|
|
1049
|
+
onDelete: "SET NULL",
|
|
1050
|
+
orphanedRowAction: "nullify",
|
|
1051
|
+
}),
|
|
1052
|
+
(0, typeorm_1.JoinColumn)({ name: "productionReviewLlmProviderId" }),
|
|
1053
|
+
__metadata("design:type", LlmProvider_1.default)
|
|
1054
|
+
], CodeRepository.prototype, "productionReviewLlmProvider", void 0);
|
|
1055
|
+
__decorate([
|
|
1056
|
+
(0, ColumnAccessControl_1.default)({
|
|
1057
|
+
create: [
|
|
1058
|
+
Permission_1.default.ProjectOwner,
|
|
1059
|
+
Permission_1.default.ProjectAdmin,
|
|
1060
|
+
Permission_1.default.ProjectMember,
|
|
1061
|
+
Permission_1.default.SettingsAdmin,
|
|
1062
|
+
Permission_1.default.SettingsMember,
|
|
1063
|
+
Permission_1.default.CreateCodeRepository,
|
|
1064
|
+
],
|
|
1065
|
+
read: [
|
|
1066
|
+
Permission_1.default.ProjectOwner,
|
|
1067
|
+
Permission_1.default.ProjectAdmin,
|
|
1068
|
+
Permission_1.default.ProjectMember,
|
|
1069
|
+
Permission_1.default.Viewer,
|
|
1070
|
+
Permission_1.default.SettingsAdmin,
|
|
1071
|
+
Permission_1.default.SettingsMember,
|
|
1072
|
+
Permission_1.default.SettingsViewer,
|
|
1073
|
+
Permission_1.default.ReadCodeRepository,
|
|
1074
|
+
],
|
|
1075
|
+
update: [
|
|
1076
|
+
Permission_1.default.ProjectOwner,
|
|
1077
|
+
Permission_1.default.ProjectAdmin,
|
|
1078
|
+
Permission_1.default.ProjectMember,
|
|
1079
|
+
Permission_1.default.SettingsAdmin,
|
|
1080
|
+
Permission_1.default.SettingsMember,
|
|
1081
|
+
Permission_1.default.EditCodeRepository,
|
|
1082
|
+
],
|
|
1083
|
+
}),
|
|
1084
|
+
(0, typeorm_1.Index)(),
|
|
1085
|
+
(0, TableColumn_1.default)({
|
|
1086
|
+
type: TableColumnType_1.default.ObjectID,
|
|
1087
|
+
required: false,
|
|
1088
|
+
canReadOnRelationQuery: true,
|
|
1089
|
+
title: "Production Review LLM Provider ID",
|
|
1090
|
+
description: "ID of the LLM provider OneUptime AI reads this repository's pull requests with in its production reviews. Empty: the project's default provider, else the global one.",
|
|
1091
|
+
}),
|
|
1092
|
+
(0, typeorm_1.Column)({
|
|
1093
|
+
type: ColumnType_1.default.ObjectID,
|
|
1094
|
+
nullable: true,
|
|
1095
|
+
transformer: ObjectID_1.default.getDatabaseTransformer(),
|
|
1096
|
+
}),
|
|
1097
|
+
__metadata("design:type", ObjectID_1.default)
|
|
1098
|
+
], CodeRepository.prototype, "productionReviewLlmProviderId", void 0);
|
|
995
1099
|
__decorate([
|
|
996
1100
|
(0, ColumnAccessControl_1.default)({
|
|
997
1101
|
create: [
|
|
@@ -168,6 +168,7 @@ const DetectionRule_1 = __importDefault(require("./DetectionRule"));
|
|
|
168
168
|
const DetectionRuleException_1 = __importDefault(require("./DetectionRuleException"));
|
|
169
169
|
const SecurityWatchlist_1 = __importDefault(require("./SecurityWatchlist"));
|
|
170
170
|
const SecurityWatchlistItem_1 = __importDefault(require("./SecurityWatchlistItem"));
|
|
171
|
+
const SecurityHunt_1 = __importDefault(require("./SecurityHunt"));
|
|
171
172
|
const SecurityEventConnection_1 = __importDefault(require("./SecurityEventConnection"));
|
|
172
173
|
const SecurityEventConnectionRun_1 = __importDefault(require("./SecurityEventConnectionRun"));
|
|
173
174
|
const ToolImportRun_1 = __importDefault(require("./ToolImportRun"));
|
|
@@ -587,6 +588,7 @@ const AllModelTypes = [
|
|
|
587
588
|
DetectionRuleException_1.default,
|
|
588
589
|
SecurityWatchlist_1.default,
|
|
589
590
|
SecurityWatchlistItem_1.default,
|
|
591
|
+
SecurityHunt_1.default,
|
|
590
592
|
SecurityEventConnection_1.default,
|
|
591
593
|
SecurityEventConnectionRun_1.default,
|
|
592
594
|
ToolImportRun_1.default,
|
|
@@ -4,6 +4,7 @@ import SecurityCase from "./SecurityCase.mjs";
|
|
|
4
4
|
import User from "./User.mjs";
|
|
5
5
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel.mjs";
|
|
6
6
|
import URL from "../../Types/API/URL.mjs";
|
|
7
|
+
import { JSONObject } from "../../Types/JSON.mjs";
|
|
7
8
|
import ObjectID from "../../Types/ObjectID.mjs";
|
|
8
9
|
import SecurityCaseEvidenceKind from "../../Types/SecurityCase/SecurityCaseEvidenceKind.mjs";
|
|
9
10
|
export default class SecurityCaseEvidence extends BaseModel {
|
|
@@ -21,6 +22,9 @@ export default class SecurityCaseEvidence extends BaseModel {
|
|
|
21
22
|
fileType?: string;
|
|
22
23
|
fileSizeInBytes?: number;
|
|
23
24
|
sha256?: string;
|
|
25
|
+
eventUid?: string;
|
|
26
|
+
eventTime?: Date;
|
|
27
|
+
eventSnapshot?: JSONObject;
|
|
24
28
|
createdByUser?: User;
|
|
25
29
|
createdByUserId?: ObjectID;
|
|
26
30
|
deletedByUser?: User;
|
|
@@ -4,6 +4,7 @@ import SecurityCase from "./SecurityCase";
|
|
|
4
4
|
import User from "./User";
|
|
5
5
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
6
6
|
import URL from "../../Types/API/URL";
|
|
7
|
+
import { JSONObject } from "../../Types/JSON";
|
|
7
8
|
import ObjectID from "../../Types/ObjectID";
|
|
8
9
|
import SecurityCaseEvidenceKind from "../../Types/SecurityCase/SecurityCaseEvidenceKind";
|
|
9
10
|
export default class SecurityCaseEvidence extends BaseModel {
|
|
@@ -21,6 +22,9 @@ export default class SecurityCaseEvidence extends BaseModel {
|
|
|
21
22
|
fileType?: string;
|
|
22
23
|
fileSizeInBytes?: number;
|
|
23
24
|
sha256?: string;
|
|
25
|
+
eventUid?: string;
|
|
26
|
+
eventTime?: Date;
|
|
27
|
+
eventSnapshot?: JSONObject;
|
|
24
28
|
createdByUser?: User;
|
|
25
29
|
createdByUserId?: ObjectID;
|
|
26
30
|
deletedByUser?: User;
|
|
@@ -43,15 +43,19 @@ const SecurityCaseEvidenceKind_1 = __importDefault(require("../../Types/Security
|
|
|
43
43
|
const typeorm_1 = require("typeorm");
|
|
44
44
|
/*
|
|
45
45
|
* Evidence kept on a security case: a file uploaded to OneUptime - a log
|
|
46
|
-
* excerpt, a screenshot, a packet capture -
|
|
47
|
-
* elsewhere
|
|
46
|
+
* excerpt, a screenshot, a packet capture - a link to evidence kept
|
|
47
|
+
* elsewhere, or a security event bookmarked onto the case from Security
|
|
48
|
+
* Events (SecurityCaseEvidenceKind), with what it is, who added it and
|
|
48
49
|
* when.
|
|
49
50
|
*
|
|
50
51
|
* Kept as it was added: what a piece of evidence holds - its file or its
|
|
51
52
|
* address - is written once, and OneUptime records the file's size, type
|
|
52
53
|
* and the SHA-256 of its bytes as they were uploaded
|
|
53
54
|
* (SecurityCaseEvidenceService), so whoever downloads it later can check it
|
|
54
|
-
* is what was kept
|
|
55
|
+
* is what was kept; an event is kept as OneUptime read it, as the person
|
|
56
|
+
* who bookmarked it (SecurityCaseEvidenceService.addEvents), so the case
|
|
57
|
+
* still shows it once the event is past its retention. Its name and
|
|
58
|
+
* description can be corrected. Adding
|
|
55
59
|
* evidence is part of working a case, on the Member tier; removing it
|
|
56
60
|
* breaks the chain of what was kept, so it takes the Admin tier, and the
|
|
57
61
|
* case's timeline says who removed what. A file downloads through the
|
|
@@ -127,6 +131,16 @@ let SecurityCaseEvidence = class SecurityCaseEvidence extends DatabaseBaseModel_
|
|
|
127
131
|
this.fileType = undefined;
|
|
128
132
|
this.fileSizeInBytes = undefined;
|
|
129
133
|
this.sha256 = undefined;
|
|
134
|
+
/*
|
|
135
|
+
* An Event evidence's event, as OneUptime read it when it was kept: its id
|
|
136
|
+
* and time, to open it on Events while it is kept there, and what it said
|
|
137
|
+
* (Types/SecurityCase/SecurityCaseEventEvidence). Written by OneUptime
|
|
138
|
+
* only - an event is kept from what OneUptime reads, never from what a
|
|
139
|
+
* request says it was.
|
|
140
|
+
*/
|
|
141
|
+
this.eventUid = undefined;
|
|
142
|
+
this.eventTime = undefined;
|
|
143
|
+
this.eventSnapshot = undefined;
|
|
130
144
|
this.createdByUser = undefined;
|
|
131
145
|
this.createdByUserId = undefined;
|
|
132
146
|
this.deletedByUser = undefined;
|
|
@@ -214,7 +228,7 @@ __decorate([
|
|
|
214
228
|
type: TableColumnType_1.default.ShortText,
|
|
215
229
|
canReadOnRelationQuery: true,
|
|
216
230
|
title: "Kind",
|
|
217
|
-
description: "What the evidence is: a File uploaded to OneUptime,
|
|
231
|
+
description: "What the evidence is: a File uploaded to OneUptime, a Link to evidence kept somewhere else, or an Event bookmarked from Security Events. It can't be changed.",
|
|
218
232
|
example: "File",
|
|
219
233
|
}),
|
|
220
234
|
(0, typeorm_1.Column)({
|
|
@@ -370,6 +384,51 @@ __decorate([
|
|
|
370
384
|
}),
|
|
371
385
|
__metadata("design:type", String)
|
|
372
386
|
], SecurityCaseEvidence.prototype, "sha256", void 0);
|
|
387
|
+
__decorate([
|
|
388
|
+
(0, ColumnAccessControl_1.default)(serverWrittenColumnAccess),
|
|
389
|
+
(0, TableColumn_1.default)({
|
|
390
|
+
type: TableColumnType_1.default.LongText,
|
|
391
|
+
computed: true,
|
|
392
|
+
canReadOnRelationQuery: true,
|
|
393
|
+
title: "Event ID",
|
|
394
|
+
description: "For Event evidence: the security event's ID, as its source gave it.",
|
|
395
|
+
}),
|
|
396
|
+
(0, typeorm_1.Column)({
|
|
397
|
+
nullable: true,
|
|
398
|
+
type: ColumnType_1.default.LongText,
|
|
399
|
+
length: ColumnLength_1.default.LongText,
|
|
400
|
+
}),
|
|
401
|
+
__metadata("design:type", String)
|
|
402
|
+
], SecurityCaseEvidence.prototype, "eventUid", void 0);
|
|
403
|
+
__decorate([
|
|
404
|
+
(0, ColumnAccessControl_1.default)(serverWrittenColumnAccess),
|
|
405
|
+
(0, TableColumn_1.default)({
|
|
406
|
+
type: TableColumnType_1.default.Date,
|
|
407
|
+
computed: true,
|
|
408
|
+
canReadOnRelationQuery: true,
|
|
409
|
+
title: "Event Time",
|
|
410
|
+
description: "For Event evidence: when the security event happened.",
|
|
411
|
+
}),
|
|
412
|
+
(0, typeorm_1.Column)({
|
|
413
|
+
nullable: true,
|
|
414
|
+
type: ColumnType_1.default.Date,
|
|
415
|
+
}),
|
|
416
|
+
__metadata("design:type", Date)
|
|
417
|
+
], SecurityCaseEvidence.prototype, "eventTime", void 0);
|
|
418
|
+
__decorate([
|
|
419
|
+
(0, ColumnAccessControl_1.default)(serverWrittenColumnAccess),
|
|
420
|
+
(0, TableColumn_1.default)({
|
|
421
|
+
type: TableColumnType_1.default.JSON,
|
|
422
|
+
computed: true,
|
|
423
|
+
title: "Event",
|
|
424
|
+
description: "For Event evidence: the security event as OneUptime read it when it was kept - its severity, class, message, who and where - and the hunt that found it.",
|
|
425
|
+
}),
|
|
426
|
+
(0, typeorm_1.Column)({
|
|
427
|
+
nullable: true,
|
|
428
|
+
type: ColumnType_1.default.JSON,
|
|
429
|
+
}),
|
|
430
|
+
__metadata("design:type", Object)
|
|
431
|
+
], SecurityCaseEvidence.prototype, "eventSnapshot", void 0);
|
|
373
432
|
__decorate([
|
|
374
433
|
(0, ColumnAccessControl_1.default)(createOnlyColumnAccess),
|
|
375
434
|
(0, TableColumn_1.default)({
|
|
@@ -482,7 +541,7 @@ SecurityCaseEvidence = __decorate([
|
|
|
482
541
|
singularName: "Security Case Evidence",
|
|
483
542
|
pluralName: "Security Case Evidence",
|
|
484
543
|
icon: IconProp_1.default.Archive,
|
|
485
|
-
tableDescription: "Files and
|
|
544
|
+
tableDescription: "Files, links and security events kept on a security case as evidence, each with who added it and when: a file with the SHA-256 of what was uploaded, an event as OneUptime read it when it was kept.",
|
|
486
545
|
}),
|
|
487
546
|
(0, typeorm_1.Index)(["securityCaseId", "createdAt"])
|
|
488
547
|
], SecurityCaseEvidence);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Project from "./Project.mjs";
|
|
2
|
+
import Team from "./Team.mjs";
|
|
3
|
+
import User from "./User.mjs";
|
|
4
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel.mjs";
|
|
5
|
+
import { JSONObject } from "../../Types/JSON.mjs";
|
|
6
|
+
import ObjectID from "../../Types/ObjectID.mjs";
|
|
7
|
+
import { SecurityHuntSchedule } from "../../Types/SecurityEvent/SecurityHunt.mjs";
|
|
8
|
+
import TimeRange from "../../Types/Time/TimeRange.mjs";
|
|
9
|
+
export default class SecurityHunt extends BaseModel {
|
|
10
|
+
project?: Project;
|
|
11
|
+
projectId?: ObjectID;
|
|
12
|
+
name?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
searchQuery?: string;
|
|
15
|
+
filters?: JSONObject;
|
|
16
|
+
timeRange?: TimeRange;
|
|
17
|
+
schedule?: SecurityHuntSchedule;
|
|
18
|
+
notifyUsers?: Array<User>;
|
|
19
|
+
notifyTeams?: Array<Team>;
|
|
20
|
+
scheduledByUser?: User;
|
|
21
|
+
scheduledByUserId?: ObjectID;
|
|
22
|
+
searchedUpToAt?: Date;
|
|
23
|
+
nextRunAt?: Date;
|
|
24
|
+
lastRunAt?: Date;
|
|
25
|
+
lastRunEventCount?: number;
|
|
26
|
+
lastRunError?: string;
|
|
27
|
+
lastFoundAt?: Date;
|
|
28
|
+
lastFoundSinceAt?: Date;
|
|
29
|
+
lastFoundEventCount?: number;
|
|
30
|
+
createdByUser?: User;
|
|
31
|
+
createdByUserId?: ObjectID;
|
|
32
|
+
deletedByUser?: User;
|
|
33
|
+
deletedByUserId?: ObjectID;
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Project from "./Project";
|
|
2
|
+
import Team from "./Team";
|
|
3
|
+
import User from "./User";
|
|
4
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
5
|
+
import { JSONObject } from "../../Types/JSON";
|
|
6
|
+
import ObjectID from "../../Types/ObjectID";
|
|
7
|
+
import { SecurityHuntSchedule } from "../../Types/SecurityEvent/SecurityHunt";
|
|
8
|
+
import TimeRange from "../../Types/Time/TimeRange";
|
|
9
|
+
export default class SecurityHunt extends BaseModel {
|
|
10
|
+
project?: Project;
|
|
11
|
+
projectId?: ObjectID;
|
|
12
|
+
name?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
searchQuery?: string;
|
|
15
|
+
filters?: JSONObject;
|
|
16
|
+
timeRange?: TimeRange;
|
|
17
|
+
schedule?: SecurityHuntSchedule;
|
|
18
|
+
notifyUsers?: Array<User>;
|
|
19
|
+
notifyTeams?: Array<Team>;
|
|
20
|
+
scheduledByUser?: User;
|
|
21
|
+
scheduledByUserId?: ObjectID;
|
|
22
|
+
searchedUpToAt?: Date;
|
|
23
|
+
nextRunAt?: Date;
|
|
24
|
+
lastRunAt?: Date;
|
|
25
|
+
lastRunEventCount?: number;
|
|
26
|
+
lastRunError?: string;
|
|
27
|
+
lastFoundAt?: Date;
|
|
28
|
+
lastFoundSinceAt?: Date;
|
|
29
|
+
lastFoundEventCount?: number;
|
|
30
|
+
createdByUser?: User;
|
|
31
|
+
createdByUserId?: ObjectID;
|
|
32
|
+
deletedByUser?: User;
|
|
33
|
+
deletedByUserId?: ObjectID;
|
|
34
|
+
}
|