SafeWeave

dev.safeweave由 safeweave.dev 发布官方发布者v0.7.5更新于 Oct 27, 2026

Security scanner for AI-written code: SAST, secrets, dependencies, IaC, containers and DAST.

已验证Streamable HTTP可网页运行开发者工具安全与监控

概览

AI 生成的概览

SafeWeave 是一款面向 AI 编写代码的安全扫描器,让助手扫描项目中的漏洞、泄露密钥、风险依赖、IaC 与容器问题,并在同一轮对话中修复。

可以做什么
  • 扫描源码中的 SQL 注入、XSS、SSRF、路径穿越和不安全加密等漏洞
  • 检测源码中硬编码的密钥、API key、令牌和私钥
  • 检查 npm、pip、Go 和 Cargo 依赖的已知 CVE 与高风险许可证
  • 扫描 Terraform、Dockerfile、Kubernetes 配置、容器镜像与 API 安全态势
  • 套用 standard、hardened、owasp、soc2、pci-dss、hipaa 等合规配置
  • 在付费云方案下对运行中的应用执行 DAST 运行时扫描
适用场景
适合在提交、推送或创建 PR 之前,让助手检查刚写好的代码并当场修复问题;也适合在支持 MCP 的编辑器中定期做依赖、密钥和基础设施配置检查。
运行要求
可作为远程端点使用,也可通过 npx 运行本地 npm 包 safeweave-mcp,或用 Docker 以 SSE 方式运行。声明需要 OAuth;SAFEWEAVE_LICENSE_KEY 为可选项(无密钥为 10 次试用,免费账号解锁 7 个本地扫描器,付费方案提供 DAST 与托管扫描)。首次使用会下载扫描器二进制文件,需要联网;支持 macOS、Linux 和 Windows x64。
安装前请注意
服务器会下载并运行第三方扫描器二进制文件(gitleaks、trivy、opengrep)到本地缓存,使用前应了解该行为。扫描会读取项目目录,云方案会将扫描数据发送到托管服务。可选的 Claude Code skill 会在 git 提交、推送或创建 PR 前自动扫描,并可能因严重或高危问题阻止推送。付费方案为每月 29 或 59 美元。

安装

在 SourceWeft 中

  1. 打开 控制台中的 SafeWeave,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/dev.safeweave%2Fsafeweave/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "safeweave": {
      "type": "http",
      "url": "https://mcp.safeweave.dev/mcp"
    }
  }
}

README

SafeWeave

Security scanner for AI-written code. SafeWeave runs inside your AI editor over MCP (Claude Code, Cursor, VS Code, Windsurf) and checks your code for vulnerabilities, leaked secrets, risky dependencies, IaC and container issues, so your assistant can fix findings in the same turn.

This repository is the open-core part of SafeWeave: the scanner engines (packages/scanners), the scan gateway (packages/gateway), shared types (packages/common), Docker files and the Claude Code skill. The MCP server itself ships on npm.

Quick Start

Run one command. It downloads the scanners and configures every editor it finds:

bash
npx -y safeweave-mcp

Or add it to your editor's MCP config yourself:

json
{  "mcpServers": {    "safeweave": {      "command": "npx",      "args": ["-y", "safeweave-mcp"],      "env": {        "SAFEWEAVE_LICENSE_KEY": "your-license-key-here"      }    }  }}

The key is optional. Without one you get a 10-scan trial (SAST, secrets and dependencies). A free account at safeweave.dev/signup unlocks unlimited local scans with 7 scanners.

Plans

PlanPriceWhere scans runScanners
No keyFreeLocal, 10-scan trial3 (SAST, secrets, dependencies)
Free accountFreeLocal7 (everything except DAST)
Cloud$29/moLocal + hostedAll 8, plus PR checks, website scans and AI-builder rules
Cloud Plus$59/moLocal + hostedAll of Cloud, plus teammates

See safeweave.dev/pricing for details.

Alternative: Docker

If you prefer running via Docker:

bash
git clone https://github.com/nickfluxk/safeweave.gitcd safeweavecp .env.example .env   # Edit with your license key and SCAN_DIRdocker compose up

How Scanner Binaries Work

SafeWeave automatically downloads and manages the scanner binaries it needs on first use.

