Enterprise Security Framework for DevSecOps Integration
Project description
๐ก๏ธ SecFlow
Enterprise Security Framework for DevSecOps Integration
๐ New: Complete enterprise-ready security framework with advanced threat modeling, plugin system, and web interface!
โจ Features
๐ Plugin System
- Extensible architecture with custom scanners
- Automatic plugin discovery and registration
- Version management and dependencies
๐ Elasticsearch Integration
- Centralized result storage and analytics
- Automatic index creation and mapping
- Ready-to-use Kibana dashboards
๐ฌ Multi-Channel Notifications
- Slack - Rich formatting with attachments
- Microsoft Teams - Interactive cards
- Email - HTML/text notifications
๐ก๏ธ Advanced Threat Modeling
- Automatic codebase analysis
- STRIDE threat generation
- Mitigation recommendations
- JSON/YAML export
๐ Web Management Interface
- Interactive dashboard
- REST API for integrations
- Real-time scan monitoring
- CORS support for frontends
๐ Security Scanners
- SAST: Bandit, Semgrep, CodeQL
- DAST: OWASP ZAP, Nuclei
- Secrets: GitLeaks, TruffleHog
- Dependencies: Safety, Snyk
- Infrastructure: Checkov, Terrascan
๐ Quick Start
Installation
# Install from PyPI
pip install secflow
# Or install from source
git clone https://github.com/WaiperOK/SecFlow.git
cd SecFlow
pip install -e .
Basic Usage
from pyseckit import SecFlow
# Initialize SecFlow
sf = SecFlow()
# Run security scan
results = sf.scan(target="./my-project")
# Generate threat model
threat_model = sf.generate_threat_model("./my-project")
# Start web interface
sf.start_web_interface(port=8080)
CLI Usage
# Initialize configuration
secflow init
# Run comprehensive scan
secflow scan --target ./project --format json,html
# Start web interface
secflow web --port 8080
# Generate threat model
secflow threat-model --target ./project --output threats.json
# Test notifications
secflow test-notifications
๐ Configuration
Create .secflow.yml in your project root:
# Core settings
project_name: "My Secure Project"
target_directories: ["."]
# Scanners configuration
scanners:
bandit:
enabled: true
severity_threshold: "medium"
semgrep:
enabled: true
rules: ["security", "owasp-top-10"]
# Integrations
elasticsearch:
enabled: true
hosts: ["localhost:9200"]
# Notifications
notifications:
slack:
enabled: true
webhook_url: "https://hooks.slack.com/..."
channel: "#security"
# Web interface
web:
enabled: true
host: "0.0.0.0"
port: 8080
# Plugins
plugins:
discovery_paths: ["./plugins", "~/.secflow/plugins"]
๐๏ธ Architecture
SecFlow/
โโโ ๐ฆ Core Modules
โ โโโ pyseckit/core/ # Base functionality
โ โโโ pyseckit/sast/ # Static analysis
โ โโโ pyseckit/dast/ # Dynamic testing
โ โโโ pyseckit/secret_scan/ # Secret detection
โ โโโ pyseckit/cloud/ # Infrastructure analysis
โ
โโโ ๐ Advanced Modules
โ โโโ pyseckit/plugins/ # Plugin system
โ โโโ pyseckit/integrations/ # External integrations
โ โโโ pyseckit/threat_model/ # Threat modeling
โ โโโ pyseckit/web/ # Web interface
โ
โโโ ๐ Outputs
โโโ reports/ # Generated reports
โโโ dashboards/ # Kibana dashboards
โโโ threat_models/ # Threat models
๐ Plugin Development
Create custom security scanners:
from pyseckit.plugins import ScannerPlugin, PluginMetadata
class MyCustomScanner(ScannerPlugin):
def __init__(self, config):
metadata = PluginMetadata(
name="my-scanner",
version="1.0.0",
description="Custom security scanner",
author="Your Name"
)
super().__init__(config, metadata)
def scan(self, target):
# Your scanning logic here
return scan_results
๐ REST API
SecFlow provides a comprehensive REST API:
# System status
GET /api/status
# Start scan
POST /api/scan
{
"target": "./project",
"scanners": ["bandit", "semgrep"]
}
# Get results
GET /api/results/{scan_id}
# Generate threat model
POST /api/threat-model
{
"target": "./project",
"format": "json"
}
๐ CI/CD Integration
GitHub Actions
name: SecFlow Security Scan
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run SecFlow
run: |
pip install secflow
secflow scan --target . --fail-on-critical
GitLab CI
security_scan:
stage: test
script:
- pip install secflow
- secflow scan --target . --format gitlab-sast
artifacts:
reports:
sast: gl-sast-report.json
๐ Enterprise Features
- Multi-tenant support with role-based access
- LDAP/SSO integration for enterprise authentication
- Compliance reporting (SOC2, PCI-DSS, GDPR)
- Custom rule engines for organization-specific policies
- Audit trails and compliance tracking
- High availability deployment options
๐ค Contributing
We welcome contributions! Please see our Contributing Guide.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Support
- ๐ Documentation: Wiki
- ๐ Bug Reports: Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ง Email: team@secflow.dev
๐ Acknowledgments
Built with โค๏ธ by the SecFlow team and contributors.
โญ Star us on GitHub if SecFlow helps secure your projects!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file secflow-1.0.0.tar.gz.
File metadata
- Download URL: secflow-1.0.0.tar.gz
- Upload date:
- Size: 61.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4b46d9c61bfbc42f7ed7f3d2783811e5b7930b04e88ce1061b2a48eb94665bd
|
|
| MD5 |
5f7128aede3317652607812e3215569d
|
|
| BLAKE2b-256 |
44bad2a20308d8574ba7611de6458c1c409e172cc10286c65b6882ea12d62862
|
File details
Details for the file secflow-1.0.0-py3-none-any.whl.
File metadata
- Download URL: secflow-1.0.0-py3-none-any.whl
- Upload date:
- Size: 74.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed909be26e75b248ed644736d1ef50d0f9eb25b6ee65450b0166bf17142ee5ab
|
|
| MD5 |
7cfd2fb3a4c9674616b4c8d529d1f836
|
|
| BLAKE2b-256 |
42ad1e538f88341fd7905cf91f15e6ff9865fba7c439310ce567f21d6796d97d
|