SecureLens AI is an intelligent cybersecurity assistant that automatically analyzes uploaded documents for sensitive information, evaluates compliance risks, generates AI-powered security reports, performs document masking, supports OCR for image-based documents, and enables natural language interaction through Retrieval-Augmented Generation (RAG).
The system combines traditional pattern matching, OCR, vector search, and Generative AI to help organizations identify confidential information and improve document security before sharing or storing files.
Public Deployment:
π https://securelens-ai-production.up.railway.app
Organizations frequently share resumes, contracts, reports, invoices, identity documents, and confidential files without realizing that they may contain personally identifiable information (PII) or sensitive credentials.
SecureLens AI aims to:
- Detect confidential and sensitive information
- Assess cybersecurity and compliance risks
- Generate AI-powered compliance reports
- Protect sensitive information through masking
- Allow users to ask questions about uploaded documents using AI
- Support both text-based and scanned documents
- PDF Documents
- TXT Files
- CSV Files
- Image Files (PNG, JPG, JPEG) using OCR
Automatically detects:
- Email Addresses
- Phone Numbers
- PAN Numbers
- Aadhaar Numbers
- Credit Card Numbers
- Employee IDs
- Bank Account Numbers
- IFSC Codes
- API Keys
- GitHub Tokens
- JWT Tokens
- Passwords
- Confidential Keywords
Google Gemini generates:
- Compliance observations
- Security risks
- Recommended actions
- Executive summary
Documents are automatically classified into:
- Low Risk
- Medium Risk
- High Risk
based on detected sensitive information.
Users can ask questions like:
- Summarize this document
- How many emails are present?
- List all sensitive information
- What security risks exist?
- What should I improve?
The chatbot combines:
- Retrieval-Augmented Generation (RAG)
- FAISS Vector Database
- Sentence Transformers
- Google Gemini
Automatically masks sensitive information such as:
Email:
john****@gmail.com
Phone:
98******21
PAN:
ABCDE****F
Image-based documents are processed using EasyOCR.
Example:
- Aadhaar Card
- Identity Cards
- Scanned Documents
- Resume Security Analysis
- Employee Document Screening
- Compliance Audits
- Secure Document Sharing
- HR Verification
- Identity Document Analysis
- Cybersecurity Assessments
- Data Privacy Compliance
- Detects sensitive information automatically
- Reduces accidental data exposure
- AI-generated cybersecurity insights
- Supports scanned image documents
- Interactive AI assistant
- Easy-to-use web interface
- Fast semantic document search
- Privacy-aware document masking
User
β
βΌ
Upload Document
β
βΌ
Document Parser
(PDF / TXT / CSV / OCR)
β
βΌ
Sensitive Data Detection
(Regex + Keywords)
β
βΌ
Risk Classification
β
βΌ
AI Compliance Report
(Google Gemini)
β
βΌ
FAISS Vector Database
β
βΌ
RAG AI Compliance Chatbot
β
βΌ
Data Masking Module
β
βΌ
User Dashboard
SecureLens AI combines multiple AI techniques to provide intelligent document analysis.
EasyOCR extracts text from image-based documents.
Regex-based detection identifies structured information including:
- Emails
- Phone Numbers
- PAN
- Aadhaar
- Credit Cards
- API Keys
- Passwords
Keyword-based detection identifies confidential terminology.
Each detected entity is assigned a weighted score.
Overall document risk is classified into:
- Low
- Medium
- High
The uploaded document is:
- Split into chunks
- Embedded using Sentence Transformers
- Stored in a FAISS vector database
When the user asks a question:
- Relevant document chunks are retrieved
- Sent to Google Gemini
- Gemini generates context-aware responses
Google Gemini analyzes:
- Compliance observations
- Security risks
- Recommendations
- Executive summary
- HTML5
- CSS3
- JavaScript
- Tailwind CSS
- Flask
- Python
- Google Gemini API
- Sentence Transformers
- FAISS
- EasyOCR
- pdfplumber
- pandas
- NumPy
- python-dotenv
- Railway
Include screenshots of:
- Home Page
screenshots/home.png
- Document Upload
screenshots/upload.png
- Sensitive Information Detection
screenshots/detection.png
- AI Compliance Report
screenshots/report.png
- AI Chatbot
screenshots/chatbot.png
- Data Masking
screenshots/masking.png
During development, several technical challenges were encountered:
- Extracting text from scanned image documents.
- Improving sensitive data detection accuracy while minimizing false positives.
- Implementing Retrieval-Augmented Generation (RAG) for document-specific question answering.
- Managing large AI dependencies such as EasyOCR and Sentence Transformers.
- Optimizing deployment due to memory constraints on cloud hosting platforms.
- Designing a responsive and intuitive cybersecurity dashboard.
- Ensuring AI responses remain context-aware and document-specific.
- Multi-document support
- PDF download of masked documents
- Automatic document redaction
- Compliance support for GDPR, HIPAA, ISO 27001, PCI-DSS
- User authentication
- Document history dashboard
- Batch document analysis
- Cloud storage integration
- Role-based access control
- Real-time compliance monitoring
- AI-powered policy recommendation engine
git clone https://github.com/ManvithaPola/SecureLens-AI.git
cd SecureLens-AIWindows
python -m venv venvActivate
venv\Scripts\activatepip install -r requirements.txtVisit:
https://aistudio.google.com/app/apikey
Create a free Gemini API Key.
Inside the project root create:
.env
Add:
GEMINI_API_KEY=YOUR_GEMINI_API_KEYpython app.pyThe application will start at:
http://127.0.0.1:5000
SecureLens-AI/
βββ app.py
βββ requirements.txt
βββ README.md
βββ .env
β
βββ modules/
β parser.py
β detector.py
β classifier.py
β chat.py
β rag.py
β summarizer.py
β masker.py
β keyword_detector.py
β ocr.py
β
βββ templates/
β
βββ uploads/
β
βββ screenshots/
Manvitha Pola
Artificial Intelligence & Machine Learning Engineer
This project is intended for educational and research purposes.