Source code Security & compliance

Sensitive data disclosure: secret or unminimized PII in the model prompt

Part of the AI app safety check · fix arrives as a guide

What it is

A secret, an API key, or a full unfiltered record of personal data is placed into the prompt sent to the model provider.

Why it matters

Prompt content leaves your infrastructure, may be retained by the provider, and can be surfaced back to a user who asks the right question. For personal data it is also a transfer you probably have not documented in your privacy notice.

How to fix it

Minimise before sending: pass the fields the task needs, not the whole record, and replace identifiers with opaque handles you resolve on your side. Keep credentials in the tool implementation, never in the prompt describing the tool.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.