SAST MCP Server

io.github.Skyrxin由 GitHub 账号 Skyrxin 发布v0.8.3更新于 Oct 24, 2026

11-scanner SAST/DAST MCP server with closed-loop remediation, SBOM/SARIF, and CI integrations

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手用 11 款 SAST、SCA 与 DAST 扫描器检查代码,并对结果进行分诊、导出与修复。

可以做什么
用单个扫描器或并行运行全部已安装扫描器扫描代码,支持仅扫描 git 改动、扫描完整 git 历史中的密钥,以及通过 Docker Compose 对运行中的应用做容器镜像扫描和 OWASP ZAP 动态扫描。按严重度和置信度过滤、分页,并带审计记录地抑制误报和管理忽略列表。保存与对比基线,执行 PASS/FAIL 策略判定,导出 SARIF、SBOM(CycloneDX/SPDX)、HTML/PDF 报告与合规报告。导入外部 SARIF,并用 VEX 处置结论分诊问题。生成修复提示词、通过 git apply 应用统一 diff,并执行带复扫与回滚的闭环修复。将结果上传到 DefectDojo 或 GitHub Code Scanning,在 PR/MR 上评论,创建 Jira 工单,发送 Slack/Teams 通知。
适用场景
适合让助手审查代码库或拉取请求中的漏洞、检查依赖与 IaC 配置问题、在 git 历史中查找泄露的密钥,或按严重度阈值做 CI 门禁。也适合需要 SARIF/SBOM 输出,或需要由智能体提出并验证补丁的修复流程的团队。
运行要求
以 stdio 在本地运行,通常通过 uvx 或 pip 安装(Python)。服务器能力取决于同时安装的扫描器:完整 Docker 镜像内置九款扫描器,pip 附加包增加四款,其余(CodeQL、OWASP ZAP、Trivy、Grype、Gitleaks、OSV-Scanner、Bearer)需另行安装。DAST 与镜像扫描需要 Docker。可选集成需要凭据:DEFECTDOJO_URL 与 DEFECTDOJO_API_KEY、GITHUB_TOKEN、GITLAB_TOKEN、SLACK_WEBHOOK_URL、TEAMS_WEBHOOK_URL、JIRA_*;HTTP 传输可用 SAST_MCP_JWT_SECRET 或 SAST_MCP_API_KEY 启用鉴权。
安装前请注意
扫描会调用外部扫描器程序;DAST 还会启动 Docker Compose 栈并探测运行中的应用,因此只应对你有权测试的代码和服务使用。多个工具会写入或外发数据:apply_patch 与 remediate_and_verify 通过 git apply 修改磁盘文件,导出工具会写文件,上传、PR 评论、Slack/Teams 与 Jira 工具会把发现发送给第三方。这些集成需要令牌和 webhook 地址(GITHUB_TOKEN、GITLAB_TOKEN、JIRA_API_TOKEN、DEFECTDOJO_API_KEY),应妥善保管。

安装

在 SourceWeft 中

  1. 打开 控制台中的 SAST MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

SAST MCP Server

[PyPI version] [sast-mcp-server MCP server] [Python 3.10+] [License: MIT] [CI] [codecov]

Static Application Security Testing (SAST) for AI agents. A production-ready MCP server that gives any AI agent the ability to scan code for security vulnerabilities.

Supports 11 industry-standard scanners:

ScannerLanguages / ScopeType
BanditPythonSecurity linter
njsscanJavaScript, Node.jsStatic analysis
BearerPython, JS, Ruby, Java, Go, PHPData-flow SAST
Semgrep30+ languagesRule-based SAST
TrivyAll (CVEs, Secrets, IaC, images)Multi-scanner
CodeQLPython, JS, Java, Go, C/C++, C#, Ruby, SwiftSemantic SAST
CheckovTerraform, K8s, Docker, CloudFormationIaC policy scanner
GitleaksAll (.git history)Deep secret scanning
OSV-ScannerMultiple (lockfiles, sboms)SCA
GrypeContainers, OS packages, lockfiles, SBOMsSCA / image scanning
OWASP ZAPRUNTIMEDynamic (DAST) via Docker

