Skip to main content

🛡️ SecFlow

Enterprise Security Framework for DevSecOps Integration

Python License Version Status

🚀 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Support

🏆 Acknowledgments

Built with ❤️ by the SecFlow team and contributors.


⭐ Star us on GitHub if SecFlow helps secure your projects!

Metadata

Release files for secflow 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for secflow 1.0.0
File Size Uploaded
secflow-1.0.0.tar.gz 61.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for secflow 1.0.0
File Interpreter ABI Platform
secflow-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 135.6 kB

Release files / secflow-1.0.0.tar.gz

Download URL secflow-1.0.0.tar.gz
Size 61.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e4b46d9c61bfbc42f7ed7f3d2783811e5b7930b04e88ce1061b2a48eb94665bd
BLAKE2b-256 checksum
How to use checksums
44bad2a20308d8574ba7611de6458c1c409e172cc10286c65b6882ea12d62862
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / secflow-1.0.0-py3-none-any.whl

Download URL secflow-1.0.0-py3-none-any.whl
Size 74.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed909be26e75b248ed644736d1ef50d0f9eb25b6ee65450b0166bf17142ee5ab
BLAKE2b-256 checksum
How to use checksums
42ad1e538f88341fd7905cf91f15e6ff9865fba7c439310ce567f21d6796d97d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page