If you discover a security vulnerability in MEMANTO, please report it to:
- Email: support@moorcheh.ai
- Subject: [MEMANTO Security] Brief description
Please do not open public GitHub issues for security vulnerabilities.
What NOT to commit:
.envfiles with real credentials- API keys (Moorcheh API keys start with
mk_) - JWT tokens
- Private keys (
.key,.pemfiles) - Database credentials
- Any file containing passwords or sensitive tokens
Local Development:
# Create .env file (already in .gitignore)
cp .env.example .env
# Edit .env with your REAL API key
nano .env
# The .env file is automatically ignored by gitProduction Deployment:
- Docker: Use
--env-fileor-eflags - Kubernetes: Use Secrets or external secret managers (Vault, AWS Secrets Manager)
- Cloud Run/Lambda: Use platform secret management
- Never hardcode secrets in code or Dockerfiles
The .env.example file contains placeholder values only:
# .env.example (safe to commit)
MOORCHEH_API_KEY=mk_your_api_key_here
# .env (NEVER commit)
MOORCHEH_API_KEY=mk_abc123real_key_hereIf you accidentally commit a secret:
- Rotate the key immediately - Get a new API key from Moorcheh dashboard
- Remove from git history:
# Remove file from git history git filter-branch --force --index-filter \ "git rm --cached --ignore-unmatch .env" \ --prune-empty --tag-name-filter cat -- --all # Force push (use with caution) git push origin --force --all
- Update .gitignore (already done in this repo)
- Verify removal: Use
git log --all --full-history -- .env
This repository has GitHub secret scanning enabled. If you receive an alert:
Example tokens in documentation are not real secrets:
Bearer <jwt_token_here>- placeholdermk_your_api_key_here- placeholdereyJhbGc.eyJzdWI.SflKxw...- example format (truncated, not valid)
These are safe and will not expose your system.
If the alert references a real API key:
- Rotate the key immediately in Moorcheh dashboard
- Remove from git history (see above)
- Update local .env with new key
- Verify .gitignore is working:
git check-ignore .env
Before making your repository public:
-
.envis in.gitignore - No
.envfile in git history:git log --all -- .env(should be empty after cleanup) -
.env.exampleonly contains placeholders - No hardcoded API keys in code:
git grep -i "mk_" "*.py" "*.ts" "*.js" - All documentation examples use placeholders
- GitHub secret scanning alerts reviewed and addressed
MEMANTO implements multiple security layers:
- Server-owned
MOORCHEH_API_KEYrequired at startup for backend access - Client
X-Session-Tokenrequired for session-scoped and memory endpoints - Tenant ID derived from authenticated principal (never from request body)
- Multi-tenant isolation enforced at namespace level
- Per-tenant quotas prevent abuse
- Configurable limits: 60 writes/min, 120 reads/min
- Content size limits (10KB text, 5KB metadata)
- Anti-poisoning validation for facts and preferences
- Pydantic model validation for all requests
- HTTPS enforced in production
- CORS properly configured
- Structured logging with PII redaction
- Safe deletion with audit trail
For detailed security architecture, see SECURITY_ISOLATION_ONE_PAGER.md.
- Use environment-specific API keys (dev/staging/prod)
- Rotate keys regularly (quarterly minimum)
- Use secret management tools (not .env files) in production
- Enable HTTPS/TLS for all endpoints
- Configure CORS with specific origins (not
*)
- Enable structured logging
- Monitor for unusual API activity
- Set up alerts for rate limit violations
- Regular security audits of access logs
- Implement log aggregation (ELK, Datadog, etc.)
- Deploy behind API gateway or reverse proxy
- Use VPC/private networks when possible
- Implement DDoS protection
- Regular vulnerability scanning
- Keep dependencies updated
# Check for security vulnerabilities
pip install safety
safety check
# Update dependencies
pip list --outdated
pip install --upgrade <package>- GitHub Dependabot enabled for this repository
- Review and merge security PRs promptly
- Test thoroughly before deploying dependency updates
For security questions or concerns:
- General: Dr. Majid Fekri, CTO Moorcheh.ai
- Security Issues: support@moorcheh.ai
- Moorcheh Platform: https://moorcheh.ai/security
Last Updated: March 2026