Works with any MCP-compatible agent: Gemini CLI, Claude Desktop, OpenAI Agents, Cursor, Windsurf, and more.


Features

  • 🔍 11 SAST/SCA/DAST scanners with a unified output format
  • 🌳 AST-aware context — shows the full enclosing function, not just a line number
  • 📊 Severity & confidence filtering — focus on what matters
  • 🔀 Git diff mode — scan only modified files for incremental reviews
  • 🙈 Ignore management — suppress false positives with audit trail
  • 📄 Pagination — handle large codebases without overwhelming the agent
  • 🌐 Dual transport — stdio (local) or Streamable HTTP (remote deployments)
  • 🔐 JWT & API key authentication — secure remote deployments
  • 📦 One command install — pip install sast-mcp-server
  • 🚀 Multi-scanner mode — run all installed scanners in parallel with deduplication
  • 📋 SARIF export — CI/CD integration with GitHub, GitLab, Azure DevOps
  • 🏗️ IaC scanning — Terraform, Kubernetes, Docker security policies
  • 🔑 Secret detection — find hardcoded API keys, tokens, and passwords in code and git history
  • 📦 SCA / dependency CVEs — scan lock files for known vulnerabilities against the OSV database
  • 🕷️ DAST — dynamic baseline scans of running apps via OWASP ZAP + Docker
  • 📈 Baselines & trend tracking — cache scans and diff against a saved baseline
  • 🤖 MCP Prompts & Resources — pre-built security workflows and live dashboards for agents
  • 📤 Dashboard integrations — push SARIF results to DefectDojo or GitHub Code Scanning
  • 🩹 AI-assisted remediation — generate fix prompts and apply agent-written patches via git apply

Quick Start

The server is only as useful as the scanners installed alongside it. Pick the install path that matches how much of the toolset you want out of the box.

Option 1 — Full container (recommended: 9 scanners, zero setup)

bash
docker pull ghcr.io/skyrxin/sast-mcp-server:full

Bundles bandit, njsscan, bearer, semgrep, trivy, checkov, gitleaks, osv-scanner, and grype so scan_all works immediately. Or bring up an HTTP server with one command:

bash
docker compose up          # serves http://localhost:8080/mcp + /health /ready /metrics

Option 2 — pip extra (4 pip-installable scanners)

bash
pip install "sast-mcp-server[scanners]"   # adds bandit, njsscan, semgrep, checkov

Option 3 — minimal / custom

bash
pip install sast-mcp-server               # server only — bring your own scannersuvx sast-mcp-server                        # run without installing

Then install whichever scanners you need (binary scanners aren't pip packages):

bash
pip install bandit njsscan semgrep checkov     # pip-installable# trivy:        https://aquasecurity.github.io/trivy/latest/getting-started/installation/# grype:        https://github.com/anchore/grype#installation# gitleaks:     https://github.com/gitleaks/gitleaks#installing# osv-scanner:  https://google.github.io/osv-scanner/installation/# bearer:       https://docs.bearer.com/installation/# codeql:       https://github.com/github/codeql-cli-binaries/releases

What ships where

Scanner:full image[scanners] extraNotes
Bandit✅✅pip
njsscan✅✅pip
Semgrep✅✅pip
Checkov✅✅pip
Bearer✅—install script
Trivy✅—binary
Gitleaks✅—binary
OSV-Scanner✅—binary
Grype✅—binary
CodeQL——multi-GB bundle — mount at runtime
OWASP ZAP——runs via Docker on the host (run_active_scan)

At startup the server logs how many scanners it can actually see (e.g. Scanners available: 9/11 (...)), and the list_scanners tool / /ready endpoint report the same — so it's always obvious what you have.

[sast-mcp-server MCP server]


Usage with AI Agents

Gemini CLI

Install as an extension:

bash
gemini extensions install https://github.com/Skyrxin/sast-mcp-server

Or add to your ~/.gemini/settings.json:

json
{  "mcpServers": {    "sast": {      "command": "uvx",      "args": ["sast-mcp-server"]    }  }}

Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "sast": {      "command": "uvx",      "args": ["sast-mcp-server"]    }  }}

