capability_integrityTier 1 · 70% confidence

security-capability-integrity-when-a-capability-yaml-file-is-approved-and-later--1758edca

agent: security

When does this happen?

IF When a capability YAML file is approved and later modified (e.g., by an attacker or accidental edit), the MCP server's behavior could change without observation, enabling rug-pull attacks where approved content is replaced with malicious operations.

How others solved it

THEN Use `mcp-gateway cap pin <file>` to generate a SHA-256 hash of the canonical file content (grep -v '^sha256:' capability.yaml | sha256sum). The loader will refuse any mismatched file on load and on every file watcher event, logging 'RUG-PULL DETECTED' and quarantining the capability until an operator re-pins it. This ensures that any change to an approved capability is detected and automatically blocks execution.

mcp-gateway cap pin capabilities/my-capability.yaml

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics