ofc01/sentinel-zero
๐ก๏ธ Sentinel Zero โ Autonomous Security Triage & Forensic Agent
<p align="center"> <img src="architecture_diagram.png" alt="Sentinel Zero Architecture Diagram" width="100%"/> </p>
<p align="center"> <strong>Dual Hackathon Submission</strong><br> <a href="https://splunk.devpost.com/">๐ Splunk App Development Hackathon</a> | <a href="https://findevil.devpost.com/">๐ Finding Evil: Cybersecurity Hackathon</a> </p>
<p align="center"> <a href="https://github.com/kushal-soni-official/sentinel-zero"><img src="https://img.shields.io/badge/GitHub-sentinel--zero-181717?logo=github&style=for-the-badge" alt="GitHub"/></a> <a href="https://sentinel-zero.vercel.app"><img src="https://img.shields.io/badge/Live%20Demo-Vercel-000?logo=vercel&style=for-the-badge" alt="Vercel"/></a> <a href="https://huggingface.co/spaces/ofc01/sentinel-zero"><img src="https://img.shields.io/badge/Backend-HuggingFace-yellow?logo=huggingface&style=for-the-badge" alt="HuggingFace"/></a> <img src="https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&style=for-the-badge" alt="Python"/> <img src="https://img.shields.io/badge/Gemini-2.5%20Flash-orange?logo=google&style=for-the-badge" alt="Gemini"/> <img src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge" alt="MIT"/> </p>
One codebase. Two hackathon tracks. Zero hallucinations. Sentinel Zero is a fully autonomous AI incident-response agent. It triages live Splunk SIEM alerts and performs digital forensic investigation on SANS SIFT disk/memory images โ simultaneously satisfying both hackathon criteria through a unified architecture powered by Google Gemini 2.5 Flash and the Model Context Protocol (MCP).
๐ Live Deployments
Architecture note: The Vercel frontend automatically detects the environment. On Vercel, all /api/ calls route to the Hugging Face backend, bypassing Vercel's 10-second serverless timeout entirely for long-running AI investigations.๐ฏ What It Does
๐ด Splunk Mode โ [Splunk App Dev Hackathon Track]
The agent connects to your Splunk SIEM feed, loads live security alerts (Ransomware, Data Exfiltration, Web Shells, Registry Persistence, etc.), and autonomously triages them:
- Selects and acknowledges the alert via MCP
- Runs a multi-iteration Gemini reasoning loop (up to 5 iterations)
- Calls live Splunk MCP tools to investigate the threat chain
- Streams every step to the analyst dashboard via Server-Sent Events (SSE)
- Produces a structured, copyable Incident Response Runbook
๐ข SIFT Forensics Mode โ [Finding Evil Hackathon Track]
The agent connects to our custom FastMCP server exposing read-only SANS SIFT forensic tools against disk images and memory dumps:
- Loads forensic targets (disk
.raw+ memory.dmp) - Calls
fls(filesystem timeline),volatility3(process memory), andgrep(IOC search) - Verifies every hash and IP against the live AlienVault OTX API โ no hallucinations accepted
- Runs a Self-Correction audit after each iteration to remove unsupported claims
- Generates a full Incident Response Runbook with ATT&CK-mapped findings
๐ต Shared Core Features (Both Tracks)
- Multi-Key API Rotation: Pool of 5 Gemini API keys with auto-rotation on
429 RESOURCE_EXHAUSTED. The agent never stops mid-investigation due to quota. - Self-Correction Engine: An independent second Gemini call audits every proposed finding against raw tool outputs. If a claim has no evidence, it is flagged and discarded โ confidence scored 0%.
- Real-Time SSE Streaming: Every tool call, key rotation, iteration, and correction appears in the UI console live.
- Full Audit Trail: All actions logged to
execution_log.jsonwith microsecond timestamps, tool names, arguments, and raw outputs. - Read-Only Forensics: The MCP tool schema architecturally prevents any data-modifying commands โ the AI physically cannot alter evidence.
๐๏ธ Architecture
sentinel-zero/
โโโ core/
โ โโโ agent.py # Gemini autonomous loop: multi-key pool, iteration, tool dispatch
โ โโโ self_correct.py # Independent auditor: hallucination detection + confidence scoring
โ โโโ logger.py # Timestamped execution logger (microsecond audit trail)
โ โโโ mcp_client.py # MCP tool-binding dispatcher (Splunk + SIFT modes)
โ
โโโ sift_mcp_server/
โ โโโ server.py # FastMCP server exposing forensic commands
โ โโโ tools.py # fls, volatility3, grep wrappers + live AlienVault OTX API
โ
โโโ splunk_config/
โ โโโ mcp_client_config.json # Splunk official MCP server connection config
โ
โโโ demo_data/ # High-fidelity mock datasets (zero SIFT installation required)
โ โโโ mock_alerts.json # 5 Splunk CIM-schema security events (real-world malicious IPs)
โ โโโ mock_filesystem.txt # fls timeline output: suspicious paths, WannaCry SHA256 hash
โ โโโ mock_volatility.txt # volatility3 pslist output: hollowed svchost32.exe (anomalous PPID)
โ
โโโ frontend/ # 60fps glassmorphic dashboard
โ โโโ index.html # Scroll-driven 400vh storytelling layout
โ โโโ style.css # Glassmorphism dark theme, card minimization dock
โ โโโ app.js # requestAnimationFrame canvas, SSE stream handler
โ
โโโ hf_space/
โ โโโ Dockerfile # Container definition for HF Spaces backend
โ โโโ README.md # HF Space YAML config (SDK: docker)
โ
โโโ architecture_diagram.png # System architecture visual
โโโ app.py # FastAPI server + SSE event streamer + static file host
โโโ requirements.txt # Python dependencies
โโโ vercel.json # Vercel pure-static frontend config
โโโ .env # API keys (gitignored โ see setup below)Key architectural decision: We use MCP (Model Context Protocol) instead of giving the AI raw code execution. This means the agent has a curated, sandboxed toolbox. It cannot call anything outside the defined MCP schema. For forensic investigations, this is not optional โ it is the only responsible approach.
โก Quick Start
Requirements
- Python 3.10+
- A free Gemini API key from Google AI Studio
1. Clone & Install
git clone https://github.com/kushal-soni-official/sentinel-zero.git
cd sentinel-zero
pip install -r requirements.txt2. Configure API Keys
Create a .env file in the root directory:
# Primary key (required)
GEMINI_API_KEY=your_gemini_api_key_here
# Optional fallback keys โ the agent auto-rotates through these on quota exhaustion
# Add up to GEMINI_API_KEY_10 for maximum resilience
GEMINI_API_KEY_2=your_second_key_here
GEMINI_API_KEY_3=your_third_key_here
PORT=8001Tip: Get multiple free API keys from different Google accounts at aistudio.google.com. Each free account provides 15 RPM and 1M tokens/day. With 3 keys, you effectively triple your quota.
3. Run
python app.pyThen open [http://localhost:8001](http://localhost:8001) in your browser.
๐งช Full Demo Walkthrough
Once the dashboard loads, follow this sequence to see all features:
All forensic tools fall back to high-fidelity mock data automatically โ you do not need a SIFT VM or any forensic installation to evaluate the full agent flow.
๐ Security Boundaries & Evidence Integrity
๐ Demo Data Documentation
All testing was conducted against these datasets (included in the repo):
๐ก๏ธ Real Forensic Output (Live Session Data)
The following is actual verified output from a live Sentinel Zero forensics session:
Threat Identified: Stealthy Process Hollowing + Unauthorized Executable Discovery on HOST-ALPHA-01
Self-Correction Result: Agent initially generated findings without tool evidence. Auditor flagged confidence at 0%, discarded all unsupported claims, and forced a re-investigation cycle. Final runbook generated only from verified tool output.
๐งฑ Tech Stack
๐จโ๐ป Developer
Kushal Soni GitHub: @kushal-soni-official
๐ License
MIT License โ See LICENSE for details.
Sentinel Zero ยท Dual submission: Splunk App Development Hackathon + Finding Evil: Cybersecurity Hackathon ยท 2026
