RAG security and data-leak testing.
Your AI assistant can search every document it is connected to. We check whether it shows staff, customers or partners the salary sheet, the contract or the client file they should never see, and whether one planted document can make it lie.
- FOUND Intern saw board minutes via “summarise Q3 plans”
- BLOCKED Salary sheet blocked for the sales role
- FLAGGED Deleted file still in the search index
- FIXED Results now filtered by user permissions
- PASSED Client A cannot see client B
RAG (retrieval-augmented generation) is how most company AI assistants answer questions: they search your documents, then write a reply from what they find. Data-leak testing checks whether that search respects who is asking. We sign in as different roles, customers and tenants and try to pull out files they should not see, test whether a planted document can change answers, and check that deleted or private data is really gone from the index.
- Duration
- 1–3 weeks
- Coverage
- OWASP LLM02 · LLM08
- Tested as
- Every role and tenant you name
- Pricing
- Fixed fee
Nine leaks we look for.
Most leaks are not clever hacks. They are permission gaps that existed for years and only become visible when an AI can search everything in seconds.
- Missing permission filters
The index holds every document, and nothing checks the asker’s role before results reach the AI.
- Cross-tenant leaks
In a SaaS product, one customer’s question pulls in another customer’s files.
- Over-shared sources
A folder shared with “everyone” years ago is now searchable by an AI that never forgets.
- Stale and deleted data
Files removed from the drive still live on in the vector index or cache.
- Poisoned documents
A planted file with hidden instructions or false facts changes answers for everyone.
- Personal data in answers
Names, phone numbers, Aadhaar or PAN numbers repeated in replies, citations or logs.
- Exposed vector stores
An index reachable from the internet, where stored vectors can be used to rebuild parts of the original text.
- Prompt and citation leaks
The AI quotes internal file names, paths or its hidden instructions in its sources.
- Logs and analytics
Questions and answers, full of personal data, kept indefinitely in a third-party tool.
How an intern reads the board minutes.
- Your teamA new intern asks a harmless question
“Summarise our plans for next quarter.”
- Your AIThe assistant searches everything
The index was built from the whole shared drive, including a folder of board papers shared too widely years ago.
- Your dataBoard minutes appear in the answer
Restructuring plans and salary bands come back in a neat summary, with citations.
- AttackerThe summary is forwarded
Nobody hacked anything. The AI simply made old over-sharing easy to find.
- The fixThe fix
Filter results by the asker’s real permissions at query time, clean up over-shared sources, and keep sensitive folders out of the index. We retest as every role.
We prove leaks without reading your secrets
Wherever possible we plant our own marked test documents, called canaries, in each source and check which roles can retrieve them. That proves a leak exists without our testers opening your real salary sheet.
Where we must test with real content, we agree in writing what we may view and how evidence is redacted.
The OWASP risks for AI search.
Where AI search most often fails
- LLM01Prompt injection
Hidden instructions inside documents the AI retrieves.
- LLM02Sensitive information disclosure
Personal and confidential data in answers, citations and logs.
- LLM03Supply chain
Embedding models, vector databases and connectors in the pipeline.
- LLM04Data and model poisoning
Planted or edited documents that change what the AI says.
- LLM05Improper output handling
Answers rendered as links, scripts or markdown that leak data.
- LLM06Excessive agency
Connectors with write access the assistant does not need.
- LLM07System prompt leakage
Hidden instructions and file paths exposed in replies.
- LLM08Vector and embedding weaknesses
Permission filters, tenant isolation, index exposure and inversion.
- LLM09Misinformation
Answers built from outdated or wrong documents.
- LLM10Unbounded consumption
Expensive queries that drain your AI and search budget.
Ask as everyone, see what comes back.
- Week 1
Scope and roles
Agree data sources, user roles and tenants, and get a test account for each.
- Week 1
Map the data
Trace each source from drive or database, to index, to answer.
- Weeks 1–2
Leak testing
Ask as every role, try cross-tenant access, plant canary documents, inspect the index.
- Weeks 2–3
Report
Leaks with examples, root causes and the access fixes.
- After your fixes
Retest
Every leak test repeated, as every role.
Every leak, shown and fixed.
- 01Leak report with examples
Each leak shown with the question asked, who asked it and what came back.
- 02Source clean-up list
Over-shared folders and files to fix at the source.
- 03Access design fixes
How to filter by permission at query time, per tenant and per role.
- 04DPDP and GDPR mapping
Which leaks involve personal data, and what the law expects you to do.
- 05Free retest
Every leak test repeated after your fixes.
Before, or just after, you switch on AI search.
- Companies rolling out Microsoft 365 Copilot, Gemini for Google Workspace or Glean across shared drives
- SaaS products with an AI assistant that searches each customer’s data
- HR, legal and finance teams with AI search over sensitive files
- Support teams whose bots answer from a knowledge base
- Teams building RAG on Pinecone, Weaviate, pgvector, Elasticsearch or OpenSearch
Cheaper before than after
Run a permission clean-up on your sources before an AI indexes them. It costs far less than handling a leak.
We offer a pre-rollout check of about a week: which folders are over-shared, which should stay out of the index and which roles to test first.
Mapped to the rules on personal data.
Emblems are HanulSec’s own artwork showing which frameworks our work maps to. They are not the owners’ logos and do not mean HanulSec is certified against them.
Questions buyers ask before they call us.
Q01What is RAG security testing?
Q02Is this the same as a DLP tool?
Q03Do you need to read our documents?
Q04We use Microsoft 365 Copilot. Can you test it?
Q05How does the DPDP Act affect AI search?
Q06How long does it take?
Scope it in two minutes.
Tell us what you need protected. A security engineer, not a salesperson, replies with a fixed-price proposal.
- Reply within one business day
- Free 30-minute scoping call
- Mutual NDA before any detail is shared
- Fixed price, free retest of fixed findings