Kaavach
Kavach: AI scam triage and community early-warning for India
The problem
Millions of people in India receive fake KYC alerts, UPI refund requests, parcel fee demands, fake job offers and “digital arrest” threats by SMS, WhatsApp and email. In the moment, most people cannot tell real from fake, and nobody sees which scams are spreading until the damage is done.
What Kavach does
Paste a suspicious message or upload a screenshot. In seconds Kavach returns:
A verdict (Likely Scam, Suspicious, or Uncertain) with a risk score
The manipulation tactics used (urgency, impersonation, fake job, suspicious link) with the evidence from the message
Extracted indicators such as phone numbers, UPI IDs and links, shown masked
A plain-language explanation and clear next steps
Support for English, Hindi and Bengali
The community layer
Every scan is fingerprinted with Simhash, so many variants of the same scam group into one growing campaign. The Radar dashboard, powered by Snowflake views, shows trending tactics and active campaigns. A Drill page trains users to spot scams.
How it works
FastAPI backend validates input (rate limit, size cap, magic-byte image checks, Pillow preprocessing).
A rule engine and regex extractor find known scam patterns and indicators.
Google Gemini performs structured classification, with the message fenced as untrusted content to resist prompt injection.
Scoring blends rules and AI. If the AI is unavailable, Kavach returns “Uncertain” with a visible warning rather than a false all-clear.
Simhash assigns the scan to a campaign.
Indicators are hashed with HMAC-SHA256 before storage, so raw phone numbers and UPI IDs are never kept.
Scans, hashed indicators and campaigns are written to Snowflake in the background.
Tech stack
Python, FastAPI, Google Gemini API, Snowflake (tables and analytics views), Simhash, Pillow, TypeScript, slowapi, pytest.
Security and privacy (OWASP LLM Top 10)
LLM01 prompt injection: system instruction plus tagged untrusted content with tag stripping
LLM02 sensitive data: HMAC hashing, no raw PII stored
LLM04 resource abuse: rate limiting, upload and text caps
LLM06 excessive agency: advisory only; never blocks messages, reads inboxes or opens links
Generic client errors, server-side logging, and environment-based secrets
Limits (stated honestly)
Kavach is advisory and does not guarantee safety.
It currently uses Gemini, not Gemma.
Snowflake Cortex AI is not available on trial accounts, so the Radar search is a local filter, not natural-language querying.
Detection accuracy has not been benchmarked at scale.
Open source
MIT licensed. Setup: clone, copy .env.example to .env, set the Gemini and Snowflake values and a random KAVACH_HMAC_KEY, run pip install -r requirements.txt, then uvicorn app.main:app.
Tracks: AI in Cybersecurity (OWASP), Best Open Source AI, Snowflake.
Built with
AI tools
Prize Categories Entered
- Submitted
Best Use of Gemma 4
- Submitted

Best Open-Source AI Project
- Event prizeSubmitted
AI in Cybersecurity — OWASP JIS University
- Event prizeSubmitted
Best Open-Source AI Project with Snowflake