POST /v1/refunds
Authorization: Bearer eyJhbGciOi...
{"email":"[email protected]","order_id":"A18492","error":"timeout"}
# Safer version
Authorization: Bearer <ACCESS_TOKEN>
{"email":"<CUSTOMER_EMAIL>","order_id":"<ORDER_ID>","error":"timeout"}Lesson 2 of 5 · 7 min
AI Privacy Basics
Data That Never Goes In
- Treat prompts as workplace data, not private scratch space.
- Keep secrets and unreleased material out of models. Use personal or customer data only in approved AI services when authorized and permitted.
- If prohibited or unintended sensitive data is sent, especially to an unapproved tool, stop sharing it and follow your organization's incident-reporting process. Immediately revoke or disable exposed l
What must stay out
Do not paste passwords, API keys, access tokens, private certificates, session cookies, database connection strings, or recovery codes into an AI tool. A model does not need the real secret to explain an error. Replace it with a placeholder. If a live credential was exposed, treat it as compromised and immediately revoke or disable it. When immediate revocation would cause an outage, replace it first and then promptly revoke the old credential.
Keep personal and customer data out of unapproved tools. Use it in an approved AI service only when you are authorized, the data is necessary and minimized, and applicable company policy, contracts, privacy requirements, and tool configuration permit it. This includes names linked to accounts, email addresses, phone numbers, precise locations, account IDs, support conversations, health details, payment information, and government identifiers. Even a small set of fields can identify someone when combined. Prefer synthetic data when it can meet the need.
Unreleased source code, security findings, product plans, contracts, pricing, and acquisition or launch details can be confidential business information. Your company policy may classify these differently, but the safe starting point is not to send them to an unapproved tool.
Useful does not mean identifiable
A model usually needs the shape of a problem, not the real values. Preserve the facts needed for reasoning: the language, framework version, error type, relevant fields, and sequence of events. Remove values that identify a person, system, customer, or secret.
Redaction is not just replacing a name in visible text. Check stack traces, headers, URLs, JSON, screenshots, attachments, filenames, comments, and copied terminal output. Tokens can appear after labels such as Authorization, token, key, cookie, or password.
- Keep: “The service returns HTTP 401 after token refresh.”
- Remove: the actual token, user email, account number, and private URL.
- Use stable placeholders such as <CUSTOMER_EMAIL> and <ACCESS_TOKEN>.
- If a log contains an email address, access token, and account ID, replace all three.
A production-log mistake
A developer pastes a production error into a public consumer chatbot to ask why a request failed. The log contains an Authorization header and several customer email addresses. The mistake is not fixed by deleting the chat afterward; the data may already have been processed or retained according to that tool’s settings.
The developer should stop sharing the conversation and treat the exposed token as compromised. They should immediately revoke or disable it, or replace it and then promptly revoke the old token when necessary to prevent an outage. They should preserve incident metadata without reproducing the token, follow the incident process, tell the security or privacy contact, assess the customer data exposure, and investigate possible unauthorized use. Then they can make a clean reproduction with synthetic values.
Clean a prompt before sending
Use this quick review before putting workplace content into a model:
- 1. Classify the content: secret, personal, customer, health, payment, confidential, or unreleased.
- 2. Remove credentials and sensitive fields, including values inside quotes, logs, screenshots, and attachments.
- 3. Replace values with consistent placeholders so the relationships remain clear.
- 4. Reduce the sample to the smallest useful excerpt. Prefer a synthetic example for production issues.
- 5. Check the tool and your company policy. If approval is unclear, ask the data owner or security contact.
- 6. If sensitive data was sent, immediately revoke or disable any exposed live credential. If necessary to prevent an outage, replace it first and then promptly revoke the old credential. Preserve incident metadata without reproducing the secret, notify the appropriate contact, follow the reporting process, and investigate possible unauthorized use.
Common redaction failures
Deleting a customer’s name while leaving an email address, order number, or unique error timestamp can still identify the person. Replacing an API key in the main log while leaving it in a quoted request, browser screenshot, or uploaded file creates the same risk.
Do not invent a false sense of safety by changing one character in a real token. A partial secret may still help an attacker, and a real customer record may still be identifiable. Use placeholders or generated data instead.
- Weak: “Sam, [email protected], order 918273.”
- Better: “<CUSTOMER>, <CUSTOMER_EMAIL>, <ORDER_ID>.”
- Best for testing: generated values that do not come from a real record.
Quick check
2 questions · one answer each1. You need help explaining a production 401 error. Which prompt is safest?
Pick one. The first pick counts.
2. What should you do after pasting a live API key into an unapproved chatbot?
Pick one. The first pick counts.
Sign in to save your progress.