@harnessio/react-ssca-manager-client 0.86.28 → 1.0.0

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.
Files changed (37) hide show
  1. package/dist/ssca-manager/src/services/hooks/useGetContainerTargetAiWorkflowConfigQuery.d.ts +33 -0
  2. package/dist/ssca-manager/src/services/hooks/useGetContainerTargetAiWorkflowConfigQuery.js +27 -0
  3. package/dist/ssca-manager/src/services/hooks/useSaveContainerTargetAiWorkflowConfigMutation.d.ts +39 -0
  4. package/dist/ssca-manager/src/services/hooks/useSaveContainerTargetAiWorkflowConfigMutation.js +24 -0
  5. package/dist/ssca-manager/src/services/index.d.ts +14 -5
  6. package/dist/ssca-manager/src/services/index.js +2 -0
  7. package/dist/ssca-manager/src/services/schemas/DependencyRemediationAgentSelection.d.ts +29 -0
  8. package/dist/ssca-manager/src/services/schemas/DependencyRemediationAgentSelectionFinding.d.ts +15 -0
  9. package/dist/ssca-manager/src/services/schemas/DependencyRemediationAgentSelectionVulnerability.d.ts +14 -0
  10. package/dist/ssca-manager/src/services/schemas/DependencyRemediationFinding.d.ts +23 -1
  11. package/dist/ssca-manager/src/services/schemas/DependencyRemediationFinding.js +0 -3
  12. package/dist/ssca-manager/src/services/schemas/DependencyRemediationUnresolvedFinding.d.ts +29 -0
  13. package/dist/ssca-manager/src/services/schemas/DependencyRemediationVulnerability.d.ts +10 -0
  14. package/dist/ssca-manager/src/services/schemas/DependencyRemediationVulnerability.js +4 -0
  15. package/dist/ssca-manager/src/services/schemas/InitiateRemediationAgentResponse.d.ts +11 -1
  16. package/dist/ssca-manager/src/services/schemas/RemediationAgentExecution.d.ts +1 -1
  17. package/dist/ssca-manager/src/services/schemas/RemediationAgentInitiateContext.d.ts +4 -0
  18. package/dist/ssca-manager/src/services/schemas/ZeroDayBatchAcceptedResponse.d.ts +17 -0
  19. package/dist/ssca-manager/src/services/schemas/ZeroDayBatchAcceptedResponse.js +4 -0
  20. package/dist/ssca-manager/src/services/schemas/ZeroDayBatchConflictResponse.d.ts +11 -0
  21. package/dist/ssca-manager/src/services/schemas/ZeroDayBatchConflictResponse.js +4 -0
  22. package/dist/ssca-manager/src/services/schemas/ZeroDayBatchDetailResponse.d.ts +45 -0
  23. package/dist/ssca-manager/src/services/schemas/ZeroDayBatchDetailResponse.js +4 -0
  24. package/dist/ssca-manager/src/services/schemas/ZeroDayConfig.d.ts +12 -0
  25. package/dist/ssca-manager/src/services/schemas/ZeroDayInfrastructure.d.ts +25 -0
  26. package/dist/ssca-manager/src/services/schemas/ZeroDayInfrastructure.js +4 -0
  27. package/package.json +1 -1
  28. package/dist/ssca-manager/src/services/schemas/RemediationAgentBaseImage.d.ts +0 -8
  29. package/dist/ssca-manager/src/services/schemas/RemediationAgentDockerfile.d.ts +0 -8
  30. package/dist/ssca-manager/src/services/schemas/RemediationAgentDockerfileScanExecution.d.ts +0 -15
  31. package/dist/ssca-manager/src/services/schemas/RemediationAgentDockerfileScanRequest.d.ts +0 -18
  32. package/dist/ssca-manager/src/services/schemas/RemediationAgentDockerfileScanResult.d.ts +0 -17
  33. /package/dist/ssca-manager/src/services/schemas/{RemediationAgentDockerfile.js → DependencyRemediationAgentSelection.js} +0 -0
  34. /package/dist/ssca-manager/src/services/schemas/{RemediationAgentBaseImage.js → DependencyRemediationAgentSelectionFinding.js} +0 -0
  35. /package/dist/ssca-manager/src/services/schemas/{RemediationAgentDockerfileScanExecution.js → DependencyRemediationAgentSelectionVulnerability.js} +0 -0
  36. /package/dist/ssca-manager/src/services/schemas/{RemediationAgentDockerfileScanRequest.js → DependencyRemediationUnresolvedFinding.js} +0 -0
  37. /package/dist/ssca-manager/src/services/schemas/{RemediationAgentDockerfileScanResult.js → ZeroDayConfig.js} +0 -0
