CoolFace
Apppublic

Siddhantkt/support-ticket-triage

sourceHugging Faceupdated 6mo agoView on Hugging Face
1likes
App README

๐Ÿ›ก๏ธ SentinelSOC - Autonomous Cyber-Defense Command Center

OpenEnv Meta PyTorch Hackathon Cyber Defense

SentinelSOC is a high-performance Reinforcement Learning environment simulating the high-stakes operations of a Security Operations Center (SOC). Built for the Meta PyTorch OpenEnv Hackathon, it challenges AI agents to act as Autonomous SOC Analysts (L1) defending a global enterprise from real-time cyber threats.

The agent must ingest critical security alerts (Ransomware, DDoS, Phishing), query a Threat Intelligence Database, deploy immediate mitigation countermeasures, and draft comprehensive incident reports to neutralize risks before they escalate.


๐Ÿ“ Tactical Architecture

sentinel-soc/
โ”œโ”€โ”€ openenv.yaml              # OpenEnv spec (missions, metadata)
โ”œโ”€โ”€ Dockerfile                # High-performance deployment for HF Spaces
โ”œโ”€โ”€ inference.py              # SentinelAI core engine ([START]/[STEP]/[END] logs)
โ”œโ”€โ”€ models.py                 # Pydantic SOC Action/Observation models
โ”œโ”€โ”€ client.py                 # EnvClient bridge
โ”œโ”€โ”€ server/
โ”‚   โ”œโ”€โ”€ app.py                # SentinelSOC Command Center (Gradio Dashboard)
โ”‚   โ”œโ”€โ”€ sentinel_env.py       # SOC environment logic
โ”‚   โ”œโ”€โ”€ kb.json               # Security Playbooks (Threat Intel)
โ”‚   โ”œโ”€โ”€ tickets.json          # Security Incidents (Easy, Medium, Hard)
โ”‚   โ””โ”€โ”€ requirements.txt

โš™๏ธ Operational Workflow

mermaid
flowchart TD
    A["๐Ÿค– SentinelAI Agent"] -->|"reset / start_mission"| B["๐Ÿ›ก๏ธ Command Bridge Initialized"]
    B -->|"Active Threat Vector Details"| A

    A -->|"1. investigate (query)"| C["๐Ÿ” Threat Intel Database"]
    C -->|"Returns Security Playbooks"| A

    A -->|"2. mitigate (unit, severity, status)"| D["โšก Countermeasures Deployed"]
    D -->|"Returns mitigation signal"| A

    A -->|"3. report (incident summary)"| E["๐Ÿ“ CISO Incident Report"]
    E -->|"Returns synchronization status"| A

    A -->|"4. submit"| F["โš–๏ธ Grader (Assessment)"]

    F -->|"Playbook adherence check"| G["๐Ÿ“Š Score 0.01 โ€“ 0.99"]
    F -->|"Threat containment quality"| G
    F -->|"Unit/Severity accuracy"| G

    G -->|"[END] Mission Complete"| H["โœ… Threat Neutralized"]

    style A fill:#ff004c,color:#fff
    style F fill:#9d00ff,color:#fff
    style G fill:#00ff9d,color:#000
    style H fill:#00e5ff,color:#000

๐Ÿ—๏ธ Technical Highlights

Rubric AreaSentinelSOC Implementation
Mission UtilityModels critical L1 SOC triage including Ransomware containment, DDoS mitigation, Phishing response, and Insider Threat auditing.
Grader QualityDynamic Multi-Vector Scoring: Evaluates action precision, playbook retrieval quality via semantic hint overlap, and report verbosity.
Reward ShapingPotential-Based Rewards: Every step provides a non-zero positive reward, ensuring the cumulative score resides strictly in (0.01, 0.99) for hackathon compliance.
Command UISOC Tactical Dashboard: A futuristic, dark-mode terminal with neon alerts, live threat telemetry, and an "AI Tournament" battleground.
CreativityTransforms standard ticket triage into a high-stakes, Action-Oriented Cybersecurity Simulation with real-world incident playbooks.

๐Ÿ›ฐ๏ธ The Sentinel Dashboard (WOW Factors)

  1. 1.Cyber-Security Command Center โ€” High-contrast tactical UI designed with Orbitron fonts and red-alert pulsing indicators.
  2. 2.๐Ÿ” Intellectual Retrieval โ€” Instant access to a curated database of 20+ security playbooks (SQLi patching, CIDR blocking).
  3. 3.๐Ÿ“Š Fleet Analytics โ€” Live Thompson-style line plots for Mitigation Efficiency and Policy Entropy tracking.
  4. 4.๐Ÿค– Autonomous Vector Analysis โ€” Integrated LLM-driven inference loop that demonstrates agentic reasoning in real-time.
  5. 5.๐Ÿ” Supervisor Authorized Terminal โ€” Multi-tiered access demonstration for CISO-level oversight.

๐Ÿฆพ Mission Parameters

Observation Space (SentinelSOCObservation)

  • โ€”current_ticket: The raw security alert or threat vector detected.
  • โ€”kb_search_results: Retrieved intelligence from the Security Playbooks.
  • โ€”ticket_status: Mitigation status (open, in_progress, resolved, escalated).
  • โ€”ticket_priority: Threat severity level (low, medium, high, critical, urgent).
  • โ€”ticket_team: Assigned mitigation unit (security, it_support, network, legal).
  • โ€”draft_reply: Drafted incident report for post-mortem analysis.

Action Space (SentinelSOCAction)

  1. 1.`start_mission`: Initiate a specific DEFCON threat level.
  2. 2.`investigate`: Search logs and threat intelligence for patterns.
  3. 3.`mitigate`: Update incident severity, routing unit, and mitigation status.
  4. 4.`report`: Compose a detailed incident summary.
  5. 5.`submit`: Close the incident and finalize the mission.

๐Ÿš€ Deployment & Intelligence Uplink

Prerequisites: Python 3.10+ and Hugging Face API Token.

1. Launch Command Center

bash
# Install dependencies
pip install -r server/requirements.txt

# Start the Command Center (Gradio)
python server/app.py

2. Initiate Sovereign Agent (SentinelAI)

To run the automated baseline agent against the environment:

bash
export HF_TOKEN="your_hf_token"
export API_BASE_URL="https://router.huggingface.co/v1"
export MODEL_NAME="Qwen/Qwen2.5-72B-Instruct"

python inference.py --url http://localhost:7860

๐Ÿฆพ Efficiency Baseline

Autonomous agents using SentinelAI (Qwen-72B) achieve the following performance metrics:

Threat LevelAvg. Mitigation ScoreEfficiency
Easy0.98 / 1.00OPTIMAL
Medium0.95 / 1.00HIGH
Hard0.89 / 1.00ROBUST

SentinelSOC โ€” Autonomous Defense. Sovereign Intelligence. ๐Ÿ›ก๏ธ