get_image_sbom
Generate a Software Bill of Materials (SBOM) for container images using the image digest to identify dependencies and components for security analysis.
Instructions
Get the SBOM of a container image
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| digest | Yes | Image digest (required for SBOM) |
Implementation Reference
- src/operations/images.ts:117-124 (handler)The handler function that executes the tool logic by making an API request to download the SBOM for the specified image digest.export async function getImageSBOM( client: RadSecurityClient, digest: string ): Promise<any> { return client.makeRequest( `/accounts/${client.getAccountId()}/sboms/${digest}/download`, ); }
- src/operations/images.ts:19-21 (schema)Zod schema defining the input parameters for the get_image_sbom tool (requires image digest).export const GetImageSBOMSchema = z.object({ digest: z.string().describe("Image digest (required for SBOM)"), });
- src/index.ts:200-204 (registration)Tool registration in the listTools handler, defining name, description, and input schema.{ name: "get_image_sbom", description: "Get the SBOM of a container image", inputSchema: zodToJsonSchema(images.GetImageSBOMSchema), },
- src/index.ts:550-556 (registration)Dispatch handler in the CallToolRequest switch statement that parses args and calls the getImageSBOM function.case "get_image_sbom": { const args = images.GetImageSBOMSchema.parse(request.params.arguments); const response = await images.getImageSBOM(client, args.digest); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; }