This document tracks critical security vulnerabilities found and fixed in agentic-brain V4.
- File:
src/agentic_brain/enterprise/disaster_recovery.py - Issue: Imported pickle module but never used it
- Risk: Creates unnecessary attack surface
- Fix: Removed unused pickle import
- CWE: CWE-502 (Deserialization of Untrusted Data)
- File:
src/agentic_brain/commerce/chatbot/chatbot/wp_hooks.py - Issue: Default webhook secret was "change-me"
- Risk: Predictable secrets enable webhook tampering
- Fix: Changed default to empty string with security comment
- CWE: CWE-798 (Use of Hard-coded Credentials)
- File:
src/agentic_brain/auth/demo/simple_auth.py - Issue: Hardcoded admin/admin credentials in demo mode
- Risk: Default credentials in production deployments
- Fix:
- Made demo passwords configurable via environment variables
- Added clear security warnings in UI
- Masked passwords in help text
- CWE: CWE-798 (Use of Hard-coded Credentials)
- File:
src/agentic_brain/benchmark/runner.py - Issue: subprocess calls without proper error handling
- Risk: Potential command injection or information disclosure
- Fix: Added
check=Falseparameter to prevent exceptions on errors - CWE: CWE-78 (OS Command Injection)
-
Set secure demo passwords:
export DEMO_ADMIN_PASSWORD="secure_random_password"
-
Configure webhook secrets:
export WEBHOOK_SECRET="your_secure_webhook_secret"
- Never use demo authentication - implement proper auth provider
- Set all secrets via environment variables - never hardcode
- Review all subprocess calls - validate inputs
- Regular security audits - use tools like bandit, semgrep
Run these commands to verify the fixes:
# 1. Verify no pickle usage in disaster recovery
grep -n "pickle" src/agentic_brain/enterprise/disaster_recovery.py
# Should return no matches
# 2. Verify webhook secret is not hardcoded
grep -n "change-me" src/agentic_brain/commerce/chatbot/chatbot/wp_hooks.py
# Should return no matches
# 3. Verify demo passwords are configurable
grep -n "DEMO_ADMIN_PASSWORD" src/agentic_brain/auth/demo/simple_auth.py
# Should find environment variable usage
# 4. Check for additional hardcoded secrets
grep -rn "password.*=" src/agentic_brain/ --include="*.py" | grep -v "None\|environ\|getenv"- Implement proper secret management (HashiCorp Vault, AWS Secrets Manager)
- Add security linting to CI/CD pipeline (bandit, semgrep)
- Regular penetration testing
- Implement security headers for web endpoints
- Add rate limiting and DDoS protection
For security issues, contact the security team immediately.
Date: $(date) Scan completed: $(date) Fixed by: Security Scan Agent