@rad-security/mcp-server 0.0.27 → 0.0.31-2.g635c655
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/README.md +53 -60
- package/dist/index.js +44 -381
- package/dist/index.js.map +1 -1
- package/dist/operations/cve-dispositions.d.ts +27 -0
- package/dist/operations/cve-dispositions.js +46 -0
- package/dist/operations/cve-dispositions.js.map +1 -0
- package/dist/operations/findings.d.ts +4 -4
- package/dist/operations/findings.js +1 -1
- package/dist/operations/findings.js.map +1 -1
- package/dist/operations/inbox.d.ts +2 -2
- package/dist/operations/radql.js +72 -1
- package/dist/operations/radql.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/dist/operations/cloud-compliance.d.ts +0 -116
- package/dist/operations/cloud-compliance.js +0 -123
- package/dist/operations/cloud-compliance.js.map +0 -1
- package/dist/operations/cloud-inventory.d.ts +0 -70
- package/dist/operations/cloud-inventory.js +0 -61
- package/dist/operations/cloud-inventory.js.map +0 -1
- package/dist/operations/cves.d.ts +0 -23
- package/dist/operations/cves.js +0 -51
- package/dist/operations/cves.js.map +0 -1
- package/dist/operations/identities.d.ts +0 -33
- package/dist/operations/identities.js +0 -30
- package/dist/operations/identities.js.map +0 -1
- package/dist/operations/misconfigs.d.ts +0 -23
- package/dist/operations/misconfigs.js +0 -306
- package/dist/operations/misconfigs.js.map +0 -1
- package/dist/operations/runtime_network.d.ts +0 -50
- package/dist/operations/runtime_network.js +0 -41
- package/dist/operations/runtime_network.js.map +0 -1
- package/dist/operations/threats.d.ts +0 -22
- package/dist/operations/threats.js +0 -24
- package/dist/operations/threats.js.map +0 -1
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { RadSecurityClient } from "../client.js";
|
|
3
|
-
export declare const ListComplianceFrameworksSchema: z.ZodObject<{
|
|
4
|
-
datasource_ids: z.ZodOptional<z.ZodString>;
|
|
5
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
6
|
-
page_size: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
page?: number | undefined;
|
|
9
|
-
page_size?: number | undefined;
|
|
10
|
-
datasource_ids?: string | undefined;
|
|
11
|
-
}, {
|
|
12
|
-
page?: number | undefined;
|
|
13
|
-
page_size?: number | undefined;
|
|
14
|
-
datasource_ids?: string | undefined;
|
|
15
|
-
}>;
|
|
16
|
-
export declare const ListFrameworkRequirementsSchema: z.ZodObject<{
|
|
17
|
-
framework_name: z.ZodString;
|
|
18
|
-
datasource_ids: z.ZodString;
|
|
19
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
20
|
-
page_size: z.ZodOptional<z.ZodNumber>;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
datasource_ids: string;
|
|
23
|
-
framework_name: string;
|
|
24
|
-
page?: number | undefined;
|
|
25
|
-
page_size?: number | undefined;
|
|
26
|
-
}, {
|
|
27
|
-
datasource_ids: string;
|
|
28
|
-
framework_name: string;
|
|
29
|
-
page?: number | undefined;
|
|
30
|
-
page_size?: number | undefined;
|
|
31
|
-
}>;
|
|
32
|
-
export declare const ListRequirementControlsSchema: z.ZodObject<{
|
|
33
|
-
framework_name: z.ZodString;
|
|
34
|
-
requirement_id: z.ZodString;
|
|
35
|
-
datasource_ids: z.ZodString;
|
|
36
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
37
|
-
page_size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
38
|
-
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
page: number;
|
|
40
|
-
page_size: number;
|
|
41
|
-
datasource_ids: string;
|
|
42
|
-
framework_name: string;
|
|
43
|
-
requirement_id: string;
|
|
44
|
-
}, {
|
|
45
|
-
datasource_ids: string;
|
|
46
|
-
framework_name: string;
|
|
47
|
-
requirement_id: string;
|
|
48
|
-
page?: number | undefined;
|
|
49
|
-
page_size?: number | undefined;
|
|
50
|
-
}>;
|
|
51
|
-
export declare const ListComplianceControlsSchema: z.ZodObject<{
|
|
52
|
-
status: z.ZodOptional<z.ZodEnum<["failing", "passing"]>>;
|
|
53
|
-
providers: z.ZodOptional<z.ZodString>;
|
|
54
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
55
|
-
page_size: z.ZodOptional<z.ZodNumber>;
|
|
56
|
-
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
status?: "failing" | "passing" | undefined;
|
|
58
|
-
page?: number | undefined;
|
|
59
|
-
page_size?: number | undefined;
|
|
60
|
-
providers?: string | undefined;
|
|
61
|
-
}, {
|
|
62
|
-
status?: "failing" | "passing" | undefined;
|
|
63
|
-
page?: number | undefined;
|
|
64
|
-
page_size?: number | undefined;
|
|
65
|
-
providers?: string | undefined;
|
|
66
|
-
}>;
|
|
67
|
-
export declare const GetComplianceControlSchema: z.ZodObject<{
|
|
68
|
-
control_name: z.ZodString;
|
|
69
|
-
datasource_ids: z.ZodString;
|
|
70
|
-
}, "strip", z.ZodTypeAny, {
|
|
71
|
-
datasource_ids: string;
|
|
72
|
-
control_name: string;
|
|
73
|
-
}, {
|
|
74
|
-
datasource_ids: string;
|
|
75
|
-
control_name: string;
|
|
76
|
-
}>;
|
|
77
|
-
export declare const ListControlResourcesSchema: z.ZodObject<{
|
|
78
|
-
control_name: z.ZodString;
|
|
79
|
-
datasource_ids: z.ZodString;
|
|
80
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
81
|
-
page_size: z.ZodOptional<z.ZodNumber>;
|
|
82
|
-
}, "strip", z.ZodTypeAny, {
|
|
83
|
-
datasource_ids: string;
|
|
84
|
-
control_name: string;
|
|
85
|
-
page?: number | undefined;
|
|
86
|
-
page_size?: number | undefined;
|
|
87
|
-
}, {
|
|
88
|
-
datasource_ids: string;
|
|
89
|
-
control_name: string;
|
|
90
|
-
page?: number | undefined;
|
|
91
|
-
page_size?: number | undefined;
|
|
92
|
-
}>;
|
|
93
|
-
/**
|
|
94
|
-
* List all compliance frameworks available for cloud resources.
|
|
95
|
-
*/
|
|
96
|
-
export declare function listComplianceFrameworks(client: RadSecurityClient, datasourceIds?: string, page?: number, pageSize?: number): Promise<any>;
|
|
97
|
-
/**
|
|
98
|
-
* List all requirements for a specific compliance framework.
|
|
99
|
-
*/
|
|
100
|
-
export declare function listFrameworkRequirements(client: RadSecurityClient, frameworkName: string, datasourceIds: string, page?: number, pageSize?: number): Promise<any>;
|
|
101
|
-
/**
|
|
102
|
-
* List controls associated with a specific requirement within a compliance framework.
|
|
103
|
-
*/
|
|
104
|
-
export declare function listRequirementControls(client: RadSecurityClient, frameworkName: string, requirementId: string, datasourceIds: string, page?: number, pageSize?: number): Promise<any>;
|
|
105
|
-
/**
|
|
106
|
-
* List all compliance control summaries for the account.
|
|
107
|
-
*/
|
|
108
|
-
export declare function listComplianceControls(client: RadSecurityClient, status?: string, providers?: string, page?: number, pageSize?: number): Promise<any>;
|
|
109
|
-
/**
|
|
110
|
-
* Get details for a specific compliance control.
|
|
111
|
-
*/
|
|
112
|
-
export declare function getComplianceControl(client: RadSecurityClient, controlName: string, datasourceIds: string): Promise<any>;
|
|
113
|
-
/**
|
|
114
|
-
* List resources associated with a specific compliance control.
|
|
115
|
-
*/
|
|
116
|
-
export declare function listControlResources(client: RadSecurityClient, controlName: string, datasourceIds: string, page?: number, pageSize?: number): Promise<any>;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
// Schema for list_compliance_frameworks
|
|
3
|
-
export const ListComplianceFrameworksSchema = z.object({
|
|
4
|
-
datasource_ids: z.string().optional().describe("Comma-separated datasource IDs (e.g. AWS Account IDs)"),
|
|
5
|
-
page: z.number().optional().describe("Page number starting from 1"),
|
|
6
|
-
page_size: z.number().optional().describe("Page size"),
|
|
7
|
-
});
|
|
8
|
-
// Schema for list_framework_requirements
|
|
9
|
-
export const ListFrameworkRequirementsSchema = z.object({
|
|
10
|
-
framework_name: z.string().describe("Name of the compliance framework"),
|
|
11
|
-
datasource_ids: z.string().describe("Comma-separated datasource IDs (e.g. AWS Account IDs)"),
|
|
12
|
-
page: z.number().optional().describe("Page number starting from 1"),
|
|
13
|
-
page_size: z.number().optional().describe("Page size"),
|
|
14
|
-
});
|
|
15
|
-
// Schema for list_requirement_controls
|
|
16
|
-
export const ListRequirementControlsSchema = z.object({
|
|
17
|
-
framework_name: z.string().describe("Name of the compliance framework"),
|
|
18
|
-
requirement_id: z.string().describe("ID of the requirement within the framework"),
|
|
19
|
-
datasource_ids: z.string().describe("Comma-separated datasource IDs (e.g. AWS Account IDs)"),
|
|
20
|
-
page: z.number().optional().default(1).describe("Page number starting from 1"),
|
|
21
|
-
page_size: z.number().optional().default(10).describe("Page size"),
|
|
22
|
-
});
|
|
23
|
-
// Schema for list_compliance_controls
|
|
24
|
-
export const ListComplianceControlsSchema = z.object({
|
|
25
|
-
status: z.enum(["failing", "passing"]).optional().describe("Filter by failure status: failing or passing"),
|
|
26
|
-
providers: z.string().optional().describe("Comma-separated list of cloud providers (aws, azure, gcp, linode)"),
|
|
27
|
-
page: z.number().optional().describe("Page number starting from 1"),
|
|
28
|
-
page_size: z.number().optional().describe("Page size"),
|
|
29
|
-
});
|
|
30
|
-
// Schema for get_compliance_control
|
|
31
|
-
export const GetComplianceControlSchema = z.object({
|
|
32
|
-
control_name: z.string().describe("Name of the compliance control"),
|
|
33
|
-
datasource_ids: z.string().describe("Comma-separated datasource IDs (e.g. AWS Account IDs)"),
|
|
34
|
-
});
|
|
35
|
-
// Schema for list_control_resources
|
|
36
|
-
export const ListControlResourcesSchema = z.object({
|
|
37
|
-
control_name: z.string().describe("Name of the compliance control"),
|
|
38
|
-
datasource_ids: z.string().describe("Comma-separated datasource IDs (e.g. AWS Account IDs)"),
|
|
39
|
-
page: z.number().optional().describe("Page number starting from 1"),
|
|
40
|
-
page_size: z.number().optional().describe("Page size"),
|
|
41
|
-
});
|
|
42
|
-
/**
|
|
43
|
-
* List all compliance frameworks available for cloud resources.
|
|
44
|
-
*/
|
|
45
|
-
export async function listComplianceFrameworks(client, datasourceIds, page, pageSize) {
|
|
46
|
-
const params = {};
|
|
47
|
-
if (datasourceIds) {
|
|
48
|
-
params.datasource_ids = datasourceIds;
|
|
49
|
-
}
|
|
50
|
-
if (page !== undefined) {
|
|
51
|
-
params.page = page;
|
|
52
|
-
}
|
|
53
|
-
if (pageSize !== undefined) {
|
|
54
|
-
params.page_size = pageSize;
|
|
55
|
-
}
|
|
56
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/compliance/cloud/frameworks`, params);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* List all requirements for a specific compliance framework.
|
|
60
|
-
*/
|
|
61
|
-
export async function listFrameworkRequirements(client, frameworkName, datasourceIds, page, pageSize) {
|
|
62
|
-
const params = { datasource_ids: datasourceIds };
|
|
63
|
-
if (page !== undefined) {
|
|
64
|
-
params.page = page;
|
|
65
|
-
}
|
|
66
|
-
if (pageSize !== undefined) {
|
|
67
|
-
params.page_size = pageSize;
|
|
68
|
-
}
|
|
69
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/compliance/cloud/frameworks/${encodeURIComponent(frameworkName)}/requirements`, params);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* List controls associated with a specific requirement within a compliance framework.
|
|
73
|
-
*/
|
|
74
|
-
export async function listRequirementControls(client, frameworkName, requirementId, datasourceIds, page, pageSize) {
|
|
75
|
-
const params = { datasource_ids: datasourceIds };
|
|
76
|
-
if (page !== undefined) {
|
|
77
|
-
params.page = page;
|
|
78
|
-
}
|
|
79
|
-
if (pageSize !== undefined) {
|
|
80
|
-
params.page_size = pageSize;
|
|
81
|
-
}
|
|
82
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/compliance/cloud/frameworks/${encodeURIComponent(frameworkName)}/requirements/${encodeURIComponent(requirementId)}/controls`, params);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* List all compliance control summaries for the account.
|
|
86
|
-
*/
|
|
87
|
-
export async function listComplianceControls(client, status, providers, page, pageSize) {
|
|
88
|
-
const params = {};
|
|
89
|
-
if (status) {
|
|
90
|
-
params.status = status;
|
|
91
|
-
}
|
|
92
|
-
if (providers) {
|
|
93
|
-
params.providers = providers;
|
|
94
|
-
}
|
|
95
|
-
if (page !== undefined) {
|
|
96
|
-
params.page = page;
|
|
97
|
-
}
|
|
98
|
-
if (pageSize !== undefined) {
|
|
99
|
-
params.page_size = pageSize;
|
|
100
|
-
}
|
|
101
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/compliance/cloud/controls`, params);
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Get details for a specific compliance control.
|
|
105
|
-
*/
|
|
106
|
-
export async function getComplianceControl(client, controlName, datasourceIds) {
|
|
107
|
-
const params = { datasource_ids: datasourceIds };
|
|
108
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/compliance/cloud/controls/${encodeURIComponent(controlName)}`, params);
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* List resources associated with a specific compliance control.
|
|
112
|
-
*/
|
|
113
|
-
export async function listControlResources(client, controlName, datasourceIds, page, pageSize) {
|
|
114
|
-
const params = { datasource_ids: datasourceIds };
|
|
115
|
-
if (page !== undefined) {
|
|
116
|
-
params.page = page;
|
|
117
|
-
}
|
|
118
|
-
if (pageSize !== undefined) {
|
|
119
|
-
params.page_size = pageSize;
|
|
120
|
-
}
|
|
121
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/compliance/cloud/controls/${encodeURIComponent(controlName)}/resources`, params);
|
|
122
|
-
}
|
|
123
|
-
//# sourceMappingURL=cloud-compliance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-compliance.js","sourceRoot":"","sources":["../../src/operations/cloud-compliance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,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B,MAAM,MAAM,GAAwB,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC;IACtE,OAAO,MAAM,CAAC,WAAW,CACvB,aAAa,MAAM,CAAC,YAAY,EAAE,8BAA8B,kBAAkB,CAAC,WAAW,CAAC,EAAE,EACjG,MAAM,CACP,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAyB,EACzB,WAAmB,EACnB,aAAqB,EACrB,IAAa,EACb,QAAiB;IAEjB,MAAM,MAAM,GAAwB,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC;IAEtE,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,CACvB,aAAa,MAAM,CAAC,YAAY,EAAE,8BAA8B,kBAAkB,CAAC,WAAW,CAAC,YAAY,EAC3G,MAAM,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { RadSecurityClient } from "../client.js";
|
|
3
|
-
declare const ProviderTypeEnum: z.ZodEnum<["aws", "gcp", "azure", "linode"]>;
|
|
4
|
-
type ProviderType = z.infer<typeof ProviderTypeEnum>;
|
|
5
|
-
export declare const ListCloudResourcesSchema: z.ZodObject<{
|
|
6
|
-
provider: z.ZodEnum<["aws", "gcp", "azure", "linode"]>;
|
|
7
|
-
filters: z.ZodOptional<z.ZodString>;
|
|
8
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
-
q: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
limit: number;
|
|
13
|
-
provider: "aws" | "gcp" | "azure" | "linode";
|
|
14
|
-
filters?: string | undefined;
|
|
15
|
-
offset?: number | undefined;
|
|
16
|
-
q?: string | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
provider: "aws" | "gcp" | "azure" | "linode";
|
|
19
|
-
filters?: string | undefined;
|
|
20
|
-
offset?: number | undefined;
|
|
21
|
-
limit?: number | undefined;
|
|
22
|
-
q?: string | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
export declare const GetCloudResourceDetailsSchema: z.ZodObject<{
|
|
25
|
-
provider: z.ZodEnum<["aws", "gcp", "azure", "linode"]>;
|
|
26
|
-
resource_type: z.ZodString;
|
|
27
|
-
resource_id: z.ZodString;
|
|
28
|
-
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
provider: "aws" | "gcp" | "azure" | "linode";
|
|
30
|
-
resource_type: string;
|
|
31
|
-
resource_id: string;
|
|
32
|
-
}, {
|
|
33
|
-
provider: "aws" | "gcp" | "azure" | "linode";
|
|
34
|
-
resource_type: string;
|
|
35
|
-
resource_id: string;
|
|
36
|
-
}>;
|
|
37
|
-
export declare const GetCloudResourceFacetsSchema: z.ZodObject<{
|
|
38
|
-
provider: z.ZodEnum<["aws", "gcp", "azure", "linode"]>;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
provider: "aws" | "gcp" | "azure" | "linode";
|
|
41
|
-
}, {
|
|
42
|
-
provider: "aws" | "gcp" | "azure" | "linode";
|
|
43
|
-
}>;
|
|
44
|
-
export declare const GetCloudResourceFacetValuesSchema: z.ZodObject<{
|
|
45
|
-
provider: z.ZodEnum<["aws", "gcp", "azure", "linode"]>;
|
|
46
|
-
facet_id: z.ZodString;
|
|
47
|
-
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
provider: "aws" | "gcp" | "azure" | "linode";
|
|
49
|
-
facet_id: string;
|
|
50
|
-
}, {
|
|
51
|
-
provider: "aws" | "gcp" | "azure" | "linode";
|
|
52
|
-
facet_id: string;
|
|
53
|
-
}>;
|
|
54
|
-
/**
|
|
55
|
-
* List cloud resources for a specific provider.
|
|
56
|
-
*/
|
|
57
|
-
export declare function listCloudResources(client: RadSecurityClient, provider: ProviderType, filters?: string, offset?: number, limit?: number, q?: string): Promise<any>;
|
|
58
|
-
/**
|
|
59
|
-
* Get details for a specific cloud resource.
|
|
60
|
-
*/
|
|
61
|
-
export declare function getCloudResourceDetails(client: RadSecurityClient, provider: ProviderType, resource_type: string, resource_id: string): Promise<any>;
|
|
62
|
-
/**
|
|
63
|
-
* Get available facets for a provider.
|
|
64
|
-
*/
|
|
65
|
-
export declare function getCloudResourceFacets(client: RadSecurityClient, provider: ProviderType): Promise<any>;
|
|
66
|
-
/**
|
|
67
|
-
* Get values for a specific facet.
|
|
68
|
-
*/
|
|
69
|
-
export declare function getCloudResourceFacetValues(client: RadSecurityClient, provider: ProviderType, facet_id: string): Promise<any>;
|
|
70
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
// Define provider type using Zod enum
|
|
3
|
-
const ProviderTypeEnum = z.enum(["aws", "gcp", "azure", "linode"]);
|
|
4
|
-
// Schema for list_cloud_resources
|
|
5
|
-
export const ListCloudResourcesSchema = z.object({
|
|
6
|
-
provider: ProviderTypeEnum.describe("Cloud provider (aws, gcp, azure, linode)"),
|
|
7
|
-
filters: z.string().optional().describe("Filter string (e.g., 'resource_type:EC2NetworkInterface,resource_type:SQSQueue,aws_account:123456789012,compliance:not_compliant')"),
|
|
8
|
-
offset: z.number().optional().describe("Pagination offset. Default: 0"),
|
|
9
|
-
limit: z.number().optional().default(20).describe("Maximum number of results to return"),
|
|
10
|
-
q: z.string().optional().describe("Free text search query"),
|
|
11
|
-
});
|
|
12
|
-
// Schema for get_resource_details
|
|
13
|
-
export const GetCloudResourceDetailsSchema = z.object({
|
|
14
|
-
provider: ProviderTypeEnum.describe("Cloud provider (aws, gcp, azure, linode)"),
|
|
15
|
-
resource_type: z.string().describe("Type of cloud resource (to be fetched from get_cloud_resource_facet_values or from list_cloud_resources)"),
|
|
16
|
-
resource_id: z.string().describe("ID of the cloud resource"),
|
|
17
|
-
});
|
|
18
|
-
// Schema for get_facets
|
|
19
|
-
export const GetCloudResourceFacetsSchema = z.object({
|
|
20
|
-
provider: ProviderTypeEnum.describe("Cloud provider (aws, gcp, azure, linode)"),
|
|
21
|
-
});
|
|
22
|
-
// Schema for get_cloud_resource_facet_values
|
|
23
|
-
export const GetCloudResourceFacetValuesSchema = z.object({
|
|
24
|
-
provider: ProviderTypeEnum.describe("Cloud provider (aws, gcp, azure, linode)"),
|
|
25
|
-
facet_id: z.string().describe("ID of the facet"),
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* List cloud resources for a specific provider.
|
|
29
|
-
*/
|
|
30
|
-
export async function listCloudResources(client, provider, filters, offset, limit = 20, q) {
|
|
31
|
-
const params = { limit };
|
|
32
|
-
if (filters) {
|
|
33
|
-
params.filter = filters;
|
|
34
|
-
}
|
|
35
|
-
if (offset !== undefined) {
|
|
36
|
-
params.offset = offset;
|
|
37
|
-
}
|
|
38
|
-
if (q) {
|
|
39
|
-
params.q = q;
|
|
40
|
-
}
|
|
41
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/cloud-inventory/v1/${provider}`, params);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Get details for a specific cloud resource.
|
|
45
|
-
*/
|
|
46
|
-
export async function getCloudResourceDetails(client, provider, resource_type, resource_id) {
|
|
47
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/cloud-inventory/v1/${provider}/${resource_type}/${resource_id}`);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Get available facets for a provider.
|
|
51
|
-
*/
|
|
52
|
-
export async function getCloudResourceFacets(client, provider) {
|
|
53
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/cloud-inventory/v1/${provider}/facets`);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Get values for a specific facet.
|
|
57
|
-
*/
|
|
58
|
-
export async function getCloudResourceFacetValues(client, provider, facet_id) {
|
|
59
|
-
return client.makeRequest(`/accounts/${client.getAccountId()}/cloud-inventory/v1/${provider}/facets/${facet_id}`);
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=cloud-inventory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-inventory.js","sourceRoot":"","sources":["../../src/operations/cloud-inventory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,sCAAsC;AACtC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGnE,kCAAkC;AAClC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC/E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oIAAoI,CAAC;IAC7K,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IACvE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IACxF,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;CAC5D,CAAC,CAAC;AAEH,kCAAkC;AAClC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC/E,aA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OAAO,MAAM,CAAC,WAAW,CACvB,aAAa,MAAM,CAAC,YAAY,EAAE,uBAAuB,QAAQ,IAAI,aAAa,IAAI,WAAW,EAAE,CACpG,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAyB,EACzB,QAAsB;IAEtB,OAAO,MAAM,CAAC,WAAW,CACvB,aAAa,MAAM,CAAC,YAAY,EAAE,uBAAuB,QAAQ,SAAS,CAC3E,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,MAAyB,EACzB,QAAsB,EACtB,QAAgB;IAEhB,OAAO,MAAM,CAAC,WAAW,CACvB,aAAa,MAAM,CAAC,YAAY,EAAE,uBAAuB,QAAQ,WAAW,QAAQ,EAAE,CACvF,CAAC;AACJ,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const getCveSchema: z.ZodObject<{
|
|
3
|
-
cveId: z.ZodString;
|
|
4
|
-
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
cveId: string;
|
|
6
|
-
}, {
|
|
7
|
-
cveId: string;
|
|
8
|
-
}>;
|
|
9
|
-
export declare const searchCvesSchema: z.ZodObject<{
|
|
10
|
-
vendor: z.ZodString;
|
|
11
|
-
product: z.ZodOptional<z.ZodString>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
vendor: string;
|
|
14
|
-
product?: string | undefined;
|
|
15
|
-
}, {
|
|
16
|
-
vendor: string;
|
|
17
|
-
product?: string | undefined;
|
|
18
|
-
}>;
|
|
19
|
-
export declare function listCveVendors(): Promise<any>;
|
|
20
|
-
export declare function listCveProducts(vendor: string): Promise<any>;
|
|
21
|
-
export declare function searchCves(vendor: string, product?: string): Promise<any>;
|
|
22
|
-
export declare function getCve(cveId: string): Promise<any>;
|
|
23
|
-
export declare function getLatest30Cves(): Promise<any>;
|
package/dist/operations/cves.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
// Base URL for the CVE Search API
|
|
3
|
-
const BASE_URL = "https://cve.circl.lu/api";
|
|
4
|
-
// Input schemas
|
|
5
|
-
export const getCveSchema = z.object({
|
|
6
|
-
cveId: z.string().describe("CVE ID to retrieve information for"),
|
|
7
|
-
});
|
|
8
|
-
export const searchCvesSchema = z.object({
|
|
9
|
-
vendor: z.string().describe("Vendor name to search for"),
|
|
10
|
-
product: z.string().optional().describe("Product name to search for"),
|
|
11
|
-
});
|
|
12
|
-
// Main functions
|
|
13
|
-
export async function listCveVendors() {
|
|
14
|
-
const response = await fetch(`${BASE_URL}/browse`);
|
|
15
|
-
if (!response.ok) {
|
|
16
|
-
throw new Error(`Failed to list vendors: ${response.statusText}`);
|
|
17
|
-
}
|
|
18
|
-
return response.json();
|
|
19
|
-
}
|
|
20
|
-
export async function listCveProducts(vendor) {
|
|
21
|
-
const response = await fetch(`${BASE_URL}/browse/${encodeURIComponent(vendor)}`);
|
|
22
|
-
if (!response.ok) {
|
|
23
|
-
throw new Error(`Failed to list products for vendor ${vendor}: ${response.statusText}`);
|
|
24
|
-
}
|
|
25
|
-
return response.json();
|
|
26
|
-
}
|
|
27
|
-
export async function searchCves(vendor, product) {
|
|
28
|
-
const url = product
|
|
29
|
-
? `${BASE_URL}/search/${encodeURIComponent(vendor)}/${encodeURIComponent(product)}`
|
|
30
|
-
: `${BASE_URL}/search/${encodeURIComponent(vendor)}`;
|
|
31
|
-
const response = await fetch(url);
|
|
32
|
-
if (!response.ok) {
|
|
33
|
-
throw new Error(`Failed to search CVEs: ${response.statusText}`);
|
|
34
|
-
}
|
|
35
|
-
return response.json();
|
|
36
|
-
}
|
|
37
|
-
export async function getCve(cveId) {
|
|
38
|
-
const response = await fetch(`${BASE_URL}/cve/${encodeURIComponent(cveId)}`);
|
|
39
|
-
if (!response.ok) {
|
|
40
|
-
throw new Error(`Failed to get CVE ${cveId}: ${response.statusText}`);
|
|
41
|
-
}
|
|
42
|
-
return response.json();
|
|
43
|
-
}
|
|
44
|
-
export async function getLatest30Cves() {
|
|
45
|
-
const response = await fetch(`${BASE_URL}/last`);
|
|
46
|
-
if (!response.ok) {
|
|
47
|
-
throw new Error(`Failed to get last CVEs: ${response.statusText}`);
|
|
48
|
-
}
|
|
49
|
-
return response.json();
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=cves.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cves.js","sourceRoot":"","sources":["../../src/operations/cves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,kCAAkC;AAClC,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAE5C,gBAAgB;AAChB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;CACjE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IACxD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;CACtE,CAAC,CAAC;AAEH,iBAAiB;AACjB,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,QAAQ,SAAS,CAAC,CAAC;IACnD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,2BAA2B,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAED,M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AC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,QAAQ,OAAO,CAAC,CAAC;IACjD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { RadSecurityClient } from "../client.js";
|
|
3
|
-
declare const IdentityTypeEnum: z.ZodEnum<["k8s_service_account", "k8s_user", "k8s_group"]>;
|
|
4
|
-
type IdentityType = z.infer<typeof IdentityTypeEnum>;
|
|
5
|
-
export declare const ListIdentitiesSchema: z.ZodObject<{
|
|
6
|
-
identity_types: z.ZodOptional<z.ZodArray<z.ZodEnum<["k8s_service_account", "k8s_user", "k8s_group"]>, "many">>;
|
|
7
|
-
cluster_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
page_size: z.ZodOptional<z.ZodNumber>;
|
|
10
|
-
q: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
q?: string | undefined;
|
|
13
|
-
page?: number | undefined;
|
|
14
|
-
page_size?: number | undefined;
|
|
15
|
-
cluster_ids?: string[] | undefined;
|
|
16
|
-
identity_types?: ("k8s_service_account" | "k8s_user" | "k8s_group")[] | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
q?: string | undefined;
|
|
19
|
-
page?: number | undefined;
|
|
20
|
-
page_size?: number | undefined;
|
|
21
|
-
cluster_ids?: string[] | undefined;
|
|
22
|
-
identity_types?: ("k8s_service_account" | "k8s_user" | "k8s_group")[] | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
export declare const GetIdentityDetailsSchema: z.ZodObject<{
|
|
25
|
-
identity_id: z.ZodString;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
identity_id: string;
|
|
28
|
-
}, {
|
|
29
|
-
identity_id: string;
|
|
30
|
-
}>;
|
|
31
|
-
export declare function listIdentities(client: RadSecurityClient, identityTypes?: IdentityType[], clusterIds?: string[], page?: number, page_size?: number, q?: string): Promise<any>;
|
|
32
|
-
export declare function getIdentityDetails(client: RadSecurityClient, identityId: string): Promise<any>;
|
|
33
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
const IdentityTypeEnum = z.enum(["k8s_service_account", "k8s_user", "k8s_group"]);
|
|
3
|
-
export const ListIdentitiesSchema = z.object({
|
|
4
|
-
identity_types: z.array(IdentityTypeEnum).optional().describe("Identity types to get"),
|
|
5
|
-
cluster_ids: z.array(z.string()).optional().describe("Cluster IDs to get identities for"),
|
|
6
|
-
page: z.number().optional().describe("Page number to get. Default: 1"),
|
|
7
|
-
page_size: z.number().optional().describe("Page size to get. Default: 10"),
|
|
8
|
-
q: z.string().optional().describe("Query to filter identities"),
|
|
9
|
-
});
|
|
10
|
-
export const GetIdentityDetailsSchema = z.object({
|
|
11
|
-
identity_id: z.string().describe("Identity ID to get details for"),
|
|
12
|
-
});
|
|
13
|
-
export async function listIdentities(client, identityTypes = [], clusterIds = [], page = 1, page_size = 10, q = "") {
|
|
14
|
-
const identities = await client.makeRequest(`/accounts/${client.getAccountId()}/identities`, {
|
|
15
|
-
identity_types: identityTypes.join(","),
|
|
16
|
-
identity_sources: clusterIds.join(","),
|
|
17
|
-
page,
|
|
18
|
-
page_size,
|
|
19
|
-
q,
|
|
20
|
-
});
|
|
21
|
-
return identities;
|
|
22
|
-
}
|
|
23
|
-
export async function getIdentityDetails(client, identityId) {
|
|
24
|
-
const identity = await client.makeRequest(`/accounts/${client.getAccountId()}/identities/${identityId}`);
|
|
25
|
-
if (!identity) {
|
|
26
|
-
throw new Error(`No identity found with ID: ${identityId}`);
|
|
27
|
-
}
|
|
28
|
-
return identity;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=identities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identities.js","sourceRoot":"","sources":["../../src/operations/identities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,qBAAqB,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AAGlF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACtF,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACzF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IACtE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAC1E,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;CAChE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;CACnE,CAAC,CAAC;AAEH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAAyB,EACzB,gBAAgC,EAAE,EAClC,aAAuB,EAAE,EACzB,OAAe,CAAC,EAChB,YAAoB,EAAE,EACtB,IAAY,EAAE;IAEd,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,WAAW,CACzC,aAAa,MAAM,CAAC,YAAY,EAAE,aAAa,EAC/C;QACE,cAAc,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC;QACvC,gBAAgB,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC;QACtC,IAAI;QACJ,SAAS;QACT,CAAC;KACF,CACF,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACpC,MAAyB,EACzB,UAAkB;IAElB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CACvC,aAAa,MAAM,CAAC,YAAY,EAAE,eAAe,UAAU,EAAE,CAC9D,CAAC;IAEF,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,8BAA8B,UAAU,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { RadSecurityClient } from "../client.js";
|
|
3
|
-
export declare const ListKubernetesResourceMisconfigurationsSchema: z.ZodObject<{
|
|
4
|
-
resource_uid: z.ZodString;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
resource_uid: string;
|
|
7
|
-
}, {
|
|
8
|
-
resource_uid: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const GetKubernetesResourceMisconfigurationDetailsSchema: z.ZodObject<{
|
|
11
|
-
cluster_id: z.ZodString;
|
|
12
|
-
misconfig_id: z.ZodString;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
cluster_id: string;
|
|
15
|
-
misconfig_id: string;
|
|
16
|
-
}, {
|
|
17
|
-
cluster_id: string;
|
|
18
|
-
misconfig_id: string;
|
|
19
|
-
}>;
|
|
20
|
-
export declare const ListKubernetesResourceMisconfigurationPoliciesSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
21
|
-
export declare function listKubernetesResourceMisconfigurations(client: RadSecurityClient, resourceUid: string): Promise<any>;
|
|
22
|
-
export declare function getKubernetesResourceMisconfigurationDetails(client: RadSecurityClient, clusterId: string, misconfigId: string): Promise<any>;
|
|
23
|
-
export declare function listKubernetesResourceMisconfigurationPolicies(): Promise<any>;
|