InfraLoka AcademyPathwayAI
PathwayAI

Module 5 · Protect the data

Data that must not go in

5 min read5 min readReviewed 26 October 2026

In short

Before pasting anything, ask: is there data about people, a secret, or something a client owns? If so, do the task without it. If a secret got out, treat it as leaked: replace it and report it.

After this lesson you can

  • Recognise personal data and secrets before pasting them into an AI tool
  • Know what to do when a secret has already leaked
  • Choose a way to do the task without sending forbidden data

Terms in this lesson

Understand

An AI chat box feels like a private notebook. You type, it answers, nobody else is in the room. Yet the moment you press send, the text leaves your computer and is processed on servers run by the provider. Depending on your account settings, it may be kept for a while, read by the provider's safety staff if there is an abuse report, or used to train the next model. We cover those settings in the lesson on data settings and memory. Here we start with a more basic question: what should never be sent in the first place.

There are three kinds of content to recognise before you paste:

  • Personal data. Anything that can point to a particular person: name, ID number, address, phone number, face photo, work history, grades, salary. Some personal data is specific under the PDP Law, such as health data, children's data and personal financial data; the list is in the PDP Law basics lesson. For these, the safest answer is often not to send them to a model at all.
  • Technical secrets. Passwords, API keys, access tokens, the contents of configuration files, invitation links anyone can use. Whoever holds them can get into a system in your name.
  • Other people's property. Client contracts, quoted prices, unpublished financial reports, documents marked confidential. They may not mention a person, but you have promised to keep them safe.

The most useful habit is to stop for three seconds before pasting and reread what you are about to send through an outsider's eyes. The question is simple: if a stranger read this text, would anyone be harmed? If yes, do not send it as it is.

Holding data back does not mean giving up on AI. There is almost always a way to do the same task without the forbidden data:

  • Send the shape, not the contents. To build a spreadsheet formula, the model only needs the column names and two made-up sample rows, not the whole payroll.
  • Replace secrets with markers. To ask why a configuration fails, write [PASSWORD_REMOVED] where the password was. The model does not need your real password to spot a typo.
  • Mask as much as needed. To summarise customer complaints, names and phone numbers can be swapped for codes. How to do that, and where it stops working, is in the lesson on masking data.
  • Use a tool your organisation has approved. Some work really needs real data, such as tidying clinical notes. That is not a job for your personal account on a public service; ask which tool your organisation has approved and contracted.

Mistakes still happen: an API key gets pasted along with an error message, or a spreadsheet with employee names is uploaded to the wrong account. When that happens, do not hope nobody saw it. Treat it as a leak.

For a technical secret, the steps are clear: replace (rotate) the key or password right now, revoke the old one, and tell the system's owner. Deleting the message is not enough, because copies may already sit on a server, in history, or in someone's notifications. A replaced key is useless to anyone who copied it.

For personal data, do not try to handle it quietly on your own. Report it to your manager and to your organisation's data protection officer or security team the same day, noting what was sent, to which service and when. Your organisation may have a notification duty with a short deadline under the PDP Law, so every hour counts. A fast, honest report is almost always cheaper than a leak someone else finds later.

Worked example

Before

The prompt

Why is this failing? DB_HOST=office-db-server DB_USER=finance_admin DB_PASS=[real password written here] PORT=5432x

What came back

The PORT value ends with the letter 'x', so it cannot be read as a number. Change it to 5432. The other credentials look correct.

After

The prompt

I need to know why this database connection configuration fails to load. I have replaced the password and server name with markers; assume their values are correct. The error is: 'invalid port number'. DB_HOST=[SERVER_NAME] DB_USER=[USER_NAME] DB_PASS=[PASSWORD_REMOVED] PORT=5432x Show me the wrong line and why. Do not guess the values I have hidden.

What came back

The wrong line is PORT=5432x. A port number must be numeric, and the trailing 'x' makes it invalid. Change it to PORT=5432. I cannot check the values of the other lines because they are hidden, but their format is correct.

What changed

  • The answer is just as good, but the real password never left your computer.
  • The internal server name is hidden too: it helps an attacker map the system.
  • If you already sent the first version, the password must be changed, not just the message deleted.

Common mistake

Mistake
Deleting the message that held a key or personal data and treating the matter as closed.
Why it hurts
Copies may already sit on the provider's servers, in chat history, in notifications or on someone else's screen. A key that still works can be used by anyone who copied it, and your organisation loses time it needs to handle a personal data leak properly.
Do this instead
For a secret: replace and revoke the key now, then tell the system's owner. For personal data: report it the same day to your manager and data protection officer, noting what was sent, where and when.

Try

Sorting card

Sort before pasting: red (do not send), yellow (send after masking or through an approved tool), green (safe).

  1. An office holiday notice already shared with all staff

  2. The column names of a payroll sheet and two made-up sample rows

  3. A summary of a patient's medical record to turn into a referral letter

  4. A payment service API key that appears in an error message

  5. Twenty customer complaints that mention names and order numbers

  6. A client contract draft marked confidential

6 cards left

A colleague has just realised they pasted the warehouse system's access token into an AI chat yesterday afternoon. They have deleted the conversation. What is the next step?

Take home

Three seconds before pasting

  • No names, ID numbers, contacts or health data of people are included
  • No passwords, keys, tokens or configuration file contents
  • No client documents or documents marked confidential
  • If something is needed, I send its shape or a masked version
  • If it leaked: I replace secrets and report personal data the same day

What went wrong for us

How we work

Patient data never goes to a model

Context
We run a clinic app that stores medical records. An AI feature that summarises patient histories sounds very useful.
What tends to go wrong
Sending medical records to a third-party model means health data leaves the clinic's systems.
What it costs if ignored
Leaked health data cannot be pulled back, and patients' trust goes with it.
Root cause
Health data is specific personal data under the PDP Law, with large legal and trust risks.
How we do it
AI features in that app only work on things outside patient data, such as schedules, stock and SOP drafts.
The rule we keep
AI code may not read medical record tables, and every access to health records is written to an audit log.

The lessonSome data is better never sent to a model at all.

What it means for your workBefore using AI on work that touches people's health data, find the parts of the job it can help with without that data.