@harnessio/react-sto-core-client 0.3.2 → 0.3.4
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/dist/sto-core/src/services/hooks/useExemptionsCreateExemptionMutation.d.ts +42 -0
- package/dist/sto-core/src/services/hooks/useExemptionsCreateExemptionMutation.js +14 -0
- package/dist/sto-core/src/services/hooks/useExemptionsFindExemptionByIdQuery.d.ts +55 -0
- package/dist/sto-core/src/services/hooks/useExemptionsFindExemptionByIdQuery.js +14 -0
- package/dist/sto-core/src/services/hooks/useExemptionsListExemptionsQuery.d.ts +53 -0
- package/dist/sto-core/src/services/hooks/useExemptionsListExemptionsQuery.js +14 -0
- package/dist/sto-core/src/services/hooks/useFrontendExpiringExemptionsQuery.d.ts +46 -0
- package/dist/sto-core/src/services/hooks/useFrontendExpiringExemptionsQuery.js +14 -0
- package/dist/sto-core/src/services/hooks/useFrontendGlobalExemptionsQuery.d.ts +61 -0
- package/dist/sto-core/src/services/hooks/useFrontendGlobalExemptionsQuery.js +14 -0
- package/dist/sto-core/src/services/hooks/useFrontendSecurityReviewQuery.d.ts +56 -0
- package/dist/sto-core/src/services/hooks/useFrontendSecurityReviewQuery.js +14 -0
- package/dist/sto-core/src/services/hooks/useIssuesIssuesAugmentRemediationMutation.d.ts +49 -0
- package/dist/sto-core/src/services/hooks/useIssuesIssuesAugmentRemediationMutation.js +14 -0
- package/dist/sto-core/src/services/hooks/useTargetsFindTargetByIdQuery.d.ts +46 -0
- package/dist/sto-core/src/services/hooks/useTargetsFindTargetByIdQuery.js +14 -0
- package/dist/sto-core/src/services/index.d.ts +35 -2
- package/dist/sto-core/src/services/index.js +8 -1
- package/dist/sto-core/src/services/schemas/AugmentRemediationMetadata.d.ts +10 -0
- package/dist/sto-core/src/services/schemas/AugmentRemediationMetadata.js +1 -0
- package/dist/sto-core/src/services/schemas/AugmentRemediationResult.d.ts +19 -0
- package/dist/sto-core/src/services/schemas/AugmentRemediationResult.js +1 -0
- package/dist/sto-core/src/services/schemas/AugmentRemediationWarning.d.ts +13 -0
- package/dist/sto-core/src/services/schemas/AugmentRemediationWarning.js +4 -0
- package/dist/sto-core/src/services/schemas/CreateExemptionRequestBody.d.ts +68 -0
- package/dist/sto-core/src/services/schemas/CreateExemptionRequestBody.js +1 -0
- package/dist/sto-core/src/services/schemas/Exemption.d.ts +149 -0
- package/dist/sto-core/src/services/schemas/Exemption.js +1 -0
- package/dist/sto-core/src/services/schemas/ExemptionsCreateExemptionResponseBody.d.ts +2 -0
- package/dist/sto-core/src/services/schemas/ExemptionsCreateExemptionResponseBody.js +1 -0
- package/dist/sto-core/src/services/schemas/ExemptionsListExemptionsResponseBody.d.ts +12 -0
- package/dist/sto-core/src/services/schemas/ExemptionsListExemptionsResponseBody.js +1 -0
- package/dist/sto-core/src/services/schemas/FrontendExemption.d.ts +132 -0
- package/dist/sto-core/src/services/schemas/FrontendExemption.js +1 -0
- package/dist/sto-core/src/services/schemas/FrontendExemptionCounts.d.ts +33 -0
- package/dist/sto-core/src/services/schemas/FrontendExemptionCounts.js +4 -0
- package/dist/sto-core/src/services/schemas/FrontendExpiringExemptionsResponseBody.d.ts +2 -0
- package/dist/sto-core/src/services/schemas/FrontendExpiringExemptionsResponseBody.js +1 -0
- package/dist/sto-core/src/services/schemas/FrontendSecurityReviewResponseBody.d.ts +2 -0
- package/dist/sto-core/src/services/schemas/FrontendSecurityReviewResponseBody.js +1 -0
- package/dist/sto-core/src/services/schemas/IdResult.d.ts +10 -0
- package/dist/sto-core/src/services/schemas/IdResult.js +4 -0
- package/dist/sto-core/src/services/schemas/IssueSummaries.d.ts +12 -0
- package/dist/sto-core/src/services/schemas/IssueSummaries.js +1 -0
- package/dist/sto-core/src/services/schemas/IssueSummary.d.ts +94 -0
- package/dist/sto-core/src/services/schemas/IssueSummary.js +4 -0
- package/dist/sto-core/src/services/schemas/IssuesAugmentRemediationRequestBody.d.ts +28 -0
- package/dist/sto-core/src/services/schemas/IssuesAugmentRemediationRequestBody.js +4 -0
- package/dist/sto-core/src/services/schemas/IssuesIssuesAugmentRemediationResponseBody.d.ts +2 -0
- package/dist/sto-core/src/services/schemas/IssuesIssuesAugmentRemediationResponseBody.js +1 -0
- package/dist/sto-core/src/services/schemas/PendingChanges.d.ts +11 -0
- package/dist/sto-core/src/services/schemas/PendingChanges.js +4 -0
- package/dist/sto-core/src/services/schemas/SecurityReviewResult.d.ts +16 -0
- package/dist/sto-core/src/services/schemas/SecurityReviewResult.js +1 -0
- package/dist/sto-core/src/services/schemas/Target.d.ts +62 -0
- package/dist/sto-core/src/services/schemas/Target.js +4 -0
- package/package.json +1 -1
- package/dist/sto-core/src/services/hooks/useTargetsDeleteTargetMutation.d.ts +0 -38
- package/dist/sto-core/src/services/hooks/useTargetsDeleteTargetMutation.js +0 -14
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AugmentRemediationMetadata } from '../schemas/AugmentRemediationMetadata';
|
|
2
|
+
/**
|
|
3
|
+
* @example {"metadata":{"warnings":[{"message":"Fugiat quia architecto et earum.","source":"Est consequatur et."},{"message":"Fugiat quia architecto et earum.","source":"Est consequatur et."},{"message":"Fugiat quia architecto et earum.","source":"Est consequatur et."}]},"remediationCode":"Doloremque reprehenderit consectetur provident ut quam.","remediationContext":"Unde voluptatem rem et beatae.","repoContent":"Fuga neque ut laudantium qui."}
|
|
4
|
+
*/
|
|
5
|
+
export interface AugmentRemediationResult {
|
|
6
|
+
metadata: AugmentRemediationMetadata;
|
|
7
|
+
/**
|
|
8
|
+
* @example "Aut nulla possimus ipsa et porro."
|
|
9
|
+
*/
|
|
10
|
+
remediationCode?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @example "Aut eum nostrum possimus."
|
|
13
|
+
*/
|
|
14
|
+
remediationContext: string;
|
|
15
|
+
/**
|
|
16
|
+
* @example "Dicta rerum."
|
|
17
|
+
*/
|
|
18
|
+
repoContent?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example {"message":"Recusandae esse.","source":"Porro rerum dolore et doloribus quis."}
|
|
3
|
+
*/
|
|
4
|
+
export interface AugmentRemediationWarning {
|
|
5
|
+
/**
|
|
6
|
+
* @example "Nihil non omnis excepturi et quia repellat."
|
|
7
|
+
*/
|
|
8
|
+
message: string;
|
|
9
|
+
/**
|
|
10
|
+
* @example "Pariatur rerum."
|
|
11
|
+
*/
|
|
12
|
+
source: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { PendingChanges } from '../schemas/PendingChanges';
|
|
2
|
+
/**
|
|
3
|
+
* @example {"exemptFutureOccurrences":false,"expiration":1651578240,"issueId":"abcdef1234567890ghijkl","link":"https://example.com/ABC-1234","occurrences":[42,666],"pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","search":"CWE-123,5","targetId":"abcdef1234567890ghijkl","type":"Other"}
|
|
4
|
+
*/
|
|
5
|
+
export interface CreateExemptionRequestBody {
|
|
6
|
+
/**
|
|
7
|
+
* States if the user wants to exempt future occurrences of the issue
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
exemptFutureOccurrences?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Unix timestamp at which this Exemption will expire
|
|
13
|
+
* @format int64
|
|
14
|
+
* @example 1651578240
|
|
15
|
+
*/
|
|
16
|
+
expiration?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Issue ID associated with the Exemption
|
|
19
|
+
* @example "abcdef1234567890ghijkl"
|
|
20
|
+
*/
|
|
21
|
+
issueId: string;
|
|
22
|
+
/**
|
|
23
|
+
* Link to a related ticket
|
|
24
|
+
* @example "https://example.com/ABC-1234"
|
|
25
|
+
*/
|
|
26
|
+
link?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Array of occurrence Ids
|
|
29
|
+
* @example [42,666]
|
|
30
|
+
*/
|
|
31
|
+
occurrences?: number[];
|
|
32
|
+
pendingChanges: PendingChanges;
|
|
33
|
+
/**
|
|
34
|
+
* ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
|
|
35
|
+
* @example "your_pipeline"
|
|
36
|
+
*/
|
|
37
|
+
pipelineId?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Text describing why this Exemption is necessary
|
|
40
|
+
* @example "Waiting on upstream bug fix"
|
|
41
|
+
*/
|
|
42
|
+
reason: string;
|
|
43
|
+
/**
|
|
44
|
+
* User ID of user who requested this exemptions
|
|
45
|
+
* @example "user111111111111111111"
|
|
46
|
+
*/
|
|
47
|
+
requesterId: string;
|
|
48
|
+
/**
|
|
49
|
+
* ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".
|
|
50
|
+
* @example "abcdef1234567890ghijkl"
|
|
51
|
+
*/
|
|
52
|
+
scanId?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Search parameter to find filtered occurrences of the issue
|
|
55
|
+
* @example "CWE-123,5"
|
|
56
|
+
*/
|
|
57
|
+
search?: string;
|
|
58
|
+
/**
|
|
59
|
+
* ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
|
|
60
|
+
* @example "abcdef1234567890ghijkl"
|
|
61
|
+
*/
|
|
62
|
+
targetId?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
|
|
65
|
+
* @example "Other"
|
|
66
|
+
*/
|
|
67
|
+
type: 'Acceptable Risk' | 'Acceptable Use' | 'Compensating Controls' | 'False Positive' | 'Fix Unavailable' | 'Other';
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import type { PendingChanges } from '../schemas/PendingChanges';
|
|
2
|
+
/**
|
|
3
|
+
* Information about an Exemption
|
|
4
|
+
* @example {"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Rejected","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Canceled","targetId":"abcdef1234567890ghijkl","type":"Other"}
|
|
5
|
+
*/
|
|
6
|
+
export interface Exemption {
|
|
7
|
+
/**
|
|
8
|
+
* User ID the user who approved or rejected this exemptions
|
|
9
|
+
* @example "user111111111111111111"
|
|
10
|
+
*/
|
|
11
|
+
approverId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Consists of RBAC scopes for an user associated with this Exemption
|
|
14
|
+
* @example ["ACCOUNT","ORG","PROJECT","PIPELINE"]
|
|
15
|
+
*/
|
|
16
|
+
canApproveFor?: Array<'ACCOUNT' | 'ORG' | 'PIPELINE' | 'PROJECT' | 'TARGET'>;
|
|
17
|
+
/**
|
|
18
|
+
* States if the user can cancel the exemption
|
|
19
|
+
* @example true
|
|
20
|
+
*/
|
|
21
|
+
canCancel?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* States whether the user can create or reopen the exemption
|
|
24
|
+
* @example true
|
|
25
|
+
*/
|
|
26
|
+
canCreate?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* States if the user can re-approve the exemption for the exemption's scope
|
|
29
|
+
* @example true
|
|
30
|
+
*/
|
|
31
|
+
canReApprove?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* States whether the user can reject the exemption
|
|
34
|
+
* @example true
|
|
35
|
+
*/
|
|
36
|
+
canReject?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Unix timestamp at which the resource was created
|
|
39
|
+
* @format int64
|
|
40
|
+
* @example 1651578240
|
|
41
|
+
*/
|
|
42
|
+
created: number;
|
|
43
|
+
/**
|
|
44
|
+
* Exemption's status at the Security Scan created time
|
|
45
|
+
* @example "Rejected"
|
|
46
|
+
*/
|
|
47
|
+
exemptionStatusAtScan?: 'Approved' | 'Expired' | 'Pending' | 'Rejected';
|
|
48
|
+
/**
|
|
49
|
+
* Unix timestamp at which this Exemption will expire
|
|
50
|
+
* @format int64
|
|
51
|
+
* @example 1651578240
|
|
52
|
+
*/
|
|
53
|
+
expiration?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Resource identifier
|
|
56
|
+
* @example "abcdef1234567890ghijkl"
|
|
57
|
+
*/
|
|
58
|
+
id: string;
|
|
59
|
+
/**
|
|
60
|
+
* States if the exemption is deleted
|
|
61
|
+
* @example true
|
|
62
|
+
*/
|
|
63
|
+
isDeleted?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Issue ID associated with the Exemption
|
|
66
|
+
* @example "abcdef1234567890ghijkl"
|
|
67
|
+
*/
|
|
68
|
+
issueId: string;
|
|
69
|
+
/**
|
|
70
|
+
* Unix timestamp at which the resource was most recently modified
|
|
71
|
+
* @format int64
|
|
72
|
+
* @example 1651578240
|
|
73
|
+
*/
|
|
74
|
+
lastModified: number;
|
|
75
|
+
/**
|
|
76
|
+
* Link to a related ticket
|
|
77
|
+
* @example "https://example.com/ABC-1234"
|
|
78
|
+
*/
|
|
79
|
+
link?: string;
|
|
80
|
+
/**
|
|
81
|
+
* States how may occurrences are associated with the exemption, if not an issue level exemption
|
|
82
|
+
* @format int64
|
|
83
|
+
* @default 0
|
|
84
|
+
* @example 10
|
|
85
|
+
*/
|
|
86
|
+
numOccurrences?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Array of occurrence Ids
|
|
89
|
+
* @example [42,666]
|
|
90
|
+
*/
|
|
91
|
+
occurrences?: number[];
|
|
92
|
+
/**
|
|
93
|
+
* ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
|
|
94
|
+
* @example "your_project"
|
|
95
|
+
*/
|
|
96
|
+
orgId?: string;
|
|
97
|
+
pendingChanges: PendingChanges;
|
|
98
|
+
/**
|
|
99
|
+
* ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
|
|
100
|
+
* @example "your_pipeline"
|
|
101
|
+
*/
|
|
102
|
+
pipelineId?: string;
|
|
103
|
+
/**
|
|
104
|
+
* ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
|
|
105
|
+
* @example "your_project"
|
|
106
|
+
*/
|
|
107
|
+
projectId?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Text describing why this Exemption is necessary
|
|
110
|
+
* @example "Waiting on upstream bug fix"
|
|
111
|
+
*/
|
|
112
|
+
reason: string;
|
|
113
|
+
/**
|
|
114
|
+
* User ID of user who requested this exemptions
|
|
115
|
+
* @example "user111111111111111111"
|
|
116
|
+
*/
|
|
117
|
+
requesterId: string;
|
|
118
|
+
/**
|
|
119
|
+
* ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".
|
|
120
|
+
* @example "abcdef1234567890ghijkl"
|
|
121
|
+
*/
|
|
122
|
+
scanId?: string;
|
|
123
|
+
/**
|
|
124
|
+
* States the scope for the exemption
|
|
125
|
+
* @example "PROJECT"
|
|
126
|
+
*/
|
|
127
|
+
scope?: 'ACCOUNT' | 'ORG' | 'PIPELINE' | 'PROJECT' | 'TARGET';
|
|
128
|
+
/**
|
|
129
|
+
* Search parameter to find filtered occurrences of the issue
|
|
130
|
+
* @example "CWE-123,5"
|
|
131
|
+
*/
|
|
132
|
+
search?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Approval status of Exemption
|
|
135
|
+
* @default "Pending"
|
|
136
|
+
* @example "Rejected"
|
|
137
|
+
*/
|
|
138
|
+
status: 'Approved' | 'Canceled' | 'Expired' | 'Pending' | 'Rejected';
|
|
139
|
+
/**
|
|
140
|
+
* ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
|
|
141
|
+
* @example "abcdef1234567890ghijkl"
|
|
142
|
+
*/
|
|
143
|
+
targetId?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
|
|
146
|
+
* @example "Other"
|
|
147
|
+
*/
|
|
148
|
+
type: 'Acceptable Risk' | 'Acceptable Use' | 'Compensating Controls' | 'False Positive' | 'Fix Unavailable' | 'Other';
|
|
149
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Pagination } from '../schemas/Pagination';
|
|
2
|
+
import type { Exemption } from '../schemas/Exemption';
|
|
3
|
+
/**
|
|
4
|
+
* @example {"pagination":{"link":"","page":4,"pageSize":20,"totalItems":230,"totalPages":12},"results":[{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Approved","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Expired","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Approved","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Expired","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Approved","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Expired","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Approved","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Expired","targetId":"abcdef1234567890ghijkl","type":"Other"}]}
|
|
5
|
+
*/
|
|
6
|
+
export interface ExemptionsListExemptionsResponseBody {
|
|
7
|
+
pagination: Pagination;
|
|
8
|
+
/**
|
|
9
|
+
* @example [{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Approved","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Expired","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Approved","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Expired","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Approved","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Expired","targetId":"abcdef1234567890ghijkl","type":"Other"}]
|
|
10
|
+
*/
|
|
11
|
+
results: Exemption[];
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { IssueSummary } from '../schemas/IssueSummary';
|
|
2
|
+
import type { PendingChanges } from '../schemas/PendingChanges';
|
|
3
|
+
/**
|
|
4
|
+
* Exemption summary for frontend use
|
|
5
|
+
* @example {"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueSummary":{"currentStatus":"Rejected","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":2120508977338000000,"numOccurrences":3991226380867742000,"numRemediatedOccurrences":8224674406052809000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"},"lastModified":1651578240,"link":"Upstream bug","numOccurrences":10,"orgId":"STO","pendingChanges":{"durationDays":7},"pipelineId":"pipeline_1","projectId":"STO","reason":"Upstream bug","requesterId":"user111111111111111111","scope":"PROJECT","status":"Approved","targetId":"target2222222222222222","totalOccurrences":10,"type":"Other"}
|
|
6
|
+
*/
|
|
7
|
+
export interface FrontendExemption {
|
|
8
|
+
/**
|
|
9
|
+
* User ID of the user who approved this Exemption
|
|
10
|
+
* @example "user111111111111111111"
|
|
11
|
+
*/
|
|
12
|
+
approverId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Scopes that the user has permission to approve for this Exemption
|
|
15
|
+
* @example ["ACCOUNT","ORG","PROJECT","PIPELINE"]
|
|
16
|
+
*/
|
|
17
|
+
canApproveFor?: Array<'ACCOUNT' | 'ORG' | 'PIPELINE' | 'PROJECT' | 'TARGET'>;
|
|
18
|
+
/**
|
|
19
|
+
* States if the user can cancel the exemption
|
|
20
|
+
* @example true
|
|
21
|
+
*/
|
|
22
|
+
canCancel?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* States if the user can create or reopen the exemption
|
|
25
|
+
* @example true
|
|
26
|
+
*/
|
|
27
|
+
canCreate?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* States if the user can re-approve the exemption for the exemption's scope
|
|
30
|
+
* @example true
|
|
31
|
+
*/
|
|
32
|
+
canReApprove?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* States if the user can reject the exemption
|
|
35
|
+
* @example true
|
|
36
|
+
*/
|
|
37
|
+
canReject?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Unix timestamp at which the resource was created
|
|
40
|
+
* @format int64
|
|
41
|
+
* @example 1651578240
|
|
42
|
+
*/
|
|
43
|
+
created: number;
|
|
44
|
+
/**
|
|
45
|
+
* Unix timestamp at which this Exemption will expire
|
|
46
|
+
* @format int64
|
|
47
|
+
* @example 1651578240
|
|
48
|
+
*/
|
|
49
|
+
expiration?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Resource identifier
|
|
52
|
+
* @example "abcdef1234567890ghijkl"
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* States if the exemption is deleted
|
|
57
|
+
* @example true
|
|
58
|
+
*/
|
|
59
|
+
isDeleted?: boolean;
|
|
60
|
+
issueSummary: IssueSummary;
|
|
61
|
+
/**
|
|
62
|
+
* Unix timestamp at which the resource was most recently modified
|
|
63
|
+
* @format int64
|
|
64
|
+
* @example 1651578240
|
|
65
|
+
*/
|
|
66
|
+
lastModified: number;
|
|
67
|
+
/**
|
|
68
|
+
* Link related to this Exemption
|
|
69
|
+
* @example "Upstream bug"
|
|
70
|
+
*/
|
|
71
|
+
link?: string;
|
|
72
|
+
/**
|
|
73
|
+
* States how may occurrences are associated with the exemption, if not an issue level exemption
|
|
74
|
+
* @format int64
|
|
75
|
+
* @default 0
|
|
76
|
+
* @example 10
|
|
77
|
+
*/
|
|
78
|
+
numOccurrences?: number;
|
|
79
|
+
/**
|
|
80
|
+
* ID of the Harness Org to which this Exemption applies
|
|
81
|
+
* @example "STO"
|
|
82
|
+
*/
|
|
83
|
+
orgId?: string;
|
|
84
|
+
pendingChanges: PendingChanges;
|
|
85
|
+
/**
|
|
86
|
+
* ID of the Harness pipeline to which this Exemption applies
|
|
87
|
+
* @example "pipeline_1"
|
|
88
|
+
*/
|
|
89
|
+
pipelineId?: string;
|
|
90
|
+
/**
|
|
91
|
+
* ID of the Harness project to which this Exemption applies
|
|
92
|
+
* @example "STO"
|
|
93
|
+
*/
|
|
94
|
+
projectId?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Reason for Exemption
|
|
97
|
+
* @example "Upstream bug"
|
|
98
|
+
*/
|
|
99
|
+
reason: string;
|
|
100
|
+
/**
|
|
101
|
+
* User ID of the user who requested this Exemption
|
|
102
|
+
* @example "user111111111111111111"
|
|
103
|
+
*/
|
|
104
|
+
requesterId: string;
|
|
105
|
+
/**
|
|
106
|
+
* The scope of the exemption
|
|
107
|
+
* @example "PROJECT"
|
|
108
|
+
*/
|
|
109
|
+
scope?: 'ACCOUNT' | 'ORG' | 'PIPELINE' | 'PROJECT' | 'TARGET';
|
|
110
|
+
/**
|
|
111
|
+
* Status of this Exemption
|
|
112
|
+
* @example "Approved"
|
|
113
|
+
*/
|
|
114
|
+
status: string;
|
|
115
|
+
/**
|
|
116
|
+
* ID of Target to which this Exemption applies
|
|
117
|
+
* @example "target2222222222222222"
|
|
118
|
+
*/
|
|
119
|
+
targetId?: string;
|
|
120
|
+
/**
|
|
121
|
+
* States total occurrences associated with the issue exemption
|
|
122
|
+
* @format int64
|
|
123
|
+
* @default 0
|
|
124
|
+
* @example 10
|
|
125
|
+
*/
|
|
126
|
+
totalOccurrences?: number;
|
|
127
|
+
/**
|
|
128
|
+
* Type of Exemption
|
|
129
|
+
* @example "Other"
|
|
130
|
+
*/
|
|
131
|
+
type: string;
|
|
132
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example {"Approved":150,"Expired":150,"Pending":150,"Rejected":150}
|
|
3
|
+
*/
|
|
4
|
+
export interface FrontendExemptionCounts {
|
|
5
|
+
/**
|
|
6
|
+
* The count of approved Exemptions
|
|
7
|
+
* @format int32
|
|
8
|
+
* @default 0
|
|
9
|
+
* @example 150
|
|
10
|
+
*/
|
|
11
|
+
Approved?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The count of expired Exemptions
|
|
14
|
+
* @format int32
|
|
15
|
+
* @default 0
|
|
16
|
+
* @example 150
|
|
17
|
+
*/
|
|
18
|
+
Expired?: number;
|
|
19
|
+
/**
|
|
20
|
+
* The count of pending Exemptions
|
|
21
|
+
* @format int32
|
|
22
|
+
* @default 0
|
|
23
|
+
* @example 150
|
|
24
|
+
*/
|
|
25
|
+
Pending?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The count of rejected Exemptions
|
|
28
|
+
* @format int32
|
|
29
|
+
* @default 0
|
|
30
|
+
* @example 150
|
|
31
|
+
*/
|
|
32
|
+
Rejected?: number;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IssueSummary } from '../schemas/IssueSummary';
|
|
2
|
+
/**
|
|
3
|
+
* List of issue summaries
|
|
4
|
+
* @example {"issues":[{"currentStatus":"Rejected","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":2120508977338000000,"numOccurrences":3991226380867742000,"numRemediatedOccurrences":8224674406052809000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"},{"currentStatus":"Rejected","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":2120508977338000000,"numOccurrences":3991226380867742000,"numRemediatedOccurrences":8224674406052809000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"},{"currentStatus":"Rejected","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":2120508977338000000,"numOccurrences":3991226380867742000,"numRemediatedOccurrences":8224674406052809000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"},{"currentStatus":"Rejected","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":2120508977338000000,"numOccurrences":3991226380867742000,"numRemediatedOccurrences":8224674406052809000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"}]}
|
|
5
|
+
*/
|
|
6
|
+
export interface IssueSummaries {
|
|
7
|
+
/**
|
|
8
|
+
* Short summary of an Issue
|
|
9
|
+
* @example [{"currentStatus":"Rejected","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":2120508977338000000,"numOccurrences":3991226380867742000,"numRemediatedOccurrences":8224674406052809000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"},{"currentStatus":"Rejected","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":2120508977338000000,"numOccurrences":3991226380867742000,"numRemediatedOccurrences":8224674406052809000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"},{"currentStatus":"Rejected","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":2120508977338000000,"numOccurrences":3991226380867742000,"numRemediatedOccurrences":8224674406052809000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"},{"currentStatus":"Rejected","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":2120508977338000000,"numOccurrences":3991226380867742000,"numRemediatedOccurrences":8224674406052809000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"}]
|
|
10
|
+
*/
|
|
11
|
+
issues: IssueSummary[];
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Short summary of an Issue
|
|
3
|
+
* @example {"currentStatus":"Approved","exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Pending","id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNewOccurrences":510441610290248450,"numOccurrences":2506609549796740600,"numRemediatedOccurrences":8648993288355202000,"override":{"originalSeverity":"medium","reason":"snyk"},"scanId":"scan111111111111111111","severity":8.5,"severityCode":"High","status":"Remediated","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"}
|
|
4
|
+
*/
|
|
5
|
+
export interface IssueSummary {
|
|
6
|
+
/**
|
|
7
|
+
* Current status of the Exemption
|
|
8
|
+
* @example "Rejected"
|
|
9
|
+
*/
|
|
10
|
+
currentStatus?: 'Approved' | 'Expired' | 'Pending' | 'Rejected';
|
|
11
|
+
/**
|
|
12
|
+
* Indicates if the Security Issue was found to be Exempted, Partially Exempted.
|
|
13
|
+
* @example "Partially Exempted"
|
|
14
|
+
*/
|
|
15
|
+
exemptionCoverage?: string;
|
|
16
|
+
/**
|
|
17
|
+
* ID of the associated Exemption
|
|
18
|
+
* @example "abcdef1234567890ghijkl"
|
|
19
|
+
*/
|
|
20
|
+
exemptionId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Exemption's status at the Security Scan created time
|
|
23
|
+
* @example "Pending"
|
|
24
|
+
*/
|
|
25
|
+
exemptionStatusAtScan?: 'Approved' | 'Expired' | 'Pending' | 'Rejected';
|
|
26
|
+
/**
|
|
27
|
+
* Resource identifier
|
|
28
|
+
* @example "abcdef1234567890ghijkl"
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Compression/deduplication key
|
|
33
|
+
* @example "json-schema@0.2.3"
|
|
34
|
+
*/
|
|
35
|
+
key: string;
|
|
36
|
+
/**
|
|
37
|
+
* @format int64
|
|
38
|
+
* @example 2924611843635244500
|
|
39
|
+
*/
|
|
40
|
+
numNewOccurrences?: number;
|
|
41
|
+
/**
|
|
42
|
+
* @format int64
|
|
43
|
+
* @example 54511519078764640
|
|
44
|
+
*/
|
|
45
|
+
numOccurrences?: number;
|
|
46
|
+
/**
|
|
47
|
+
* @format int64
|
|
48
|
+
* @example 9022332400783716000
|
|
49
|
+
*/
|
|
50
|
+
numRemediatedOccurrences?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Indicates the issue has been overridden
|
|
53
|
+
* @example {"originalSeverity":"medium","reason":"snyk"}
|
|
54
|
+
*/
|
|
55
|
+
override?: {
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* The ID of the Scan that detected this Security Issue
|
|
60
|
+
* @example "scan111111111111111111"
|
|
61
|
+
*/
|
|
62
|
+
scanId: string;
|
|
63
|
+
/**
|
|
64
|
+
* Numeric severity, from 0 (lowest) to 10 (highest)
|
|
65
|
+
* @format float
|
|
66
|
+
* @example 8.5
|
|
67
|
+
*/
|
|
68
|
+
severity: number;
|
|
69
|
+
/**
|
|
70
|
+
* Severity code
|
|
71
|
+
* @example "High"
|
|
72
|
+
*/
|
|
73
|
+
severityCode: 'Critical' | 'High' | 'Info' | 'Low' | 'Medium' | 'Unassigned';
|
|
74
|
+
/**
|
|
75
|
+
* Indicates if the Security Issue was found to be remediated, ignored, etc.
|
|
76
|
+
* @example "Remediated"
|
|
77
|
+
*/
|
|
78
|
+
status?: 'Acceptable Risk' | 'Acceptable Use' | 'Compensating Controls' | 'Exempted' | 'False Positive' | 'Fix Unavailable' | 'Remediated';
|
|
79
|
+
/**
|
|
80
|
+
* Name of the associated Target and Variant
|
|
81
|
+
* @example "nodegoat:master"
|
|
82
|
+
*/
|
|
83
|
+
targetVariantName?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Title of the Security Issue
|
|
86
|
+
* @example "json-schema@0.2.3 is vulnerable to Prototype Pollution"
|
|
87
|
+
*/
|
|
88
|
+
title: string;
|
|
89
|
+
/**
|
|
90
|
+
* The type of vulnerability or quality issue for this Issue
|
|
91
|
+
* @example "SAST"
|
|
92
|
+
*/
|
|
93
|
+
type?: 'BUG_SMELLS' | 'CODE_COVERAGE' | 'CODE_SMELLS' | 'DAST' | 'EXTERNAL_POLICY' | 'IAC' | 'MISCONFIG' | 'SAST' | 'SCA' | 'SECRET';
|
|
94
|
+
}
|