@harnessio/react-sto-core-client 0.3.11 → 0.3.12
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/useFrontendUpdateTestTargetVariantsMutation.d.ts +42 -0
- package/dist/sto-core/src/services/hooks/useFrontendUpdateTestTargetVariantsMutation.js +14 -0
- package/dist/sto-core/src/services/index.d.ts +5 -0
- package/dist/sto-core/src/services/index.js +1 -0
- package/dist/sto-core/src/services/schemas/AllIssuesDetailsResult.d.ts +3 -3
- package/dist/sto-core/src/services/schemas/AllIssuesListResult.d.ts +2 -2
- package/dist/sto-core/src/services/schemas/AllIssuesOccurrenceDetailsResult.d.ts +2 -2
- package/dist/sto-core/src/services/schemas/AugmentRemediationMetadata.d.ts +2 -2
- package/dist/sto-core/src/services/schemas/AugmentRemediationResult.d.ts +1 -1
- package/dist/sto-core/src/services/schemas/Exemption.d.ts +11 -1
- package/dist/sto-core/src/services/schemas/ExemptionsListExemptionsResponseBody.d.ts +2 -2
- package/dist/sto-core/src/services/schemas/HistoricalCounts.d.ts +2 -2
- package/dist/sto-core/src/services/schemas/IssueInScan.d.ts +1 -1
- package/dist/sto-core/src/services/schemas/Status.d.ts +10 -0
- package/dist/sto-core/src/services/schemas/Status.js +4 -0
- package/dist/sto-core/src/services/schemas/TargetVariantStatusInfo.d.ts +15 -0
- package/dist/sto-core/src/services/schemas/TargetVariantStatusInfo.js +4 -0
- package/dist/sto-core/src/services/schemas/UpdateTestTargetVariantsRequestBody.d.ts +11 -0
- package/dist/sto-core/src/services/schemas/UpdateTestTargetVariantsRequestBody.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { Status } from '../schemas/Status';
|
|
3
|
+
import type { NotFound } from '../schemas/NotFound';
|
|
4
|
+
import type { UpdateTestTargetVariantsRequestBody } from '../schemas/UpdateTestTargetVariantsRequestBody';
|
|
5
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
+
export interface FrontendUpdateTestTargetVariantsMutationPathParams {
|
|
8
|
+
/**
|
|
9
|
+
* Associated Target ID
|
|
10
|
+
* @example "abcdef1234567890ghijkl"
|
|
11
|
+
*/
|
|
12
|
+
targetId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface FrontendUpdateTestTargetVariantsMutationQueryParams {
|
|
15
|
+
/**
|
|
16
|
+
* Harness Account ID
|
|
17
|
+
* @example "abcdef1234567890ghijkl"
|
|
18
|
+
*/
|
|
19
|
+
accountId: string;
|
|
20
|
+
/**
|
|
21
|
+
* Harness Organization ID
|
|
22
|
+
* @example "example_org"
|
|
23
|
+
*/
|
|
24
|
+
orgId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Harness Project ID
|
|
27
|
+
* @example "example_project"
|
|
28
|
+
*/
|
|
29
|
+
projectId: string;
|
|
30
|
+
}
|
|
31
|
+
export type FrontendUpdateTestTargetVariantsRequestBody = UpdateTestTargetVariantsRequestBody;
|
|
32
|
+
export type FrontendUpdateTestTargetVariantsOkResponse = ResponseWithPagination<Status>;
|
|
33
|
+
export type FrontendUpdateTestTargetVariantsErrorResponse = NotFound;
|
|
34
|
+
export interface FrontendUpdateTestTargetVariantsProps extends FrontendUpdateTestTargetVariantsMutationPathParams, Omit<FetcherOptions<FrontendUpdateTestTargetVariantsMutationQueryParams, FrontendUpdateTestTargetVariantsRequestBody>, 'url'> {
|
|
35
|
+
queryParams: FrontendUpdateTestTargetVariantsMutationQueryParams;
|
|
36
|
+
body: FrontendUpdateTestTargetVariantsRequestBody;
|
|
37
|
+
}
|
|
38
|
+
export declare function frontendUpdateTestTargetVariants(props: FrontendUpdateTestTargetVariantsProps): Promise<FrontendUpdateTestTargetVariantsOkResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Updates statuses for a list of Test Target Variants
|
|
41
|
+
*/
|
|
42
|
+
export declare function useFrontendUpdateTestTargetVariantsMutation(options?: Omit<UseMutationOptions<FrontendUpdateTestTargetVariantsOkResponse, FrontendUpdateTestTargetVariantsErrorResponse, FrontendUpdateTestTargetVariantsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<FrontendUpdateTestTargetVariantsOkResponse, NotFound, FrontendUpdateTestTargetVariantsProps, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function frontendUpdateTestTargetVariants(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/api/v2/frontend/test-targets/${props.targetId}/variants/status`, method: 'PUT' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Updates statuses for a list of Test Target Variants
|
|
11
|
+
*/
|
|
12
|
+
export function useFrontendUpdateTestTargetVariantsMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => frontendUpdateTestTargetVariants(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -43,6 +43,8 @@ export type { FrontendSecurityReviewErrorResponse, FrontendSecurityReviewOkRespo
|
|
|
43
43
|
export { frontendSecurityReview, useFrontendSecurityReviewQuery, } from './hooks/useFrontendSecurityReviewQuery';
|
|
44
44
|
export type { FrontendTestTargetsErrorResponse, FrontendTestTargetsOkResponse, FrontendTestTargetsProps, FrontendTestTargetsQueryQueryParams, } from './hooks/useFrontendTestTargetsQuery';
|
|
45
45
|
export { frontendTestTargets, useFrontendTestTargetsQuery, } from './hooks/useFrontendTestTargetsQuery';
|
|
46
|
+
export type { FrontendUpdateTestTargetVariantsErrorResponse, FrontendUpdateTestTargetVariantsMutationPathParams, FrontendUpdateTestTargetVariantsMutationQueryParams, FrontendUpdateTestTargetVariantsOkResponse, FrontendUpdateTestTargetVariantsProps, FrontendUpdateTestTargetVariantsRequestBody, } from './hooks/useFrontendUpdateTestTargetVariantsMutation';
|
|
47
|
+
export { frontendUpdateTestTargetVariants, useFrontendUpdateTestTargetVariantsMutation, } from './hooks/useFrontendUpdateTestTargetVariantsMutation';
|
|
46
48
|
export type { IssuesFindIssueByIdErrorResponse, IssuesFindIssueByIdOkResponse, IssuesFindIssueByIdProps, IssuesFindIssueByIdQueryPathParams, IssuesFindIssueByIdQueryQueryParams, } from './hooks/useIssuesFindIssueByIdQuery';
|
|
47
49
|
export { issuesFindIssueById, useIssuesFindIssueByIdQuery, } from './hooks/useIssuesFindIssueByIdQuery';
|
|
48
50
|
export type { IssuesIssuesAugmentRemediationErrorResponse, IssuesIssuesAugmentRemediationMutationPathParams, IssuesIssuesAugmentRemediationMutationQueryParams, IssuesIssuesAugmentRemediationOkResponse, IssuesIssuesAugmentRemediationProps, IssuesIssuesAugmentRemediationRequestBody, } from './hooks/useIssuesIssuesAugmentRemediationMutation';
|
|
@@ -126,10 +128,13 @@ export type { RefIds } from './schemas/RefIds';
|
|
|
126
128
|
export type { ScansScanIssueResponseBody } from './schemas/ScansScanIssueResponseBody';
|
|
127
129
|
export type { SecurityReviewResult } from './schemas/SecurityReviewResult';
|
|
128
130
|
export type { StageStepId } from './schemas/StageStepId';
|
|
131
|
+
export type { Status } from './schemas/Status';
|
|
129
132
|
export type { StepInfo } from './schemas/StepInfo';
|
|
130
133
|
export type { Target } from './schemas/Target';
|
|
134
|
+
export type { TargetVariantStatusInfo } from './schemas/TargetVariantStatusInfo';
|
|
131
135
|
export type { TestTarget } from './schemas/TestTarget';
|
|
132
136
|
export type { TestTargetResult } from './schemas/TestTargetResult';
|
|
133
137
|
export type { TestTargetVariant } from './schemas/TestTargetVariant';
|
|
134
138
|
export type { UpdateExemptionRequestBody } from './schemas/UpdateExemptionRequestBody';
|
|
135
139
|
export type { UpdatePullRequestRequestBody } from './schemas/UpdatePullRequestRequestBody';
|
|
140
|
+
export type { UpdateTestTargetVariantsRequestBody } from './schemas/UpdateTestTargetVariantsRequestBody';
|
|
@@ -20,6 +20,7 @@ export { frontendPipelineSecurityIssues, useFrontendPipelineSecurityIssuesQuery,
|
|
|
20
20
|
export { frontendPipelineSecuritySteps, useFrontendPipelineSecurityStepsQuery, } from './hooks/useFrontendPipelineSecurityStepsQuery';
|
|
21
21
|
export { frontendSecurityReview, useFrontendSecurityReviewQuery, } from './hooks/useFrontendSecurityReviewQuery';
|
|
22
22
|
export { frontendTestTargets, useFrontendTestTargetsQuery, } from './hooks/useFrontendTestTargetsQuery';
|
|
23
|
+
export { frontendUpdateTestTargetVariants, useFrontendUpdateTestTargetVariantsMutation, } from './hooks/useFrontendUpdateTestTargetVariantsMutation';
|
|
23
24
|
export { issuesFindIssueById, useIssuesFindIssueByIdQuery, } from './hooks/useIssuesFindIssueByIdQuery';
|
|
24
25
|
export { issuesIssuesAugmentRemediation, useIssuesIssuesAugmentRemediationMutation, } from './hooks/useIssuesIssuesAugmentRemediationMutation';
|
|
25
26
|
export { pullRequestsCreatePullRequest, usePullRequestsCreatePullRequestMutation, } from './hooks/usePullRequestsCreatePullRequestMutation';
|
|
@@ -2,7 +2,7 @@ import type { ImpactedTarget } from '../schemas/ImpactedTarget';
|
|
|
2
2
|
import type { Pagination } from '../schemas/Pagination';
|
|
3
3
|
import type { RefIds } from '../schemas/RefIds';
|
|
4
4
|
/**
|
|
5
|
-
* @example {"description":"Non omnis excepturi et quia.","impactedTargets":[{"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"
|
|
5
|
+
* @example {"description":"Non omnis excepturi et quia.","impactedTargets":[{"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Dolorem explicabo culpa sit earum.","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"userId":"Nihil culpa earum nemo.","variantName":"Nobis error dolore ratione."},{"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Dolorem explicabo culpa sit earum.","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"userId":"Nihil culpa earum nemo.","variantName":"Nobis error dolore ratione."},{"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Dolorem explicabo culpa sit earum.","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"userId":"Nihil culpa earum nemo.","variantName":"Nobis error dolore ratione."}],"issueType":"Doloribus quis aspernatur recusandae.","lastDetected":1634836529,"override":{"originalSeverity":"medium","reason":"snyk"},"pagination":{"link":"","page":4,"pageSize":20,"totalItems":230,"totalPages":12},"referenceIdentifiers":[{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."},{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."},{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."},{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."}],"scanTool":"owasp","severityCode":"High","targetType":"Exercitationem porro rerum dolore.","title":"Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash"}
|
|
6
6
|
*/
|
|
7
7
|
export interface AllIssuesDetailsResult {
|
|
8
8
|
/**
|
|
@@ -12,7 +12,7 @@ export interface AllIssuesDetailsResult {
|
|
|
12
12
|
description: string;
|
|
13
13
|
/**
|
|
14
14
|
* List of Impacted Targets
|
|
15
|
-
* @example [{"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"
|
|
15
|
+
* @example [{"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Dolorem explicabo culpa sit earum.","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"userId":"Nihil culpa earum nemo.","variantName":"Nobis error dolore ratione."},{"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Dolorem explicabo culpa sit earum.","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"userId":"Nihil culpa earum nemo.","variantName":"Nobis error dolore ratione."}]
|
|
16
16
|
*/
|
|
17
17
|
impactedTargets: ImpactedTarget[];
|
|
18
18
|
/**
|
|
@@ -36,7 +36,7 @@ export interface AllIssuesDetailsResult {
|
|
|
36
36
|
pagination: Pagination;
|
|
37
37
|
/**
|
|
38
38
|
* Reference Identifiers
|
|
39
|
-
* @example [{"id":"
|
|
39
|
+
* @example [{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."},{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."},{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."},{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."}]
|
|
40
40
|
*/
|
|
41
41
|
referenceIdentifiers: RefIds[];
|
|
42
42
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AllIssueSummary } from '../schemas/AllIssueSummary';
|
|
2
2
|
import type { Pagination } from '../schemas/Pagination';
|
|
3
3
|
/**
|
|
4
|
-
* @example {"issues":[{"exemptionExpiration":1651578240,"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"abcdef1234567890ghijkl","issueType":"
|
|
4
|
+
* @example {"issues":[{"exemptionExpiration":1651578240,"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"abcdef1234567890ghijkl","issueType":"Non cupiditate.","lastDetected":1634836529,"numOccurrences":12,"numTargetsImpacted":2,"override":{"originalSeverity":"medium","reason":"snyk"},"severityCode":"High","title":"Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash"},{"exemptionExpiration":1651578240,"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"abcdef1234567890ghijkl","issueType":"Non cupiditate.","lastDetected":1634836529,"numOccurrences":12,"numTargetsImpacted":2,"override":{"originalSeverity":"medium","reason":"snyk"},"severityCode":"High","title":"Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash"}],"pagination":{"link":"","page":4,"pageSize":20,"totalItems":230,"totalPages":12}}
|
|
5
5
|
*/
|
|
6
6
|
export interface AllIssuesListResult {
|
|
7
7
|
/**
|
|
8
8
|
* Issues related to the latest scans of a baseline in a specific project
|
|
9
|
-
* @example [{"exemptionExpiration":1651578240,"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"abcdef1234567890ghijkl","issueType":"
|
|
9
|
+
* @example [{"exemptionExpiration":1651578240,"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"abcdef1234567890ghijkl","issueType":"Non cupiditate.","lastDetected":1634836529,"numOccurrences":12,"numTargetsImpacted":2,"override":{"originalSeverity":"medium","reason":"snyk"},"severityCode":"High","title":"Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash"},{"exemptionExpiration":1651578240,"exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"abcdef1234567890ghijkl","issueType":"Non cupiditate.","lastDetected":1634836529,"numOccurrences":12,"numTargetsImpacted":2,"override":{"originalSeverity":"medium","reason":"snyk"},"severityCode":"High","title":"Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash"}]
|
|
10
10
|
*/
|
|
11
11
|
issues: AllIssueSummary[];
|
|
12
12
|
pagination: Pagination;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Pagination } from '../schemas/Pagination';
|
|
2
2
|
import type { RefIds } from '../schemas/RefIds';
|
|
3
3
|
/**
|
|
4
|
-
* @example {"description":"Libero et consequatur.","exemptionId":"abcdef1234567890ghijkl","issueType":"Modi dicta alias voluptate eius.","occurrences":[{"Accusamus voluptas.":"Voluptatibus consequatur.","Corporis quis earum sed in neque.":"Ut incidunt totam magnam ratione vero.","Culpa quam iure corrupti non cupiditate.":"Assumenda repellendus neque nostrum autem dolor."},{"Autem unde ad culpa.":"Enim fugiat et sit aut.","Fugiat molestiae sit.":"Necessitatibus nobis pariatur eos.","Nesciunt similique dolor placeat nulla magnam.":"Doloremque consectetur veniam rem ullam explicabo rerum."},{"Aut animi provident similique dignissimos mollitia deleniti.":"Minus porro accusamus recusandae.","Labore quis.":"Laborum nulla amet asperiores velit ut.","Soluta ab quis.":"Quidem omnis ipsum repellendus et et."},{"Corrupti eligendi distinctio sequi porro asperiores labore.":"Voluptatem sapiente perspiciatis debitis aut.","Voluptatem amet dolores.":"Enim itaque laborum."}],"pagination":{"link":"","page":4,"pageSize":20,"totalItems":230,"totalPages":12},"referenceIdentifiers":[{"id":"
|
|
4
|
+
* @example {"description":"Libero et consequatur.","exemptionId":"abcdef1234567890ghijkl","issueType":"Modi dicta alias voluptate eius.","occurrences":[{"Accusamus voluptas.":"Voluptatibus consequatur.","Corporis quis earum sed in neque.":"Ut incidunt totam magnam ratione vero.","Culpa quam iure corrupti non cupiditate.":"Assumenda repellendus neque nostrum autem dolor."},{"Autem unde ad culpa.":"Enim fugiat et sit aut.","Fugiat molestiae sit.":"Necessitatibus nobis pariatur eos.","Nesciunt similique dolor placeat nulla magnam.":"Doloremque consectetur veniam rem ullam explicabo rerum."},{"Aut animi provident similique dignissimos mollitia deleniti.":"Minus porro accusamus recusandae.","Labore quis.":"Laborum nulla amet asperiores velit ut.","Soluta ab quis.":"Quidem omnis ipsum repellendus et et."},{"Corrupti eligendi distinctio sequi porro asperiores labore.":"Voluptatem sapiente perspiciatis debitis aut.","Voluptatem amet dolores.":"Enim itaque laborum."}],"pagination":{"link":"","page":4,"pageSize":20,"totalItems":230,"totalPages":12},"referenceIdentifiers":[{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."},{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."}],"severityCode":"High","targetName":"The Target","targetType":"Rerum reprehenderit harum sint.","title":"Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash","variantName":"Pariatur est dolor."}
|
|
5
5
|
*/
|
|
6
6
|
export interface AllIssuesOccurrenceDetailsResult {
|
|
7
7
|
/**
|
|
@@ -29,7 +29,7 @@ export interface AllIssuesOccurrenceDetailsResult {
|
|
|
29
29
|
pagination?: Pagination;
|
|
30
30
|
/**
|
|
31
31
|
* Reference Identifiers
|
|
32
|
-
* @example [{"id":"
|
|
32
|
+
* @example [{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."},{"id":"Ut perferendis quos eligendi eum excepturi consequuntur.","type":"Nesciunt rerum blanditiis itaque aut."}]
|
|
33
33
|
*/
|
|
34
34
|
referenceIdentifiers?: RefIds[];
|
|
35
35
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { AugmentRemediationWarning } from '../schemas/AugmentRemediationWarning';
|
|
2
2
|
/**
|
|
3
|
-
* @example {"warnings":[{"message":"
|
|
3
|
+
* @example {"warnings":[{"message":"Est consequatur molestiae et incidunt aspernatur.","source":"Maiores quas ea unde deserunt dicta quos."},{"message":"Est consequatur molestiae et incidunt aspernatur.","source":"Maiores quas ea unde deserunt dicta quos."}]}
|
|
4
4
|
*/
|
|
5
5
|
export interface AugmentRemediationMetadata {
|
|
6
6
|
/**
|
|
7
|
-
* @example [{"message":"
|
|
7
|
+
* @example [{"message":"Est consequatur molestiae et incidunt aspernatur.","source":"Maiores quas ea unde deserunt dicta quos."},{"message":"Est consequatur molestiae et incidunt aspernatur.","source":"Maiores quas ea unde deserunt dicta quos."}]
|
|
8
8
|
*/
|
|
9
9
|
warnings: AugmentRemediationWarning[];
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AugmentRemediationMetadata } from '../schemas/AugmentRemediationMetadata';
|
|
2
2
|
/**
|
|
3
|
-
* @example {"metadata":{"warnings":[{"message":"
|
|
3
|
+
* @example {"metadata":{"warnings":[{"message":"Est consequatur molestiae et incidunt aspernatur.","source":"Maiores quas ea unde deserunt dicta quos."},{"message":"Est consequatur molestiae et incidunt aspernatur.","source":"Maiores quas ea unde deserunt dicta quos."},{"message":"Est consequatur molestiae et incidunt aspernatur.","source":"Maiores quas ea unde deserunt dicta quos."},{"message":"Est consequatur molestiae et incidunt aspernatur.","source":"Maiores quas ea unde deserunt dicta quos."}]},"remediationCode":"Ex iure architecto a.","remediationContext":"Amet enim.","repoContent":"Expedita accusamus."}
|
|
4
4
|
*/
|
|
5
5
|
export interface AugmentRemediationResult {
|
|
6
6
|
metadata: AugmentRemediationMetadata;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PendingChanges } from '../schemas/PendingChanges';
|
|
2
2
|
/**
|
|
3
3
|
* Information about an Exemption
|
|
4
|
-
* @example {"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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":"Rejected","targetId":"abcdef1234567890ghijkl","type":"Other"}
|
|
4
|
+
* @example {"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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","orgName":"Organization Name","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","projectName":"Project Name","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Rejected","targetId":"abcdef1234567890ghijkl","type":"Other"}
|
|
5
5
|
*/
|
|
6
6
|
export interface Exemption {
|
|
7
7
|
/**
|
|
@@ -99,6 +99,11 @@ export interface Exemption {
|
|
|
99
99
|
* @example "your_project"
|
|
100
100
|
*/
|
|
101
101
|
orgId?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Name of the organization associated with the exemption
|
|
104
|
+
* @example "Organization Name"
|
|
105
|
+
*/
|
|
106
|
+
orgName?: string;
|
|
102
107
|
pendingChanges: PendingChanges;
|
|
103
108
|
/**
|
|
104
109
|
* ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
|
|
@@ -110,6 +115,11 @@ export interface Exemption {
|
|
|
110
115
|
* @example "your_project"
|
|
111
116
|
*/
|
|
112
117
|
projectId?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Name of the project associated with the exemption
|
|
120
|
+
* @example "Project Name"
|
|
121
|
+
*/
|
|
122
|
+
projectName?: string;
|
|
113
123
|
/**
|
|
114
124
|
* Text describing why this Exemption is necessary
|
|
115
125
|
* @example "Waiting on upstream bug fix"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Pagination } from '../schemas/Pagination';
|
|
2
2
|
import type { Exemption } from '../schemas/Exemption';
|
|
3
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,"comment":"This exemption was reviewed by the security team.","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":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"}]}
|
|
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,"comment":"This exemption was reviewed by the security team.","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","orgName":"Organization Name","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","projectName":"Project Name","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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","orgName":"Organization Name","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","projectName":"Project Name","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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","orgName":"Organization Name","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","projectName":"Project Name","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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","orgName":"Organization Name","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","projectName":"Project Name","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"}]}
|
|
5
5
|
*/
|
|
6
6
|
export interface ExemptionsListExemptionsResponseBody {
|
|
7
7
|
pagination: Pagination;
|
|
8
8
|
/**
|
|
9
|
-
* @example [{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"}]
|
|
9
|
+
* @example [{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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","orgName":"Organization Name","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","projectName":"Project Name","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"},{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"comment":"This exemption was reviewed by the security team.","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","orgName":"Organization Name","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","projectName":"Project Name","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Pending","targetId":"abcdef1234567890ghijkl","type":"Other"}]
|
|
10
10
|
*/
|
|
11
11
|
results: Exemption[];
|
|
12
12
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { HistoricalIssueCounts } from '../schemas/HistoricalIssueCounts';
|
|
2
2
|
/**
|
|
3
|
-
* @example {"counts":[{"active":
|
|
3
|
+
* @example {"counts":[{"active":true,"counts":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17},"date":1651578240,"detections":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17},"remediations":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17}},{"active":true,"counts":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17},"date":1651578240,"detections":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17},"remediations":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17}}]}
|
|
4
4
|
*/
|
|
5
5
|
export interface HistoricalCounts {
|
|
6
6
|
/**
|
|
7
7
|
* Counts of active issues on baselines for each of the past several days
|
|
8
|
-
* @example [{"active":
|
|
8
|
+
* @example [{"active":true,"counts":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17},"date":1651578240,"detections":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17},"remediations":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17}},{"active":true,"counts":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17},"date":1651578240,"detections":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17},"remediations":{"critical":1,"high":3,"ignored":1,"info":11,"low":39,"medium":17}}]
|
|
9
9
|
*/
|
|
10
10
|
counts: HistoricalIssueCounts[];
|
|
11
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GitMetadata } from '../schemas/GitMetadata';
|
|
2
2
|
import type { Pagination } from '../schemas/Pagination';
|
|
3
3
|
/**
|
|
4
|
-
* @example {"baseImageName":"baseImageName","baselineVariantId":"abcdef1234567890ghijkl","created":1651578240,"currentStatus":"Rejected","details":{"package":"json-schema","version":"v0.2.3"},"exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","gitMetadata":{"detectedName":"Et
|
|
4
|
+
* @example {"baseImageName":"baseImageName","baselineVariantId":"abcdef1234567890ghijkl","created":1651578240,"currentStatus":"Rejected","details":{"package":"json-schema","version":"v0.2.3"},"exemptionCoverage":"Partially Exempted","exemptionId":"abcdef1234567890ghijkl","exemptionStatusAtScan":"Rejected","gitMetadata":{"detectedName":"Et autem iusto vero est eos.","detectedVariant":"Occaecati beatae molestias qui sint eos et.","droneCorrelated":false,"provider":"Placeat dolore est rem.","pullRequestNumber":11,"repositoryHttp":"https://github.com/harness/drone-cli.git","repositoryPath":["Beatae harum aliquam.","At accusantium.","Praesentium dolores tenetur voluptatem quae.","Ut in."],"repositorySsh":"git@github.com:harness/drone-cli.git","sourceBranch":"feat/shiny-object","targetBranch":"develop","workspace":"/harness"},"harnessAugmentation":{"Adipisci ut.":"Vel hic provident.","Aut quis doloribus facere.":"Nihil similique magni sit velit.","Rerum quos.":"Expedita repellendus esse saepe soluta blanditiis."},"id":"abcdef1234567890ghijkl","key":"json-schema@0.2.3","numNonExemptedOccurrences":10,"numOccurrences":10,"occurrenceId":12345,"occurrences":[{"line":"42"},{"line":"666"}],"occurrencesPagination":{"link":"","page":4,"pageSize":20,"totalItems":230,"totalPages":12},"origins":["app","base"],"primaryOccurrenceId":12345,"productId":"product1234567890abcde","severity":8.5,"severityCode":"High","status":"Remediated","subproduct":"product","targetId":"abcdef1234567890ghijkl","targetName":"abcdef1234567890ghijkl","targetType":"repository","targetVariantId":"abcdef1234567890ghijkl","targetVariantName":"nodegoat:master","title":"json-schema@0.2.3 is vulnerable to Prototype Pollution","type":"SAST"}
|
|
5
5
|
*/
|
|
6
6
|
export interface IssueInScan {
|
|
7
7
|
/**
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example {"id":"abcdef1234567890ghijkl","status":"unapproved"}
|
|
3
|
+
*/
|
|
4
|
+
export interface TargetVariantStatusInfo {
|
|
5
|
+
/**
|
|
6
|
+
* Resource identifier
|
|
7
|
+
* @example "abcdef1234567890ghijkl"
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* Associated Target Variant Status
|
|
12
|
+
* @example "unapproved"
|
|
13
|
+
*/
|
|
14
|
+
status: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TargetVariantStatusInfo } from '../schemas/TargetVariantStatusInfo';
|
|
2
|
+
/**
|
|
3
|
+
* @example {"targetVariants":[{"id":"abcdef1234567890ghijkl","status":"approved"},{"id":"xyz987zyx654wvu321tsr9","status":"unapproved"}]}
|
|
4
|
+
*/
|
|
5
|
+
export interface UpdateTestTargetVariantsRequestBody {
|
|
6
|
+
/**
|
|
7
|
+
* List of target variants with their status
|
|
8
|
+
* @example [{"id":"abcdef1234567890ghijkl","status":"approved"},{"id":"xyz987zyx654wvu321tsr9","status":"unapproved"}]
|
|
9
|
+
*/
|
|
10
|
+
targetVariants?: TargetVariantStatusInfo[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|