Security updates are provided for the following versions:
| Version | Supported |
|---|---|
| 1.0.x | β Yes |
| < 1.0 | β No |
If you discover a security vulnerability in pyDefine, please report it responsibly:
Email: yahyabuilds@gmail.com
Subject: [SECURITY] pyDefine Vulnerability Report
- Description: Clear description of the vulnerability
- Impact: What can be exploited and potential damage
- Reproduction: Step-by-step instructions to reproduce
- Environment: Python version, OS, pyDefine version
- Proof of Concept: Code or commands demonstrating the issue
- Suggested Fix: If you have one (optional)
- Initial Response: Within 48 hours
- Status Update: Within 7 days
- Fix Timeline: Depends on severity (see below)
- Remote code execution
- Privilege escalation
- Data exposure affecting all users
- Local code execution
- Denial of service
- Data corruption
- Information disclosure
- Security misconfiguration
- Limited privilege escalation
- Minor information leaks
- Theoretical vulnerabilities
- Best practice violations
The safe_run() function uses Python's exec() which can be dangerous:
safe_run() with trusted code or in sandboxed environments.
Security measures implemented:
- Restricted
__builtins__by default - No file system access by default
- No network access by default
- No dangerous functions (eval, exec, import, open)
Do NOT use for:
- Running untrusted user code in production
- Processing arbitrary code from the internet
- Executing code without proper validation
Safe usage:
β Good - trusted code result = safe_run("print('Hello')")
β Bad - untrusted user input user_code = request.form['code'] # From web form result = safe_run(user_code) # DANGEROUS!
Recommended for production:
- Use containerization (Docker)
- Use proper sandboxing (PyPy sandbox, RestrictedPython)
- Validate and sanitize all inputs
- Run in isolated processes
- Set resource limits (CPU, memory, time)
- Keep Updated: Use the latest version
pip install --upgrade pydefine
- Verify Installations: Check package integrity
pip show pydefine
- Use Virtual Environments: Isolate dependencies
python -m venv venv source venv/bin/activate pip install pydefine
- Review Code: Audit code before production use
- No Secrets in Code: Never commit API keys, passwords, tokens
- Validate Inputs: Check all user inputs
- Handle Errors Safely: Don't expose sensitive information
- Use Type Hints: Help catch type-related bugs
- Write Tests: Include security test cases
We perform regular security testing:
- Static Analysis: Using Bandit, safety
- Dependency Scanning: Automated dependency checks
- Code Review: All PRs reviewed for security
- Fuzzing: Random input testing
- Penetration Testing: Manual security testing
- We will acknowledge receipt within 48 hours
- We will provide regular updates on progress
- We will credit reporters (unless they prefer anonymity)
- We will notify affected users promptly
- Coordinated Disclosure: We prefer coordinated disclosure
- 90-Day Window: Fixes released within 90 days when possible
- CVE Assignment: For critical vulnerabilities
- Security Advisory: Published after fix is available
Security researchers who responsibly disclose vulnerabilities will be recognized here:
No vulnerabilities reported yet
Security Email: yahyabuilds@gmail.com
PGP Key: Available upon request
GitHub Security: Use private vulnerability reporting
Thank you for helping keep pyDefine secure! π
Powered by pyDefine β Created by Yahya