Secrets stay out of the chat

A key, a password and personal data stay outside the request.

Everything you paste into a request, you have handed to the assistant's service and possibly to its logs. Passwords, API keys, session tokens, private keys, database connection strings, passport details, medical information and full user dumps do not go there. "I will delete the message later" does not pull back what was already sent.

If you cannot set the task without a piece of configuration, replace the secrets with placeholders: postgres://USER:PASSWORD@HOST/DB. An error from a log often contains the same address, password included. Cut it out before copying. This is part of setting the task, not bureaucracy.

Do not ask the model to "keep the key in the code for convenience". Convenience here means a leak into the repository. A key lives in a secret store or an environment variable that is never printed in the chat. If the model itself inserts a real key it saw somewhere, treat that key as compromised and replace it.

Customers' personal data is the same class. For a bug, the shape of a record is enough: a field, a type, an example of a made-up person. The real name and phone number from a ticket do not belong in the request. If you are unsure whether something can be sent, do not send it and ask whoever is responsible for the data.

Practice

  1. What must not be pasted

    A log contains a connection string with a password. How do you bring it to the chat?

    • Paste the whole log, it is more precise
    • Replace the password and address with placeholders
    • Ask the model to remember the password
    • Put the password into a code comment
  2. After sending

    A message containing a key was deleted in the chat interface. Is the key a secret again? Answer yes or no.

  3. What to put instead of a secret

    Select acceptable substitutes.

    • The made-up name Ann
    • A real token from .env
    • The placeholder PASSWORD
    • A customer's phone number from a support request