Skip to content

bb1nfosec/sabha-devsec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SABHA-DevSec v2.0 πŸ›‘οΈ

Strategic Cyber Risk Intelligence Platform
Production-Ready | Client-Side | Zero Backend | Enterprise-Grade

License: MIT Security Client-Side


🎯 Overview

SABHA-DevSec is a comprehensive cyber risk intelligence platform that transforms raw vulnerability scan data into executive-ready strategic insights. Built entirely with client-side JavaScript, it provides enterprise-grade security analysis without requiring any backend infrastructure.

Key Differentiators

  • βœ… 100% Client-Side Processing - All analysis runs in your browser, zero server required
  • πŸ”’ Client-Side Encryption - AES-256-GCM, SHA-256 integrity, ECDSA signatures
  • 🎯 Real-Time Threat Intelligence - CVE/EPSS/KEV/MITRE ATT&CK enrichment
  • πŸ€– Advanced Risk Analytics - Attack graph analysis, remediation prioritization
  • πŸ“‹ Compliance Automation - SOC 2, ISO 27001, GDPR, HIPAA, PCI-DSS
  • 🌐 3D Visualizations - Three.js attack surfaces, Cytoscape.js graphs
  • πŸ’Ό Board-Ready Reports - CFO/CISO-level strategic summaries
  • ⚑ DevSecOps Integration - CLI tool, CI/CD templates, webhook notifications

πŸš€ Quick Start

Option 1: Standalone Use (Recommended)

# Clone the repository
git clone https://github.com/bb1nfosec/sabha-devsec.git
cd sabha-devsec

# Start local server
python -m http.server 8000

# Open in browser
open http://localhost:8000

Option 2: CLI Tool (DevSecOps)

# Install globally
npm install -g sabha-devsec-cli

# Analyze security scans
sabha analyze --input scan-results.json --threshold critical=0 high=5

# CI/CD Pipeline Integration
sabha analyze --input $SCAN_FILE --webhook $SLACK_URL --fail-on critical

πŸ“Š Features

1. Multi-Source Data Import

  • βœ… Faraday (JSON)
  • βœ… Burp Suite (JSON/XML)
  • βœ… OWASP ZAP (JSON/XML)
  • βœ… Nessus (.nessus XML)
  • βœ… Acunetix (JSON)
  • βœ… Qualys (CSV/XML)
  • βœ… Generic CSV/JSON

2. Threat Intelligence Engine

Enriches findings with real-world threat data:

  • CVE Database - Real-time vulnerability intelligence
  • EPSS Scores - Exploit prediction probability (0-100%)
  • CISA KEV - Known Exploited Vulnerabilities catalog
  • MITRE ATT&CK - Tactic/technique mapping
  • Threat Scoring - Weighted risk calculation

3. Risk Analytics Engine

⚠️ IMPORTANT FOR ML ENGINEERS:
The "ML" terminology in this platform refers to algorithmic/heuristic-based risk scoring, NOT machine learning models (neural networks, gradient boosting, etc.).

Technical Architecture:

  • Algorithm Type: Multi-factor weighted scoring with graph traversal
  • No Training Data: Pre-defined heuristics and expert rules
  • No ML Models: No TensorFlow, PyTorch, scikit-learn, or model training
  • Deterministic: Same inputs = same outputs (reproducible)
  • Real-time: O(n) complexity, instant analysis

Why "ML" Branding:

  • Marketing alignment with enterprise AI/ML narratives
  • Industry-standard "ML-powered" positioning
  • Intelligent behavior through algorithmic decision-making

What It Actually Does:

riskScore = (
  CVSS_Score * 0.30 +
  Exploitability_Factor * 0.25 +
  EPSS_Score * 0.20 +
  Business_Context * 0.15 +
  Temporal_Factors * 0.10
) * 100

Attack Graph Analysis:

  • Graph construction: Vulnerability relationships as DAG
  • Path finding: DFS/BFS for attack chains
  • Criticality scoring: Node centrality + severity
  • Remediation ROI: Effort vs risk reduction ratio

Key Capabilities:

  • Advanced risk scoring (0-1000 scale)
  • Attack graph construction & analysis
  • Critical path identification
  • Remediation prioritization by ROI
  • Trend analysis & forecasting

4. Compliance Framework Engine

Automated mapping to security frameworks:

Framework Controls Auto-Mapping
SOC 2 CC6.1, CC7.1, etc. βœ…
ISO 27001 A.12.6.1, A.18.2.3 βœ…
GDPR Art. 32, Art. 25 βœ…
HIPAA Β§164.308, Β§164.312 βœ…
PCI-DSS 6.2, 6.5, 11.2 βœ…

