🚀 Now available on PyPI

PyWard
Python Security & Optimization Linter

Catch security vulnerabilities and optimization issues in your Python code before they break things in production.

$ |
terminal
$ pyward my_script.py
⚠️ Security Issue: eval() detected (line 15)
💡 Optimization: Unused import 'os' (line 3)
✅ 2 issues found and fixed!

Why Choose PyWard?

Comprehensive code analysis for modern Python development

🔒

Security Checks

Detect dangerous patterns and known vulnerabilities

  • Unsafe eval() and exec() usage
  • Weak cryptographic hashes
  • Known CVE patterns
  • Vulnerable package imports

Optimization Checks

Improve code quality and performance

  • Unused imports detection
  • Unreachable code blocks
  • Dead variable assignments
  • Performance anti-patterns
🛠️

Developer Friendly

Built for modern development workflows

  • Simple CLI interface
  • Flexible check modes
  • Verbose output options
  • CI/CD integration ready

Quick Installation

Get PyWard running in seconds

1

Install via pip

Terminal
pip install pyward-cli

Requires Python 3.7 or newer

2

Run your first check

Terminal
pyward your_script.py

Runs both security and optimization checks

3

Customize your workflow

Terminal
pyward -s -v your_script.py

Security-only checks with verbose output

Usage Examples

See PyWard in action with real-world scenarios

🔍 All Checks

pyward demo.py

Run comprehensive security and optimization analysis

🔒 Security Only

pyward -s demo.py

Focus on security vulnerabilities and CVE patterns

⚡ Optimization Only

pyward -o demo.py

Check for performance issues and code quality

📝 Verbose Mode

pyward -v demo.py

Get detailed explanations and suggestions

Command Line Options

-s, --security Run only security checks
-o, --optimize Run only optimization checks
-v, --verbose Show detailed output
-h, --help Display help information

Help Make PyWard Better

PyWard is open source and welcomes contributions from the community. Whether you want to add new rules, fix bugs, or improve documentation, we'd love your help!

MIT License
Python 3.7+ Compatibility
Active Development