Appearance
SEC398 / MCP-CAPABILITIES-WILDCARD
SEC398 flags MCP client configuration that grants all capabilities through capabilities: ["*"] or capabilities: "*".
Why It Matters
Wildcard capability grants remove a clear least-privilege boundary in shared MCP config. They make it harder to review what a committed server entry is actually allowed to do and easier for broad access to spread unnoticed.
Trigger Shape
The rule triggers only when all of these are true:
- the file is a detected MCP config surface
- the path is not fixture-like
capabilitiesis either the exact string"*"- or
capabilitiesis an array containing the exact string"*"
Clean Cases
These stay clean:
capabilities: ["tools", "resources"]- MCP configs that omit
capabilities - fixture-like examples under test or fixture paths
Example Trigger
json
{
"mcpServers": {
"demo": {
"command": "node",
"args": ["server.js"],
"capabilities": ["*"]
}
}
}Safer Example
json
{
"mcpServers": {
"demo": {
"command": "node",
"args": ["server.js"],
"capabilities": ["tools", "resources"]
}
}
}How To Fix
Replace wildcard capabilities with only the narrowly reviewed MCP capabilities that are actually required.