Skip to main content
Glama
aws-samples

MCP Security Scanner

Official
by aws-samples

MCP Security Scanner: Real-Time Protection for AI Code Assistants

This pattern describes how to implement a Model Context Protocol (MCP) server that integrates four industry-standard security scanning tools (Checkov, Semgrep, Bandit, and ASH) to provide comprehensive code security analysis. The server enables AI coding assistants to automatically scan code snippets and Infrastructure as Code (IaC) configurations for security vulnerabilities, misconfigurations, and compliance violations.

The solution combines Checkov for scanning IaC files (including Terraform, CloudFormation, and Kubernetes manifests), Semgrep for analyzing multiple programming languages (such as Python, JavaScript, Java, and others), Bandit for specialized Python security scanning, and ASH (Automated Security Helper) for comprehensive multi-tool scanning with aggregated results.

It provides a unified interface for security scanning with standardized response formats, making it easier to integrate security checks into development workflows. The pattern uses Python and the MCP framework to deliver automated security feedback, helping developers identify and address security issues early in the development process while learning about security best practices through detailed findings.

This pattern is particularly valuable for organizations looking to enhance their development security practices through AI-assisted coding tools, providing continuous security scanning capabilities across multiple programming languages and infrastructure definitions.

Key features:

  • Delta scanning of new code segments, reducing computational overhead

  • Isolated security tool environments preventing cross-tool contamination

  • Seamless integration with AI tools (Amazon Q Developer, Kiro, others)

  • Real-time security feedback during code generation

  • Customizable scanning rules for organizational compliance

Demo

Code Scanning Demo

Try these sample prompts with your AI assistant:

  1. "Scan the current script and tell me the results"

  2. "Scan lines 20-60 and tell me the results"

  3. "Scan this Amazon DynamoDB table resource and tell me the result"

Code Scanning Demo

Code Generation with Security Scanning Demo

Try these sample prompts to generate secure code:

  1. "Generate a Terraform configuration to create a DynamoDB table with encryption enabled and scan it for security issues"

  2. "Create a Python Lambda function that writes to DynamoDB and scan it for vulnerabilities"

  3. "Generate a CloudFormation template for an S3 bucket with proper security settings and verify it passes security checks"

  4. "Write a Python script to query DynamoDB with pagination and scan for security best practices"

  5. "Create a Kubernetes deployment manifest for a microservice with security hardening and validate it"

Code Generation Demo

Related MCP server: Security-Use MCP Server

Architecture

Architecture Diagram

Features

This MCP server enables AI assistants to perform comprehensive security analysis on code snippets using four powerful security scanning tools:

šŸ›”ļø Checkov - Infrastructure as Code Security

  • Scans Infrastructure as Code (IaC) files for security misconfigurations

  • Supports: Terraform, CloudFormation, Kubernetes, Dockerfile, ARM, Bicep, and more

  • Detects compliance violations and security best practices

šŸ” Semgrep - Source Code Security

  • Analyzes source code for security vulnerabilities and bugs

  • Supports: Python, JavaScript, TypeScript, Java, Go, C/C++, C#, Ruby, PHP, Scala, Kotlin, Rust

  • Uses security-focused rulesets for comprehensive analysis

šŸ Bandit - Python Security Specialist

  • Specialized Python security scanner

  • Detects common Python security issues like insecure functions, hardcoded secrets, injection vulnerabilities

  • Provides detailed confidence and severity ratings

šŸš€ ASH - Automated Security Helper

  • Comprehensive multi-tool security scanner

  • Runs multiple scanners in parallel: Bandit, Checkov, cfn-nag, cdk-nag, detect-secrets, grype, syft, npm-audit

  • Delta scanning support for analyzing code changes

  • Aggregated results from all scanners with unified reporting

  • Supports all formats from the above tools plus additional scanners

  • Note: Semgrep is excluded from ASH scans to avoid duplication with the standalone scan_with_semgrep tool

šŸ“¦ Directory Scanning with File Output

  • All directory scanning tools save results to dedicated folders by default

  • Prevents context window overflow in LLM interactions

  • Output directories: .grype/, .checkov/, .bandit/, .semgrep/, .ash/, .sbom/, .trivy/

  • Returns lightweight summaries with file paths

  • Optional return_output=True parameter to get full results instead

  • Timestamped files for tracking scan history

  • See SCANNER_FILE_OUTPUT.md for details

Installation

Note: The following instructions are for macOS/Linux. For Windows and other code assistants, see the AWS MCP Repository README for platform-specific instructions.

Prerequisites

  • Python >=3.10, <=3.13

  • uv package manager (install from Astral)

  • (Optional) ASH - Automated Security Helper for comprehensive multi-tool scanning

Local Installation

This MCP server is not available via PyPI for enhanced security and control:

  • Security: Verify the exact code you're running by inspecting the repository

  • Control: Pin to specific versions and review changes before updating

  • Performance: Local caching improves startup speed and reduces network dependencies

  • Trust: Avoid potential package name confusion or use of unsecure mcp servers

You can install this server using one of two methods:

Option 1: Install from Local Path

Clone or download the repository locally:

git clone git@github.com:aws-samples/sample-mcp-security-scanner.git
cd sample-mcp-security-scanner

Then configure your MCP client to use the local path (see configuration examples below).

Option 2: Install from GitHub

Configure your MCP client to install directly from GitHub using:

git+https://github.com/aws-samples/sample-mcp-security-scanner.git@main

This method automatically downloads and installs the server without requiring a local clone (see configuration examples below).

Dependencies

The server automatically installs:

  • checkov>=3.0.0 - IaC security scanner

  • semgrep>=1.45.0 - Source code security scanner

  • bandit>=1.7.5 - Python security scanner

  • mcp[cli]>=1.11.0 - MCP framework

  • pydantic>=1.10.0 - Data validation

  • loguru>=0.6.0 - Logging

Optional: ASH Integration

For comprehensive multi-tool scanning with ASH (Automated Security Helper):

# Install ASH using uvx (recommended)
uvx git+https://github.com/awslabs/automated-security-helper.git@v3.2.5

# Or install with pip
pip install git+https://github.com/awslabs/automated-security-helper.git@v3.2.5

# Or install with pipx (isolated environment)
pipx install git+https://github.com/awslabs/automated-security-helper.git@v3.2.5

# Verify installation
ash --version

ASH provides additional scanners beyond the core three:

  • cfn-nag: CloudFormation security analysis

  • cdk-nag: AWS CDK security checks

  • detect-secrets: Secret detection in code

  • grype: Vulnerability scanning for dependencies

  • syft: Software Bill of Materials (SBOM) generation

  • npm-audit: Node.js dependency security

Note: ASH requires Python 3.10+ and uses UV for package management. Some scanners may require additional dependencies (see ASH documentation).

Usage

MCP Configuration

Configure your MCP client to use the server. The configuration varies by client and supports both local path and GitHub installation methods.

Getting Started with Kiro

See Kiro Model Context Protocol Documentation for details.

  1. Navigate Kiro > MCP Servers

  2. Add a new MCP server by clicking the Open MCP Config button.

  3. Paste one of the configurations below:

Option 1: Install from Local Path

Replace /path/to/sample-mcp-security-scanner with your actual repository path:

.kiro/settings/mcp.json (local) or ~/.kiro/settings/mcp.json (global)

{
  "mcpServers": {
    "security-scanner": {
      "command": "uvx",
      "args": [
        "--from",
        "/path/to/sample-mcp-security-scanner",
        "security_scanner_mcp_server"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "WORKSPACE_ROOT": "/path/to/your/workspace"
      },
      "timeout": 120000,
      "disabled": false,
      "autoApprove": []
    }
  }
}

Option 2: Install from GitHub

{
  "mcpServers": {
    "security-scanner": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/aws-samples/sample-mcp-security-scanner.git@main",
        "security_scanner_mcp_server"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "WORKSPACE_ROOT": "/path/to/your/workspace"
      },
      "timeout": 120000,
      "disabled": false,
      "autoApprove": []
    }
  }
}

Getting Started with Amazon Q Developer

See Amazon Q Developer documentation for details.

  1. Manual Configuration

    • Edit the MCP configuration file at ~/.aws/amazonq/mcp.json (global) or .amazonq/mcp.json (local).

    • Use one of the configurations below:

Option 1: Install from Local Path

Replace /path/to/sample-mcp-security-scanner with your actual repository path:

~/.aws/amazonq/mcp.json

