list_threat_vectors
Identify and retrieve threat vectors in Kubernetes and cloud environments by specifying clusters, namespaces, or resources. Designed for security insights and risk mitigation within RAD Security.
Instructions
List threat vectors
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clustersIds | No | Cluster ids to check for threat vectors | |
| namespaces | No | Namespaces to check for threat vectors | |
| page | No | Page number to retrieve | |
| page_size | No | Number of items per page | |
| resource_uid | No | Threat vector associated with this resource |
Implementation Reference
- src/operations/threats.ts:14-37 (handler)The main execution logic for the 'list_threat_vectors' tool. This function constructs query parameters and makes an API request to retrieve threat vector instances from the RAD Security API.export async function listThreatVectors( client: RadSecurityClient, clustersIds: string[] | undefined, namespaces: string[] | undefined, resourceUid: string | undefined, page: number = 1, pageSize: number = 20 ): Promise<any> { const params = { associated_with_resource_uid: resourceUid, clusters: clustersIds, namespaces: namespaces, statuses: "Open", page_size: pageSize, page: page, }; const response = await client.makeRequest( `/accounts/${client.getAccountId()}/threat_vector_instances/v2`, params ); // Return the transformed response return response; }
- src/operations/threats.ts:5-11 (schema)Zod input schema defining the parameters for the 'list_threat_vectors' tool, used for validation.export const listThreatVectorsSchema = z.object({ clustersIds: z.array(z.string()).optional().describe("Cluster ids to check for threat vectors"), namespaces: z.array(z.string()).optional().describe("Namespaces to check for threat vectors"), resource_uid: z.string().optional().describe("Threat vector associated with this resource"), page: z.number().optional().default(1).describe("Page number to retrieve"), page_size: z.number().optional().default(20).describe("Number of items per page"), });
- src/index.ts:274-280 (registration)Registration of the 'list_threat_vectors' tool in the MCP server's listTools response, conditionally enabled based on toolkit filters....(isToolkitEnabled("threats", toolkitFilters) ? [ { name: "list_threat_vectors", description: "List threat vectors", inputSchema: zodToJsonSchema(threats.listThreatVectorsSchema), }, ] : []),
- src/index.ts:666-672 (handler)Dispatch handler in the MCP server's callTool request that parses arguments, invokes the tool handler, and formats the response.case "list_threat_vectors": { const args = threats.listThreatVectorsSchema.parse(request.params.arguments); const response = await threats.listThreatVectors(client, args.clustersIds, args.namespaces, args.resource_uid, args.page, args.page_size); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; }