get_k8s_resource_misconfig
Identify and analyze specific Kubernetes resource misconfigurations by providing cluster and misconfiguration IDs. Part of RAD Security's AI-powered tools for enhancing Kubernetes and cloud environment security.
Instructions
Get detailed information about a specific Kubernetes resource misconfiguration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes | ID of the cluster to get misconfiguration for | |
| misconfig_id | Yes | ID of the misconfiguration to get details for |
Implementation Reference
- src/operations/misconfigs.ts:47-61 (handler)The handler function that executes the tool logic by making an API request to retrieve detailed information about a specific Kubernetes resource misconfiguration.export async function getKubernetesResourceMisconfigurationDetails( client: RadSecurityClient, clusterId: string, misconfigId: string ): Promise<any> { const response = await client.makeRequest( `/accounts/${client.getAccountId()}/clusters/${clusterId}/misconfig/${misconfigId}` ); if (!response) { throw new Error(`No misconfiguration found with ID: ${misconfigId}`); } return response; }
- src/operations/misconfigs.ts:8-11 (schema)Zod schema defining the input parameters for the tool: cluster_id and misconfig_id.export const GetKubernetesResourceMisconfigurationDetailsSchema = z.object({ cluster_id: z.string().describe("ID of the cluster to get misconfiguration for"), misconfig_id: z.string().describe("ID of the misconfiguration to get details for"), });
- src/index.ts:227-230 (registration)Registration of the tool in the listTools response, specifying name, description, and input schema.name: "get_k8s_resource_misconfig", description: "Get detailed information about a specific Kubernetes resource misconfiguration", inputSchema: zodToJsonSchema(misconfigs.GetKubernetesResourceMisconfigurationDetailsSchema), },
- src/index.ts:594-604 (registration)Dispatch case in the CallToolRequest handler that invokes the tool's handler function with parsed arguments.case "get_k8s_resource_misconfig": { const args = misconfigs.GetKubernetesResourceMisconfigurationDetailsSchema.parse(request.params.arguments); const response = await misconfigs.getKubernetesResourceMisconfigurationDetails( client, args.cluster_id, args.misconfig_id ); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; }