scan_directory_with_semgrep
Scan a project directory with Semgrep to find security vulnerabilities across supported source code files. Reports issues by severity threshold.
Instructions
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
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| return_output | No | Return full output instead of saving to file (default: False) | |
| directory_path | Yes | Path to the directory to scan | |
| severity_threshold | No | Minimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL) | MEDIUM |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |