bad-config.json — a synthetic fixture, not a customer's system.| Severity | Rule | Server | Field | What it means | How to fix |
|---|---|---|---|---|---|
| HIGH | MCP001 |
fs | args |
Package '@modelcontextprotocol/server-filesystem' is not pinned to an exact version (found 'latest') and is auto-installed with -y/--yes. | Pin an exact version, e.g. @modelcontextprotocol/server-filesystem@2026.7.1. |
| HIGH | MCP002 |
fs | env.GITHUB_TOKEN |
GitHub token assigned to 'GITHUB_TOKEN'. | Reference an environment variable instead, e.g. ${GITHUB_TOKEN} or env:GITHUB_TOKEN. |
| HIGH | MCP002 |
shell | env.API_KEY |
AWS access key assigned to 'API_KEY'. | Reference an environment variable instead, e.g. ${GITHUB_TOKEN} or env:GITHUB_TOKEN. |
| HIGH | MCP004 |
shell | command |
Command delegates to a shell interpreter (-c / /c / -enc) or uses eval/exec. | Invoke the target binary directly with a structured argument array; avoid shell -c wrappers. |
| HIGH | MCP005 |
remote | args[0] |
Security-disabling flag '--no-sandbox' is present. | Remove the flag. If a sandbox conflict occurs, fix the underlying cause rather than disabling the control. |
| HIGH | MCP008 |
remote | args[2] |
OpenAI-style key embedded in command-line argument. | Pass the credential via an environment variable reference instead of a literal argument. |
| MEDIUM | MCP003 |
fs | args[2] |
Filesystem-style server is granted broad root '/'. | Scope the server to the smallest project directory it actually needs. |
| MEDIUM | MCP006 |
remote | url |
Remote MCP server uses cleartext HTTP to a non-loopback host. | Use an https:// URL (or a loopback address for strictly local development). |
| MEDIUM | MCP007 |
fs | allowedTools[0] |
Wildcard tool permission at 'allowedTools[0]'. | List only the specific tool names the workflow requires. |
Source and test suite: github.com/sidsri14/mcpguard