See full Claude Desktop guide.

Cursor IDE

Add to Cursor Settings → MCP Servers:

json
{  "mcpServers": {    "sast": {      "command": "uvx",      "args": ["sast-mcp-server"]    }  }}

See full Cursor guide.

OpenAI Agents SDK

python
from agents.mcp import MCPServerStdio
sast_server = MCPServerStdio(command="uvx", args=["sast-mcp-server"])

See full OpenAI guide.


Available MCP Tools

scan_vulnerabilities

Scan a directory for security vulnerabilities using a specific scanner.

ParameterTypeDefaultDescription
target_pathstringrequiredPath to scan
scanner_namestring"bearer"Scanner: bandit, njsscan, bearer, semgrep, trivy, codeql, checkov
min_severitystring"LOW"Minimum severity: LOW, MEDIUM, HIGH, CRITICAL
min_confidencestring"LOW"Minimum confidence: LOW, MEDIUM, HIGH
git_diff_onlyboolfalseOnly scan git-modified files
limitint50Max findings to return
offsetint0Pagination offset

scan_all

Run ALL installed scanners in parallel with automatic deduplication. Recommended for comprehensive security scanning.

ParameterTypeDefaultDescription
target_pathstringrequiredPath to scan
min_severitystring"MEDIUM"Minimum severity (higher default to reduce noise)
min_confidencestring"LOW"Minimum confidence
git_diff_onlyboolfalseOnly scan git-modified files
limitint50Max findings to return
offsetint0Pagination offset

scan_git_history

Scan the entire .git history for leaked secrets and credentials using Gitleaks.

ParameterTypeDefaultDescription
target_pathstring"."Path to the repository root (must contain .git)
min_severitystring"LOW"Minimum severity to report

run_active_scan

Run a dynamic (DAST) baseline scan with OWASP ZAP by orchestrating a Docker Compose stack.

ParameterTypeDefaultDescription
target_pathstringrequiredDirectory containing the docker-compose file
docker_compose_filestringrequiredName of the docker-compose file (e.g. docker-compose.yml)
target_urlstringrequiredURL of the running app once it's up (e.g. http://localhost:8080)

export_sarif

Export scan results in SARIF 2.1.0 format for CI/CD integration.

ParameterTypeDefaultDescription
target_pathstringrequiredPath to scan
scanner_namestring"bearer"Scanner to use
min_severitystring"LOW"Minimum severity
min_confidencestring"LOW"Minimum confidence
output_pathstring""File path to write SARIF (empty = return as string)

list_scanners

List available scanners, their installation status, and supported languages.

ignore_vulnerability

Suppress a finding from future scans (with audit trail).

unignore_vulnerability

Re-enable a previously suppressed finding.

list_ignored_vulnerabilities

Show all currently suppressed findings for a project.

save_baseline

Run a scan and cache the results as a named baseline for future trend comparison.

ParameterTypeDefaultDescription
target_pathstringrequiredPath to scan
tagstring"latest"Name for this baseline (e.g. main, pre-release)
scanner_namestring"bearer"Scanner to use
min_severitystring"LOW"Minimum severity to include
min_confidencestring"LOW"Minimum confidence to include

compare_baseline

Compare a fresh scan against a saved baseline to highlight new and fixed findings.

ParameterTypeDefaultDescription
target_pathstringrequiredPath to scan
tagstring"latest"Baseline tag to compare against
scanner_namestring"bearer"Scanner to use
min_severitystring"LOW"Minimum severity to include
min_confidencestring"LOW"Minimum confidence to include

upload_to_defectdojo

Import a SARIF export into a DefectDojo engagement. Requires DEFECTDOJO_URL and DEFECTDOJO_API_KEY environment variables.

ParameterTypeDefaultDescription
sarif_pathstringrequiredPath to a SARIF file from export_sarif
engagement_idintrequiredTarget DefectDojo engagement ID
activebooltrueMark imported findings active
verifiedboolfalseMark imported findings verified

upload_to_github

