Is It Safe to Send Real User Data to My AI Features and Logs?
6 min read
Short answer: it depends on what you send and where it goes, and most
vibe-coded apps send more than the founder realises. Every time your app calls
an AI model or writes a console.log, a copy of whatever you passed in leaves
your control. If that copy contains real names, emails, messages, or payment
details, you are sharing personal data with a third party and storing it in
places you never meant to keep it.
Why this happens
An AI agent building an AI feature does the obvious thing: it takes the user's input, drops it straight into the prompt, and sends the whole object to the model. "Summarise this support ticket" becomes a prompt containing the customer's full name, email, and the account number they pasted in. It works perfectly in the demo, so nothing flags it.
The same is true of logging. To debug, the agent scatters
console.log(user) and console.log(req.body) through the code. Those lines
print the entire user record, password reset tokens and all, into your hosting
provider's log stream, where they sit in plain text for anyone with access to
the dashboard. You asked for a working feature. You did not ask "and please keep
personal data out of the prompt and the logs," so nobody did.
How to check
-
Search your code for what you log. Look for
console.log,logger., andprint(calls. Any that pass a wholeuser,req.body,session, orerrorobject are likely dumping personal data.grep -rn "console.log" ./src | grep -iE "user|body|token|email|password" -
Read your AI call sites. Find every place you build a prompt or call
openai,anthropic, or similar. Look at exactly which fields go into themessagesorinput. If the raw user object or database row is in there, real data is going to the model provider. -
Open your production logs (Vercel, Railway, Render, your hosting dashboard) and read the last hour. If you can see a real email address or the contents of a user's message, so can anyone with account access, and so can any log tool you connected.
The fix
-
Send the model only what it needs. If the feature summarises a ticket, send the ticket text, not the customer record around it. Strip names, emails, phone numbers, and IDs before they reach the prompt unless the feature genuinely requires them.
-
Redact before you log. Never log whole objects. Log an ID and a short message instead:
logger.info("checkout failed", { userId: user.id }), not the user. Build oneredact()helper that removes email, tokens, and passwords, and route logs through it. -
Turn off training on your data. On the OpenAI API, business/API traffic is not used for training by default, but confirm it in your account settings and sign a Data Processing Agreement. Do the same with any provider you send user content to.
-
Set log retention. Shorten how long your host keeps logs (days, not forever) so an accidental leak has a short shelf life.
-
Name it in your privacy policy. If personal data goes to OpenAI or Anthropic, they are subprocessors and your users have a right to know. See is it legal to send user data to OpenAI.
The trap to avoid
Do not assume "it's HTTPS, so it's private." Encryption protects data in transit from strangers on the network. It does nothing about the fact that you chose to hand the data to a third party and write it into your own logs. The leak is not an interceptor. It is the destination.
Where this fits
Getting beta-ready means knowing where your users' data actually travels, not just where you think it does. Before you can protect personal data, you need to know which of your fields count as personal in the first place, which is what what counts as PII walks through. The free Readiness Report traces your real data flows and flags prompts and logs that carry PII, and the Finishing Pass hands you the redaction fixes in order.