MCPGuard Security Auditor
Pricing
from $40.00 / 1,000 repo bundle audits
Go to Apify Store
MCPGuard Security Auditor
Pricing
from $40.00 / 1,000 repo bundle audits
audit-repo), SKILL.md Supply-Chain Hardening & x402 v2 Discoverysrc/repo-auditor.mjs, CLI audit-repo <dir>):
mcp.json, .mcp.json, .cursor/mcp.json, .vscode/mcp.json, claude_desktop_config.json, opencode.json, etc.) and Agent Rules/Skill files (AGENTS.md, CLAUDE.md, GEMINI.md, SKILL.md, .cursorrules, .cursor/rules/*.mdc, .github/copilot-instructions.md).MCP_PARSE_ERROR (HIGH) instead of crashing mid-scan.0–100) & Grade (A–F), unified SARIF 2.1.0 (--sarif), and PR-ready Markdown summary (--markdown, wired into deploy/github-action.yml $GITHUB_STEP_SUMMARY).src/rules-auditor.mjs):
PIPE_REMOTE_TO_SHELL to catch curl|wget ... | python/python3/node/perl/ruby.POWERSHELL_IEX_DOWNLOAD (irm/iwr/Invoke-WebRequest ... | iex/Invoke-Expression) and CREDENTIAL_HARVEST_EXFIL (flag-verified or piped exfiltration of ~/.ssh, ~/.aws/credentials, /etc/shadow, .env, .npmrc, .pypirc, .git-credentials), maintaining zero false positives on normal security documentation prose.src/discovery.mjs):
PAYAPI_READINESS_2026-11-26.md gap: 402 PAYMENT-REQUIRED now emits a canonical absolute resource.url (https://host/api/v1/..., configurable via PUBLIC_BASE_URL / --public-base-url) across both src/http-server.mjs and deploy/cloudflare-worker.mjs.GET /.well-known/x402, GET /openapi.json (OpenAPI 3.1.0), GET /llms.txt, and POST /api/v1/audit-repo-bundle (also exposed as the 5th Stdio MCP tool audit_repo_bundle).audit-rules)src/rules-auditor.mjs):
AGENTS.md, CLAUDE.md, GEMINI.md, .cursorrules, .cursor/rules/*.mdc, .github/copilot-instructions.md, and SKILL.md (single file or recursive directory scan).RULES_UNICODE_TAG_STEGO (CRITICAL, exit 4): Unconditionally flags hidden Unicode Tag characters (U+E0000–U+E007F) with decoded ASCII payload preview.RULES_BIDI_OVERRIDE (CRITICAL, exit 4): Unconditionally flags Trojan Source bidirectional control overrides (U+202A–U+202E, U+2066–U+2069).RULES_INVISIBLE_CONTROL (HIGH, exit 4): Flags U+200B, U+200C, U+2060, mid-file BOM (U+FEFF), and non-emoji U+200D while explicitly preserving legitimate compound Emoji ZWJ sequences (👨💻, 🧑🔬, 🏳️🌈, 👩🏽💻, 🏃♀️ via isLegitimateEmojiZwj()).RULES_EMBEDDED_SECRET (CRITICAL/HIGH, exit 4): Reuses SECRET_RULES from src/scanner.mjs to catch accidentally pasted live credentials.RULES_DANGEROUS_EXEC_SNIPPET (HIGH, exit 4): Matches only deterministic high-precision shell payloads (curl/wget ... | sh/bash, encoded PowerShell, base64 -d | sh, destructive root wipe / reverse shell); strictly zero single-word prose blacklist (zero false positives on security docs mentioning exfiltrate such as vercel/next.js/AGENTS.md L329).RULES_CONTEXT_BLOAT (MEDIUM, advisory — never blocks exit 4): Reports bytes, lines, estimated tokens (bytes / 4), and estimated Context Tax cost per 1,000 uncached turns (@$3/1M).sanitizeRulesText() & rulesReportToSarif(): Strips hidden backdoors while keeping compound Emoji intact; exports SARIF 2.1.0 with exact line numbers.node cli/mcpguard.mjs audit-rules <file-or-dir> [--max-tokens 4000] [--json | --sarif] [--sanitize <out>]src/mcp-server.mjs): 4th tool audit_rules_filesrc/http-server.mjs) & Cloudflare Worker (deploy/cloudflare-worker.mjs): POST /api/v1/audit-rules (protected by route-first 404, 1 MiB 413, and x402 /verify + /settle)web/index.html): 3rd tab Agent Rules Auditor with built-in backdoor/Emoji/Context Tax demo & strip previewdeploy/github-action.yml): Dual SARIF upload for MCP configs and Agent Rules filesexamples/sample-rules-backdoor.mdV11-01 & V11-02)HIGH, x402 Replay & Settlement Gap Fixed):
settleX402WithFacilitator() in src/payment-hooks.mjs calling the facilitator /settle endpoint and returning a Base64-encoded PAYMENT-RESPONSE receipt header./verify → compute → /settle flow into both src/http-server.mjs and deploy/cloudflare-worker.mjs: paid results are released ONLY after /settle confirms { success: true }, closing the signature-replay / zero-settlement gap; malformed 400/413 requests never trigger settlement.MEDIUM, Route Whitelist & Worker Body Cap Fixed):
src/http-server.mjs and deploy/cloudflare-worker.mjs now validate POST paths against SUPPORTED_POST_ROUTES (/api/v1/audit-mcp, /api/v1/sanitize-mcp, /api/v1/circuit-break) before invoking x402 verification/settlement (unknown paths immediately return 404 Not Found with zero facilitator calls).1 MiB (1,048,576 bytes) request body limit to deploy/cloudflare-worker.mjs (both Content-Length pre-check and actual UTF-8 byte length check returning 413 Payload Too Large).web/index.html) Breaker Parity:
runBreaker() in web/index.html to handle numeric Unix epoch timestamps (ms/s), nested OpenAI/Anthropic usage token objects, and cost_usd/total_cost_usd fields cleanly alongside JSONC/Docker/sensitive-path auditing.confirmedBugs: 0):
sanitizeMcpConfig() now scrubs URL query secrets (?api_key=...) and inline credentials inside args (e.g. postgres://user:pass@host) in addition to env and headers.evaluateCircuitBreaker() supports numeric Unix timestamps (ms and s) plus standard nested OpenAI/Anthropic usage (input_tokens/output_tokens, prompt_tokens/completion_tokens, total_tokens) and cost_usd/total_cost_usd fields without inventing missing USD values.sk-ant-api* regex collision so Anthropic keys match exclusively ANTHROPIC_KEY (zero OPENAI_KEY double-count)./etc/, ~/, $HOME/) as OVERBROAD_FS_ROOT and flags sensitive credential/system mounts (~/.ssh, ~/.aws, ~/.kube, ~/.gnupg, /var/run/docker.sock, etc.) as SENSITIVE_FS_MOUNT (CRITICAL).uvx unpinned package detection (UNPINNED_UVX_PACKAGE) alongside npx/pnpx/bunx (@latest floating tags caught).${input:...} / ${env:...} and 1Password op://... references in SAFE_PLACEHOLDER_RE, eliminating false positives on official github/github-mcp-server configs.parseJsonc() across CLI (audit-mcp), stdio MCP server, and offline web/index.html to parse real .vscode/mcp.json files containing // comments, /* */ comments, and trailing commas while keeping https:// URLs intact.DOCKER_PRIVILEGED_MODE for --privileged/--network=host/--pid=host/--cap-add=SYS_ADMIN|ALL, DOCKER_HOST_FS_MOUNT for -v/--volume/--mount targeting broad roots or sensitive paths, and DOCKER_UNPINNED_IMAGE for :latest/floating/untagged images).src/mcp-server.mjs, cli/mcpguard.mjs mcp-server): JSON-RPC 2.0 server exposing audit_mcp_config, sanitize_mcp_config, and evaluate_circuit_breaker.src/http-server.mjs, cli/mcpguard.mjs serve) & Cloudflare Workers Edge Bundle (deploy/cloudflare-worker.mjs, deploy/wrangler.toml): Free public mode by default; when X402_PAY_TO is set, emits HTTP 402 + PAYMENT-REQUIRED and enforces real facilitator /verify (503 fail-closed if no facilitator URL is configured).toSarifReport, audit-mcp --sarif) + upgraded deploy/github-action.yml for GitHub Code Scanning.web/index.html) synchronized with JSONC parsing, sk-ant-api non-duplication, VS Code/1Password placeholders, uvx, sensitive paths, and Docker privilege/mount checks.2026-11-26 15:17 UTC+8, Node.js v24.19.0)node projects/audit/adversarial-repro-mcpguard.mjs: 9/9 PASS (confirmedBugs: 0, exit code 0).node --test test/*.test.mjs: 17/17 pass, 0 fail (1170.49ms, exit code 0).audit-mcp exit 4, circuit-break $5 exit 2, $50 exit 3, clean exit 0).$0.00.audit-mcp, circuit-break, init-k8s), offline web/index.html, K8s CronJob & GitHub Actions templates, dist/mcpguard-kit-v1.0.0.zip (23,734 bytes), and LAUNCH_KIT.md. Verified 7/7 pass by independent audit.