๐Ÿ›ก๏ธ SentinelAISecurity Analyst Portal

SentinelAI

AI-Powered Endpoint DLP for AI Tools. Real-time Data Loss Prevention that intercepts prompts to web AI tools (ChatGPT, Claude, Gemini, Copilot, M365 Copilot) before they are sent, classifies the content locally, scores risk, and enforces allow / warn / block.

๐Ÿ”— Live: dashboard https://dlp.kshetra.studio ยท docs https://dlp.kshetra.studio/docs

๐Ÿ“„ Start with docs/ARCHITECTURE.md and docs/INSTALL.md. The MVP focus and the Event Collection decision (browser extension over API interception) are recorded in ADR-001 in the architecture doc. Docs are also rendered online at the /docs link above.

Central platform is serverless (AWS Lambda + DynamoDB + static S3/CloudFront, via AWS SAM). MVP is rules-only โ€” the local LLM is a Phase-2 enhancement. See docs/ARCHITECTURE.md (ADR-002, ADR-003).

Repository layout

extension/     MV3 browser extension โ€” intercepts prompts pre-send (the sensor + enforcer)
agent/         Local FastAPI agent โ€” rules classifier + risk engine (+ optional Phase-2 LLM)
backend/       FastAPI on Lambda (Mangum) + DynamoDB โ€” event ingest + dashboard API
dashboard/     Next.js static export โ€” analyst portal (S3 + CloudFront)
template.yaml  AWS SAM โ€” Lambda + DynamoDB + S3/CloudFront + GitHub OIDC role
docs/          Architecture + backlog
.github/       CI (test/build) + staging + prod (SAM deploy via OIDC)

How it fits together

Browser Extension โ”€โ”€(prompt)โ”€โ”€โ–ถ Local Agent โ”€โ”€(decision)โ”€โ”€โ–ถ Browser Extension (allow/warn/block)
                                     โ”‚
                                     โ””โ”€โ”€(telemetry: hash + snippet + metadata)โ”€โ”€โ–ถ Central Backend โ”€โ”€โ–ถ Dashboard

Quick start โ€” real DLP locally

Run the agent natively and load the extension unpacked (the endpoint side needs no cloud):

# 1) agent
cd agent && python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --host 127.0.0.1 --port 8787

# 2) extension โ†’ chrome://extensions โ†’ Developer mode โ†’ Load unpacked โ†’ ./extension

Then open ChatGPT and send a fake secret like sk-abcdefghijklmnopqrstuvwxyz012345 โ€” it gets blocked.

Local central platform (optional)

docker compose up -d dynamodb-local   # local DynamoDB
# create the table + run backend/dashboard โ€” see docker-compose.yml comments

Tests

cd agent   && PYTHONPATH=. pytest -q
cd backend && pip install -r requirements-dev.txt && PYTHONPATH=. pytest -q

Deploy (serverless, your AWS)

Two stages, one script. Locally (with your AWS creds) it creates just the OIDC deploy role (bootstrap.yaml, plain CloudFormation โ€” no build needed); then it triggers CI, which builds the Lambda on a Linux runner and deploys the app stack (Lambda + DynamoDB + S3/CloudFront) + publishes the dashboard. Building on CI avoids needing Docker / Python 3.12 locally and gives correct Linux-native wheels.

# Ensure AWS creds are active (aws sts get-caller-identity must succeed) โ€” any
# method works: static keys, AWS_PROFILE=..., or SSO. No SSO required.
./scripts/bootstrap.sh

The script reuses an existing GitHub OIDC provider if your account already has one. Thereafter every push to main deploys automatically via OIDC (no static AWS keys). Production is a separate stack (sentinelai-production) gated by the production GitHub Environment's reviewers.

Env Trigger Workflow
CI PRs & pushes .github/workflows/ci.yml
Staging push to main .github/workflows/staging.yml (SAM deploy via OIDC)
Production GitHub Release / manual, with approval .github/workflows/prod.yml

Confidential โ€” internal MVP.