mykka.ai
← All postsGuide

AI Prompt Security: How to Keep Sensitive Data Out of AI Chat Interfaces

Megan O'Brien

AI prompt security is the practice of controlling what data enters AI tools at the point of input — the text box — before it reaches the AI provider's servers. It is a distinct discipline from AI output safety (preventing AI from generating harmful content) and from AI model security (protecting the model itself from adversarial inputs).

This guide covers the threat model, the technical approaches, and how to build a prompt security program for your organization.

What is AI Prompt Security?

AI prompt security refers to the controls organizations put in place to prevent sensitive data from being submitted to AI tools in employee prompts. When an employee types or pastes content into ChatGPT, Claude, or Gemini, that content is transmitted to the AI provider's servers, potentially used for training, logged in conversation history, and accessible to the AI provider under their terms of service.

Prompt security addresses the risk that employees inadvertently — or carelessly — include sensitive organizational data in these submissions: customer names and contact details, source code and credentials, patient health information, financial records, legal case details, and proprietary business information.

The goal of prompt security is not to prevent employees from using AI tools. It is to prevent data that creates regulatory, legal, or competitive liability from leaving the organization through the AI channel.

The Prompt Security Threat Model

Prompt security threats are different from traditional data exfiltration threats in two important ways.

Intent is usually benign. Most data leakage through AI tools is accidental. An employee pasting a customer's support ticket to help draft a response is not trying to steal data — they are doing their job. Controls need to address accidental leakage, not just malicious actors.

The channel is trusted by default. Employees use ChatGPT from the same browser they use for everything else. It looks like a normal website. There is no friction signal that causes employees to think "this is different from sending an email." Training alone is insufficient; friction needs to be built into the workflow at the moment of input.

Traditional security tools are blind to this channel. Email DLP, endpoint DLP for files, and CASB tools all operate on different data flows. A prompt typed into a browser text box and submitted over HTTPS is invisible to all of them unless you have TLS inspection in place — and TLS inspection carries its own limitations and overhead.

What Data Is at Risk

The categories of sensitive data most commonly found in AI prompts, in order of frequency:

Personally identifiable information (PII). Names, email addresses, phone numbers, dates of birth, national identification numbers, and home addresses appear in prompts when employees work with customer or employee records. Under GDPR and CCPA, submitting PII to a third-party AI service without a lawful basis and appropriate data processing agreement creates regulatory exposure.

Credentials and secrets. API keys, authentication tokens, database passwords, and private keys appear in developer prompts when copying configuration snippets, .env files, or code context into AI coding assistants. These are the highest-severity leakage events: a leaked API key can result in unauthorized access to production systems.

Protected health information (PHI). Clinical teams paste patient records, diagnoses, and treatment information into AI for summarization and drafting. HIPAA prohibits sharing PHI with unauthorized third parties, and most public AI tools do not have signed Business Associate Agreements.

Payment card data. Finance teams paste transaction records, account statements, and payment details into AI for analysis. Card numbers are PCI-DSS scope, and any transmission of card data to a non-compliant third party creates audit exposure.

Legal and privileged information. Legal teams paste client communications, contract drafts, and case materials into AI for research and drafting. Sharing privileged communications with a third party — even an AI tool — can constitute waiver of attorney-client privilege in some jurisdictions.

Proprietary business information. Source code implementing novel algorithms, internal pricing models, M&A strategies, and unreleased product information. Not regulated, but a genuine competitive risk if submitted to a public AI tool.

Technical Approaches to Prompt Security

Browser-native interception

A browser extension sits between the user and the AI tool's send button. When the user submits a prompt, the extension intercepts the content before it is transmitted, evaluates it against a policy, and either blocks the submission, shows a warning, or logs the event.

This is the only approach that operates at the actual point of input — before encryption, before transmission, with full access to the prompt text as typed. It requires no network infrastructure changes and works on any device with the extension installed.

Detection methods available at the browser layer: - Pattern matching: Regular expressions for known sensitive formats — SSN patterns, card number patterns, email formats - Entropy detection: Statistical analysis to identify API keys, tokens, and passwords by their randomness — catches credentials not in any keyword list - Keyword and dictionary matching: Custom blocklists of client names, internal terms, and regulated identifiers - Score-based rules: Combining multiple signals to flag prompts that are borderline on any single dimension

Policy-based governance

Prompt security is most effective when it is policy-driven rather than rule-driven. A policy defines: which data categories are prohibited, for which teams, on which tools, and what action to take when detected.

A well-structured policy has different rules for different organizational divisions. The engineering team needs entropy detection for credentials. The healthcare team needs PHI identifier blocking. The finance team needs card number patterns. A single global policy that tries to cover all cases creates too many false positives to be usable.

Audit and visibility

Prompt security controls without audit visibility are partial solutions. The audit log — which rule triggered, which team, which AI tool, what action was taken — provides three things: a compliance evidence trail, a baseline for policy calibration, and the data for targeted employee training.

Building a Prompt Security Program

Start with a data inventory. What sensitive data do your highest-risk teams work with? Match data categories to regulatory requirements: PHI under HIPAA, card data under PCI-DSS, PII under GDPR/CCPA, privileged communications for legal. This is your block list.

Deploy in monitor mode first. Before enabling blocking, run in log-only mode for two weeks. The audit data will show you what is actually being submitted — often different from what you assumed. Use this to calibrate your rules before enforcement.

Enable blocking for highest-severity categories. API keys and credentials, regulated PII, payment card data. These have clear regulatory consequences and low false-positive rates when detection is well-tuned.

Use warn for borderline categories. Internal project names, vendor pricing, proprietary business logic. Show employees a warning, let them decide, but log the decision. This creates awareness without blocking legitimate workflows.

Review the audit log monthly. Prompt security is not a set-and-forget control. New AI tools emerge, employee workflows evolve, and new data categories become sensitive as business circumstances change. Monthly review keeps the program calibrated.


Pretzel implements this model: browser-native detection, centralized policy management, team-scoped rules, and a full audit trail. Read how it works or start free — up to 3 users, no credit card required.

Try Pretzel free — protect your team today

Start Free — No Credit Card