Security Scoring

Scoring: Overview

Scoring: Overview

Risk Scoring System - High-Level Design

Audience: Technical Teams, Management, Product Owners\nReading Time: 10 minutes\nLast Updated: November 12, 2025


๐ŸŽฏ The Big Picture

Imagine your organization's security as a living, breathing organism. Every security eventโ€”a detected threat, a resolved incident, a new vulnerabilityโ€”affects its health. But how do you measure this health in real-time? How do you communicate "Are we secure?" in a single glance?

Enter the Risk Scoring System: A self-updating "credit score" for your security posture that transforms thousands of security events into one meaningful number.


๐Ÿง  Core Philosophy: Event-Driven Intelligence

The system operates on a simple but powerful principle:

"Every security event tells a story. We listen, calculate, and updateโ€”automatically."

No manual spreadsheets. No weekly reports. No guesswork. Just real-time, data-driven security metrics.


๐Ÿ—๏ธ Architecture at a Glance

Think of the system as a three-layer cake:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚     ๐ŸŽจ PRESENTATION LAYER           โ”‚
โ”‚  (What users see and interact with) โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚     ๐Ÿงฎ COMPUTATION LAYER            โ”‚
โ”‚   (Where the math magic happens)    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚     ๐Ÿ“Š DATA LAYER                   โ”‚
โ”‚   (Event streams & persistence)     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Layer 1: Data Layer (The Foundation)

What happens here: Every security actionโ€”detection created, incident resolved, vulnerability patchedโ€”gets logged as an audit event.

Technical Detail: These events stream through our EventLog system in real-time. Think of it as a river of security activity flowing 24/7.

Example Event:

"A new phishing detection was classified"
โ†“
Event: monitor.DETECTION_INTELLIGENT_CLASSIFICATION_COMPLETED

Entity: DDT-C321-7071-4519

Timestamp: 2025-11-12 14:23:45

Layer 2: Computation Layer (The Brain)

What happens here: The system watches the event stream, recognizes important events, and automatically calculates score impacts.

The Flow:

๐Ÿ“จ Event arrives
    โ†“
๐ŸŽฏ Match event to modules
    โ†“
๐Ÿงฎ Calculate score change
    โ†“
๐Ÿ’พ Update module scores
    โ†“
๐ŸŒ Recalculate global score
    โ†“
โœ… Done (in milliseconds!)

Key Components:

1. Module Definitions (The Categories)

Security is divided into meaningful areas:

  • ๐Ÿ›ก๏ธ Attack Surface Management - Your exposed assets and vulnerabilities
  • ๐ŸŽญ Brand Protection - Phishing, domain squatting, reputation threats
  • ๐Ÿ“‹ Compliance - Policy violations, audit findings
  • ๐Ÿ” Threat Intelligence - Active threats, indicators of compromise

Each module "listens" for specific events using triggers.

2. Configuration Engine (The Rulebook)

This is where organizations customize their scoring:

  • Weights: "Attack Surface matters 40%, Brand Protection 35%, Compliance 25%"
  • Formulas: Optional advanced math for complex scoring scenarios
  • Module Selection: Choose which areas to monitor

Real-World Example:

Organization: FinTech Startup

Priority: Compliance is critical (regulated industry)

Configuration:
- Attack Surface: 30%
- Brand Protection: 20%
- Compliance: 50%  โ† Heavily weighted!

3. Score Calculator (The Math Engine)

When an event occurs:

  1. Find affected modules - "This detection affects ASM and Threat Intel"
  2. Calculate impact - "ASM: -2 points, Threat Intel: -1.5 points"
  3. Update module scores - "ASM: 85 โ†’ 83, Threat Intel: 90 โ†’ 88.5"
  4. Recalculate global - "Global: 87.5 โ†’ 85.8" (weighted average)

The Math (Simplified):

Global Score = (ASM ร— 40%) + (Brand ร— 35%) + (Compliance ร— 25%)
             = (83 ร— 0.40) + (90 ร— 0.35) + (95 ร— 0.25)
             = 33.2 + 31.5 + 23.75
             = 88.45 โœจ

Layer 3: Presentation Layer (The Experience)

What happens here: All this computation becomes beautiful, actionable visualizations.

๐ŸŽจ The Dashboard

Central Feature: A shield-shaped gauge showing your global score with animated water fill:

        ___
       /   \
      |  87 |  โ† Your score (animated!)
       \___/

    ๐ŸŸข Excellent

Color Psychology:

  • 80-100 (Green) - "Excellent" - Sleep well tonight
  • 60-79 (Green) - "Good" - Solid, minor improvements needed
  • 40-59 (Amber) - "Fair" - Time to take action
  • 0-39 (Red) - "Needs Attention" - All hands on deck!

