LLM stacks \ 4.6 Security (deep dive) - terrytaylorbonn/auxdrone GitHub Wiki

25.0717 Lab notes (Gdrive), Git

  1. Input Validation & Sanitization
  • Prompt injection attacks - malicious instructions in user input
  • Input length limits to prevent DoS attacks
  • Filter harmful content requests
  • Example: "Ignore previous instructions and..." → block/sanitize
  1. Data Protection
  • RAG database contains sensitive documents
  • Embedding models may leak information
  • Secure storage of vector databases
  • Access controls on data folders
  • Example: Your ./data folder should have proper file permissions
  1. API Security
  • Agent API authentication/authorization
  • Rate limiting to prevent abuse
  • HTTPS for all communications
  • API key management for external services
  • Example: Ollama API (localhost:11434) - secure in production
  1. MCP Tool Security
  • Validate tool permissions before execution
  • Sandbox tool execution environments
  • Audit trail of tool usage
  • Limit file system access scope
  • Example: File operations restricted to specific directories
  1. Model Security
  • Model poisoning - compromised training data
  • Adversarial inputs designed to confuse models
  • Information leakage from model responses
  • Model version control and integrity checks
  1. Network Security
  • Secure communication between components
  • VPN/firewall for remote MCP servers
  • Monitor for unusual traffic patterns
  • Encrypt data in transit and at rest
  1. Operational Security
  • Log monitoring and alerting
  • Regular security updates
  • Incident response procedures
  • User access auditing