Skip to content

Commit c841c14

Browse files
author
Ramraj Bishnoie
committed
chore: updating skills with latest mcp changes
1 parent 2c7150f commit c841c14

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

skills/software-security/rules/codeguard-0-mcp-security.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ NEVER deploy MCP servers or clients without implementing proper security control
2626
- Sanitize file paths through canonicalization
2727
- Use parameterized queries for database operations
2828
- Apply context-aware output encoding (SQL, shell, HTML)
29-
- Treat ALL AI-generated content as untrusted input
29+
- Sanitize tool outputs: return only minimum fields, redact all PII and sensitive data
30+
- Treat ALL inputs, tool schemas, metadata, prompts, and resource content as untrusted input
3031
- Deploy prompt injection detection systems
3132
- Use strict JSON schemas to maintain boundaries between instructions and data
3233

@@ -52,13 +53,20 @@ NEVER deploy MCP servers or clients without implementing proper security control
5253
#### HTTP Streaming Transport (Remote Servers)
5354
Required security controls to implement:
5455
- Payload Limits (prevent large payload and recursive payload DoS)
56+
- Rate limiting for tool calls and transport requests
5557
- Client-Server Authentication/Authorization
5658
- Mutual TLS Authentication
5759
- TLS Encryption
5860
- CORS Protection
5961
- CSRF Protection
6062
- Integrity Checks (prevent replay, spoofing, poisoned responses)
6163

64+
### Secure Tool and UX Design
65+
- Create single-purpose tools with explicit boundaries; avoid "do anything" tools
66+
- Do not rely on the LLM for validation or authorization decisions
67+
- Use two-stage commit for high-impact actions: draft/preview first, explicit commit with confirmation second
68+
- Provide rollback/undo paths (draft IDs, snapshots, reversible actions) and time-bound commits when possible
69+
6270
### Human-in-the-Loop
6371
- Implement confirmation prompts for risky operations in your MCP server
6472
- Use elicitation on MCP server side to request user confirmation of risky actions

0 commit comments

Comments
 (0)