๐Ÿ“Š Real-Time Updates

User Experience:

  1. Security analyst triages a detection
  2. Within 2-3 seconds, the dashboard refreshes
  3. Module score updates with smooth animation
  4. Global score recalculates automatically
  5. Change appears in "Recent Activity" feed

No refresh button needed. It just works.


๐Ÿ”„ The Complete Journey: Event to Dashboard

Let's follow a real security event through the entire system:

๐ŸŽฌ Act 1: The Event

10:45 AM - A security analyst classifies a new phishing detection as "High Severity"

Audit Log Created:
โ”œโ”€ Action: monitor.DETECTION_INTELLIGENT_CLASSIFICATION_COMPLETED
โ”œโ”€ Entity: DDT-C321-7071-4519 (the detection)
โ”œโ”€ Severity: HIGH
โ””โ”€ Timestamp: 2025-11-12 10:45:23

๐ŸŽฌ Act 2: The Recognition

10:45:23.001 - EventScoringProvider wakes up

๐Ÿค– "I heard that! Let me check my triggers..."

Trigger Match Found:
โœ“ DETECTION_INTELLIGENT_CLASSIFICATION_COMPLETED

Affected Modules:
โ”œโ”€ Attack Surface Management (multiplier: -2.0)
โ””โ”€ Threat Intelligence (multiplier: -1.5)

๐ŸŽฌ Act 3: The Calculation

10:45:23.015 - Score updates begin

Module Updates:
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Module              โ”‚ Was โ”‚ Now โ”‚ Change โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Attack Surface      โ”‚ 85  โ”‚ 83  โ”‚ -2.0   โ”‚
โ”‚ Threat Intelligence โ”‚ 90  โ”‚ 88.5โ”‚ -1.5   โ”‚
โ”‚ Brand Protection    โ”‚ 92  โ”‚ 92  โ”‚ (no change)
โ”‚ Compliance          โ”‚ 95  โ”‚ 95  โ”‚ (no change)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Global Recalculation:
Old: (85ร—40%) + (90ร—35%) + (92ร—15%) + (95ร—10%) = 88.8

New: (83ร—40%) + (88.5ร—35%) + (92ร—15%) + (95ร—10%) = 87.475

Final: 87.48 (rounded to 2 decimals)

๐ŸŽฌ Act 4: The Visualization

10:45:23.120 - Dashboard updates (105ms total latency!)

User sees:
โ”œโ”€ Shield gauge animates from 88.8 โ†’ 87.5
โ”œโ”€ Module cards update with smooth transitions
โ”œโ”€ "Recent Changes" shows new entry:
โ”‚   "Attack Surface: 85 โ†’ 83 (Detection classified)"
โ””โ”€ Trend chart adds new data point

Total time from event to visual update: ~105 milliseconds โšก


๐ŸŽ›๏ธ Configuration Flexibility

For the Non-Technical Administrator

Quick Setup Wizard (5 minutes):

  1. โœ… Select modules from templates
  2. ๐ŸŽš๏ธ Adjust weight sliders (must total 100%)
  3. ๐Ÿ‘๏ธ Preview score impact
  4. ๐Ÿ’พ Save and go live!

For the Technical Power User

Advanced Options:

  • ๐Ÿงฎ Custom Formulas - severity ร— confidence ร— 0.5 + threatLevel
  • ๐ŸŽฏ Custom Triggers - Map any audit log action to any module
  • ๐Ÿ“Š Multiple Configurations - Different scoring for different teams
  • ๐Ÿ”Œ API Access - 55+ endpoints for integration

๐Ÿ“ˆ Real-World Scenarios

Scenario 1: Security Team Dashboard (Morning Standup)

9:00 AM - Team lead opens dashboard:

๐ŸŸข Global Score: 87 (Excellent)

Module Breakdown:
โ”œโ”€ ๐Ÿ›ก๏ธ Attack Surface: 85 โ†“ (2 new vulnerabilities)
โ”œโ”€ ๐ŸŽญ Brand Protection: 92 โ†‘ (phishing domains taken down)
โ”œโ”€ ๐Ÿ“‹ Compliance: 88 โ†’ (no change)
โ””โ”€ ๐Ÿ” Threat Intelligence: 84 โ†“ (3 new IOCs detected)

๐ŸŽฏ Action Items:
"Focus on Attack Surface today - score trending down"

Decision made in 30 seconds.

Scenario 2: Executive Board Meeting

CEO: "How's our security posture?"\nCISO: Opens dashboard "We're at 87โ€”Excellent range. Up from 82 last quarter."

