SecurityScan 🔒
Comprehensive security analysis for Python projects with a single command
SecurityScan is a powerful Python security analysis tool that automatically detects vulnerabilities, hardcoded secrets, and security misconfigurations in your Python projects. Install it with pip and start scanning immediately - no configuration required!
🚀 Quick Start
# Install SecurityScan
pip install securityscan
# Scan your project
secscan .
# Scan with auto-fix for safe issues
secscan --fix .
# Generate HTML report
secscan --output html .
✨ Features
🔍 Comprehensive Security Scanning
- Dependency Vulnerabilities: Check against OSV, Safety DB, and PyUp.io
- Hardcoded Secrets: Detect API keys, passwords, tokens, and credentials
- SQL Injection: Find vulnerable SQL query patterns
- Code Injection: Detect dangerous functions like
eval(),exec() - Framework Security: Django, Flask, FastAPI specific checks
- Cryptography Issues: Weak algorithms, hardcoded salts
- Authentication Issues: Missing auth, weak passwords
- XSS Detection: Unescaped user input in templates
📊 Rich Reporting
- Terminal Output: Colored, interactive results with progress bars
- HTML Reports: Beautiful, interactive web reports
- JSON/SARIF: CI/CD integration ready
- Markdown: Documentation-friendly format
⚡ Smart Features
- Auto-detection: Automatically identifies project type and applies relevant rules
- Incremental Scanning: Only scan changed files for speed
- Parallel Processing: Fast scanning of large codebases
- Configuration Support:
.securityscan.ymlfor team policies
🛠️ Installation
pip install securityscan
📖 Usage
Basic Commands
# Scan current directory
secscan .
# Scan specific directory
secscan /path/to/project
# Quick scan (critical issues only)
secscan --quick .
# Deep scan (comprehensive analysis)
secscan --deep .
# Auto-fix safe issues
secscan --fix .
# Generate different output formats
secscan --output html .
secscan --output json .
secscan --output sarif .
Advanced Options
# Custom configuration
secscan --config .securityscan.yml .
# Ignore specific files/patterns
secscan --ignore "tests/*,*.pyc" .
# Set severity threshold
secscan --severity high .
# Continuous monitoring
secscan --watch .
# Update vulnerability databases
secscan --update-db
📋 Configuration
Create a .securityscan.yml file in your project root:
# SecurityScan Configuration
severity_threshold: medium
output_format: html
# Ignore patterns
ignore:
- "tests/*"
- "*.pyc"
- "venv/*"
# Custom rules
rules:
- id: custom-secret
pattern: "SECRET_KEY.*=.*['\"](.*?)['\"]"
severity: high
message: "Custom secret pattern detected"
# Framework-specific settings
frameworks:
django:
check_debug: true
check_csrf: true
flask:
check_debug: true
check_secret_key: true
🎯 Supported Frameworks
- Django: Debug mode, CSRF protection, security middleware
- Flask: Debug mode, secret keys, Jinja2 rendering
- FastAPI: Input validation, CORS, exposed endpoints
- Generic Python: All security patterns apply
🔧 CI/CD Integration
GitHub Actions
name: Security Scan
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install SecurityScan
run: pip install securityscan
- name: Run Security Scan
run: secscan --output sarif --fail-on high .
GitLab CI
security_scan:
stage: test
script:
- pip install securityscan
- secscan --output sarif .
artifacts:
reports:
codequality: security-report.sarif
📈 Security Score
SecurityScan calculates a security score (0-100) based on:
- Number and severity of vulnerabilities
- Security best practices implemented
- Framework-specific security measures
- Dependency health
Perfect scores get special congratulations! 🎉
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
👨💻 Author
SecurityScan is created by Sherin Joseph Roy, Co-Founder of DeepMost AI and creator of intelligent systems that bridge research and real-world safety.
- 🌐 GitHub: @Sherin-SEF-AI
- 💼 LinkedIn: sherin-roy-deepmost
- 📧 Email: sherin.joseph2217@gmail.com
Made with ❤️ by Sherin Joseph Roy
Metadata
Release files for securityscan 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| securityscan-1.0.0.tar.gz | 47.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| securityscan-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 105.0 kB
Release files / securityscan-1.0.0.tar.gz
| Download URL | securityscan-1.0.0.tar.gz |
|---|---|
| Size | 47.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01d1741c618ec403c3d95a1d6a9c04be3f6d72f8a388f151686fc91bc6fc7d4a
|
|
BLAKE2b-256 checksum How to use checksums |
d656fbe0b95d66e0fc12291c5e5a92fdcf5d603a98f5d9f4b7cae5ad41c4a49f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / securityscan-1.0.0-py3-none-any.whl
| Download URL | securityscan-1.0.0-py3-none-any.whl |
|---|---|
| Size | 57.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc7a79742e858e8e79e35449712d9fdf30710311d8533fc3665f2d6e55011e9a
|
|
BLAKE2b-256 checksum How to use checksums |
5bfc69ecd7eafd6cbdbbdf685b31088c2b65e6b39ad77c41889bf36808e1ef94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|