{
  "mcpServers": {
    "security-scanner": {
      "command": "uvx",
      "args": [
        "--from",
        "/path/to/sample-mcp-security-scanner",
        "security_scanner_mcp_server"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "WORKSPACE_ROOT": "/path/to/your/workspace"
      },
      "timeout": 120000
    }
  }
}

Option 2: Install from GitHub

{
  "mcpServers": {
    "security-scanner": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/aws-samples/sample-mcp-security-scanner.git@main",
        "security_scanner_mcp_server"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "WORKSPACE_ROOT": "/path/to/your/workspace"
      },
      "timeout": 120000
    }
  }
}

Getting Started with Cline

  1. Install the Cline VS Code Extension.

  2. Click the extension to open it and select MCP Servers.

  3. Select the Installed tab, then click Configure MCP Servers to open the cline_mcp_settings.json file.

  4. Add one of the configurations below:

Option 1: Install from Local Path

Replace /path/to/sample-mcp-security-scanner with your actual repository path:

cline_mcp_settings.json

{
  "mcpServers": {
    "security-scanner": {
      "command": "uvx",
      "args": [
        "--from",
        "/path/to/sample-mcp-security-scanner",
        "security_scanner_mcp_server"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "WORKSPACE_ROOT": "/path/to/your/workspace"
      },
      "timeout": 120000,
      "disabled": false,
      "autoApprove": []
    }
  }
}

Option 2: Install from GitHub

{
  "mcpServers": {
    "security-scanner": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/aws-samples/sample-mcp-security-scanner.git@main",
        "security_scanner_mcp_server"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "WORKSPACE_ROOT": "/path/to/your/workspace"
      },
      "timeout": 120000,
      "disabled": false,
      "autoApprove": []
    }
  }
}

Other Code Assistants

For configuration instructions for Cursor, Windsurf, VS Code, Claude Desktop, and other MCP clients, see the AWS MCP Repository README.

Available Tools

1. scan_with_checkov

Scan Infrastructure as Code files for security issues.

Parameters:

  • code (string): IaC content to scan

  • format_type (string): Format type (terraform, cloudformation, kubernetes, dockerfile, etc.)

2. scan_with_semgrep

Scan source code for security vulnerabilities.

Parameters:

  • code (string): Source code content to scan

  • language (string): Programming language (python, javascript, java, etc.)

3. scan_with_bandit

Scan Python code for security issues (Python-specific).

Parameters:

  • code (string): Python code content to scan

4. scan_with_ash

Scan code using ASH for comprehensive multi-tool security analysis.

Parameters:

  • code (string): Code content to scan

  • file_extension (string): File extension (e.g., .py, .tf, .js, Dockerfile)

  • severity_threshold (string, optional): Minimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL). Default: MEDIUM

Features:

  • Runs multiple security scanners in parallel

  • Provides aggregated results from all applicable scanners

  • Delta scanning optimized for code snippets

  • Unified severity reporting across all tools

5. scan_with_trivy

Scan Infrastructure as Code or Dockerfile using Trivy for security issues.

Parameters:

  • code (string): Code content to scan (Dockerfile or IaC config)

  • scan_type (string, optional): Type of scan (dockerfile, terraform, kubernetes, config). Default: dockerfile

6. check_ash_availability

Check if ASH is installed and available, including which individual scanners are available.

Returns: Installation status, version information, scanner availability details, and a formatted report

Example Response:

{
  "success": true,
  "available": true,
  "version": "3.2.1",
  "message": "ASH is installed and available: 3.2.1",
  "scanner_summary": {
    "available": 6,
    "total": 9,
    "unavailable": 3
  },
  "formatted_report": "ASH Status: āœ… Installed (version 3.2.1)\nScanner Availability: 6 out of 9 scanners available\n\nāœ… Available Scanners:\n  • Bandit - Python security linter (python-based)\n  • Semgrep - Multi-language SAST (python-based)\n  • Checkov - IaC security scanner (python-based)\n  • cdk-nag - AWS CDK security scanner (npm-based)\n  • detect-secrets - Secret detection (python-based)\n  • npm-audit - Node.js dependency scanner (npm-based)\n\nāŒ Missing Scanners:\n  • cfn-nag - CloudFormation security scanner (ruby-based)\n    Install with: gem install cfn-nag\n  • Grype - Vulnerability scanner (binary)\n    Install with: Install Grype from official source\n  • Syft - SBOM generator (binary)\n    Install with: Install Syft from official source\n\nThe tool successfully shows which scanners are available and which ones need additional OS-level dependencies.",
  "scanners": {
    "bandit": {
      "name": "Bandit",
      "description": "Python security linter",
      "available": true,
      "dependency_type": "python",
      "file_types": [".py"],
      "status": "installed"
    },
    "semgrep": {
      "name": "Semgrep",
      "description": "Multi-language SAST",
      "available": true,
      "dependency_type": "python",
      "file_types": [".py", ".js", ".ts", ".java", ".go", ".rb", ".php"],
      "status": "installed"
    },
    "checkov": {
      "name": "Checkov",
      "description": "IaC security scanner",
      "available": true,
      "dependency_type": "python",
      "file_types": [".tf", ".yaml", ".yml", ".json", "Dockerfile"],
      "status": "installed"
    },
    "cfn-nag": {
      "name": "cfn-nag",
      "description": "CloudFormation security scanner",
      "available": false,
      "dependency_type": "ruby",
      "file_types": [".yaml", ".yml", ".json", ".template"],
      "status": "not installed",
      "install_hint": "gem install cfn-nag"
    },
    "cdk-nag": {
      "name": "cdk-nag",
      "description": "AWS CDK security scanner",
      "available": true,
      "dependency_type": "npm",
      "file_types": [".ts", ".js"],
      "status": "installed"
    },
    "detect-secrets": {
      "name": "detect-secrets",
      "description": "Secret detection",
      "available": true,
      "dependency_type": "python",
      "file_types": ["*"],
      "status": "installed"
    },
    "grype": {
      "name": "Grype",
      "description": "Vulnerability scanner",
      "available": false,
      "dependency_type": "binary",
      "file_types": ["*"],
      "status": "not installed",
      "install_hint": "Install Grype from official source"
    },
    "syft": {
      "name": "Syft",
      "description": "SBOM generator",
      "available": false,
      "dependency_type": "binary",
      "file_types": ["*"],
      "status": "not installed",
      "install_hint": "Install Syft from official source"
    },
    "npm-audit": {
      "name": "npm-audit",
      "description": "Node.js dependency scanner",
      "available": true,
      "dependency_type": "npm",
      "file_types": ["package.json", "package-lock.json"],
      "status": "installed"
    }
  }
}

Formatted Report Output: When you call this tool, the AI assistant will display the formatted_report field which provides a clean, readable summary:

ASH Status: āœ… Installed (version 3.2.1)
Scanner Availability: 6 out of 9 scanners available

āœ… Available Scanners:
  • Bandit - Python security linter (python-based)
  • Semgrep - Multi-language SAST (python-based) (disabled in ASH - use standalone scan_with_semgrep tool)
  • Checkov - IaC security scanner (python-based)
  • cdk-nag - AWS CDK security scanner (npm-based)
  • detect-secrets - Secret detection (python-based)
  • npm-audit - Node.js dependency scanner (npm-based)

āŒ Missing Scanners:
  • cfn-nag - CloudFormation security scanner (ruby-based)
    Install with: gem install cfn-nag
  • Grype - Vulnerability scanner (binary)
    Install with: Install Grype from official source
  • Syft - SBOM generator (binary)
    Install with: Install Syft from official source

The tool successfully shows which scanners are available and which ones need additional OS-level dependencies.

Note: Semgrep is excluded from ASH scans to avoid duplication with the standalone scan_with_semgrep tool, which provides more focused and faster scanning.

Use this tool to:

  • Verify ASH installation before running scans

  • Check which scanners are available in your environment

  • Identify missing dependencies (e.g., cfn-nag requires Ruby, grype/syft are binaries)

  • Get installation hints for missing scanners

7. get_supported_formats

Get information about supported formats and languages for all tools.

8. generate_security_report

Generate a SECURITY.md report from scan results.

Parameters:

  • project_name (string): Name of the project being analyzed

  • scan_results (string): JSON string with scan results from any scanning tool. Can be a single result object or an array of result objects.

Workflow:

  1. Scan relevant files using the appropriate scanner tools

  2. Collect all scan result JSON objects into an array

  3. Call generate_security_report with project_name and scan_results (JSON string)

  4. Save the returned report field as SECURITY.md