ToolVersionPurpose
gitleaks8.21.2Secret and credential detection
trivy0.58.0Container vulnerability and IaC misconfiguration scanning
opengrep1.16.3SAST analysis (Semgrep-compatible, standalone binary)
  • Binaries are resolved in order: system PATH → ~/.safeweave/bin/ cache → auto-download
  • If you already have gitleaks or trivy installed via Homebrew/apt, those are used (never shadowed)
  • For SAST, system semgrep is preferred; if not found, opengrep (a standalone Semgrep-compatible fork) is downloaded — no Python required
  • Downloads happen in the background at startup — the server is ready immediately
  • Versions are pinned and updated with each SafeWeave release
  • If a download fails (no internet), that scanner is skipped gracefully

Supported platforms: macOS (arm64, x64), Linux (arm64, x64), Windows (x64)

Cache location:

~/.safeweave/  bin/       # Downloaded binaries  meta/      # Version metadata (JSON)

To force a re-download: rm -rf ~/.safeweave/bin ~/.safeweave/meta

What's Included

ScannerWhat it detectsPlan
SASTSQL injection, XSS, SSRF, path traversal, insecure cryptoFree
SecretsAPI keys, tokens, passwords and private keys in sourceFree
DependenciesKnown CVEs in npm, pip, Go and Cargo packagesFree
IaCTerraform, Dockerfile and Kubernetes misconfigurationsFree account
ContainerVulnerabilities in container imagesFree account
LicenseGPL, AGPL and other risky dependency licensesFree account
PostureMissing auth, rate limiting, CORS and security headersFree account
DASTRuntime API security issues in a running appCloud

MCP Integration

Works with any MCP-compatible editor — Cursor, Claude Code, VS Code, Windsurf, and more.

Once configured (see Quick Start above), ask your AI:

  • "Scan this project for security vulnerabilities"
  • "Check my dependencies for CVEs"
  • "Scan for hardcoded secrets"
  • "Run an IaC misconfiguration scan"

If running via Docker, use the SSE transport instead:

json
{  "mcpServers": {    "safeweave": {      "url": "http://localhost:9000/sse"    }  }}

HTTP API

Health Check

bash
curl http://localhost:9000/api/health

Run a Scan

bash
curl -X POST http://localhost:9000/api/scan \  -H 'Content-Type: application/json' \  -d '{"directory": "/path/to/project"}'

Scan Specific Scanners

bash
curl -X POST http://localhost:9000/api/scan \  -H 'Content-Type: application/json' \  -d '{"directory": "/path/to/project", "scanners": ["sast", "secrets"]}'

Compliance Profiles

Built-in profiles: standard, hardened, owasp, soc2, pci-dss, hipaa

Set via MCP set_profile tool or create a custom .safeweave/profile.yaml in your project.

Configuration

Environment Variables

VariableRequiredDescription
SAFEWEAVE_LICENSE_KEYNoYour license key from safeweave.dev. Without it: a 10-scan trial
SCAN_DIRDocker onlyHost directory to mount for scanning
SAFEWEAVE_LICENSE_URLNoLicense server URL (defaults to https://license.safeweave.dev)

Claude Code Skill: Auto-Scan Before Push

SafeWeave includes a Claude Code skill that automatically scans your code before every git commit, git push, or PR creation.

Install the skill

Copy the skill to your Claude Code skills directory:

bash
mkdir -p ~/.claude/skills/secure-before-pushcurl -sL https://raw.githubusercontent.com/nickfluxk/safeweave/main/skills/secure-before-push/SKILL.md \  -o ~/.claude/skills/secure-before-push/SKILL.md

Or clone and copy:

bash
git clone https://github.com/nickfluxk/safeweave.git /tmp/safeweavecp -r /tmp/safeweave/skills/secure-before-push ~/.claude/skills/

What happens after install

Once installed, Claude Code automatically runs a SafeWeave scan whenever you say "commit", "push", "ship it", or "create a PR":

SeverityActionBlocks push?
Critical / HighFix immediately, re-scanYes
MediumWarns, asks confirmationUser decides
Low / InfoNo actionNo

Prerequisites

SafeWeave MCP server must be configured. Run npx safeweave-mcp to set it up automatically.

Verify

Start a new Claude Code session and ask it to commit code. You should see a SafeWeave scan run before the git operation.

License

MIT. See LICENSE.

来源:README.md,提交 8cb96a9

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

2
  1. v0.7.5最新Oct 20, 2026
  2. v0.7.4Oct 19, 2026

评分

已满足适用检查项的 85%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

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

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