๐Ÿ“Š Trend (90 days):
    90 โ”ค     โ•ญโ”€โ”€โ”€โ•ฎ
    85 โ”ค   โ•ญโ”€โ•ฏ   โ•ฐโ”€โ•ฎ  โ† We are here
    80 โ”คโ”€โ”€โ”€โ•ฏ        โ•ฐโ”€โ”€
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
       Aug  Sep  Oct  Nov

โœ… 5-point improvement
โœ… Above industry average (75)
โœ… Zero critical incidents this quarter

Board confidence: High. Meeting: Successful.

Scenario 3: Compliance Audit

Auditor: "Show me evidence of continuous security monitoring."

Security Officer: Exports audit trail

๐Ÿ“‹ Score Change History (Last 30 Days)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Date       โ”‚ Module โ”‚ Old โ”‚ New โ”‚ Reason       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2025-11-12 โ”‚ ASM    โ”‚ 85  โ”‚ 87  โ”‚ Vuln patched โ”‚
โ”‚ 2025-11-11 โ”‚ Brand  โ”‚ 88  โ”‚ 92  โ”‚ Domain fixed โ”‚
โ”‚ 2025-11-10 โ”‚ TI     โ”‚ 90  โ”‚ 88  โ”‚ IOC detected โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœ… Complete audit trail
โœ… Automated tracking
โœ… Compliance requirement: MET

๐Ÿ”’ Data Integrity & Security

Audit Trail Everything

Every score change is logged:

  • Who/what caused it
  • When it happened
  • Old value โ†’ New value
  • Associated security event
  • Automatic (no human intervention needed)

Score Boundaries

Automatic safeguards:

  • Scores clamped to 0-100 range
  • Invalid formulas rejected before saving
  • Weight validation (must sum to 100%)
  • No arbitrary code execution in formulas

Organization Isolation

Multi-tenant safety:

  • Scores scoped to organizations
  • No cross-org data leakage
  • Configuration per organization
  • Independent module definitions

๐Ÿš€ Performance & Scalability

Real-Time at Scale

Current Performance:

  • โšก Event processing: <100ms average
  • ๐Ÿ“Š Dashboard load: <500ms
  • ๐Ÿ”„ Score updates: Near-instant (2-3 seconds to UI)
  • ๐Ÿ’พ Audit log storage: MongoDB (horizontally scalable)

Optimization Techniques:

  • Batch module updates before global calculation
  • Skip redundant recalculations
  • Efficient database indexing
  • Reactive UI updates (no polling)

Future-Proof Architecture

Easy to extend:

  • โœ… Add new modules without code changes
  • โœ… Create new formulas through UI
  • โœ… Adjust weights on the fly
  • โœ… Deploy multiple scoring systems (security, compliance, SLA, etc.)

๐ŸŽ“ Key Takeaways

For Management

โœ… One number tells the whole story - No need to parse complex reports\nโœ… Automatic and real-time - Always up-to-date without manual work\nโœ… Data-driven decisions - Prioritize based on quantifiable impact\nโœ… Audit-ready - Complete history of all changes

For Security Teams

โœ… Actionable insights - Know exactly what needs attention\nโœ… Trend visibility - See if you're improving or declining\nโœ… Event correlation - Understand what affects your score\nโœ… Customizable - Match your organization's priorities

For Technical Teams

โœ… Event-driven architecture - Scalable and maintainable\nโœ… API-first design - Easy integration with other tools\nโœ… Formula engine - Flexible scoring logic\nโœ… Complete audit trail - Full traceability in audit logs


๐ŸŽฏ The Bottom Line

Traditional approach:

Manually review alerts โ†’ Compile reports โ†’ Present findings
โฑ๏ธ Time: Hours/Days | ๐Ÿ“‰ Accuracy: Subjective | ๐Ÿ”„ Update frequency: Weekly

Risk Scoring System:

Events happen โ†’ Scores update โ†’ Dashboard shows status
โฑ๏ธ Time: Seconds | ๐Ÿ“Š Accuracy: Calculated | ๐Ÿ”„ Update frequency: Real-time

Result: Transform security posture from a quarterly report into a living, breathing metric that guides daily decisions.


๐Ÿ“š Want to Learn More?


๐ŸŽฌ Ready to Get Started?

5-Minute Quick Start:

  1. Navigate to /dev/org-control/risk-configuration
  2. Click "Quick Setup Wizard"
  3. Select modules and adjust weights
  4. Save configuration
  5. Watch your scores initialize and start updating!

That's it. You're now monitoring security posture in real-time. ๐Ÿš€