Report includes:

  • Executive Summary — risk level (CRITICAL/HIGH/MEDIUM/LOW) and total finding counts

  • Scan Results — breakdown by scanner, format, and severity

  • Critical & High Severity Findings — detailed per-finding info

  • Medium & Low Severity Findings — summary table

  • Threat Model Inputs — STRIDE classification

  • Compliance & Regulatory Notes — SOC2, PCI-DSS, HIPAA, GDPR observations

  • Recommendations — prioritized actions by severity tier

Directory Scanning Tools

The following tools scan entire project directories and save results to files by default to prevent context window overflow:

8. scan_directory_with_grype

Scan a project directory for dependency vulnerabilities.

Parameters:

  • directory_path (string): Path to the directory to scan

  • severity_threshold (string, optional): Minimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL). Default: MEDIUM

  • return_output (bool, optional): Return full output instead of saving to file. Default: False

Output: Saves to .grype/grype_scan_{directory}_{timestamp}.json and returns summary

9. scan_directory_with_checkov

Scan a project directory for IaC security issues.

Parameters:

  • directory_path (string): Path to the directory to scan

  • severity_threshold (string, optional): Minimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL). Default: MEDIUM

  • return_output (bool, optional): Return full output instead of saving to file. Default: False

Output: Saves to .checkov/checkov_scan_{directory}_{timestamp}.json and returns summary

10. scan_directory_with_bandit

Scan a project directory for Python security issues.

Parameters:

  • directory_path (string): Path to the directory to scan

  • severity_threshold (string, optional): Minimum severity threshold (LOW, MEDIUM, HIGH). Default: MEDIUM

  • return_output (bool, optional): Return full output instead of saving to file. Default: False

Output: Saves to .bandit/bandit_scan_{directory}_{timestamp}.json and returns summary

11. scan_directory_with_semgrep

Scan a project directory for source code security issues.

Parameters:

  • directory_path (string): Path to the directory to scan

  • severity_threshold (string, optional): Minimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL). Default: MEDIUM

  • return_output (bool, optional): Return full output instead of saving to file. Default: False

Output: Saves to .semgrep/semgrep_scan_{directory}_{timestamp}.json and returns summary

12. scan_directory_with_ash

Scan a project directory with ASH for comprehensive multi-tool security analysis.

Parameters:

  • directory_path (string): Path to the directory to scan

  • severity_threshold (string, optional): Minimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL). Default: MEDIUM

  • return_output (bool, optional): Return full output instead of saving to file. Default: False

Output: Saves to .ash/ash_scan_{directory}_{timestamp}.json and returns summary

13. scan_directory_with_syft

Generate Software Bill of Materials (SBOM) for a project directory.

Parameters:

  • directory_path (string): Path to the directory to scan

  • output_format (string, optional): Output format (json, cyclonedx-json, spdx-json, table). Default: json

  • save_sbom (bool, optional): Save full SBOM to file. Default: False (only returns summary)

Output: Saves to .sbom/sbom_{directory}_{timestamp}.{extension} and returns summary

14. scan_image_with_trivy

Scan a container image for vulnerabilities.

Parameters:

  • image_name (string): Container image to scan (e.g., nginx:latest, python:3.9)

  • severity_threshold (string, optional): Minimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL). Default: MEDIUM

  • return_output (bool, optional): Return full output instead of saving to file. Default: False

Output: Saves to .trivy/trivy_scan_{image}_{timestamp}.json and returns summary

Note: All directory scanning tools automatically save full results to dedicated folders and return lightweight summaries. Use return_output=True to get full results in the response instead. See SCANNER_FILE_OUTPUT.md for more details.

Supported Formats

Checkov (IaC)

  • terraform: .tf, .tfvars, .tfstate

  • cloudformation: .yaml, .yml, .json, .template

  • kubernetes: .yaml, .yml

  • dockerfile: Dockerfile

  • arm: .json (Azure Resource Manager)

  • bicep: .bicep

  • serverless: .yml, .yaml

  • helm: .yaml, .yml, .tpl

  • github_actions: .yml, .yaml

  • gitlab_ci: .yml, .yaml

  • ansible: .yml, .yaml

Semgrep (Source Code)

  • python: .py

  • javascript: .js

  • typescript: .ts

  • java: .java

  • go: .go

  • c: .c

  • cpp: .cpp

  • csharp: .cs

  • ruby: .rb

  • php: .php

  • scala: .scala

  • kotlin: .kt

  • rust: .rs

Bandit (Python Only)

  • python: .py files

Response Format

All scanning tools return a consistent response format:

{
  "success": true,
  "tool": "checkov|semgrep|bandit|ash",
  "format_type": "terraform",
  "language": "python", 
  "total_issues": 3,
  "findings": [
    {
      "check_id": "CKV_AWS_20",
      "severity": "HIGH",
      "description": "S3 Bucket has an ACL defined which allows public access",
      "line_number": 3,
      "resource": "aws_s3_bucket.example"
    }
  ],
  "summary": {
    "high": 1,
    "medium": 2,
    "low": 0
  }
}

Integration with AI Assistants

This MCP server is designed to work with AI coding assistants like Kiro, Amazon Q Developer, Cline and others. The AI can:

  1. Analyze generated code: Automatically scan code snippets for security issues

  2. Provide context-aware suggestions: Get language and format-specific security recommendations

  3. Continuous security feedback: Integrate security scanning into the development workflow

  4. Educational insights: Learn about security best practices through detailed findings

Kiro Power: Security Scanner

This repository is also packaged as a Kiro Power — a plug-and-play capability bundle that includes the MCP server, steering files, and documentation. Installing the power gives Kiro automatic access to all scanning tools without manual MCP configuration.

What's included

sample-mcp-security-scanner/
ā”œā”€ā”€ POWER.md                          # Power metadata and documentation (repo root)
ā”œā”€ā”€ mcp.json                          # Pre-configured MCP server (auto-approve all tools)
ā”œā”€ā”€ steering/
│   ā”œā”€ā”€ scanning-workflows.md         # Auto-included: scanner selection, scan-fix-rescan loop, report generation
│   └── secure-coding.md              # Auto-included: application, infrastructure, and dependency security rules
ā”œā”€ā”€ security_scanner_mcp_server/      # MCP server source code
ā”œā”€ā”€ agents/                           # Pre-built Kiro agent configs
ā”œā”€ā”€ hooks/                            # Kiro hook definitions
ā”œā”€ā”€ tests/                            # Test suite
└── docs/                             # Documentation, examples, and assets

How it works

  • mcp.json — Pre-configured MCP server definition with all scanning tools auto-approved. Kiro automatically starts the security scanner server when the power is installed.

  • scanning-workflows.md (auto-included steering) — Guides Kiro to pick the right scanner for each file type, run scan-fix-rescan loops, and generate SECURITY.md reports.

  • secure-coding.md (auto-included steering) — Instructs Kiro to proactively apply secure coding practices when generating or reviewing code (input validation, parameterized queries, no hardcoded secrets, strong crypto, least-privilege IAM, etc.).

Installing the power

  1. Open Kiro and navigate to the Powers panel.

  2. Click Add Custom Power.

  3. Select Import power from GitHub.

  4. Paste the repository URL and press Enter:

    https://github.com/aws-samples/sample-mcp-security-scanner

The power auto-configures the MCP server and steering files — no manual setup needed.

Usage with the power

Once installed, Kiro automatically applies the steering rules in every conversation. You can use prompts like:

  • "Scan the current file for security vulnerabilities"

  • "Scan this Terraform config, fix any issues, and re-scan until clean"

  • "Run security scans on the project and generate a SECURITY.md report"

  • "Scan the entire project directory and summarize the findings"

Kiro will automatically select the right scanner based on file type, apply secure coding practices, and follow the scan-fix-rescan workflow.

Kiro Agent: Sec-Lazio

This repository includes a pre-built Kiro agent that uses the MCP Security Scanner to provide security-first coding assistance.

Feature

Description

Auto-scan

Scans every code change with Semgrep, Bandit, or Checkov

Fix loop

Finds vulnerabilities → fixes them → re-scans until clean

SECURITY.md

Generates structured reports with STRIDE threat model

Secure by default

Applies security best practices when generating code

Compliance hints

Flags SOC2, PCI-DSS, HIPAA, GDPR relevant patterns

Quick install

# Global (all projects)
cp agents/sec-lazio/sec-lazio.json ~/.kiro/agents/

# Or project-specific
mkdir -p .kiro/agents
cp agents/sec-lazio/sec-lazio.json .kiro/agents/

Activate

/agent sec-lazio

