How shreekamesh/input-security-layer works
Security Gateway is a Flask SOC application: incoming requests are intercepted and analyzed, threats are scored and either blocked or remediated, and each outcome is logged for operational review. The dashboard and JSON endpoints expose threat history, lifecycle stages, and system-health metrics; a demo route seeds sample events. Image analysis includes binary-signature checks and hypothesis-based handling of entropy signals. The graph reflects the shown gateway, analysis, persistence, and UI code plus README-documented capabilities; unsampled template and route internals are not inferred.
Main entry points: app.py Security Gateway · ai_decision.py Decision Engine · db.py Threat Log Store · scanner.py Input Scanner
Components 18
Request Ingress
- Security Gateway
app.py - Threat Configuration
config.py
Threat Analysis
- Decision Engine
src/ai_decision.py - Input Scanner
src/scanner.py - Image Hypotheses
src/scanner.py - Input Remediation
src/fixer.py
SOC Records
- Event Logger
src/db.py - Threat Log Store
src/db.py
SOC Operations
- Dashboard Route
app.py - Threat Logs API
app.py - System Health API
app.py - Demo Event Seeder
app.py - Lifecycle View
app.py
User Interface
- SOC Dashboard
templates/dashboard.html - Login Interface
templates/index.html - Form Interaction
static/script.js - Demo Interface
templates/demo.html
Other components
- Request User
Connections 26
- Request User → Security Gateway: submits request
README.md - Form Interaction → Security Gateway: posts form
static/script.js - Security Gateway → Decision Engine: processes input
app.py - Decision Engine → Input Scanner: scans input
src/ai_decision.py - Decision Engine → Threat Configuration: checks threshold
src/ai_decision.py - Input Scanner → Threat Configuration: uses patterns
src/scanner.py - Input Scanner → Image Hypotheses: tests images
src/scanner.py - Decision Engine → Input Remediation: fixes input
src/ai_decision.py - Decision Engine → Event Logger: logs outcome
src/ai_decision.py - Security Gateway → Event Logger: initializes store
app.py - Event Logger → Threat Log Store: writes events
src/db.py - Security Gateway → Threat Log Store: reads logs
app.py - Security Gateway → Threat Log Store: seeds demo events
app.py - Request User → Dashboard Route: opens dashboard
README.md - Dashboard Route → SOC Dashboard: renders view
README.md - Dashboard Route → Lifecycle View: derives stages
app.py - Lifecycle View → SOC Dashboard: supplies stages
app.py - Request User → Threat Logs API: requests logs
README.md - Threat Logs API → Threat Log Store: reads records
app.py - Request User → System Health API: requests health
README.md - System Health API → Threat Log Store: queries metrics
app.py - Request User → Demo Event Seeder: requests demo
README.md - Demo Event Seeder → Demo Interface: renders demo
app.py - Demo Interface → Demo Event Seeder: submits demo
- Security Gateway → Login Interface: renders login
app.py - Login Interface → Form Interaction: uses interaction