@@ -0,0 +1,33 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { AiWorkflowConfigYamlResponse } from '../schemas/AiWorkflowConfigYamlResponse';
3
+ import type { AiWorkflowTypeEnum } from '../schemas/AiWorkflowTypeEnum';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetContainerTargetAiWorkflowConfigQueryPathParams {
7
+ org: string;
8
+ project: string;
9
+ targetId: string;
10
+ }
11
+ export interface GetContainerTargetAiWorkflowConfigQueryQueryParams {
12
+ ai_workflow_type?: AiWorkflowTypeEnum;
13
+ }
14
+ export interface GetContainerTargetAiWorkflowConfigQueryHeaderParams {
15
+ 'Harness-Account': string;
16
+ }
17
+ export type GetContainerTargetAiWorkflowConfigOkResponse = ResponseWithPagination<AiWorkflowConfigYamlResponse>;
18
+ export type GetContainerTargetAiWorkflowConfigErrorResponse = unknown;
19
+ export interface GetContainerTargetAiWorkflowConfigProps extends GetContainerTargetAiWorkflowConfigQueryPathParams, Omit<FetcherOptions<GetContainerTargetAiWorkflowConfigQueryQueryParams, unknown, GetContainerTargetAiWorkflowConfigQueryHeaderParams>, 'url'> {
20
+ queryParams: GetContainerTargetAiWorkflowConfigQueryQueryParams;
21
+ }
22
+ export declare function getContainerTargetAiWorkflowConfig(props: GetContainerTargetAiWorkflowConfigProps): Promise<GetContainerTargetAiWorkflowConfigOkResponse>;
23
+ /**
24
+ * Get the raw overrides stored for a STO container target.
25
+ * dependency_remediation (the default) returns target-owned fields only — variantScope,
26
+ * repoUrl, dockerfilePath, scm, and agent.validation — not the effective merged config.
27
+ * fp_triage returns only agent.variantScope from the triage rule on the same document.
28
+ * A target with no document returns a minimal payload containing only the agent type.
29
+ * Clearing a field restores inheritance from the effective agent config for dependency
30
+ * remediation, and restores baseline-only triage when the triage variantScope is cleared.
31
+ *
32
+ */
33
+ export declare function useGetContainerTargetAiWorkflowConfigQuery(props: GetContainerTargetAiWorkflowConfigProps, options?: Omit<UseQueryOptions<GetContainerTargetAiWorkflowConfigOkResponse, GetContainerTargetAiWorkflowConfigErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetContainerTargetAiWorkflowConfigOkResponse, unknown>;
@@ -0,0 +1,27 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ import { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function getContainerTargetAiWorkflowConfig(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/ai-workflow-config/container-targets/${props.targetId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get the raw overrides stored for a STO container target.
11
+ * dependency_remediation (the default) returns target-owned fields only — variantScope,
12
+ * repoUrl, dockerfilePath, scm, and agent.validation — not the effective merged config.
13
+ * fp_triage returns only agent.variantScope from the triage rule on the same document.
14
+ * A target with no document returns a minimal payload containing only the agent type.
15
+ * Clearing a field restores inheritance from the effective agent config for dependency
16
+ * remediation, and restores baseline-only triage when the triage variantScope is cleared.
17
+ *
18
+ */
19
+ export function useGetContainerTargetAiWorkflowConfigQuery(props, options) {
20
+ return useQuery([
21
+ 'getContainerTargetAIWorkflowConfig',
22
+ props.org,
23
+ props.project,
24
+ props.targetId,
25
+ props.queryParams,
26
+ ], ({ signal }) => getContainerTargetAiWorkflowConfig(Object.assign(Object.assign({}, props), { signal })), options);
27
+ }
@@ -0,0 +1,39 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { AiWorkflowConfigYamlResponse } from '../schemas/AiWorkflowConfigYamlResponse';
3
+ import type { AiWorkflowConfigYamlRequest } from '../schemas/AiWorkflowConfigYamlRequest';
4
+ import type { AiWorkflowTypeEnum } from '../schemas/AiWorkflowTypeEnum';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface SaveContainerTargetAiWorkflowConfigMutationPathParams {
8
+ org: string;
9
+ project: string;
10
+ targetId: string;
11
+ }
12
+ export interface SaveContainerTargetAiWorkflowConfigMutationQueryParams {
13
+ ai_workflow_type?: AiWorkflowTypeEnum;
14
+ }
15
+ export interface SaveContainerTargetAiWorkflowConfigMutationHeaderParams {
16
+ 'Harness-Account': string;
17
+ }
18
+ export type SaveContainerTargetAiWorkflowConfigRequestBody = AiWorkflowConfigYamlRequest;
19
+ export type SaveContainerTargetAiWorkflowConfigOkResponse = ResponseWithPagination<AiWorkflowConfigYamlResponse>;
20
+ export type SaveContainerTargetAiWorkflowConfigErrorResponse = unknown;
21
+ export interface SaveContainerTargetAiWorkflowConfigProps extends SaveContainerTargetAiWorkflowConfigMutationPathParams, Omit<FetcherOptions<SaveContainerTargetAiWorkflowConfigMutationQueryParams, SaveContainerTargetAiWorkflowConfigRequestBody, SaveContainerTargetAiWorkflowConfigMutationHeaderParams>, 'url'> {
22
+ queryParams: SaveContainerTargetAiWorkflowConfigMutationQueryParams;
23
+ body: SaveContainerTargetAiWorkflowConfigRequestBody;
24
+ }
25
+ export declare function saveContainerTargetAiWorkflowConfig(props: SaveContainerTargetAiWorkflowConfigProps): Promise<SaveContainerTargetAiWorkflowConfigOkResponse>;
26
+ /**
27
+ * Create or update overrides for a STO container target.
28
+ * Presence-aware semantics: an omitted field preserves the stored override, an explicit
29
+ * null or blank value clears it, and a value sets it.
30
+ * dependency_remediation (the default) accepts agent.variantScope (baseline|all|fixed|regex),
31
+ * agent.repoUrl, agent.dockerfilePath, agent.scm, and agent.validation (pipeline,
32
+ * buildStepId, scanStepId, pushStepId, mustVerifyFix, mustPassChecks).
33
+ * fp_triage accepts only agent.variantScope in that same shape and stores it separately
34
+ * from the dependency-remediation rule. Any other field is rejected. The response returns
35
+ * the stored raw overrides for the requested agent. No STO target or SCM connectivity
36
+ * check is performed on save.
37
+ *
38
+ */
39
+ export declare function useSaveContainerTargetAiWorkflowConfigMutation(options?: Omit<UseMutationOptions<SaveContainerTargetAiWorkflowConfigOkResponse, SaveContainerTargetAiWorkflowConfigErrorResponse, SaveContainerTargetAiWorkflowConfigProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SaveContainerTargetAiWorkflowConfigOkResponse, unknown, SaveContainerTargetAiWorkflowConfigProps, unknown>;
@@ -0,0 +1,24 @@
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 saveContainerTargetAiWorkflowConfig(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/ai-workflow-config/container-targets/${props.targetId}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Create or update overrides for a STO container target.
11
+ * Presence-aware semantics: an omitted field preserves the stored override, an explicit
12
+ * null or blank value clears it, and a value sets it.
13
+ * dependency_remediation (the default) accepts agent.variantScope (baseline|all|fixed|regex),
14
+ * agent.repoUrl, agent.dockerfilePath, agent.scm, and agent.validation (pipeline,
15
+ * buildStepId, scanStepId, pushStepId, mustVerifyFix, mustPassChecks).
16
+ * fp_triage accepts only agent.variantScope in that same shape and stores it separately
17
+ * from the dependency-remediation rule. Any other field is rejected. The response returns
18
+ * the stored raw overrides for the requested agent. No STO target or SCM connectivity
19
+ * check is performed on save.
20
+ *
21
+ */
22
+ export function useSaveContainerTargetAiWorkflowConfigMutation(options) {
23
+ return useMutation((mutateProps) => saveContainerTargetAiWorkflowConfig(mutateProps), options);
24
+ }
@@ -143,6 +143,8 @@ export type { GetComponentsErrorResponse, GetComponentsOkResponse, GetComponents
143
143
  export { getComponents, useGetComponentsQuery } from './hooks/useGetComponentsQuery';
144
144
  export type { GetConnectorConfigErrorResponse, GetConnectorConfigOkResponse, GetConnectorConfigProps, GetConnectorConfigQueryQueryParams, } from './hooks/useGetConnectorConfigQuery';
145
145
  export { getConnectorConfig, useGetConnectorConfigQuery } from './hooks/useGetConnectorConfigQuery';
146
+ export type { GetContainerTargetAiWorkflowConfigErrorResponse, GetContainerTargetAiWorkflowConfigOkResponse, GetContainerTargetAiWorkflowConfigProps, GetContainerTargetAiWorkflowConfigQueryPathParams, GetContainerTargetAiWorkflowConfigQueryQueryParams, } from './hooks/useGetContainerTargetAiWorkflowConfigQuery';
147
+ export { getContainerTargetAiWorkflowConfig, useGetContainerTargetAiWorkflowConfigQuery, } from './hooks/useGetContainerTargetAiWorkflowConfigQuery';
146
148
  export type { GetDeploymentsListForArtifactInRemediationErrorResponse, GetDeploymentsListForArtifactInRemediationOkResponse, GetDeploymentsListForArtifactInRemediationProps, GetDeploymentsListForArtifactInRemediationQueryPathParams, GetDeploymentsListForArtifactInRemediationQueryQueryParams, GetDeploymentsListForArtifactInRemediationRequestBody, } from './hooks/useGetDeploymentsListForArtifactInRemediationQuery';
147
149
  export { getDeploymentsListForArtifactInRemediation, useGetDeploymentsListForArtifactInRemediationQuery, } from './hooks/useGetDeploymentsListForArtifactInRemediationQuery';
148
150
  export type { GetEnvironmentListForRemediationErrorResponse, GetEnvironmentListForRemediationOkResponse, GetEnvironmentListForRemediationProps, GetEnvironmentListForRemediationQueryPathParams, GetEnvironmentListForRemediationQueryQueryParams, } from './hooks/useGetEnvironmentListForRemediationQuery';
@@ -237,6 +239,8 @@ export type { SaveCodeRepoAiWorkflowConfigErrorResponse, SaveCodeRepoAiWorkflowC
237
239
  export { saveCodeRepoAiWorkflowConfig, useSaveCodeRepoAiWorkflowConfigMutation, } from './hooks/useSaveCodeRepoAiWorkflowConfigMutation';
238
240
  export type { SaveConnectorConfigErrorResponse, SaveConnectorConfigOkResponse, SaveConnectorConfigProps, SaveConnectorConfigRequestBody, } from './hooks/useSaveConnectorConfigMutation';
239
241
  export { saveConnectorConfig, useSaveConnectorConfigMutation, } from './hooks/useSaveConnectorConfigMutation';
242
+ export type { SaveContainerTargetAiWorkflowConfigErrorResponse, SaveContainerTargetAiWorkflowConfigMutationPathParams, SaveContainerTargetAiWorkflowConfigMutationQueryParams, SaveContainerTargetAiWorkflowConfigOkResponse, SaveContainerTargetAiWorkflowConfigProps, SaveContainerTargetAiWorkflowConfigRequestBody, } from './hooks/useSaveContainerTargetAiWorkflowConfigMutation';
243
+ export { saveContainerTargetAiWorkflowConfig, useSaveContainerTargetAiWorkflowConfigMutation, } from './hooks/useSaveContainerTargetAiWorkflowConfigMutation';
240
244
  export type { SaveOssScoringCapConfigErrorResponse, SaveOssScoringCapConfigOkResponse, SaveOssScoringCapConfigProps, SaveOssScoringCapConfigRequestBody, } from './hooks/useSaveOssScoringCapConfigQuery';
241
245
  export { saveOssScoringCapConfig, useSaveOssScoringCapConfigQuery, } from './hooks/useSaveOssScoringCapConfigQuery';
242
246
  export type { SaveProjectAiWorkflowConfigErrorResponse, SaveProjectAiWorkflowConfigMutationPathParams, SaveProjectAiWorkflowConfigMutationQueryParams, SaveProjectAiWorkflowConfigOkResponse, SaveProjectAiWorkflowConfigProps, SaveProjectAiWorkflowConfigRequestBody, } from './hooks/useSaveProjectAiWorkflowConfigMutation';
@@ -626,7 +630,12 @@ export type { DefaultVulnerability } from './schemas/DefaultVulnerability';
626
630
  export type { DeleteRepositoriesRequestBody } from './schemas/DeleteRepositoriesRequestBody';
627
631
  export type { DependencyChange } from './schemas/DependencyChange';
628
632
  export type { DependencyChanges } from './schemas/DependencyChanges';
633
+ export type { DependencyRemediationAgentSelection } from './schemas/DependencyRemediationAgentSelection';
634
+ export type { DependencyRemediationAgentSelectionFinding } from './schemas/DependencyRemediationAgentSelectionFinding';
635
+ export type { DependencyRemediationAgentSelectionVulnerability } from './schemas/DependencyRemediationAgentSelectionVulnerability';
629
636
  export type { DependencyRemediationFinding } from './schemas/DependencyRemediationFinding';
637
+ export type { DependencyRemediationUnresolvedFinding } from './schemas/DependencyRemediationUnresolvedFinding';
638
+ export type { DependencyRemediationVulnerability } from './schemas/DependencyRemediationVulnerability';
630
639
  export type { DependencyType } from './schemas/DependencyType';
631
640
  export type { DeploymentActivity } from './schemas/DeploymentActivity';
632
641
  export type { Deployments } from './schemas/Deployments';
@@ -779,15 +788,10 @@ export type { ProvenanceRequestBodyV2 } from './schemas/ProvenanceRequestBodyV2'
779
788
  export type { ProvenanceResponseBody } from './schemas/ProvenanceResponseBody';
780
789
  export type { RekorLog } from './schemas/RekorLog';
781
790
  export type { RemediationAgentApprovedBaseImageVariant } from './schemas/RemediationAgentApprovedBaseImageVariant';
782
- export type { RemediationAgentBaseImage } from './schemas/RemediationAgentBaseImage';
783
791
  export type { RemediationAgentBaseImageApproval } from './schemas/RemediationAgentBaseImageApproval';
784
792
  export type { RemediationAgentBaseImageApprovalRequest } from './schemas/RemediationAgentBaseImageApprovalRequest';
785
793
  export type { RemediationAgentBaseImageApprovalResponse } from './schemas/RemediationAgentBaseImageApprovalResponse';
786
794
  export type { RemediationAgentCriteria } from './schemas/RemediationAgentCriteria';
787
- export type { RemediationAgentDockerfile } from './schemas/RemediationAgentDockerfile';
788
- export type { RemediationAgentDockerfileScanExecution } from './schemas/RemediationAgentDockerfileScanExecution';
789
- export type { RemediationAgentDockerfileScanRequest } from './schemas/RemediationAgentDockerfileScanRequest';
790
- export type { RemediationAgentDockerfileScanResult } from './schemas/RemediationAgentDockerfileScanResult';
791
795
  export type { RemediationAgentExecution } from './schemas/RemediationAgentExecution';
792
796
  export type { RemediationAgentInitiateContext } from './schemas/RemediationAgentInitiateContext';
793
797
  export type { RemediationAgentTargetConfig } from './schemas/RemediationAgentTargetConfig';
@@ -900,4 +904,9 @@ export type { VulnerabilitySource } from './schemas/VulnerabilitySource';
900
904
  export type { VulnerabilitySourceConfigRequestBody } from './schemas/VulnerabilitySourceConfigRequestBody';
901
905
  export type { VulnerabilitySourceConfigResponse } from './schemas/VulnerabilitySourceConfigResponse';
902
906
  export type { WorkflowSource } from './schemas/WorkflowSource';
907
+ export type { ZeroDayBatchAcceptedResponse } from './schemas/ZeroDayBatchAcceptedResponse';
908
+ export type { ZeroDayBatchConflictResponse } from './schemas/ZeroDayBatchConflictResponse';
909
+ export type { ZeroDayBatchDetailResponse } from './schemas/ZeroDayBatchDetailResponse';
910
+ export type { ZeroDayConfig } from './schemas/ZeroDayConfig';
911
+ export type { ZeroDayInfrastructure } from './schemas/ZeroDayInfrastructure';
903
912
  export type { ZeroDayRerunStatusResponse } from './schemas/ZeroDayRerunStatusResponse';
@@ -70,6 +70,7 @@ export { getComponentTicket, useGetComponentTicketQuery } from './hooks/useGetCo
70
70
  export { getComponentVulnerabilitiesByPurl, useGetComponentVulnerabilitiesByPurlQuery, } from './hooks/useGetComponentVulnerabilitiesByPurlQuery';
71
71
  export { getComponents, useGetComponentsQuery } from './hooks/useGetComponentsQuery';
72
72
  export { getConnectorConfig, useGetConnectorConfigQuery } from './hooks/useGetConnectorConfigQuery';
73
+ export { getContainerTargetAiWorkflowConfig, useGetContainerTargetAiWorkflowConfigQuery, } from './hooks/useGetContainerTargetAiWorkflowConfigQuery';
73
74
  export { getDeploymentsListForArtifactInRemediation, useGetDeploymentsListForArtifactInRemediationQuery, } from './hooks/useGetDeploymentsListForArtifactInRemediationQuery';
74
75
  export { getEnvironmentListForRemediation, useGetEnvironmentListForRemediationQuery, } from './hooks/useGetEnvironmentListForRemediationQuery';
75
76
  export { getEolArtifactSourceComponentTicket, useGetEolArtifactSourceComponentTicketQuery, } from './hooks/useGetEolArtifactSourceComponentTicketQuery';
@@ -117,6 +118,7 @@ export { saveAccountAiWorkflowConfig, useSaveAccountAiWorkflowConfigMutation, }
117
118
  export { saveAutoPrConfig, useSaveAutoPrConfigMutation } from './hooks/useSaveAutoPrConfigMutation';
118
119
  export { saveCodeRepoAiWorkflowConfig, useSaveCodeRepoAiWorkflowConfigMutation, } from './hooks/useSaveCodeRepoAiWorkflowConfigMutation';
119
120
  export { saveConnectorConfig, useSaveConnectorConfigMutation, } from './hooks/useSaveConnectorConfigMutation';
121
+ export { saveContainerTargetAiWorkflowConfig, useSaveContainerTargetAiWorkflowConfigMutation, } from './hooks/useSaveContainerTargetAiWorkflowConfigMutation';
120
122
  export { saveOssScoringCapConfig, useSaveOssScoringCapConfigQuery, } from './hooks/useSaveOssScoringCapConfigQuery';
121
123
  export { saveProjectAiWorkflowConfig, useSaveProjectAiWorkflowConfigMutation, } from './hooks/useSaveProjectAiWorkflowConfigMutation';
122
124
  export { setBaselineForArtifactV2, useSetBaselineForArtifactV2Mutation, } from './hooks/useSetBaselineForArtifactV2Mutation';
@@ -0,0 +1,29 @@
1
+ import type { DependencyRemediationAgentSelectionFinding } from '../schemas/DependencyRemediationAgentSelectionFinding';
2
+ import type { DependencyRemediationAgentSelectionVulnerability } from '../schemas/DependencyRemediationAgentSelectionVulnerability';
3
+ export interface DependencyRemediationAgentSelection {
4
+ /**
5
+ * Versions the scanner named as fixes, first-seen order, bounded. A range contributes its lower bound. The agent must choose one of these verbatim.
6
+ */
7
+ candidates: string[];
8
+ /**
9
+ * The package's eligible findings; the chosen version applies to all of them.
10
+ */
11
+ findings: DependencyRemediationAgentSelectionFinding[];
12
+ packageName: string;
13
+ /**
14
+ * Installed version, as the scan reported it.
15
+ */
16
+ packageVersion: string;
17
+ /**
18
+ * Why the selector could not rank this package's versions.
19
+ */
20
+ reason: string;
21
+ /**
22
+ * The selector's own pick over the versions it could read, within maxVersionUpdate. A hint only; absent when it found none.
23
+ */
24
+ suggestedVersion?: string;
25
+ /**
26
+ * Per-CVE scanner fix strings for the package, worst severity first, bounded.
27
+ */
28
+ vulnerabilities?: DependencyRemediationAgentSelectionVulnerability[];
29
+ }
@@ -0,0 +1,15 @@
1
+ export interface DependencyRemediationAgentSelectionFinding {
2
+ /**
3
+ * Scanner issue / CVE identifier
4
+ */
5
+ issueId: string;
6
+ /**
7
+ * Highest severity among the finding's counted issues (CRITICAL, HIGH, MEDIUM or LOW).
8
+ */
9
+ severity?: string;
10
+ /**
11
+ * Number of critical, high, medium and low issues the scan counted for this finding.
12
+ * @format int32
13
+ */
14
+ vulnerabilityCount?: number;
15
+ }
@@ -0,0 +1,14 @@
1
+ export interface DependencyRemediationAgentSelectionVulnerability {
2
+ /**
3
+ * The scanner's fix string for this CVE, verbatim.
4
+ */
5
+ fixVersion: string;
6
+ /**
7
+ * CVE identifier.
8
+ */
9
+ id: string;
10
+ /**
11
+ * CRITICAL, HIGH, MEDIUM, LOW or INFO.
12
+ */
13
+ severity?: string;
14
+ }
@@ -1,12 +1,34 @@
1
+ import type { DependencyRemediationVulnerability } from '../schemas/DependencyRemediationVulnerability';
1
2
  export interface DependencyRemediationFinding {
3
+ /**
4
+ * CVEs this finding's selected version resolves, worst severity first. Empty when the scan carried no per-CVE data, in which case vulnerabilityCount is the only signal.
5
+ */
6
+ fixedVulnerabilities?: DependencyRemediationVulnerability[];
2
7
  /**
3
8
  * Scanner issue / CVE identifier
4
9
  */
5
10
  issueId: string;
11
+ /**
12
+ * Free-text context for the selected version. On PARTIAL findings, what the selected version leaves unresolved and what it would take to resolve it. On findings whose version the remediation agent chose from the scanner's fix versions, why it chose that version.
13
+ */
14
+ note?: string;
6
15
  packageName: string;
7
16
  packageVersion: string;
8
17
  /**
9
- * Upgrade selected by the effective remediation policy for this finding's package/version group: the highest strict-SemVer candidate satisfying the configured severity/risk criteria and staying within maxVersionUpdate. Identical for every finding in the same group.
18
+ * Upgrade selected by the effective remediation policy for this finding's package/version group: the lowest version within maxVersionUpdate that resolves the most findings in the group, weighted by severity. Fix lists such as "4.0.1, 2.0.1" and ranges such as ">=4.6.0" are understood. Identical for every finding in the same group.
10
19
  */
11
20
  selectedFixVersion: string;
21
+ /**
22
+ * Highest severity among the finding's counted issues (CRITICAL, HIGH, MEDIUM or LOW).
23
+ */
24
+ severity?: string;
25
+ /**
26
+ * FIXED when the selected version resolves every reported issue of this finding, PARTIAL when it resolves only some of them (see note).
27
+ */
28
+ status?: string;
29
+ /**
30
+ * Number of critical, high, medium and low issues the scan counted for this finding.
31
+ * @format int32
32
+ */
33
+ vulnerabilityCount?: number;
12
34
  }
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -0,0 +1,29 @@
1
+ export interface DependencyRemediationUnresolvedFinding {
2
+ /**
3
+ * Scanner issue / CVE identifier
4
+ */
5
+ issueId: string;
6
+ packageName: string;
7
+ packageVersion: string;
8
+ /**
9
+ * Human-readable explanation.
10
+ */
11
+ reason: string;
12
+ /**
13
+ * Smallest version that would resolve the finding, when one is known.
14
+ */
15
+ requiredVersion?: string;
16
+ /**
17
+ * Highest severity among the finding's counted issues (CRITICAL, HIGH, MEDIUM or LOW).
18
+ */
19
+ severity?: string;
20
+ /**
21
+ * Why no upgrade was selected. NEEDS_MINOR or NEEDS_MAJOR means a fix exists but needs a larger bump than maxVersionUpdate allows. NO_FIX means no upgrade could be applied: either the scanner reported no usable fix newer than the installed version, or its fix is within maxVersionUpdate but conflicts with the version chosen for other issues of the same package (see reason). UNPARSEABLE means the installed or fixed version is not a recognizable version format.
22
+ */
23
+ status: string;
24
+ /**
25
+ * Number of critical, high, medium and low issues the scan counted for this finding.
26
+ * @format int32
27
+ */
28
+ vulnerabilityCount?: number;
29
+ }
@@ -0,0 +1,10 @@
1
+ export interface DependencyRemediationVulnerability {
2
+ /**
3
+ * CVE identifier, upper-cased.
4
+ */
5
+ id: string;
6
+ /**
7
+ * CRITICAL, HIGH, MEDIUM, LOW or INFO.
8
+ */
9
+ severity?: string;
10
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -1,13 +1,23 @@
1
+ import type { DependencyRemediationAgentSelection } from '../schemas/DependencyRemediationAgentSelection';
1
2
  import type { RemediationAgentInitiateContext } from '../schemas/RemediationAgentInitiateContext';
2
3
  import type { RemediationAgentExecution } from '../schemas/RemediationAgentExecution';
3
4
  import type { DependencyRemediationFinding } from '../schemas/DependencyRemediationFinding';
4
5
  import type { RemediationAgentTargetConfig } from '../schemas/RemediationAgentTargetConfig';
6
+ import type { DependencyRemediationUnresolvedFinding } from '../schemas/DependencyRemediationUnresolvedFinding';
5
7
  export interface InitiateRemediationAgentResponse {
8
+ /**
9
+ * Package groups whose versions the selector cannot rank: the installed version, or every fix string a scanner reported for a requirement, is not a recognizable version. The group is not in findings or unresolvedFindings. The agent chooses one of its candidates, guided by suggestedVersion. Empty or absent when the selector decided every group.
10
+ */
11
+ agentSelectFindings?: DependencyRemediationAgentSelection[];
6
12
  context?: RemediationAgentInitiateContext;
7
13
  execution: RemediationAgentExecution;
8
14
  /**
9
- * Config-eligible component findings with a policy-resolved selectedFixVersion, in source order. Fully exempted findings, findings outside the configured severity/risk criteria, and package groups with no compliant upgrade are omitted. Empty when the scan is clean or nothing is remediable: a fresh initiation pairs an empty list with a SKIPPED execution, while a replayed terminal execution keeps its stored status and can also return an empty list. Each item carries only the package identity, issue id and selected fix; raw scan evidence remains available server-side under the scan.
15
+ * Config-eligible component findings with a policy-resolved selectedFixVersion, in source order. Fully exempted findings, findings outside the configured severity/risk criteria, and package groups with no compliant upgrade are omitted. Empty when the scan is clean or nothing is remediable: a fresh initiation pairs an empty list with a SKIPPED execution, while a replayed terminal execution keeps its stored status and can also return an empty list. Each item carries the package identity, issue id, selected fix and a short outcome summary (status, severity); raw scan evidence remains available server-side under the scan.
10
16
  */
11
17
  findings: DependencyRemediationFinding[];
12
18
  targetConfig?: RemediationAgentTargetConfig;
19
+ /**
20
+ * Config-eligible findings that no policy-compliant upgrade could address, in source order, each with the reason. These are not part of findings and need manual follow-up. Empty when every eligible finding has a selected fix.
21
+ */
22
+ unresolvedFindings?: DependencyRemediationUnresolvedFinding[];
13
23
  }
@@ -5,7 +5,7 @@ export interface RemediationAgentExecution {
5
5
  */
6
6
  failureReason?: string;
7
7
  /**
8
- * QUEUED|PENDING|RUNNING|COMPLETED|FAILED|SKIPPED. SKIPPED means the request selected no remediation criterion or no package group resolved to a policy-compliant upgrade; findings is empty in that case. A request that selects a criterion without a valid maxVersionUpdate fails with a 400 instead. On a SKIPPED execution, executionId is a deterministic synthetic value and is never persisted.
8
+ * QUEUED|PENDING|RUNNING|COMPLETED|FAILED|SKIPPED. SKIPPED means the request selected no remediation criterion or no package group resolved to a policy-compliant upgrade and none was handed to the agent to choose; findings is empty in that case. A request that selects a criterion without a valid maxVersionUpdate fails with a 400 instead. On a SKIPPED execution, executionId is a deterministic synthetic value and is never persisted.
9
9
  */
10
10
  status: string;
11
11
  targetId?: string;
@@ -2,6 +2,10 @@
2
2
  * Server-resolved context for this execution; derived data, not configuration.
3
3
  */
4
4
  export interface RemediationAgentInitiateContext {
5
+ /**
6
+ * Repository-relative Dockerfile path recorded by the scanned artifact's provenance. Present only while the execution is still active, and absent when the target config already carries a dockerfilePath or provenance has none.
7
+ */
8
+ dockerfilePath?: string;
5
9
  /**
6
10
  * SCM provider for the execution's repository: the scan's recorded artifactInfo.scmProvider, else inferred from the resolved repo URL. Absent when neither is known.
7
11
  */
@@ -0,0 +1,17 @@
1
+ export interface ZeroDayBatchAcceptedResponse {
2
+ accepted_cluster_ids?: string[];
3
+ batch_id?: string;
4
+ /**
5
+ * Rejected findings with a reason such as MISSING_PACKAGE, MISSING_ECOSYSTEM, INVALID_VERSION_RANGES, INVALID_LIST_FIELD, ALREADY_ACCEPTED, WITHDRAWN
6
+ */
7
+ rejected?: Array<{
8
+ cluster_id?: string;
9
+ index?: number;
10
+ reason?: string;
11
+ }>;
12
+ /**
13
+ * ACCEPTING, QUEUED, or COMPLETED when nothing new was accepted
14
+ */
15
+ status?: string;
16
+ valid_findings?: number;
17
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface ZeroDayBatchConflictResponse {
2
+ batch_id?: string;
3
+ /**
4
+ * @example "Run already accepted"
5
+ */
6
+ reason?: string;
7
+ /**
8
+ * Batch status, or IN_PROGRESS while the first request has not saved the batch yet
9
+ */
10
+ status?: string;
11
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,45 @@
1
+ export interface ZeroDayBatchDetailResponse {
2
+ accepted_cluster_ids?: string[];
3
+ batch_account_results?: Array<{
4
+ account_id?: string;
5
+ execution_id?: string;
6
+ failure_message?: string;
7
+ outcome?: string;
8
+ pipeline_execution_id?: string;
9
+ /**
10
+ * @format int64
11
+ */
12
+ processed_at?: number;
13
+ state?: string;
14
+ }>;
15
+ batch_id?: string;
16
+ /**
17
+ * @format int64
18
+ */
19
+ created_at?: number;
20
+ /**
21
+ * Live number of the batch's executions per status
22
+ */
23
+ execution_status_counts?: {
24
+ [key: string]: number;
25
+ };
26
+ failed_account_count?: number;
27
+ generated_at?: string;
28
+ rejected_cluster_ids?: string[];
29
+ results_truncated?: boolean;
30
+ run_id?: string;
31
+ skipped_account_count?: number;
32
+ /**
33
+ * Dispatch outcome of the batch; unaffected by reruns
34
+ */
35
+ status?: string;
36
+ target_count?: number;
37
+ total_finding_count?: number;
38
+ triggered_account_count?: number;
39
+ /**
40
+ * @format int64
41
+ */
42
+ triggered_at?: number;
43
+ triggered_by_principal?: string;
44
+ valid_finding_count?: number;
45
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { ZeroDayInfrastructure } from '../schemas/ZeroDayInfrastructure';
2
+ export interface ZeroDayConfig {
3
+ /**
4
+ * Whether zero-day remediation is enabled for the account
5
+ */
6
+ enabled?: boolean;
7
+ /**
8
+ * Package name patterns (glob with *) to filter out of dispatch
9
+ */
10
+ exclude_artifact_patterns?: string[];
11
+ infrastructure?: ZeroDayInfrastructure;
12
+ }
@@ -0,0 +1,25 @@
1
+ export interface ZeroDayInfrastructure {
2
+ /**
3
+ * Defaults to true when omitted
4
+ * @default true
5
+ */
6
+ automount_service_account_token?: boolean;
7
+ connector_ref?: string;
8
+ /**
9
+ * Required for KubernetesDirect
10
+ */
11
+ namespace?: string;
12
+ node_selector?: {
13
+ [key: string]: string;
14
+ };
15
+ /**
16
+ * Only Linux is supported
17
+ * @default "Linux"
18
+ */
19
+ os: 'Linux';
20
+ /**
21
+ * HarnessCloud (default) or KubernetesDirect
22
+ * @default "HarnessCloud"
23
+ */
24
+ type: 'HarnessCloud' | 'KubernetesDirect';
25
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.86.28",
3
+ "version": "1.0.0",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,8 +0,0 @@
1
- export interface RemediationAgentBaseImage {
2
- alias?: string;
3
- image: string;
4
- /**
5
- * @format int32
6
- */
7
- line: number;
8
- }
@@ -1,8 +0,0 @@
1
- import type { RemediationAgentBaseImage } from '../schemas/RemediationAgentBaseImage';
2
- export interface RemediationAgentDockerfile {
3
- baseImages: RemediationAgentBaseImage[];
4
- /**
5
- * Repository-relative Dockerfile path
6
- */
7
- path: string;
8
- }
@@ -1,15 +0,0 @@
1
- export interface RemediationAgentDockerfileScanExecution {
2
- /**
3
- * Dockerfile path used for discovery: request override, else SLSA provenance, else omitted when the workspace is walked.
4
- */
5
- dockerfilePath?: string;
6
- pipelineExecutionId: string;
7
- /**
8
- * SCM connector used for the clone, from the request or DEPENDENCY_REMEDIATION config
9
- */
10
- scmConnectorRef?: string;
11
- /**
12
- * PMS status at trigger time
13
- */
14
- status: string;
15
- }
@@ -1,18 +0,0 @@
1
- export interface RemediationAgentDockerfileScanRequest {
2
- /**
3
- * Optional repository-relative Dockerfile path from the template. When omitted, resolved from SLSA provenance buildMetadata.dockerfile / dockerFile. When still unset the cloned workspace is walked.
4
- */
5
- dockerfilePath?: string;
6
- /**
7
- * Remediator AI workflow execution id from initiate. Used to store and reuse the Dockerfile-discovery pipelineExecutionId so retries do not start a second clone.
8
- */
9
- executionId: string;
10
- /**
11
- * Git remote URL of the repository to scan for Dockerfiles
12
- */
13
- repoUrl: string;
14
- /**
15
- * SCM connector used to clone the repository. The request is rejected when omitted.
16
- */
17
- scmConnectorRef?: string;
18
- }
@@ -1,17 +0,0 @@
1
- import type { RemediationAgentDockerfile } from '../schemas/RemediationAgentDockerfile';
2
- export interface RemediationAgentDockerfileScanResult {
3
- /**
4
- * Branch the Dockerfile-discovery clone resolved to, i.e. the repository's default branch. Recorded by CI when the clone lands, so absent on executions that have not cloned yet.
5
- */
6
- defaultBranch?: string;
7
- dockerfiles: RemediationAgentDockerfile[];
8
- /**
9
- * Failure detail when status is FAILED
10
- */
11
- message?: string;
12
- pipelineExecutionId: string;
13
- /**
14
- * One of RUNNING, SUCCEEDED or FAILED
15
- */
16
- status: string;
17
- }