Or use the keyboard shortcut: Ctrl+Shift+S

See agents/README.md for full documentation and example prompts.

Scanning Strategy

Use the right scanner for the job:

File type

Primary scanner

Secondary scanner

Python (.py)

scan_with_bandit

scan_with_semgrep

JavaScript (.js), TypeScript (.ts)

scan_with_semgrep

—

Java, Go, Rust, Kotlin, C#

scan_with_semgrep

—

Terraform (.tf, .tfvars)

scan_with_checkov

—

CloudFormation (.yaml, .yml, .json)

scan_with_checkov

—

Kubernetes manifests

scan_with_checkov

—

Dockerfile

scan_with_checkov

scan_with_trivy

Container images

scan_image_with_trivy

—

Dependency manifests

scan_directory_with_grype

—

Full project

scan_directory_with_* variants

—

For Python files, run both Bandit and Semgrep — they catch different classes of issues.

Severity Handling

Severity

Action

CRITICAL

Must be fixed before deployment — block the release

HIGH

Fix in the current sprint — these are exploitable vulnerabilities

MEDIUM

Triage and plan — fix in the next sprint or accept with justification

LOW

Backlog — review for risk acceptance or opportunistic fix

Development

Running Locally

# Clone and install
git clone git@github.com:aws-samples/sample-mcp-security-scanner.git
cd sample-mcp-security-scanner
uv pip install -e .

# Run the server
python -m security_scanner_mcp_server.server

Testing

The project includes several test scripts to verify functionality:

1. Comprehensive Scanner Tests

# Test all scanners (Checkov, Semgrep, Bandit, ASH)
python tests/test_scanner.py

This script tests:

  • Checkov with Terraform code (S3 bucket and security group misconfigurations)

  • Semgrep with Python code (SQL injection and hardcoded secrets)

  • Bandit with Python code (insecure pickle usage and weak crypto)

2. ASH Integration Tests

# Test ASH availability and scanning
python tests/test_ash_integration.py

This script tests:

  • ASH installation and version check

  • ASH scanning with Python code containing security issues

  • Scanner availability reporting

3. Simple Standalone Tests

# Test scanners without MCP dependencies
python tests/simple_test.py

This script tests:

  • Basic Checkov functionality

  • Basic Semgrep functionality

  • Basic Bandit functionality

  • Useful for troubleshooting scanner installations

4. ASH Import Test

# Verify ASH module can be imported
python test_ash_import.py

This script verifies:

  • ASH module is properly installed

  • ASH version can be retrieved

  • Python environment is correctly configured

Sample Kiro Hooks

The project includes sample Kiro hooks in the hooks/ directory that demonstrate automated security scanning workflows. These hooks can be installed in your Kiro IDE to enable automatic security scanning.

1. Security Scanner with Auto-Remediation

File: hooks/security-scan-on-save.kiro.hook

This hook automatically scans files when saved and offers to fix security issues:

Features:

  • Triggers on file save for source code and IaC files

  • Automatically selects the appropriate scanner:

    • Bandit for Python files

    • Semgrep for multi-language source code

    • Checkov for Infrastructure as Code

  • Performs initial security scan

  • Offers to remediate findings (with approval):

    • Replaces insecure functions with secure alternatives

    • Removes hardcoded secrets

    • Fixes SQL injection vulnerabilities

    • Updates insecure configurations

  • Rescans after remediation to verify fixes

  • Provides detailed before/after comparison report

Supported File Types:

  • Source code: .py, .js, .ts, .java, .go, .c, .cpp, .cs, .rb, .php, .scala, .kt, .rs

  • IaC: .tf, .tfvars, .yaml, .yml, .json, .bicep, Dockerfile*

2. Security Scanner Report (Read-Only)

File: hooks/security-scan-report-on-save.kiro.hook

This hook scans all open editor files and provides a security report without modifying code:

Features:

  • Triggers on file save

  • Scans ALL currently open editor files (not just the active one)

  • Automatically selects appropriate scanner per file type

  • Reports security issues with severity levels

  • Provides remediation recommendations

  • Read-only mode - never modifies source code

  • Reuses current chat session for continuous feedback

Use Cases:

  • Security audits of multiple files

  • Pre-commit security checks

  • Learning about security issues without auto-fixing

  • Team code reviews with security focus

