LLM stacks \ 4 CPLT \ 4.6 Security - terrytaylorbonn/auxdrone GitHub Wiki
25.0717 Lab notes (Gdrive), Git
- 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
- 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
- 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
- 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
- Model Security
- Model poisoning - compromised training data
- Adversarial inputs designed to confuse models
- Information leakage from model responses
- Model version control and integrity checks
- Network Security
- Secure communication between components
- VPN/firewall for remote MCP servers
- Monitor for unusual traffic patterns
- Encrypt data in transit and at rest
- Operational Security
- Log monitoring and alerting
- Regular security updates
- Incident response procedures
- User access auditing