Metadata-Version: 2.4
Name: secflow
Version: 1.0.0
Summary: Enterprise Security Framework for DevSecOps Integration
Author-email: SecFlow Team <team@secflow.dev>
Maintainer-email: SecFlow Team <team@secflow.dev>
License: MIT License
        
        Copyright (c) 2025 SecFlow Team
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE. 
Project-URL: Homepage, https://github.com/WaiperOK/SecFlow
Project-URL: Documentation, https://github.com/WaiperOK/SecFlow/wiki
Project-URL: Repository, https://github.com/WaiperOK/SecFlow
Project-URL: Changelog, https://github.com/WaiperOK/SecFlow/blob/main/CHANGELOG.md
Project-URL: Bug Tracker, https://github.com/WaiperOK/SecFlow/issues
Keywords: security,sast,dast,devsecops,ci-cd,vulnerability,scanning
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Requires-Dist: click>=8.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: jinja2>=3.0.0
Requires-Dist: rich>=12.0.0
Requires-Dist: python-gitlab>=3.0.0
Requires-Dist: pygithub>=1.55
Requires-Dist: boto3>=1.20.0
Requires-Dist: elasticsearch>=8.0.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: plotly>=5.0.0
Requires-Dist: bandit>=1.7.0
Requires-Dist: safety>=2.0.0
Requires-Dist: checkov>=2.0.0
Requires-Dist: semgrep>=1.0.0
Requires-Dist: truffleHog>=2.0.0
Requires-Dist: gitpython>=3.1.0
Requires-Dist: psutil>=5.8.0
Requires-Dist: cryptography>=3.4.0
Requires-Dist: flask>=2.3.0
Requires-Dist: flask-cors>=4.0.0
Provides-Extra: dev
Requires-Dist: pytest>=6.0.0; extra == "dev"
Requires-Dist: pytest-cov>=2.12.0; extra == "dev"
Requires-Dist: pytest-mock>=3.6.0; extra == "dev"
Requires-Dist: black>=21.0.0; extra == "dev"
Requires-Dist: flake8>=3.9.0; extra == "dev"
Requires-Dist: mypy>=0.910; extra == "dev"
Requires-Dist: pre-commit>=2.15.0; extra == "dev"
Requires-Dist: sphinx>=4.0.0; extra == "dev"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
Provides-Extra: cloud
Requires-Dist: azure-identity>=1.7.0; extra == "cloud"
Requires-Dist: azure-storage-blob>=12.8.0; extra == "cloud"
Requires-Dist: google-cloud-storage>=1.42.0; extra == "cloud"
Requires-Dist: kubernetes>=18.0.0; extra == "cloud"
Provides-Extra: enterprise
Requires-Dist: ldap3>=2.9.0; extra == "enterprise"
Requires-Dist: pyjwt>=2.3.0; extra == "enterprise"
Requires-Dist: celery>=5.2.0; extra == "enterprise"
Requires-Dist: redis>=4.0.0; extra == "enterprise"
Dynamic: license-file

# 🛡️ SecFlow

**Enterprise Security Framework for DevSecOps Integration**

[![Python](https://img.shields.io/badge/Python-3.8%2B-blue.svg)](https://python.org)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
[![Version](https://img.shields.io/badge/Version-1.0.0-orange.svg)](https://pypi.org/project/secflow/)
[![Status](https://img.shields.io/badge/Status-Production%20Ready-brightgreen.svg)]()

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

```bash
# 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

```python
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

```bash
# 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:

```yaml
# 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:

```python
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:

```bash
# 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

```yaml
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

```yaml
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](CONTRIBUTING.md).

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](LICENSE) file for details.

## 🌟 Support

- 📖 **Documentation**: [Wiki](https://github.com/WaiperOK/SecFlow/wiki)
- 🐛 **Bug Reports**: [Issues](https://github.com/WaiperOK/SecFlow/issues)
- 💬 **Discussions**: [GitHub Discussions](https://github.com/WaiperOK/SecFlow/discussions)
- 📧 **Email**: team@secflow.dev

## 🏆 Acknowledgments

Built with ❤️ by the SecFlow team and contributors.

---

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