mcp-safeguard · Rules
148 rules in v0.9.3.
This is a snapshot of the scanner's security://rules MCP resource, taken from the installed 0.9.3 package. The count changes between releases; the resource at runtime is the authoritative list. Regex patterns are omitted here and live in the scanner source.
Prompt injection
scan15 rules| ID | Title | Severity | CVSS |
|---|---|---|---|
| PI-001 | Instruction Override Attempt | CRITICAL | 9.3 |
| PI-002 | Identity Hijacking Pattern | HIGH | 8.1 |
| PI-003 | Fake System Message Injection | HIGH | 7.8 |
| PI-004 | Constraint Bypass Attempt | CRITICAL | 9.1 |
| PI-005 | Hidden Instruction Tag | HIGH | 8.5 |
| PI-006 | System Prompt Exfiltration | HIGH | 7.5 |
| PI-007 | Deception Instruction | MEDIUM | 5.5 |
| PI-008 | Encoded Instruction Obfuscation | MEDIUM | 5.8 |
| PI-009 | Conditional Trigger Instruction | MEDIUM | 5.2 |
| PI-010 | Code Execution Prompt | HIGH | 8.0 |
| PI-011 | Data Exfiltration Instruction | CRITICAL | 9.5 |
| PI-012 | Template Injection Pattern | MEDIUM | 5.0 |
| PI-013 | Comment-Hidden Instruction | MEDIUM | 4.8 |
| PI-014 | Zero-Width Character Steganography | HIGH | 7.2 |
| PI-015 | Forced Tool Call Instruction | MEDIUM | 6.0 |
Schema risks
scan4 rulesShape-of-schema checks that ride along with prompt injection.
| ID | Title | Severity |
|---|---|---|
| PI-SCH-001 | Oversized Default Value (potential injection vector) | MEDIUM |
| PI-SCH-002 | Unusually Long Parameter Description | LOW |
| PI-SCH-003 | Oversized Enum Definition | LOW |
| PI-SCH-004 | Non-standard Schema Extension | INFO |
Credential leaks
scan31 rules| ID | Title | Severity | CVSS |
|---|---|---|---|
| CRED-001 | Hardcoded API Key | CRITICAL | 9.8 |
| CRED-002 | Hardcoded API Key Assignment | CRITICAL | 9.5 |
| CRED-003 | Hardcoded Password | CRITICAL | 9.8 |
| CRED-004 | Hardcoded Secret Key | HIGH | 8.5 |
| CRED-005 | Exposed JWT Token | HIGH | 8.8 |
| CRED-006 | Exposed Bearer Token | HIGH | 8.5 |
| CRED-007 | AWS Access Key ID | CRITICAL | 9.9 |
| CRED-008 | AWS Secret Access Key | CRITICAL | 9.9 |
| CRED-009 | GitHub Personal Access Token | HIGH | 8.5 |
| CRED-010 | GitLab Personal Access Token | HIGH | 8.5 |
| CRED-011 | Database Connection String with Credentials | CRITICAL | 9.5 |
| CRED-012 | Private Key Material | CRITICAL | 10.0 |
| CRED-013 | Hardcoded Access Token | HIGH | 8.0 |
| CRED-014 | Slack API Token | HIGH | 8.5 |
| CRED-015 | Stripe API Key | CRITICAL | 9.8 |
| CRED-016 | OpenAI API Key | CRITICAL | 9.5 |
| CRED-017 | Anthropic API Key | CRITICAL | 9.5 |
| CRED-026 | Hugging Face API Token | HIGH | 8.0 |
| CRED-027 | Replicate API Token | HIGH | 8.5 |
| CRED-028 | Cohere API Key | HIGH | 8.0 |
| CRED-018 | Stripe Credential in Environment | HIGH | 8.5 |
| CRED-019 | OpenAI Credential in Environment | HIGH | 8.5 |
| CRED-020 | Anthropic Credential in Environment | HIGH | 8.5 |
| CRED-021 | Twilio Credential in Environment | HIGH | 7.5 |
| CRED-022 | SendGrid Credential in Environment | HIGH | 7.5 |
| CRED-023 | Slack Credential in Environment | HIGH | 7.5 |
| CRED-024 | GitHub Credential in Environment | HIGH | 8.0 |
| CRED-025 | AWS Credential in Environment | HIGH | 9.5 |
| CRED-026 | Hugging Face Credential in Environment | HIGH | 8.0 |
| CRED-027 | Replicate Credential in Environment | HIGH | 8.5 |
| CRED-028 | Cohere Credential in Environment | HIGH | 8.0 |
Tool poisoning
scan11 rules| ID | Title | Severity | CVSS |
|---|---|---|---|
| TP-001 | Hidden Side-Effect in Benign Tool | HIGH | 8.0 |
| TP-002 | Covert Operation Descriptor | HIGH | 8.5 |
| TP-003 | Instruction to Suppress Logging | CRITICAL | 9.0 |
| TP-004 | Explicitly Covert Tool Action | CRITICAL | 9.5 |
| TP-005 | Silent Data Exfiltration Descriptor | CRITICAL | 9.8 |
| TP-006 | Deceptive Tool Description | HIGH | 8.8 |
| TP-007 | Forced Tool Chain Trigger | MEDIUM | 6.0 |
| TP-008 | User Awareness Suppression | CRITICAL | 9.5 |
| TP-009 | Hidden Instruction Tag in Tool Description | CRITICAL | 9.0 |
| TP-010 | Instruction to Conceal Action from User | HIGH | 8.0 |
| TP-011 | Read Sensitive File Then Pass As Argument | CRITICAL | 9.5 |
SSRF
scan3 rulesSeverity is assigned per finding at scan time.
| ID | Title |
|---|---|
| SS-001 | Unconstrained URL parameter with no allowlist/blocklist |
| SS-002 | Redirect-following URL fetch with no revalidation |
| SS-003 | Missing scheme restriction on a URL-fetching tool |
OAuth scope risk
scan7 rules| ID | Title | Severity | CVSS |
|---|---|---|---|
| OAUTH-001 | Wildcard or Admin OAuth Scope | CRITICAL | 9.0 |
| OAUTH-002 | Write-Scoped OAuth (check if read-only suffices) | MEDIUM | 4.5 |
| OAUTH-003 | Delete-Scoped OAuth Token | HIGH | 7.5 |
| OAUTH-004 | Offline Access Scope (persistent token risk) | MEDIUM | 5.0 |
| OAUTH-005 | Sudo/Impersonation OAuth Scope | CRITICAL | 9.5 |
| OAUTH-006 | PII-Exposing OAuth Scope | LOW | 3.0 |
| OAUTH-007 | Full Repository OAuth Scope | MEDIUM | 5.5 |
Sensitive endpoints
scan29 rulesProbed on a live host via check_endpoint_exposure or scan_mcp_server.
| ID | Path · title | Severity |
|---|---|---|
| EP-001 | /admin Exposed Admin Panel | HIGH |
| EP-001 | /admin/ Exposed Admin Panel | HIGH |
| EP-001 | /_admin Exposed Admin Panel | HIGH |
| EP-002 | /debug Exposed Debug Endpoint | HIGH |
| EP-002 | /debug/ Exposed Debug Endpoint | HIGH |
| EP-002 | /__debug__ Exposed Debug Endpoint | HIGH |
| EP-003 | /health Health Endpoint (check response content) | INFO |
| EP-003 | /healthz Health Endpoint | INFO |
| EP-003 | /ready Readiness Endpoint | INFO |
| EP-004 | /metrics Prometheus Metrics Exposed Publicly | MEDIUM |
| EP-004 | /_metrics Prometheus Metrics Exposed | MEDIUM |
| EP-005 | /docs API Documentation Exposed | LOW |
| EP-005 | /swagger Swagger UI Exposed | LOW |
| EP-005 | /swagger-ui Swagger UI Exposed | LOW |
| EP-005 | /redoc ReDoc Documentation Exposed | LOW |
| EP-006 | /openapi.json OpenAPI Schema Exposed | MEDIUM |
| EP-007 | /config Configuration Endpoint Exposed | HIGH |
| EP-008 | /.env Environment File Exposed | CRITICAL |
| EP-007 | /env Environment Endpoint Exposed | HIGH |
| EP-009 | /mcp MCP Endpoint (verify auth required) | INFO |
| EP-010 | /sse SSE Endpoint (verify auth) | MEDIUM |
| EP-010 | /ws WebSocket Endpoint (verify auth) | MEDIUM |
| EP-011 | /actuator Spring Actuator Exposed | HIGH |
| EP-011 | /actuator/env Spring Actuator Env Exposed | CRITICAL |
| EP-011 | /actuator/heapdump Spring Actuator Heap Dump | CRITICAL |
| EP-012 | /version Version Disclosure | LOW |
| EP-012 | /_version Version Disclosure | LOW |
| EP-013 | /trace Trace Endpoint Exposed | HIGH |
| EP-013 | /pprof Go pprof Profiler Exposed | HIGH |
Dangerous ports
scan12 rules| ID | Port · service | Severity |
|---|---|---|
| EP-PORT-001 | 22 SSH | MEDIUM |
| EP-PORT-002 | 23 Telnet | HIGH |
| EP-PORT-003 | 2375 Docker API (unauthenticated) | CRITICAL |
| EP-PORT-004 | 2376 Docker API (TLS) | HIGH |
| EP-PORT-005 | 4040 Ngrok Inspection UI | MEDIUM |
| EP-PORT-006 | 5000 Development Server | MEDIUM |
| EP-PORT-007 | 5432 PostgreSQL | HIGH |
| EP-PORT-008 | 6379 Redis (commonly unauthenticated) | HIGH |
| EP-PORT-009 | 8080 HTTP Alt / Dev Server | LOW |
| EP-PORT-010 | 8443 HTTPS Alt | LOW |
| EP-PORT-011 | 9200 Elasticsearch | CRITICAL |
| EP-PORT-012 | 27017 MongoDB | HIGH |
Source audit
scan-source36 rulesSeverity and CVSS are assigned per finding at scan time. Rule doc comments in source_scanner.py name the confirmed finding each was derived from.
| ID | Title |
|---|---|
| SRC-001 | Auth header re-applied in transport without redirect guard |
| SRC-002 | httpx client follows redirects while carrying a bearer token |
| SRC-003 | SQL read-only enforced by string prefix check only |
| SRC-004 | Credential attached to a caller-influenced destination host |
| SRC-005 | Auth flag parsed and warned about, never enforced before serving |
| SRC-006 | Client-supplied resource ID keys shared state with no ownership check |
| SRC-007 | Read-only/destructive classifier recognizes syntax, not calls |
| SRC-008 | Client-supplied ownership field trusted on create/update |
| SRC-009 | Unescaped interpolation into a shell command |
| SRC-010 | Credential file written without permission hardening |
| SRC-011 | SSRF guard validates once; fetch call re-resolves DNS separately |
| SRC-012 | Manifest entry silently dropped with only debug-level logging |
| SRC-013 | TLS certificate verification disabled |
| SRC-014 | OAuth redirect_uri used in a redirect with no allowlist check |
| SRC-015 | Inbound Authorization header re-forwarded to an outbound request |
| SRC-016 | Write-capability flag gates tool listing, not tool execution |
| SRC-017 | Header value used as authorization identity with no authentication check |
| SRC-018 | Path traversal: joined path used with no containment check |
| SRC-019 | Unescaped interpolation into a shell command (broad check) |
| SRC-020 | Unencoded value interpolated into a URL query string |
| SRC-021 | Network listener starts with no authentication mechanism anywhere in the file |
| SRC-022 | SQL/query injection via unescaped string interpolation |
| SRC-023 | Outbound fetch of a caller-derived URL with no SSRF validation call in the file |
| SRC-024 | Resource ID used as a read/approval lookup key with no ownership check (BOLA) |
| SRC-025 | Unescaped request parameter interpolated into HTML response (reflected XSS) |
| SRC-026 | Loopback-bound server has no Origin-header check (DNS rebinding / cross-site WebSocket hijacking) |
| SRC-027 | OAuth scope taken from request with no role check before token issuance |
| SRC-028 | Full upstream response/exception body logged with no redaction |
| SRC-029 | Live runtime-obtained access token/secret written to disk in plaintext |
| SRC-030 | CORS wildcard or disabled dev-server host check exposes sensitive endpoints |
| SRC-031 | Credential passed as a URL query parameter on a GET request |
| SRC-032 | Session id from a client header reused with no ownership check (session hijacking) |
| SRC-033 | Caller-controlled simulate/dry-run flag is the sole gate before a signing/broadcast call |
| SRC-034 | State-changing FastAPI/Flask route with no authentication dependency anywhere in the file |
| SRC-035 | Secret-shaped constant falls back to a hardcoded non-empty string when its env var is unset |
| SRC-036 | MCP SDK's DNS-rebinding protection explicitly disabled |