Skip to main content
Glama
code-alchemist01

MCP Cloud Services Server

scan_security_issues

Scan cloud resources for security issues to identify vulnerabilities and ensure compliance across AWS, Azure, and GCP environments.

Instructions

Scan cloud resources for security issues

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerYesCloud provider
resourceIdNoSpecific resource ID to scan (optional)

Implementation Reference

  • Core handler logic for the 'scan_security_issues' tool. Generates mock security findings based on provider and optional resourceId, then formats the output.
    case 'scan_security_issues': { const resourceId = params.resourceId as string | undefined; // Simplified security scanning const findings: SecurityFinding[] = [ { id: '1', severity: 'medium', title: 'Public S3 Bucket Detected', description: 'Some S3 buckets may be publicly accessible', resourceId: resourceId || 'all', resourceType: 'storage', provider, recommendation: 'Review bucket policies and ensure proper access controls', detectedAt: new Date(), category: 'access-control', }, { id: '2', severity: 'high', title: 'Unencrypted Storage', description: 'Storage resources without encryption detected', resourceId: resourceId || 'all', resourceType: 'storage', provider, recommendation: 'Enable encryption at rest for all storage resources', detectedAt: new Date(), category: 'encryption', }, ]; return Formatters.formatSecurityFindings(findings); }
  • Tool schema definition including name, description, and inputSchema for validation.
    { name: 'scan_security_issues', description: 'Scan cloud resources for security issues', inputSchema: { type: 'object', properties: { provider: { type: 'string', enum: ['aws', 'azure', 'gcp'], description: 'Cloud provider', }, resourceId: { type: 'string', description: 'Specific resource ID to scan (optional)', }, }, required: ['provider'], }, },
  • src/server.ts:19-27 (registration)
    Registration of securityTools (containing scan_security_issues) into the combined allTools list used for tool listing.
    const allTools = [ ...awsTools, ...azureTools, ...gcpTools, ...resourceManagementTools, ...costAnalysisTools, ...monitoringTools, ...securityTools, ];
  • src/server.ts:76-78 (registration)
    Dispatch registration: routes calls to tools in securityTools (including scan_security_issues) to the handleSecurityTool function.
    } else if (securityTools.some((t) => t.name === name)) { result = await handleSecurityTool(name, args || {}); } else {
  • Helper function used by the handler to format security findings into a markdown report.
    static formatSecurityFindings(findings: SecurityFinding[]): string { let output = `# Security Findings\n\n`; output += `**Total Findings:** ${findings.length}\n\n`; const bySeverity = { critical: findings.filter((f) => f.severity === 'critical'), high: findings.filter((f) => f.severity === 'high'), medium: findings.filter((f) => f.severity === 'medium'), low: findings.filter((f) => f.severity === 'low'), }; output += `- Critical: ${bySeverity.critical.length}\n`; output += `- High: ${bySeverity.high.length}\n`; output += `- Medium: ${bySeverity.medium.length}\n`; output += `- Low: ${bySeverity.low.length}\n\n`; if (findings.length > 0) { output += '## Findings\n\n'; for (const finding of findings.slice(0, 20)) { const severityIcon = { critical: '🔴', high: '🟠', medium: '🟡', low: '🟢', }[finding.severity]; output += `### ${severityIcon} ${finding.title}\n\n`; output += `- **Severity:** ${finding.severity}\n`; output += `- **Provider:** ${finding.provider.toUpperCase()}\n`; output += `- **Resource:** ${finding.resourceId}\n`; output += `- **Type:** ${finding.resourceType}\n`; output += `- **Description:** ${finding.description}\n`; output += `- **Recommendation:** ${finding.recommendation}\n`; output += `- **Detected:** ${finding.detectedAt.toISOString()}\n\n`; } if (findings.length > 20) { output += `\n... and ${findings.length - 20} more findings\n`; } } return output; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/code-alchemist01/Cloud-mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server