Upload a SARIF report to GitHub Code Scanning. Requires a GITHUB_TOKEN with security_events: write scope.

ParameterTypeDefaultDescription
sarif_pathstringrequiredPath to a SARIF file from export_sarif
repostringrequiredRepository in owner/name form
commit_shastringrequiredFull commit SHA the results apply to
refstringrequiredFully qualified ref, e.g. refs/heads/main

generate_fix_prompt

Package a cached finding's vulnerable code and context into an LLM-ready prompt that asks for a strict unified diff fix.

ParameterTypeDefaultDescription
target_pathstringrequiredScanned project root (with .sast-mcp-cache)
finding_hashstringrequiredHash of the finding to fix (from scan output)
context_windowint15Source lines to include before/after the finding

apply_patch

Apply an agent-generated unified diff to disk via git apply (paths that escape the target directory are rejected).

ParameterTypeDefaultDescription
target_pathstringrequiredDirectory the patch paths are relative to
patchstringrequiredThe unified diff text to apply
check_onlyboolfalseValidate without modifying files

evaluate_policy

Run all scanners and return an explicit PASS/FAIL verdict for CI gating.

ParameterTypeDefaultDescription
target_pathstringrequiredPath to scan
max_criticalint0Max allowed CRITICAL (−1 = unlimited)
max_highint-1Max allowed HIGH (−1 = unlimited)
max_mediumint-1Max allowed MEDIUM (−1 = unlimited)
fail_on_newboolfalseFail if findings are new vs. a scan_all baseline
baseline_tagstring"latest"Baseline tag used when fail_on_new
output_formatstring"markdown"markdown or json

export_sbom

Run all scanners and export an SBOM / vulnerability report. In CycloneDX mode, if Syft is installed the component inventory is the full dependency list (not just vulnerable packages).

ParameterTypeDefaultDescription
target_pathstringrequiredPath to scan
output_pathstring""File to write (empty = return inline)
min_severitystring"LOW"Minimum severity to include
sca_onlybooltrueOnly dependency (SCA) findings; false = all
formatstring"cyclonedx"cyclonedx or spdx (SPDX 2.3)

generate_report

Run all scanners and render an executive security report.

ParameterTypeDefaultDescription
target_pathstringrequiredPath to scan
output_pathstring""File to write (empty = return inline HTML; required for PDF)
min_severitystring"LOW"Minimum severity to include
formatstring"html"html or pdf (needs the [pdf] extra)

compliance_report

Map findings to a compliance framework and report the posture.

ParameterTypeDefaultDescription
target_pathstringrequiredPath to scan
frameworkstring"owasp"owasp, sans, pci, or cis
output_pathstring""Optional file to write the markdown report
min_severitystring"LOW"Minimum severity to include

scan_image

Scan a container image reference for vulnerabilities and secrets (Trivy or Grype).

ParameterTypeDefaultDescription
image_refstringrequiredImage reference, e.g. nginx:1.25
scanner_namestring"trivy"trivy or grype
min_severitystring"MEDIUM"Minimum severity to report
output_formatstring"markdown"markdown or json

remediate_and_verify

Closed-loop remediation: dry-run a patch, apply it, re-scan, and confirm the finding is gone (rolling the patch back on failure).

