How manoj-gif-b/healthsecure_ai works
HealthSecureAI screens healthcare documents for prompt injection, combines explainable rules with an offline text classifier, and allows, reviews, or blocks downstream AI processing. The Streamlit app implements this workflow directly; a separate FastAPI backend exposes a similar analysis and logs API. Both paths produce risk explanations and event records. The README was empty, so this map relies on the supplied source excerpts and index; the optional real-model integration is documented but unimplemented.
Main entry points: main.py FastAPI analysis · app.py Streamlit workflow · logger.py Event logger · security_engine.py Threat rules
Components 9
User Interface
- Streamlit workflow
HealthSecureAI/app.py
Risk Analysis
- Threat rules
HealthSecureAI/backend/security_engine.py - Risk classifier
HealthSecureAI/backend/classifier.py
Safe Processing
- AI handler
HealthSecureAI/backend/ai_handler.py - Event logger
HealthSecureAI/backend/logger.py - JSON event log
API Service
- FastAPI analysis
HealthSecureAI/backend/main.py - API schemas
HealthSecureAI/backend/models.py
Other components
- Document user
Connections 14
- Document user → Streamlit workflow: submits document
HealthSecureAI/app.py - Streamlit workflow → Threat rules: scans text
HealthSecureAI/app.py - Streamlit workflow → Risk classifier: estimates risk
HealthSecureAI/app.py - Streamlit workflow → AI handler: forwards allowed text
HealthSecureAI/app.py - Streamlit workflow → Event logger: records event
HealthSecureAI/app.py - Streamlit workflow → Event logger: reads recent events
HealthSecureAI/app.py - Event logger → JSON event log: reads and appends
HealthSecureAI/backend/logger.py - Document user → FastAPI analysis: posts analysis
HealthSecureAI/backend/main.py - FastAPI analysis → Threat rules: scans text
HealthSecureAI/backend/main.py - FastAPI analysis → Risk classifier: estimates risk
HealthSecureAI/backend/main.py - FastAPI analysis → AI handler: forwards allowed text
HealthSecureAI/backend/main.py - FastAPI analysis → Event logger: records event
HealthSecureAI/backend/main.py - FastAPI analysis → Event logger: reads log entries
HealthSecureAI/backend/main.py - FastAPI analysis → API schemas: validates and shapes
HealthSecureAI/backend/main.py