Installing Hooks in Kiro

  1. Copy hooks to your project:

    # Copy to workspace-level hooks (project-specific)
    cp hooks/*.kiro.hook .kiro/hooks/
    
    # Or copy to user-level hooks (global)
    cp hooks/*.kiro.hook ~/.kiro/hooks/
  2. Enable hooks in Kiro:

    • Open Kiro IDE

    • Navigate to the "Agent Hooks" section in the explorer view

    • Enable the desired hooks

    • Or use Command Palette: "Open Kiro Hook UI"

  3. Customize hooks:

    • Edit the .kiro.hook files to adjust file patterns

    • Modify the prompts to change scanning behavior

    • Enable/disable auto-remediation as needed

Note: Hooks require the security-scanner MCP server to be configured and running in Kiro.

Troubleshooting

Issue

Solution

Environment setup issues

Verify Python 3.10+ is installed. Ensure uv package manager is installed.

Scanner issues

Verify file formats are supported. Check file syntax is valid. Ensure proper file extensions are used.

Integration problems

Verify the MCP server is running. Check the configuration file is correct. Validate API endpoints.

ASH not available

Install ASH using uvx git+https://github.com/awslabs/automated-security-helper.git@v3.2.5

Trivy not found

macOS: brew install trivy. Linux: see Trivy installation.

To enable debug logging, set "FASTMCP_LOG_LEVEL" to "DEBUG" in your MCP configuration.

Contributing

Contributions welcome! Please read CONTRIBUTING.md for guidelines.

Authors

Pattern created by Ivan Girardi (AWS) and Iker Reina Fuente (AWS).

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

Available Tools

15 tools
check_ash_availabilityA

Check if ASH (Automated Security Helper) is installed and available.

This tool verifies that ASH is properly installed and can be executed. It also checks which individual scanners are available, as some require external dependencies (e.g., cfn-nag requires Ruby, cdk-nag requires npm).

Use this before attempting to scan with ASH to ensure it's available and to understand which scanners will be used.

Returns: A dictionary with: - ASH installation status and version - Scanner availability (which tools are installed) - Formatted report for easy reading - Installation instructions for missing dependencies

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden of behavioral disclosure. It details what the tool verifies (ASH installation, scanner availability) and the return dictionary contents, making behavior transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured, opening with a clear purpose, then adding usage context and return details. It is slightly verbose in listing return items, but all sentences contribute value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and an output schema, the description adequately covers installation status, scanner dependencies, and return items. It doesn't detail how availability is determined, but the output schema likely handles the return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the description correctly does not invent any parameter semantics. This aligns with the baseline for no-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks if ASH is installed and available, with a specific verb and resource. It also distinguishes itself from sibling scanning tools by framing this as a preflight check, not a scan.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs users to 'Use this before attempting to scan with ASH,' providing a clear when-to-use context. It doesn't specify when not to use it or list alternatives, but the intended usage is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_security_reportA

Generate a SECURITY.md report from scan results.

Takes output from one or more security scans and produces a structured Markdown report with executive summary, STRIDE threat model, compliance notes, and prioritized recommendations.

ParametersJSON Schema
NameRequiredDescriptionDefault
project_nameYesName of the project being analyzed
scan_resultsYesJSON string with scan results from scan_with_checkov, scan_with_semgrep, scan_with_bandit, or any other scanning tool. Can be a single result object or an array of result objects.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool 'produces a structured Markdown report with executive summary, STRIDE threat model, compliance notes, and prioritized recommendations,' which gives valuable insight into the output. However, it does not mention whether the report is returned directly, saved to a file, or how it handles malformed JSON input, leaving some behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—just two sentences—with the purpose front-loaded in the first sentence and the additional breakdown of the report's contents in the second. Every word earns its place, and there is no fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the tool has only two parameters, full schema coverage, and an output schema, the description is sufficiently complete for an agent to understand its role. It could have mentioned more about the expected input format or error behavior, but the existing detail about the report contents is enough for basic invocation. The output schema presumably covers return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides 100% coverage of parameters with descriptions, and the description adds no additional semantic detail beyond what is in the schema. For example, the schema details that 'scan_results' is a JSON string from specific scan tools, and the description merely references 'one or more security scans.' This matches the baseline expectation for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states what the tool does: 'Generate a SECURITY.md report from scan results.' The verb 'generate' and resource 'SECURITY.md report' are specific, and the tool is clearly distinguished from sibling scanning tools like scan_with_checkov and scan_with_semgrep by focusing on report generation rather than scanning.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool: 'Takes output from one or more security scans.' This implies it should be used after scanning, and since no other report-generation siblings exist, the usage is unambiguous. However, it does not explicitly mention alternative tools or exclusions, so it falls short of a perfect score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_supported_formatsA

Get list of supported formats and languages for all security scanning tools.

This tool returns information about what file formats and programming languages are supported by each of the security scanning tools.

Returns: A dictionary with supported formats for each tool

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It states the tool 'returns information,' implying a non-mutating, read-only operation. However, it does not disclose potential side effects, dependencies, or the exact structure of the returned dictionary beyond a high-level description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first and second sentences are redundant ('Get list of supported formats and languages' vs. 'returns information about what file formats and programming languages are supported'). The Returns section adds minimal new info. This could be condensed to one sentence, resulting in wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, parameterless getter, the description is sufficient: it explains the purpose and return type. The output schema is noted as present, so the description does not need to enumerate every field. It is complete for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline for this dimension is 4. The description correctly focuses on the output rather than inputs, and no parameter clarification is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('Get list') and resource ('supported formats and languages for all security scanning tools'), immediately distinguishing it from sibling scan tools. The purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: this appears to be a pre-scan information tool. However, it does not explicitly state when to use it (e.g., 'before scanning, use this to check compatibility') or mention alternatives/exclusions. The context is clear but not fully explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_directory_with_ashA

Scan an entire project directory with ASH for comprehensive security analysis.

This tool scans all files in a directory using ASH (Automated Security Helper), which runs multiple security scanners including Bandit, Checkov, cfn-nag, cdk-nag, detect-secrets, grype, and more.

Unlike scan_with_ash which scans code snippets, this tool scans the actual project directory for comprehensive security analysis.

Note: Semgrep is excluded from ASH scans. Use scan_directory_with_semgrep instead.

Supported file types:

  • Python (.py): Scanned with Bandit, detect-secrets

  • JavaScript/TypeScript (.js, .ts): Scanned with npm-audit

  • Terraform (.tf): Scanned with Checkov

  • CloudFormation (.yaml, .yml, .json): Scanned with Checkov, cfn-nag, cdk-nag

  • Dockerfile: Scanned with Checkov

  • And many more formats supported by the underlying scanners

Args: directory_path: Path to the directory to scan (relative or absolute) severity_threshold: Minimum severity level to report (LOW, MEDIUM, HIGH, CRITICAL)

Returns: A dictionary with aggregated scan results from multiple scanners

Note: ASH must be installed and available. Install with: - uvx: uvx git+https://github.com/awslabs/automated-security-helper.git@v3.2.1 - pip: pip install git+https://github.com/awslabs/automated-security-helper.git@v3.2.1

ParametersJSON Schema
NameRequiredDescriptionDefault
return_outputNoReturn full output instead of saving to file (default: False)
directory_pathYesPath to the directory to scan
severity_thresholdNoMinimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL)MEDIUM

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses several behavioral traits: multiple scanners are run, semgrep is excluded, and installation requirements are provided. However, it omits a key behavior reflected in the schema: the return_output parameter defaults to false, meaning output is saved to file rather than returned, and the 'Returns' section implies a dictionary is always returned without mentioning this flag. Since no annotations exist, the description carries the full burden and this is a notable gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections, front-loaded purpose, and no fluff. The supported file types list and installation notes are useful, though the text is somewhat long. It earns a high score for organization and relevance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity and the presence of an output schema, the description covers many important aspects: scanner list, file type support, installation, and the semgrep exclusion. However, it does not explain the return_output/save-to-file behavior, which is a significant omission for a tool that can save results. The overall picture is fairly complete but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema provides complete parameter documentation. The description's Args section repeats directory_path and severity_threshold but adds no new meaning; it also omits the return_output parameter entirely. The supported file types and severity level list add some context, but not enough to raise the score above the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Scan an entire project directory with ASH for comprehensive security analysis.' It distinguishes itself from scan_with_ash ('Unlike scan_with_ash which scans code snippets') and from scan_directory_with_semgrep ('Use scan_directory_with_semgrep instead'). It also names the underlying scanners.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly explains when to use this tool vs alternatives: it scans actual project directories, while scan_with_ash scans snippets, and semgrep is excluded so scan_directory_with_semgrep is recommended. It also lists supported file types and gives installation instructions, providing clear context for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_directory_with_banditA

Scan an entire project directory with Bandit for Python security issues.

This tool scans all Python files in a directory for security issues using Bandit.

Unlike scan_with_bandit which scans code snippets, this tool scans the actual project directory to find issues across all Python files.

Bandit can detect issues like:

  • Use of insecure functions (pickle, eval, exec)

  • Hardcoded passwords and secrets

  • SQL injection vulnerabilities

  • Command injection risks

  • Weak cryptographic practices

  • Insecure random number generation

  • And many other Python-specific security issues

Args: directory_path: Path to the directory to scan (relative or absolute) severity_threshold: Minimum severity level to report (LOW, MEDIUM, HIGH)

Returns: A dictionary with security findings from Bandit

Note: Bandit must be installed and available in PATH. Install with: - pip: pip install bandit - pipx: pipx install bandit

ParametersJSON Schema
NameRequiredDescriptionDefault
return_outputNoReturn full output instead of saving to file (default: False)
directory_pathYesPath to the directory to scan
severity_thresholdNoMinimum severity threshold (LOW, MEDIUM, HIGH)MEDIUM

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavior. It discloses that it scans all Python files, requires Bandit to be installed, returns a dictionary of findings, and honors severity thresholds. It also notes installation instructions. The only notable gap is that the description omits the 'return_output' parameter's behavior (returning output vs. saving to file) even though it's in the schema, which would have added extra transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, contrast, issue types, args, returns, note). It is somewhat lengthy due to the bulleted list of security issues, but these bullets are informative and give the agent a concrete sense of what Bandit detects. The front-loaded purpose sentence is strong, and the overall organization aids comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a security scanning tool with an output schema and no annotations, the description covers most essential context: purpose, scope, return type, installation requirements, and parameter meanings. It does not describe the exact structure of the returned dictionary (though the output schema handles that), nor does it mention performance or side effects. Given the tool's moderate complexity, this is a solid, complete-enough description, though not exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for all three parameters, so the baseline is 3. The description adds a few extra details (e.g., 'relative or absolute' for directory_path) but largely repeats the schema information. It does not clarify the 'return_output' parameter beyond the schema, so it does not significantly enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool scans whole directories with Bandit for Python security issues, using a specific verb ('scan') and resource ('project directory'). It explicitly distinguishes itself from the sibling scan_with_bandit, which scans code snippets, and enumerates the types of issues it catches, leaving no ambiguity about its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly contrasts this tool with scan_with_bandit, stating the former scans directories while the latter scans snippets. This gives clear guidance on when to use this tool over that specific alternative. However, it does not mention sibling directory scanning tools (e.g., sync_directory_with_grype) or explicitly state that it is Python-specific, though the implication is clear from the 'Python files' phrasing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_directory_with_checkovA

Scan an entire project directory with Checkov for IaC security issues.

This tool scans all Infrastructure as Code files in a directory for security misconfigurations and compliance violations using Checkov.

Unlike scan_with_checkov which scans code snippets, this tool scans the actual project directory to find issues across all IaC files.

Supported file types:

  • Terraform (.tf, .tfvars)

  • CloudFormation (.yaml, .yml, .json)

  • Kubernetes (.yaml, .yml)

  • Dockerfile

  • ARM templates (.json)

  • Bicep (.bicep)

  • Serverless framework (.yml, .yaml)

  • Helm charts (.yaml, .yml)

  • GitHub Actions (.yml, .yaml)

  • GitLab CI (.yml, .yaml)

  • Ansible (.yml, .yaml)

Args: directory_path: Path to the directory to scan (relative or absolute) severity_threshold: Minimum severity level to report (LOW, MEDIUM, HIGH, CRITICAL)

Returns: A dictionary with security findings from Checkov

Note: Checkov must be installed and available in PATH. Install with: - pip: pip install checkov - pipx: pipx install checkov

ParametersJSON Schema
NameRequiredDescriptionDefault
return_outputNoReturn full output instead of saving to file (default: False)
directory_pathYesPath to the directory to scan
severity_thresholdNoMinimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL)MEDIUM

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses prerequisites (Checkov must be installed), supported file types, and return type. However, it fails to explain the behavioral implication of the return_output parameter (default false saves output to file), which creates ambiguity about the actual output behavior. With no annotations, this gap leaves significant behavioral disclosure unmet.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is thorough but contains some redundancy (first two sentences both say it scans IaC files). The file type list and install note are useful, and the structure with clear headings helps readability. It is longer than strictly necessary but not bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity and the presence of an output schema, the description covers key aspects: purpose, scope, supported formats, and installation requirement. It misses explaining the default file-saving behavior tied to return_output, but the overall context is sufficient for an agent to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all three parameters. The description redundantly restates directory_path and severity_threshold but adds no additional semantic detail beyond the schema. It omits return_output entirely, so no added value for that parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action and resource: 'Scan an entire project directory with Checkov for IaC security issues.' It immediately distinguishes itself from sibling tool scan_with_checkov, which scans code snippets, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly contrasts with scan_with_checkov ('Unlike scan_with_checkov which scans code snippets'), offering a clear alternative. It also lists supported file types to indicate applicable scenarios. However, it does not provide explicit when-not-to-use guidance relative to other sibling scanners like semgrep or trivy.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_directory_with_grypeA

Scan an entire project directory with Grype for dependency vulnerabilities.

This tool scans all dependency files in a directory (Cargo.lock, package.json, requirements.txt, etc.) and reports known vulnerabilities across all ecosystems.

Unlike scan_with_ash which scans code snippets, this tool scans the actual project directory to find vulnerabilities in all dependencies.

Supported ecosystems:

  • Rust (Cargo.lock)

  • Python (requirements.txt, setup.py, Pipfile.lock)

  • Node.js (package.json, package-lock.json, yarn.lock)

  • Java (pom.xml, build.gradle)

  • Go (go.mod)

  • Ruby (Gemfile.lock)

  • And many more

Args: directory_path: Path to the directory to scan (relative or absolute) severity_threshold: Minimum severity level to report (LOW, MEDIUM, HIGH, CRITICAL)

Returns: A dictionary with vulnerability findings from Grype

Note: Grype must be installed and available in PATH. Install with: - macOS: brew install grype - Linux: curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh

ParametersJSON Schema
NameRequiredDescriptionDefault
return_outputNoReturn full output instead of saving to file (default: False)
directory_pathYesPath to the directory to scan
severity_thresholdNoMinimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL)MEDIUM

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the prerequisite that Grype must be installed and available in PATH, and notes that it reports known vulnerabilities. However, it does not mention potential side effects like downloading vulnerability databases or network access, which a security scanner might perform.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Supported ecosystems, Args, Returns, Note) and front-loaded with its purpose. It is somewhat verbose with installation instructions and ecosystem lists, but these are useful and not excessive.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists, the description does not need to elaborate beyond the dictionary return. It covers dependencies scanned, supported ecosystems, arguments, and installation prerequisites. It lacks error-handling details but is otherwise complete for typical usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already covers all three parameters (100% coverage). The description adds value by specifying that directory_path can be relative or absolute and that severity_threshold is the minimum severity to report. It does not mention the return_output parameter, but the schema describes it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool scans a project directory with Grype for dependency vulnerabilities, using a specific verb and resource. It explicitly distinguishes itself from scan_with_ash by noting that tool scans code snippets while this one scans the project directory for dependency files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context on when to use this tool versus scan_with_ash, and lists supported ecosystems. However, it does not explicitly mention exclusions or compare to other directory scanners like scan_with_trivy or scan_directory_with_syft, so the guidance is not comprehensive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_directory_with_semgrepA

Scan an entire project directory with Semgrep for security issues.

This tool scans all supported source code files in a directory for security vulnerabilities using Semgrep with security-focused rulesets.

Unlike scan_with_semgrep which scans code snippets, this tool scans the actual project directory to find issues across all supported files.

Supported languages:

  • Python, JavaScript, TypeScript, Java, Go, C/C++

  • C#, Ruby, PHP, Scala, Kotlin, Rust

  • And many more

Args: directory_path: Path to the directory to scan (relative or absolute) severity_threshold: Minimum severity level to report (LOW, MEDIUM, HIGH, CRITICAL)

Returns: A dictionary with security findings from Semgrep

Note: Semgrep must be installed and available in PATH. Install with: - pip: pip install semgrep - pipx: pipx install semgrep - homebrew: brew install semgrep

ParametersJSON Schema
NameRequiredDescriptionDefault
return_outputNoReturn full output instead of saving to file (default: False)
directory_pathYesPath to the directory to scan
severity_thresholdNoMinimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL)MEDIUM

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It explains the scanning scope, ruleset focus, and return type, and notes Semgrep must be installed. However, the 'Returns' section conflicts with the schema's 'return_output' parameter (default false implies saving to file rather than returning), which is confusing and undermines transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for purpose, differentiation, supported languages, args, returns, and note. It is longer than minimal but each section adds value, such as the installation instructions. Front-loaded with the main purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a moderately complex scanning tool with an output schema, the description covers core behavior, languages, and differences from sibling. However, the inconsistency about saving vs returning output (due to return_output) creates a completeness gap, and there is no mention of performance implications or failure modes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for all three parameters. The description restates directory_path and severity_threshold but does not add substantial meaning beyond the schema. The installation note is helpful but not parameter-specific.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Scan') with a specific resource ('entire project directory with Semgrep') and clearly distinguishes itself from 'scan_with_semgrep' which scans code snippets. It also lists supported languages, making the scope evident.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly contrasts with 'scan_with_semgrep' and gives installation prerequisites. While it doesn't discuss when to choose this over other directory scanners like scan_directory_with_bandit, it provides clear context for its own appropriate use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_directory_with_syftA

Scan an entire project directory with Syft to generate Software Bill of Materials (SBOM).

This tool catalogs all software components and dependencies in a directory using Syft. Unlike vulnerability scanners, Syft creates an inventory (SBOM) of what's in your software.

Syft catalogs:

  • Container images (Docker, OCI)

  • Filesystems and directories

  • Archive files (tar, zip)

  • Language-specific packages:

    • Python (pip, poetry, pipenv)

    • JavaScript/Node (npm, yarn, pnpm)

    • Java (Maven, Gradle)

    • Go modules

    • Ruby gems

    • Rust crates

    • PHP composer

    • .NET/C#

    • And many more

By default, only a summary is returned. Set save_sbom=True to save the full SBOM to a file in the .sbom directory at the workspace root.

The SBOM file can be used with Grype for vulnerability scanning or for compliance/auditing purposes.

Args: directory_path: Path to the directory to scan (relative or absolute) output_format: Output format - json (default), cyclonedx-json, spdx-json, or table save_sbom: Save full SBOM to file (default: False, only returns summary)

Returns: A dictionary with: - total_packages: Total number of packages found - type_counts: Package counts by type - language_counts: Package counts by language - timestamp: Scan timestamp

Note: Syft must be installed and available in PATH. Install with: - macOS: brew install syft - Linux: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh

ParametersJSON Schema
NameRequiredDescriptionDefault
save_sbomNoSave full SBOM to file (default: False, only returns summary)
output_formatNoOutput format (json, cyclonedx-json, spdx-json, table)json
directory_pathYesPath to the directory to scan

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full transparency burden. It discloses that only a summary is returned by default, that save_sbom=True writes to a .sbom directory, the output format options, the exact return dictionary structure, and the prerequisite that Syft must be installed (with installation commands). It does not explicitly state it is read-only/non-destructive, but the catalog/inventory language strongly implies it. This is rich behavioral context beyond the minimal, but not exhaustive enough for a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with a clear purpose statement. It uses headings, bullet points, and concise sections for behavior, parameters, returns, and installation. While the supported package list is long, it is useful and directly relevant to an SBOM tool. Every section serves a purpose, and the overall structure is easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the purpose, usage context, parameters, return format, and installation prerequisites. It differentiates the tool from vulnerability scanner siblings and explains the downstream use of the generated SBOM. Given the tool's moderate complexity, this is sufficiently complete for an agent to invoke it correctly, though it could mention edge cases like nonexistent directories or recursive scanning behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description's Args section largely repeats the schema descriptions, adding only minor clarifications like 'relative or absolute' for directory_path and spelling out the output_format options (which are already in the schema). This adds marginal value beyond the schema, so a 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear, specific statement: 'Scan an entire project directory with Syft to generate Software Bill of Materials (SBOM).' It explicitly distinguishes the tool from vulnerability scanners, which is a key differentiator among the many scanning siblings. The verb and resource are precise, leaving no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly states this is for generating an SBOM inventory, not for vulnerability scanning, and even suggests using Grype later for vulnerability scanning. It gives clear context on when to use the tool, but it doesn't explicitly name sibling alternatives or state exclusions (e.g., 'use scan_directory_with_grype for vulnerabilities'). This is a clear context without explicit alternative naming, matching a 4.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_image_with_trivyA

Scan a container image using Trivy for vulnerabilities.

This tool scans container images for known vulnerabilities in:

  • OS packages (Alpine, Debian, Ubuntu, RHEL, etc.)

  • Application dependencies (Python, Node.js, Java, Go, etc.)

  • Base image vulnerabilities

The output is minimized to show only essential information:

  • Vulnerability ID and severity

  • Affected package and versions

  • Fixed version (if available)

  • Primary reference URL

This is particularly useful for:

  • Scanning base images used in Dockerfiles

  • Checking for vulnerabilities before deployment

  • Security audits of container images

Args: image_name: Container image to scan (e.g., nginx:latest, python:3.9, ghcr.io/owner/image:tag) severity_threshold: Minimum severity level to report (LOW, MEDIUM, HIGH, CRITICAL)

Returns: A dictionary with vulnerability findings from Trivy (minimized output)

Note: Trivy must be installed and available in PATH. Install with: - macOS: brew install trivy - Linux: See https://aquasecurity.github.io/trivy/latest/getting-started/installation/

The image will be pulled if not available locally.
ParametersJSON Schema
NameRequiredDescriptionDefault
image_nameYesContainer image name to scan (e.g., nginx:latest, ghcr.io/owner/image:tag)
return_outputNoReturn full output instead of saving to file (default: False)
severity_thresholdNoMinimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL)MEDIUM

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must fully disclose behavior. It mentions installation requirements, image pulling, and minimized output format. However, it fails to mention the `return_output` parameter behavior, which is key: the description says 'Returns: A dictionary' but the schema for `return_output` indicates that by default it saves to file (return_output=false), not returns a dictionary. This internal inconsistency means an agent could be misled about the return behavior. The description does not disclose this crucial aspect.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections (overview, output details, use cases, Args, Returns, Note). It is reasonably concise and front-loaded with the core purpose. The inclusion of installation instructions is slightly beyond the core, but they are relevant and add value without being excessive, so it earns a 4.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description has clear gaps. The `return_output` parameter is not covered in the description and the Returns statement conflicts with the schema. Additionally, it does not mention any registry authentication requirements or network access considerations for private images. For a security scanning tool with three parameters and no annotations, these omissions reduce completeness below the minimum viable level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds useful examples for `image_name` (e.g., nginx:latest) and severity levels, but it omits the `return_output` parameter entirely from its Args section, which could create confusion about its existence. Overall it adds some value beyond the schema but not enough to exceed the baseline given the omission.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource statement: 'Scan a container image using Trivy for vulnerabilities.' It clearly distinguishes this tool from sibling scanning tools by focusing on container images and mentions specific vulnerability categories (OS packages, application dependencies, base images).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear use cases ('Scanning base images used in Dockerfiles', 'Checking for vulnerabilities before deployment', 'Security audits of container images') and explicitly indicates the tool is for container images. However, it does not explicitly name alternatives or state when not to use this tool, so it lacks the explicit 'when-not' guidance needed for a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_with_ashA

Scan code using ASH (Automated Security Helper) for comprehensive security analysis.

ASH is a comprehensive security scanning tool that runs multiple security scanners including Bandit, Checkov, cfn-nag, cdk-nag, detect-secrets, and more.

Note: Semgrep is excluded from ASH scans because there's a separate scan_with_semgrep tool.

This tool performs delta scanning on the provided code snippet, creating a temporary file and scanning it with ASH in local mode. This approach is optimized for scanning code changes rather than entire projects.

Supported file types:

  • Python (.py): Scanned with Bandit, detect-secrets

  • JavaScript/TypeScript (.js, .ts): Scanned with npm-audit

  • Terraform (.tf): Scanned with Checkov

  • CloudFormation (.yaml, .yml, .json): Scanned with Checkov, cfn-nag, cdk-nag

  • Dockerfile: Scanned with Checkov

  • And many more formats supported by the underlying scanners

For Semgrep scanning, use the separate scan_with_semgrep tool.

Args: code: The code content to analyze file_extension: File extension to determine scanner selection (e.g., '.py', '.tf', 'Dockerfile') severity_threshold: Minimum severity level to report (LOW, MEDIUM, HIGH, CRITICAL)

Returns: A dictionary with aggregated scan results from multiple scanners

Note: ASH must be installed and available in PATH. Install with: uvx git+https://github.com/awslabs/automated-security-helper.git@v3.2.1 or: pip install git+https://github.com/awslabs/automated-security-helper.git@v3.2.1

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesCode content to scan
file_extensionYesFile extension (e.g., .py, .tf, .js, Dockerfile)
severity_thresholdNoMinimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL)MEDIUM

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that the tool performs delta scanning, creates a temporary file, runs in local mode, and requires ASH to be installed with specific install commands. This is substantial behavioral transparency, though it doesn't mention failure modes or timeout behaviors, hence not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections: overview, file types, args, returns, and install notes. It is somewhat long and repeats the Semgrep exclusion twice, but overall each section adds relevant information. Slight redundancy prevents a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers all essential aspects: what it does, how it scans, file-type support, parameters, return type, and installation prerequisites. An output schema exists, so the return dictionary is already indicated. This is thoroughly complete for a security scanning tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of parameters, and the description enriches this by explaining how file_extension maps to specific scanners and file types. It also clarifies the meaning of severity_threshold. This adds value beyond the schema descriptions, earning above the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: scanning code with ASH for comprehensive security analysis. It lists specific scanners and explicitly distinguishes itself from the sibling scan_with_semgrep tool. The verb 'Scan' plus the resource and scope ('code snippet') make it unambiguous and well-differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for usage, including supported file types and the note that Semgrep is intentionally excluded and should be handled by scan_with_semgrep. It also explains the delta-scanning approach. A stronger explicit 'when to use ASH vs. individual scanners' would push it to 5, but the guidance is solid.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_with_banditA

Scan Python code using Bandit for security issues.

This tool analyzes Python source code for common security issues using PyCQA's Bandit security linter. Bandit is specifically designed for Python and can detect issues like:

  • Use of insecure functions (pickle, eval, exec)

  • Hardcoded passwords and secrets

  • SQL injection vulnerabilities

  • Command injection risks

  • Weak cryptographic practices

  • Insecure random number generation

  • And many other Python-specific security issues

Args: code: The Python code content to analyze

Returns: A dictionary with scan results including found security issues

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesPython code content to scan

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden. It explains the types of issues detected and the return shape, but does not mention whether the code is executed, whether the operation is read-only, or any limitations/edge cases. Adequate but not deeply transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with an opening summary, a bulleted list of security issues, and an Args/Returns section. There is slight redundancy between the first line and the second line, but the content is focused and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool, the description covers the input, the tool's purpose, representative issue types, and the return format. An output schema already exists, so detailed field documentation is unnecessary. It could have mentioned the directory-based sibling, but the scope is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes the only parameter as 'Python code content to scan' with 100% coverage. The description's 'code: The Python code content to analyze' adds no meaningful new semantics, so a baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action ('Scan Python code using Bandit') with a resource ('Python source code') and a nameable tool (Bandit). The included vulnerability examples and Python-specific framing distinguish it from sibling tools like scan_with_semgrep or scan_directory_with_bandit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context: it is for scanning Python code snippets/content for security issues. It does not explicitly describe when to use this tool versus directory-level scanners or alternative scanners, but the Python+code scope is well implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_with_checkovA

Scan Infrastructure as Code using Checkov for security issues.

This tool analyzes Infrastructure as Code files for security misconfigurations and compliance violations using Bridgecrew's Checkov scanner.

Supported formats:

  • terraform: Terraform configuration files

  • cloudformation: AWS CloudFormation templates

  • kubernetes: Kubernetes manifests

  • dockerfile: Docker files

  • arm: Azure Resource Manager templates

  • bicep: Azure Bicep files

  • serverless: Serverless framework files

  • helm: Helm charts

  • github_actions: GitHub Actions workflows

  • gitlab_ci: GitLab CI configurations

  • ansible: Ansible playbooks

Args: code: The IaC code content to analyze format_type: The type of IaC format being scanned

Returns: A dictionary with scan results including found security issues

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesInfrastructure as Code content to scan
format_typeYesIaC format type (terraform, cloudformation, kubernetes, dockerfile, etc.)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full transparency burden. It states the tool analyzes IaC files for security misconfigurations and compliance violations, and mentions it returns a dictionary of results. However, it does not disclose potential limitations (e.g., file size, network access), whether it executes the scanned code, or that it is a read-only operation. This is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with sections for purpose, supported formats, args, and returns. The list of formats is essential and earns its place, though the second sentence restates the first line with minor detail, making it slightly verbose. Overall, it is front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with an output schema and 100% parameter coverage, the description is reasonably complete. It covers what the tool does, supported formats, input arguments, and return type. It does not explain how results are structured beyond 'dictionary with scanned issues', but the output schema likely handles that. It could mention whether multiple formats can be scanned at once, but the schema implies single format per call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage, so the baseline is 3. The description adds meaningful value by listing the accepted format types (e.g., terraform, cloudformation, kubernetes) and clarifying that 'code' is the content to analyze. This goes beyond the schema's brief 'etc.' and helps the agent select valid values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool scans Infrastructure as Code using Checkov for security issues, with a specific verb ('Scan'), a resource ('Infrastructure as Code'), and the tool name ('Checkov'). It also distinguishes itself from siblings like scan_with_semgrep and scan_with_bandit by focusing on IaC formats and listing supported types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context by specifying that it analyzes Infrastructure as Code files and lists supported formats, which implies when to use it. However, it does not explicitly name alternatives or state exclusions, such as 'use this for IaC scanning rather than semgrep'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_with_semgrepA

Scan source code using Semgrep for security vulnerabilities.

This tool analyzes source code for security vulnerabilities, bugs, and anti-patterns using Semgrep's rule engine with security-focused rulesets.

Supported languages:

  • python: Python source code

  • javascript: JavaScript source code

  • typescript: TypeScript source code

  • java: Java source code

  • go: Go source code

  • c: C source code

  • cpp: C++ source code

  • csharp: C# source code

  • ruby: Ruby source code

  • php: PHP source code

  • scala: Scala source code

  • kotlin: Kotlin source code

  • rust: Rust source code

Args: code: The source code content to analyze language: The programming language of the code

Returns: A dictionary with scan results including found security issues

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesSource code content to scan
languageYesProgramming language (python, javascript, typescript, java, go, etc.)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral traits. It mentions that the tool 'analyzes' and 'returns' results, but it does not state whether the scan is read-only, whether any network calls are made, rate limits, or limitations. Since it's a security scanner, it likely has no side effects, but this is not disclosed, leaving a transparency gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections for purpose, languages, args, and returns. The language list is necessary but length, and there is no redundant fluff. It front-loads the primary purpose and provides the essential details without excessive verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with an output schema, the description is mostly adequate. It explains the arguments and return type. However, it does not explicitly distinguish this tool from the sibling 'scan_directory_with_semgrep', so an agent might be unclear when to use this content-based variant versus a directory scan. This is a notable completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes both parameters, but the description adds value by listing the full set of supported languages (expanding on the schema's 'etc.') and clarifying that 'code' refers to source code content. This helps the agent select valid values for the language parameter, going beyond the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Scan source code using Semgrep for security vulnerabilities.' It identifies the specific tool (Semgrep), the resource (source code), and the scope (security vulnerabilities, bugs, anti-patterns). This distinguishes it from other sibling scanners by naming the engine and the input type (code content vs directory).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by listing supported languages and describing the code parameter, but it does not explicitly state when to choose this tool over alternatives like scan_with_bandit or scan_directory_with_semgrep. There is no 'use when...' or 'not for directories' guidance, leaving the context implicit rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_with_trivyA

Scan Infrastructure as Code or Dockerfile using Trivy for security issues.

Trivy is a comprehensive security scanner that can detect:

  • Misconfigurations in IaC files

  • Security issues in Dockerfiles

  • Vulnerabilities in base images (when scanning Dockerfiles)

  • Best practice violations

Supported scan types:

  • dockerfile: Scan Dockerfile for security issues and misconfigurations

  • terraform: Scan Terraform configuration files

  • kubernetes: Scan Kubernetes manifests

  • config: Generic configuration file scanning

Args: code: The code content to analyze scan_type: Type of scan to perform (dockerfile, terraform, kubernetes, config)

Returns: A dictionary with scan results including found security issues

Note: Trivy must be installed and available in PATH. Install with: - macOS: brew install trivy - Linux: See https://aquasecurity.github.io/trivy/latest/getting-started/installation/

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesCode content to scan (Dockerfile or IaC config)
scan_typeNoType of scan: dockerfile, terraform, kubernetes, or configdockerfile

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses the installation requirement for Trivy (with install instructions), notes the return format (a dictionary with scan results), and lists the types of issues it detects. This provides valuable behavioral context beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections for supported scans, Args, Returns, and Notes. While somewhat long, each section provides useful information without unnecessary filler. The opening line is clear and the list format improves readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema and only two parameters, the description covers the essential aspects: supported scan types, return type, and the installation prerequisite. It doesn't explain the contents of the returned dictionary, but the output schema covers that, so the description is adequately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description doesn't need to compensate much. It adds meaning by explicitly enumerating the valid values for scan_type (dockerfile, terraform, kubernetes, config) and clarifying what 'code' should contain, going slightly beyond the schema's generic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool scans Infrastructure as Code or Dockerfiles using Trivy, with a specific verb ('Scan'), resource, and tool named. It includes a list of supported scan types (dockerfile, terraform, kubernetes, config), which distinguishes it from sibling tools like scan_with_checkov or scan_with_semgrep.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description lists supported scan types and specifies Trivy as the scanner, implying usage for security scanning of IaC and Dockerfiles. However, it provides no explicit guidance on when to choose this tool over alternatives like Checkov or Semgrep, and no exclusions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 15 tool updatesv0.2.0
    • First observedcheck_ash_availability
    • First observedgenerate_security_report
    • First observedget_supported_formats
    • First observedscan_directory_with_ash
    • First observedscan_directory_with_bandit
    • First observedscan_directory_with_checkov
    • First observedscan_directory_with_grype
    • First observedscan_directory_with_semgrep
    • First observedscan_directory_with_syft
    • First observedscan_image_with_trivy
    • First observedscan_with_ash
    • First observedscan_with_bandit
    • First observedscan_with_checkov
    • First observedscan_with_semgrep
    • First observedscan_with_trivy

TDQS

A3.9/5.0
Disambiguation2/5

Multiple tools serve overlapping purposes: scan_with_bandit, scan_with_semgrep, and scan_with_ash all analyze source code snippets, while scan_with_checkov, scan_with_trivy, and scan_with_ash overlap for IaC snippets. Similarly, directory scan variants duplicate capabilities. The descriptions clarify differences, but the boundaries between using a specialized scanner versus the aggregated ASH scanner are unclear, causing potential misselection.

Naming Consistency5/5

Tool names follow a consistent verb_noun pattern with snake_case: scan_with_<scanner> for snippets, scan_directory_with_<scanner> for directories, and utility verbs like get_supported_formats, check_ash_availability, generate_security_report. The naming clearly reflects the action and target.

Tool Count4/5

15 tools is at the upper boundary of a reasonable count, but the presence of both snippet-level and directory-level variants for the same scanner, plus an aggregated scanner (ASH) that subsumes several individual scans, makes the set feel larger than necessary. Still, the count is not excessive for the breadth of scanners covered.

Completeness5/5

The server covers a comprehensive range of security scanning needs: code snippets (Semgrep, Bandit, ASH), IaC (Checkov, Trivy, ASH), directories (Grype, Checkov, Bandit, Semgrep, ASH, Syft), container images (Trivy), plus discovery utilities and report generation. There are no significant dead ends; the tool set fully addresses the stated security scanner domain.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time OWASP ASVS security guidance and vulnerability scanning for AI coding agents. Enables proactive security during code generation by checking security requirements, scanning code for vulnerabilities, and suggesting secure code fixes.
    3
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides AI coding assistants with real-time security scanning superpowers, including SAST, secrets detection, dependency CVE scanning, and web vulnerability assessment.
    27
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to scan code for security vulnerabilities using multiple static analysis tools, with support for filtering, deduplication, and CI/CD integration.
    27
    2
    MIT

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/aws-samples/sample-mcp-security-scanner'

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