ParameterTypeDefaultDescription
target_pathstringrequiredProject root (with a .sast-mcp-cache)
finding_hashstringrequiredHash of the finding to fix
patchstringrequiredUnified diff to apply
scanner_namestring""Re-scan scanner (default: the finding's scanner)
auto_rollbackbooltrueRevert the patch if verification fails

import_sarif

Ingest an external SARIF file (Snyk, Veracode, CI jobs, …) into the normalized finding pipeline so it joins dedup / baselines / dashboards.

ParameterTypeDefaultDescription
target_pathstringrequiredProject root the results belong to
sarif_pathstringrequiredPath to a SARIF 2.1.0 file
scanner_namestring"external"Source scanner name to record
savebooltrueCache the imported findings

triage_finding

Get an exploitability/false-positive assessment prompt, or record a CycloneDX VEX decision (suppressing dispositions also add the finding to the ignore-list).

ParameterTypeDefaultDescription
target_pathstringrequiredProject root (with a .sast-mcp-cache)
finding_hashstringrequiredHash of the finding to triage
dispositionstring""exploitable, not_affected, false_positive, resolved, in_triage (empty = return a prompt)
justificationstring""Rationale / CycloneDX justification keyword

comment_on_pr

Post a security summary on a GitHub PR or GitLab merge request. Requires GITHUB_TOKEN or GITLAB_TOKEN (+ optional GITLAB_URL).

ParameterTypeDefaultDescription
providerstringrequiredgithub or gitlab
repostringrequiredowner/name (GitHub) or project ID/path (GitLab)
pr_numberintrequiredPR number / MR IID
bodystringrequiredMarkdown comment body

notify_slack / notify_teams

Send a notification to a Slack or Microsoft Teams incoming webhook (SLACK_WEBHOOK_URL / TEAMS_WEBHOOK_URL).

create_jira_issue

Open a Jira issue for a finding. Requires JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN.

ParameterTypeDefaultDescription
project_keystringrequiredJira project key (e.g. SEC)
summarystringrequiredIssue title
descriptionstringrequiredIssue description
issue_typestring"Bug"Jira issue type

Tip: scan_vulnerabilities, scan_all, and scan_git_history accept output_format="json" for machine-readable results in CI/agent pipelines.

Auth: On HTTP transports every tool is scope-gated — scan:read (scans, reports, exports), scan:write (baselines, patches, uploads, notifications), config:write (ignore list). Set SAST_MCP_JWT_SECRET and issue scoped JWTs.


SARIF / CI/CD Integration

Export scan results in SARIF 2.1.0 format for integration with CI/CD platforms:

bash
# In your CI pipeline, use the MCP tool:# export_sarif(target_path=".", scanner_name="semgrep", output_path="results.sarif")
# Then upload to GitHub Code Scanning:# gh api /repos/{owner}/{repo}/code-scanning/sarifs -f [email protected]

Compatible with: GitHub Code Scanning, GitLab SAST, Azure DevOps, VS Code SARIF Viewer.


Remote Deployment (Streamable HTTP)

For remote or cloud-hosted deployments, the 2026 MCP standard uses Streamable HTTP.

You can secure the server with JWT Bearer Authentication by setting a secret. Alternatively, for backward compatibility, you can use a static API key.

bash
# Set JWT secret for secure authenticationexport SAST_MCP_JWT_SECRET="your_hmac_sha256_secret"
# Or use the legacy API key methodexport SAST_MCP_API_KEY="your_secure_api_key_here"
# Start the server with streamable-http transportuv run sast-mcp-server --transport streamable-http --port 8080 --host 0.0.0.0

Note: The old sse transport is deprecated. Please migrate to streamable-http.

Core Workflows

1. Unified Vulnerability Scanning

Run any of the installed scanners individually (scan_vulnerabilities(scanner_name="bandit")) or run all of them at once using scan_all.

2. Deep Secret & Dynamic Scanning

Use scan_git_history to find API keys leaked years ago, or run_active_scan to spin up your application with Docker Compose and test it dynamically with OWASP ZAP.

3. Baseline & Trend Tracking

Save a scan as a named baseline and compare future scans against it to track new vulnerabilities, fixed issues, and severity trends over time.

  • save_baseline(target_path=".", tag="main")
  • compare_baseline(target_path=".", tag="main")

4. CI/CD Integration

Export scan results to SARIF format (export_sarif) to integrate with GitHub Code Scanning, GitLab SAST, or any other SARIF-compatible platform.

5. MCP Prompts (Security Workflows)

Pre-built security workflows that guide AI agents:

  • security_review: Full codebase assessment
  • fix_vulnerability: Focused remediation advisor
  • pr_security_check: Scan only git diffs and enforce a severity gate
  • compliance_report: Generate an OWASP Top 10 or PCI-DSS report

6. MCP Resources (Security Dashboards)

Read-only contextual data for AI agents without running a full scan:

  • sast://dashboard/{path}: Security posture dashboard
  • sast://config: Server configuration and status
  • sast://scanners: Available scanners and languages
  • sast://cache/{path}/latest: Latest scan results metadata

7. Dashboard Upload & AI-Assisted Remediation

Push SARIF results to external platforms and remediate findings with agent-written patches:

  • upload_to_defectdojo / upload_to_github: Push a SARIF export to a dashboard
  • generate_fix_prompt: Build an LLM-ready prompt for a specific finding
  • apply_patch: Apply the resulting unified diff via git apply

Docker

Pre-built images are published to GHCR on every release:

bash
docker pull ghcr.io/skyrxin/sast-mcp-server:full       # 9 scanners (recommended)docker pull ghcr.io/skyrxin/sast-mcp-server:minimal    # bandit, njsscan, bearer
# Run as an HTTP serverdocker run -p 8080:8080 -e SAST_MCP_JWT_SECRET=your-secret \  ghcr.io/skyrxin/sast-mcp-server:full --transport streamable-http
# …or use the bundled compose file (exposes /health /ready /metrics too)docker compose up

Prefer to build locally?

bash
docker build -t sast-mcp-server .                       # minimaldocker build -f Dockerfile.full -t sast-mcp-server:full .   # full

CodeQL and OWASP ZAP are not bundled in the image — CodeQL ships a multi-GB bundle (mount at runtime) and ZAP's run_active_scan orchestrates Docker on the host.


Reliability

"Production-ready" isn't a slogan here — it's measured in CI on every push:

  • 226 tests, 74% line coverage (Codecov), green across Python 3.10–3.13, with mypy type-checking enforced.
  • Self-scan, every build. The server runs its own scanners against its own code in CI; the SARIF + summary are published as the self-scan-report artifact. A snapshot lives in examples/self-scan/.
  • Load-tested HTTP transport. scripts/loadtest.py runs in CI against the Streamable HTTP server: a local run sustains ~210 req/s at p95 ≈ 290 ms with zero failures across /health, /ready, /metrics under 30 concurrent workers.
  • Ops endpoints — /health (liveness), /ready (cached scanner inventory, 503 when none installed), /metrics (Prometheus text).
  • Bounded under load — a configurable concurrency cap (SAST_MCP_MAX_CONCURRENT_SCANS) around subprocess scanners, per-client token-bucket rate limiting (SAST_MCP_RATE_LIMIT_PER_MIN) for HTTP transports, per-scanner timeouts, and an optional incremental-scan cache.

Run the load test yourself:

bash
python scripts/loadtest.py --requests 2000 --concurrency 50

Configuration

Environment Variables

VariableDefaultDescription
SAST_MCP_TIMEOUT300Scan timeout in seconds
SAST_MCP_LOG_LEVELINFOLog level: DEBUG, INFO, WARNING, ERROR
SAST_MCP_CACHE_TTL86400Cache time-to-live in seconds (non-tagged scans)
SAST_MCP_CACHE_MAX_SCANS200Max non-tagged cached scans to retain (0 = unlimited)
SAST_MCP_HTTP_RETRIES3Retry attempts for integration HTTP calls
SAST_MCP_HTTP_TIMEOUT60Per-request timeout (s) for integration HTTP calls
SAST_MCP_MAX_CONCURRENT_SCANS8Max subprocess scanners running at once (0 = unlimited)
SAST_MCP_RATE_LIMIT_PER_MIN0Per-client request budget for HTTP transports (0 = disabled)
SAST_MCP_SCANNER_TIMEOUTS(none)JSON map of per-scanner timeout overrides, e.g. {"trivy":600}
SAST_MCP_API_KEY(none)API key for remote (HTTP) authentication
SAST_MCP_JWT_SECRET(none)HMAC-SHA256 secret for JWT bearer auth (scopes enforced per tool)
DEFECTDOJO_URL(none)Base URL of a DefectDojo instance (for upload_to_defectdojo)
DEFECTDOJO_API_KEY(none)DefectDojo API v2 token
GITHUB_TOKEN(none)Token with security_events: write (SARIF upload + PR comments)
GITLAB_TOKEN(none)GitLab token with api scope (for comment_on_pr)
GITLAB_URLhttps://gitlab.comGitLab base URL (self-managed override)
SLACK_WEBHOOK_URL(none)Slack incoming webhook (for notify_slack)
TEAMS_WEBHOOK_URL(none)Microsoft Teams incoming webhook (for notify_teams)
JIRA_URL / JIRA_EMAIL / JIRA_API_TOKEN(none)Jira Cloud credentials (for create_jira_issue)

Operational endpoints (HTTP transports)

When running with --transport streamable-http, the server exposes:

EndpointPurpose
GET /healthLiveness probe — 200 with version while the process is up
GET /readyReadiness probe — lists installed scanners (503 if none)
GET /metricsPrometheus text exposition (tool calls, scan durations, findings)

Incremental scans

scan_vulnerabilities and scan_all accept use_cache=true: the server fingerprints the target's files and reuses the previous scan when nothing has changed, so repeated scans in a session are fast.


Development

bash
# Clone and install with dev dependenciesgit clone https://github.com/Skyrxin/sast-mcp-server.gitcd sast-mcp-serverpip install -e ".[dev]"
# Run testspytest tests/ -v
# Lintruff check sast_mcp_server/
# Run locallypython -m sast_mcp_server

Project Structure

sast_mcp_server/├── __init__.py          # Package version├── __main__.py          # python -m entry point├── server.py            # FastMCP server with all tools + /health /ready /metrics├── models.py            # Typed data models (Finding, Severity, etc.)├── config.py            # Central validated settings (env-driven)├── sarif.py             # SARIF 2.1.0 export and parsing├── aggregator.py        # Multi-scanner parallel execution + deduplication├── cache.py             # Scan caching, baselines, comparison, fingerprints├── auth.py              # JWT / API key authentication for remote transports├── metrics.py           # In-process Prometheus metrics├── ratelimit.py         # Per-client token-bucket rate limiting├── prompts.py           # MCP prompt templates (security workflows)├── resources.py         # MCP resources (sast:// dashboards and metadata)├── scanners/│   ├── base.py          # Abstract scanner base class│   ├── factory.py       # Scanner registry and factory│   ├── bandit.py        # Bandit (Python)│   ├── njsscan.py       # njsscan (JavaScript)│   ├── bearer.py        # Bearer (multi-language)│   ├── semgrep.py       # Semgrep (30+ languages)│   ├── trivy.py         # Trivy (CVEs, secrets, IaC)│   ├── codeql.py        # CodeQL (deep semantic SAST)│   ├── checkov.py       # Checkov (IaC policies)│   ├── gitleaks.py      # Gitleaks (git history secret scanning)│   ├── osv_scanner.py   # OSV-Scanner (SCA / dependency CVEs)│   ├── grype.py         # Grype (SCA + container image scanning)│   └── zap.py           # OWASP ZAP (DAST via Docker)├── enrichment/│   ├── ast_context.py   # AST-aware code context extraction│   ├── git_diff.py      # Git diff for incremental scanning│   ├── ignore_manager.py # Finding ignore list management│   ├── patch_prompt.py  # Builds LLM prompts to fix a cached finding│   └── patch_apply.py   # Applies/reverts agent-generated diffs via `git apply`├── reporting/│   ├── sbom.py          # CycloneDX SBOM/VDR (+ optional Syft inventory)│   ├── spdx.py          # SPDX 2.3 SBOM│   ├── vex.py           # CycloneDX VEX statements (triage decisions)│   ├── html.py          # Standalone HTML executive report│   ├── pdf.py           # PDF report (optional [pdf] extra)│   └── compliance.py    # OWASP / SANS / PCI / CIS mapping└── integrations/    ├── defectdojo.py    # Upload SARIF to DefectDojo    ├── github.py        # GitHub Code Scanning + PR comments    ├── gitlab.py        # GitLab MR comments    ├── slack.py / teams.py  # Webhook notifications    └── jira.py          # Create Jira issues

License

MIT

来源:README.md,提交 d9a8431

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.8.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分