How sarvajithsankar/tenet-ai works
TENET AI is defensive middleware for LLM applications: a plugin submits prompts for security analysis, after which requests can be blocked, sanitized, flagged, or allowed and activity is exposed to a SOC dashboard. The README documents heuristic, ML, and behavioral detection, policy actions, Redis event queuing, and analyst feedback; sampled service code confirms ingestion, analyzer endpoints, Redis-backed event handling, tenant security, and dashboard API reads. Behavioral analysis, policy handling, and feedback are documented capabilities, but their implementation was not sampled.
Main entry points: analyzer/app.py Analyzer API · ingest/app.py Ingest API · App.tsx Dashboard App · client.py Security Plugin
Components 16
LLM Integration
- Security Plugin
tenet_plugin/client.py - Ingest API
services/ingest/app.py
Detection Services
- Analyzer API
services/analyzer/app.py - Heuristic Detection
services/analyzer/app.py - Phishing Model
services/analyzer/model/phishing_model.py - Behavioral Analysis
services/analyzer - Policy Actions
services
Security Operations
- Tenant Security
services/security/tenant_security.py - Redis Event Queue
services/ingest/app.py - Prometheus Metrics
services/utils/metrics.py
SOC Dashboard
- Dashboard App
dashboard/src/App.tsx - Chart Aggregations
dashboard/src/utils/chartAggregations.ts - SOC Charts
dashboard/src/components/charts
Other components
- LLM Application
- LLM Provider
- Security Analyst
Connections 19
- LLM Application → Security Plugin: secures calls
- Security Plugin → Ingest API: submits prompts
- Ingest API → Tenant Security: authenticates tenants
services/ingest/app.py - Ingest API → Analyzer API: requests analysis
- Analyzer API → Heuristic Detection: checks patterns
services/analyzer/app.py - Analyzer API → Phishing Model: scores prompts
- Analyzer API → Behavioral Analysis: analyzes behavior
- Analyzer API → Policy Actions: selects actions
services/analyzer/app.py - Policy Actions → LLM Provider: forwards allowed
- Ingest API → Redis Event Queue: stores events
services/ingest/app.py - Analyzer API → Redis Event Queue: updates events
services/analyzer/app.py - Ingest API → Prometheus Metrics: records requests
services/ingest/app.py - Analyzer API → Prometheus Metrics: records requests
services/analyzer/app.py - Dashboard App → Ingest API: fetches events
dashboard/src/App.tsx - Dashboard App → Analyzer API: checks health
dashboard/src/App.tsx - Dashboard App → Chart Aggregations: aggregates events
dashboard/src/App.tsx - Chart Aggregations → SOC Charts: provides chart data
dashboard/src/components/charts/DetectionsOverTimeChart.tsx - Security Analyst → Dashboard App: reviews alerts
- Security Analyst → Behavioral Analysis: provides feedback