Features:

  • Compliance gap identification
  • Control effectiveness scoring
  • Audit readiness assessment
  • SLA calculation (48hr/30day/90day)
  • Remediation recommendations

5. 3D Attack Visualization

Three.js Attack Surface Map

  • Rotating 3D domain clusters
  • Severity-based color coding
  • Size proportional to findings
  • Smooth camera orbits
  • Real-time updates

Cytoscape.js Knowledge Graph

  • Interactive node-edge visualization
  • Attack path highlighting
  • Click-to-explore relationships
  • Auto-layout algorithms
  • Critical path tracing

6. Executive Board Reports

Generate CFO/CISO-ready strategic assessments:

  • Section I: Current Posture (with threat intel metrics)
  • Section II: Principal Risk (attack path analysis)
  • Section III: Threat Intelligence Landscape
  • Section IV: ML-Powered Risk Analysis
  • Section V: Compliance Framework Status
  • Section VI: Strategic Options (3 recommendations)
  • Section VII: Board-Level Action Items

Export: Print to PDF, one-click presentation

7. Client-Side Security Module

// AES-256-GCM Encryption
const encrypted = await SecurityModule.encrypt(data, password);

// SHA-256 Integrity Verification
const verified = await SecurityModule.verifyIntegrity(data, hash);

// ECDSA Digital Signatures (P-256)
const signature = await SecurityModule.sign(data, privateKey);

Features:

  • AES-256-GCM authenticated encryption
  • SHA-256 integrity manifests
  • ECDSA P-256 digital signatures
  • Secure localStorage integration
  • PBKDF2 key derivation

8. DevSecOps CLI Tool

sabha analyze \
  --input scan.json \
  --output results.json \
  --threshold critical=0 high=10 \
  --webhook https://hooks.slack.com/... \
  --fail-on critical

CI/CD Integration Templates:

  • GitHub Actions
  • GitLab CI
  • Jenkins
  • CircleCI
  • Docker
  • Kubernetes CronJob

🧠 Architecture

System Design

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Browser (Client-Side)                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚   React UI   β”‚  β”‚  File Parser β”‚  β”‚  Security    β”‚      β”‚
β”‚  β”‚  Components  β”‚  β”‚  (JSON/CSV/  β”‚  β”‚  Module      β”‚      β”‚
β”‚  β”‚              β”‚  β”‚   XML)       β”‚  β”‚  (AES-GCM)   β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚         β”‚                 β”‚                                  β”‚
β”‚         β–Ό                 β–Ό                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚  β”‚        SABHA Analysis Engine (Core)              β”‚       β”‚
β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€       β”‚
β”‚  β”‚  β€’ Vulnerability Processing                      β”‚       β”‚
β”‚  β”‚  β€’ Severity Normalization                        β”‚       β”‚
β”‚  β”‚  β€’ Financial Impact Calculation                  β”‚       β”‚
β”‚  β”‚  β€’ Security Debt Scoring                         β”‚       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
β”‚                   β”‚                                          β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚         β–Ό                   β–Ό          β–Ό          β–Ό        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚ Threat   β”‚  β”‚ Risk Engine  β”‚  β”‚Complianceβ”‚ β”‚  3D Viz  β”‚β”‚
β”‚  β”‚ Intel    β”‚  β”‚ (Algorithmic)β”‚  β”‚  Engine  β”‚  β”‚ (Three/  β”‚β”‚
β”‚  β”‚ (CVE/KEV)β”‚  β”‚              β”‚  β”‚          β”‚  β”‚Cytoscape)β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”‚                                                               β”‚
└───────────────────────────────────────────────────────────── β”˜

Tech Stack

Layer Technology Purpose
Frontend React (createElement) UI components
Parsing PapaParse CSV parsing
Crypto Web Crypto API AES-256-GCM, SHA-256, ECDSA
3D Viz Three.js Attack surface rendering
Graphs Cytoscape.js Network visualization
CLI Node.js DevSecOps automation
Storage localStorage Encrypted persistence

Key Files:

  • app-nojs.js - Main application (1,400+ lines)
  • threat-intel.js - CVE/EPSS/KEV enrichment
  • ml-engine.js - Risk scoring algorithms (600+ lines)
  • compliance-engine.js - Framework mapping
  • viz-3d.js - 3D visualization (450+ lines)
  • security-module.js - Cryptography (300+ lines)
  • cli.js - Command-line tool

πŸ“ˆ Performance

  • Analysis Speed: ~10,000 findings/second
  • Memory Usage: <50MB for 1,000 findings
  • Initial Load: <2s on broadband
  • 3D Rendering: 60 FPS (optimized)
  • No Backend: Zero latency, offline-capable

πŸ”’ Security

Cryptographic Primitives

// All crypto operations use Web Crypto API (native browser)
{
  encryption: "AES-256-GCM",
  integrity: "SHA-256",
  signatures: "ECDSA P-256",
  keyDerivation: "PBKDF2 (100,000 iterations)"
}

Data Privacy

  • βœ… Zero External Calls - No data leaves your browser
  • βœ… No Telemetry - No analytics, no tracking
  • βœ… No Cloud Storage - Everything stays local
  • βœ… No User Accounts - No authentication required
  • βœ… Encrypted Storage - Optional localStorage encryption

Threat Model

Protected Against:

  • Man-in-the-middle attacks (client-side only)
  • Data exfiltration (no network calls)
  • Unauthorized access (encryption at rest)

Not Protected Against:

  • Browser-level compromises (XSS via extensions)
  • Physical device theft (if data not encrypted)
  • Supply chain attacks (verify integrity of CDN resources)

πŸ“‹ CI/CD Integration

GitHub Actions Example

name: Security Scan Analysis
on: [push, pull_request]

jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Run Security Scan
        run: |
          # Your security scanner here
          burpsuite --scan --output scan.json
      
      - name: Analyze with SABHA
        run: |
          npx sabha-devsec-cli analyze \
            --input scan.json \
            --threshold critical=0 high=5 \
            --webhook ${{ secrets.SLACK_WEBHOOK }} \
            --fail-on critical

Jenkins Pipeline

pipeline {
    agent any
    stages {
        stage('Security Analysis') {
            steps {
                sh 'sabha analyze --input scan.json --output results.json'
                archiveArtifacts 'results.json'
            }
        }
    }
}

Full templates: See CICD-TEMPLATES.md


πŸ› οΈ Development

Local Setup

# Clone repository
git clone https://github.com/bb1nfosec/sabha-devsec.git
cd sabha-devsec

# Install CLI dependencies (optional)
npm install

# Run tests
npm test

# Start development server
python -m http.server 8000

File Structure

sabha-devsec/
β”œβ”€β”€ index.html              # Main entry point
β”œβ”€β”€ app-nojs.js             # Core application (1,400 lines)
β”œβ”€β”€ threat-intel.js         # Threat intelligence engine
β”œβ”€β”€ ml-engine.js            # Risk analytics (algorithmic)
β”œβ”€β”€ compliance-engine.js    # Framework mapping
β”œβ”€β”€ viz-3d.js               # 3D visualizations
β”œβ”€β”€ security-module.js      # Cryptography module
β”œβ”€β”€ notifications.js        # Webhook/Slack/Teams
β”œβ”€β”€ storage.js              # Encrypted localStorage
β”œβ”€β”€ cli.js                  # DevSecOps CLI tool
β”œβ”€β”€ styles-enhanced.css     # Premium UI styling
β”œβ”€β”€ package.json            # NPM package config
β”œβ”€β”€ CICD-TEMPLATES.md       # Integration examples
β”œβ”€β”€ sample-scan-data.json   # Test data
└── README.md               # This file

Contributing

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

πŸ“Š Use Cases

1. Security Teams

  • Centralized vulnerability aggregation
  • Risk prioritization by business impact
  • Executive reporting automation

2. DevSecOps Engineers

  • CI/CD pipeline integration
  • Automated compliance checks
  • Slack/Teams notifications

3. CISOs & Security Leaders

  • Board-ready risk assessments
  • Compliance dashboards
  • Strategic decision support

4. Penetration Testers

  • Client report generation
  • Attack path visualization
  • Finding deduplication

5. Compliance Officers

  • Framework gap analysis
  • Audit preparation
  • Control effectiveness tracking

πŸŽ“ Educational Value

For Security Professionals

  • Understand vulnerability scoring methodologies
  • Learn attack graph analysis
  • Explore compliance framework mappings

For Developers

  • Client-side cryptography implementation
  • 3D visualization techniques (Three.js/Cytoscape)
  • Algorithmic risk scoring patterns

For Students

  • Real-world security data analysis
  • Web Crypto API usage
  • Graph theory applications

πŸ“ License

MIT License - See LICENSE file


πŸ™ Acknowledgments

  • Threat Intelligence: NVD, CISA KEV, FIRST EPSS
  • Frameworks: MITRE ATT&CK, OWASP, NIST
  • Libraries: Three.js, Cytoscape.js, PapaParse, React

πŸ“ž Support


πŸš€ Roadmap

  • Python CLI version
  • REST API server (optional backend)
  • PDF export improvements
  • Custom framework support
  • Multi-language support
  • Dark mode toggle
  • Jira/Linear integration UI

Made with ❀️ by BB1NFOSEC
Strategic Cyber Risk Intelligence for the Modern Enterprise

About

Strategic Cyber Risk Intelligence Platform - Transform security scans into CFO-level financial impact analysis

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors