Skip to content

Module 08 · Lesson 8.4

Review, Ownership and Data Handling

35 minUpdated 19 Nov 2026Part of Documentation and Governance · New Project Creation
On this page
  1. What you will learn
  2. Ownership and review rules
  3. Enforce reviewers with CODEOWNERS
  4. A data-handling policy for AI tools
  5. A paste guard: a last look before you send
  6. Step-by-step workflow: set up governance
  7. What the assistant does and what you do
  8. Conclusion and your next step
  9. Reusable prompt
  10. Expected output
  11. Common errors and fixes
  12. Validation checklist
  13. Hands-on exercise
  14. Knowledge check
  15. Frequently asked questions
  16. References

A clinic keeps drug and record cabinets under lock. Some cabinets need two keys, and a list says who holds which key. Nobody thinks this is unfriendly. It protects patients, and it protects staff from blame. A software project needs the same kind of list.

In this lesson you set three things for Tidewell. First, who owns each area and who must review each kind of change. Second, how to make the hosting tool enforce that, using a file called CODEOWNERS. Third, a policy that says what may be shared with an AI assistant and what must never be. You also run two small scripts that check your CODEOWNERS file and warn you before risky text is pasted.

What you will learn

  • Name an owner by role for each area, and write review rules that include a second reviewer for risky changes.
  • Write a CODEOWNERS file, and check that the right people review the right files.
  • Write a data-handling policy with a classification table for AI tools.
  • Use a simple paste guard, and explain why it is only a safety net.

Before you start

  • Completed Recording AI Assistance and Review, or have a project with pull requests.
  • Access to any capable AI assistant.
  • Optional: Node.js and the project from earlier lessons, if you want to run the examples.

Ownership and review rules

An owner is the role that decides about one area. The owner does not have to do the work. The practice manager owns the booking rules, such as the 24-hour notice period. The developer then changes the code to match. We name owners by role, not by person, so the list stays true when people change.

A review is a second look before a change goes live. A second reviewer is someone other than the author. It is like a second key on the cabinet. It matters most where a mistake is costly or hard to see: database migrations, sign-in code and permission code.

Owner
The role that decides about an area, such as booking rules or hosting.
Pull request
A proposal to merge a change, with a page where others can read it and comment.
Second reviewer
A person other than the author who reads a risky change before it is merged.
Waiting period
A pause, such as one night, before a solo developer rereads their own change with fresh eyes.

Tidewell writes all of this in one short file. The ownership table comes from the stakeholder roles in Module 1 and the permission table in Module 6. The review rules come from this module.

Markdowndocs/governance.md
# Ownership and review rules

## Who owns what

| Area | Owner (by role) | What the owner decides |
| --- | --- | --- |
| Code, tests and database migrations | Developer | How the system is built, and what is merged after review. |
| Booking rules, such as the 24-hour notice period | Practice manager | Any change to a rule. The developer then changes the code to match. |
| Approving waiting-list offers and day cancellations | Front desk and practice manager | Each request, as set out in the permission table. |
| Hosting, backups and data protection | Clinic owner | Where data is held, who may reach it, and when to ask for professional advice. |
| These documents | Developer writes, each area owner confirms their part | Whether the text is still true. |

## Review rules

1. Every change goes through a pull request. Nobody commits straight to `main`.
2. A second person reviews every change.
3. Migrations, sign-in code and permission code always need a second reviewer who did not write the change.
4. A solo developer answers the self-review checklist in the pull request, waits until the next day, then rereads the diff. Rule 3 still needs a second person, such as the local contractor.
5. A change to a booking rule needs the practice manager's written yes before it is merged.
6. A change that an assistant helped to write has an entry in `docs/ai-assistance.md`.
7. The checks must pass before a merge. Nobody turns them off to get a change through.

## Self-review checklist

- Does the change trace to a requirement or a decision record?
- Did I read the whole diff, line by line, as if someone else wrote it?
- Do the new tests fail when I break the code on purpose?
- Is every new route checked for sign-in and permission on the server?
- Is the migration additive, so the previous version still works?
- Is any secret, key or real personal data in the code, tests, logs or comments?
- Are README, operating notes, API contract and diagrams updated?
- Is the AI record updated, with what was not verified?

Thirty-two lines. Owners are roles, and every rule can be checked.

What each part does

  • The ownership table says who decides what. The clinic owner decides about hosting, backups and data protection, because the clinic's data-protection duties (CON-01) rest with the clinic. The owner can ask for proper professional advice. This lesson is not legal advice.
  • Rules 1 and 2 make every change visible and give it a second pair of eyes.
  • Rule 3 names the changes that always need a second reviewer who did not write them.
  • Rule 4 is for a solo developer, who has no colleague. They answer a written checklist, wait a night and reread the diff. Rule 3 still needs a person, such as the local contractor.
  • Rule 5 sends a change to a booking rule to its owner. Rule 6 links back to the AI record. Rule 7 stops anyone turning the checks off to get a change through.
  • The self-review checklist is a list of questions every author answers. It is the same list a second reviewer would use.

Enforce reviewers with CODEOWNERS

A rule that only lives in a document is easy to forget. A CODEOWNERS file turns part of it into a setting. It lists file patterns and the teams that must review changes to them. This is a GitHub feature. Other hosting tools have similar ones, so check yours. Read About code owners (opens in a new tab) for the current details.

Text.github/CODEOWNERS
# Who must review a change. When several lines match a file, the LAST one wins.
# The teams are placeholders. Replace your-org and the team names with your own.

*                              @your-org/developers

/db/migrations/                @your-org/developers @your-org/reviewers
/src/lib/auth/                 @your-org/developers @your-org/reviewers
/src/lib/permissions.ts        @your-org/developers @your-org/reviewers
/.github/                      @your-org/developers @your-org/reviewers

/docs/requirements.md          @your-org/practice-managers
/docs/acceptance-criteria.md   @your-org/practice-managers
/docs/ai-data-policy.md        @your-org/clinic-owners

The teams are placeholders. Replace your-org and the team names with your own.

What each part does

  • The first rule, *, says every file has an owner. Nothing is left unowned.
  • Migrations, the sign-in folder and the permission file add a second team, reviewers, so a different person must approve them.
  • Requirements and acceptance criteria go to the practice managers, because they own the booking rules.
  • The data policy goes to the clinic owners, because they decide what is shared with tools.
  • The paths for sign-in and permission code follow the layout from Module 6. Change them to match your project.

Here is the classic mistake. This draft puts * last, so it overrides the specific lines above it.

Text.github/CODEOWNERS.draft
/db/migrations/                @your-org/developers
/src/lib/auth/                 @your-org/developers
/docs/ai-data-policy.md        @your-org/clinic-owners

*                              @your-org/developers

A file like this looks fine when you read it. A short script checks what it really does. It reads the rules, finds the owners of a few risky example files and says whether the right team is included.

TypeScriptscripts/check-codeowners.ts
// scripts/check-codeowners.ts: does the CODEOWNERS file ask the right people to review the risky files?
import { readFileSync } from "node:fs";

interface Rule {
  pattern: string;
  owners: string[];
}

export function parseRules(text: string): Rule[] {
  return text
    .split("\n")
    .map((line) => line.trim())
    .filter((line) => line !== "" && !line.startsWith("#"))
    .map((line) => {
      const [pattern, ...owners] = line.split(/\s+/);
      return { pattern, owners };
    });
}

// A simplified matcher: "*", "/folder/", "/exact/file.ext". GitHub supports more patterns than this.
function matches(pattern: string, path: string): boolean {
  if (pattern === "*") return true;
  if (pattern.endsWith("/")) return ("/" + path).startsWith(pattern);
  return "/" + path === pattern;
}

export function ownersFor(rules: Rule[], path: string): string[] {
  let owners: string[] = [];
  for (const rule of rules) if (matches(rule.pattern, path)) owners = rule.owners; // the last match wins
  return owners;
}

const MUST_REVIEW: [path: string, team: string][] = [
  ["db/migrations/007_example.sql", "@your-org/reviewers"],
  ["src/lib/auth/session.ts", "@your-org/reviewers"],
  ["src/lib/permissions.ts", "@your-org/reviewers"],
  ["docs/acceptance-criteria.md", "@your-org/practice-managers"],
  ["docs/ai-data-policy.md", "@your-org/clinic-owners"],
];

if (process.argv[1] && import.meta.filename === process.argv[1]) {
  const rules = parseRules(readFileSync(process.argv[2], "utf8"));
  let failed = 0;
  for (const [path, team] of MUST_REVIEW) {
    const owners = ownersFor(rules, path);
    const ok = owners.includes(team);
    if (!ok) failed++;
    console.log(`${ok ? "ok     " : "MISSING"} ${path} -> ${owners.join(" ") || "(no owner)"}${ok ? "" : ` (needs ${team})`}`);
  }
  if (failed > 0) process.exitCode = 1;
}

Tested with the TypeScript compiler and run below. The matcher is simplified. GitHub supports more patterns than this.

What each part does

  • parseRules reads each line into a pattern and a list of owners, and ignores comments and blank lines.
  • matches and ownersFor find the owners of a file. The loop keeps the last matching rule, as GitHub does.
  • MUST_REVIEW lists example files and the team that must be among their owners.
  • The last block prints one line for each example and sets a failing exit code if any team is missing.
Bash
npx tsx scripts/check-codeowners.ts .github/CODEOWNERS.draft
npx tsx scripts/check-codeowners.ts .github/CODEOWNERS
Output: the draft, then the real fileCaptured from a real run
MISSING db/migrations/007_example.sql -> @your-org/developers (needs @your-org/reviewers)
MISSING src/lib/auth/session.ts -> @your-org/developers (needs @your-org/reviewers)
MISSING src/lib/permissions.ts -> @your-org/developers (needs @your-org/reviewers)
MISSING docs/acceptance-criteria.md -> @your-org/developers (needs @your-org/practice-managers)
MISSING docs/ai-data-policy.md -> @your-org/developers (needs @your-org/clinic-owners)
ok      db/migrations/007_example.sql -> @your-org/developers @your-org/reviewers
ok      src/lib/auth/session.ts -> @your-org/developers @your-org/reviewers
ok      src/lib/permissions.ts -> @your-org/developers @your-org/reviewers
ok      docs/acceptance-criteria.md -> @your-org/practice-managers
ok      docs/ai-data-policy.md -> @your-org/clinic-owners

In the draft, every risky file falls through to developers alone, so the second reviewer is never asked. In the real file, each risky file has the right team. Run it twice and you get the same lines.

A data-handling policy for AI tools

An assistant works by reading what you send it. Where that text is stored, and who can see it, depends on the tool and its terms, and those terms change. So the safe habit is to decide in advance what may be sent. That decision is a data-handling policy.

A data classification sorts information into a few groups by how much harm its leak would do. Four groups are enough for a small project: public, internal, personal and secret. A physiotherapy booking can reveal that a named person is receiving treatment, which can count as health information in some places. So Tidewell treats it with extra care. The clinic owner decides the rules, with proper advice, and this lesson does not give legal advice.

Markdowndocs/ai-data-policy.md
# Policy: AI tools and Tidewell data

Status: draft for the clinic owner to approve. The owner decides, with proper advice.

## Rules

1. Never paste patient data, secrets or production logs into an AI assistant.
2. Use synthetic data only: Patient A, `example.com` emails and phone numbers from 01632 960000 to 960999.
3. Share code only with tools the organisation has approved. The clinic owner keeps the list of approved tools.
4. If something sensitive was pasted by mistake, stop. Tell the developer and the clinic owner. Revoke any secret that was pasted. Write it in the incident record.
5. Keep an entry in `docs/ai-assistance.md` for every change an assistant helped with.

## Data classes

| Class | Examples | May go into an approved assistant? | Other rules |
| --- | --- | --- | --- |
| Public | Opening hours, text already on the clinic website | Yes | None. |
| Internal | Source code, requirements, decision records, test names | Yes, in approved tools only | Check the tool's own data terms first. |
| Personal | Patient names, emails, phone numbers, booking history, production logs and error reports | No. Use synthetic data instead | Real data stays in the production system. Access follows the permission table. |
| Secret | Keys, passwords, session secrets, `.env.local`, connection strings with a password | Never | If one is exposed, revoke it first and replace it. |

Twenty lines. The clinic owner approves it. The approved list of tools is the owner's to fill in.

What each part does

  • Rule 1 is the core: never paste patient data, secrets or production logs into an assistant.
  • Rule 2 gives the safe alternative: synthetic data, such as Patient A and the fictional phone range.
  • Rule 3 says code may go only to tools the organisation has approved, because a tool's terms decide what happens to it.
  • Rule 4 says what to do when it goes wrong: stop, tell the right roles, revoke the secret and write it down.
  • The table says, for each class, what may go into an approved assistant. Personal data and secrets never do.

Keep the rules in step with the tools you really use. For more on keys, read Managing API Keys Locally. The Secrets Management cheat sheet (opens in a new tab) from OWASP explains how to store and rotate secrets.

A paste guard: a last look before you send

A rule is easy to break by accident, such as when you paste a long error message in a hurry. A paste guard is a small script that scans text for the signs of personal data and secrets before you send it. It is a safety net, not a guarantee. It will miss things, and it only knows the patterns you gave it. It never prints the text it found, only the line number and the kind, so the guard cannot leak what it is guarding.

TypeScriptscripts/paste-guard.ts
// scripts/paste-guard.ts: a last look at text before it goes into an AI assistant.
// A safety net, not a guarantee. It never prints the text it found, only where and what kind.
import { readFileSync } from "node:fs";

const PLACEHOLDER = /^(replace-with|change-me|your-|example|<)/i;

const RULES: { kind: string; test: (line: string) => boolean }[] = [
  {
    kind: "email address that is not example.com, example.org or example.net",
    test: (l) => [...l.matchAll(/(?<![\w.+:-])[\w.+-]+@([\w-]+(?:\.[\w-]+)+)/g)].some((m) => !/^example\.(com|org|net)$/i.test(m[1])),
  },
  {
    kind: "phone number outside the fictional range 01632 960000 to 960999",
    test: (l) => [...l.matchAll(/\b0\d{3,4} ?\d{3} ?\d{3}\b/g)].some((m) => !/^01632 ?960 ?\d{3}$/.test(m[0])),
  },
  {
    kind: "password inside a connection string",
    test: (l) => [...l.matchAll(/\w+:\/\/[^:\s/]+:([^@\s]+)@/g)].some((m) => !PLACEHOLDER.test(m[1])),
  },
  {
    kind: "key, secret, password or token being set",
    test: (l) => [...l.matchAll(/(?:api[_-]?key|secret|password|token)\s*[=:]\s*(\S+)/gi)].some((m) => !PLACEHOLDER.test(m[1])),
  },
  { kind: "bearer token", test: (l) => /\bBearer\s+[A-Za-z0-9._~+/-]{16,}/.test(l) },
];

export function scan(text: string): { line: number; kind: string }[] {
  const findings: { line: number; kind: string }[] = [];
  text.split("\n").forEach((line, i) => {
    for (const rule of RULES) if (rule.test(line)) findings.push({ line: i + 1, kind: rule.kind });
  });
  return findings;
}

if (process.argv[1] && import.meta.filename === process.argv[1]) {
  for (const file of process.argv.slice(2)) {
    const findings = scan(readFileSync(file, "utf8"));
    console.log(`${file}: ${findings.length === 0 ? "nothing found" : findings.length + " finding(s)"}`);
    for (const f of findings) console.log(`  line ${f.line}: ${f.kind}`);
  }
}

Tested with the TypeScript compiler and run below. The patterns are examples. Tune them for your data.

What each part does

  • RULES is a list of patterns. Each one has a kind and a test for one line of text.
  • The email rule allows only the example domains. The phone rule allows only the fictional range from the course.
  • The other rules look for a password in a connection string, a key or secret being set to a real-looking value and a bearer token. Placeholders such as replace-with-your-key are allowed.
  • scan returns the line number and kind of each finding. It does not return the matched text.

Two sample files test it. The first has values that look real but are made up. They are an email on a .test domain, a phone number from a reserved fictional range, a password in a connection string, a key and a bearer token.

Textpaste-risky.txt
2026-11-19T10:02:11Z ERROR booking failed for patient@mail.test
Patient phoned from 07700 900123 about the slot
DATABASE_URL=postgres://tidewell_app:Hunter2xyz@db.internal.test:5432/tidewell
EMAIL_API_KEY=k9Xp2LmQ4rT7vZ1cB8nW3sD6fG0hJ5aE2yU4iO
Authorization: Bearer k9Xp2LmQ4rT7vZ1cB8nW3sD6fG0hJ5aE2yU4iO

The second file uses only synthetic data and placeholders.

Textpaste-safe.txt
Patient A (patient.a@example.com, 01632 960001) tries to cancel slot 12.
DATABASE_URL=postgres://tidewell_user:change-me@localhost:5432/tidewell_booking
EMAIL_API_KEY=replace-with-your-key
The service returns 422 notice-period instead of 200.

Now run the guard on both.

Bash
npx tsx scripts/paste-guard.ts paste-risky.txt paste-safe.txt
OutputCaptured from a real run
paste-risky.txt: 5 finding(s)
  line 1: email address that is not example.com, example.org or example.net
  line 2: phone number outside the fictional range 01632 960000 to 960999
  line 3: password inside a connection string
  line 4: key, secret, password or token being set
  line 5: bearer token
paste-safe.txt: nothing found

The guard flags every risky line and passes the safe file. Run it twice for the same result. Use it on text you are about to paste, and treat a clean result as 'nothing obvious', not as 'safe'.

Step-by-step workflow: set up governance

  1. Step 1: List the areas and name the owner of each

    Use the stakeholder roles from Module 1. Write each owner as a role, and say what they decide.

    What you should see: An ownership table in docs/governance.md.

  2. Step 2: Write the review rules

    State that every change is reviewed, which changes always need a second reviewer, and what a solo developer does instead.

    What you should see: Numbered rules that you could check someone against.

  3. Step 3: Add the CODEOWNERS file and turn on the setting

    List risky paths with their teams, put the general rule first, and run the checker. Then turn on the branch protection that requires code owner review.

    What you should see: A risky change cannot merge without the right review.

  4. Step 4: Draft the data-handling policy

    Classify your data, write the four rules and leave the approved tools list for the owner. Ask the clinic owner to approve it, with proper advice where needed.

    What you should see: A policy with an approval date.

  5. Step 5: Make the policy easy to follow

    Provide synthetic test data and the paste guard. Say where the policy lives and who to ask.

    What you should see: The safe way is also the easy way.

  6. Step 6: Review the rules when things change

    Reread the documents when a role, a tool or a data type changes, and after every incident.

    What you should see: Rules that match how the team really works.

From rules to enforcement
  1. Owners

    By role

  2. Review rules

    Second reviewer

  3. CODEOWNERS

    Teams per path

  4. Branch protection

    Required review

  5. Data policy

    Four classes

  6. Paste guard

    A last look

Writing a rule is the first half. A setting or a script makes it hard to forget.

What the assistant does and what you do

TaskAssistant's partYour part
Drafting the governance and policy documentsCan draft them from your list of roles and data types.Check each rule against how the clinic really works.
Reviewing a changeCan point out risks and missing checks.A named person still reviews and approves.
Writing CODEOWNERSCan propose patterns.Check the order and the real team names with the checker.
Classifying dataCan suggest a class for each item.The clinic owner decides, with proper advice.
Deciding which tools are approvedNot its job.The clinic owner approves each tool after reading its terms.

Conclusion and your next step

Good governance is small and clear. Owners are named by role. Every change is reviewed, and risky changes get a second reviewer, enforced where possible by a CODEOWNERS file and branch protection. A data-handling policy sorts information into classes and says that patient data, secrets and production logs never go into an assistant. A paste guard is the last safety net.

Your next step: rules do not end at launch. Plan the long term in Maintenance and Incident Readiness.

For a way to find injection risks in a diff, see the prompt Injection Risk Review of a Diff.

Reusable prompt

Draft a data-handling policy for the owner to review

Gets a draft policy and classification table from facts you supply, with questions left for the owner instead of guessed answers.

You are helping me draft a short data-handling policy for using AI tools. Do not give legal advice. Do not decide which tools are approved. Do not invent rules that I have not given you.

Organisation: Tidewell Physiotherapy, a fictional clinic. The booking system holds patient names, emails, phone numbers and appointment times. Production logs and error reports can contain these.
Rules I want: never paste patient data, secrets or production logs into an assistant; use synthetic data only (Patient A, example.com emails, phone numbers 01632 960000 to 960999); share code only with tools the organisation has approved; say what to do if something sensitive is pasted by mistake.
Roles: developer, practice manager, clinic owner. The clinic owner decides data-protection questions.

Tasks:
1. Write the policy in plain English, in under 25 lines: rules first, then a table of four data classes (public, internal, personal, secret) with examples, whether each may go into an approved assistant and other rules.
2. Mark the approved-tools list as the clinic owner's to fill in.
3. After the policy, list the questions the clinic owner must answer, and say where they should ask for professional advice.
Show the reusable template

Replace each {{placeholder}} with your own details.

You are helping me draft a short data-handling policy for using AI tools. Do not give legal advice. Do not decide which tools are approved. Do not invent rules that I have not given you.

Organisation: {{organisation_and_data_held}}.
Rules I want: {{rules}}
Roles: {{roles_and_who_decides}}

Tasks:
1. Write the policy in plain English, in under {{max_lines}} lines: rules first, then a table of four data classes (public, internal, personal, secret) with examples, whether each may go into an approved assistant and other rules.
2. Mark the approved-tools list as the {{deciding_role}}'s to fill in.
3. After the policy, list the questions that role must answer, and say where they should ask for professional advice.

Expected output and limitations

A short policy with numbered rules and a table of four data classes, an approved-tools line left for the owner, and a list of open questions for the owner, including where to get advice.

Sample responseIllustrative — your output will differ
Rules
1. Never paste patient data, secrets or production logs into an AI assistant.
2. Use synthetic data only.
3. Share code only with tools the clinic owner has approved. Approved tools: (clinic owner to fill in).

| Class | Examples | May go into an approved assistant? |
| Public | Opening hours | Yes |
| Personal | Patient names, emails, booking history, logs | No |
| Secret | Keys, passwords, .env.local | Never |

Questions for the clinic owner: Which tools are approved, and on what terms? How long may tool providers keep what we send? Who should give professional advice on data protection for the clinic?

Limitations to keep in mind

  • The assistant may sound legal. It is not giving legal advice, and the owner should take professional advice where needed.
  • It may suggest tools or settings as 'safe'. Tool terms change, so check the tool's own page.
  • It cannot know what data your real system holds. Check its classes against your actual tables and logs.

Common errors and how to fix them

CODEOWNERS exists, but risky changes merge without the second reviewer.

Why it happens: The * rule is at the bottom, or branch protection does not require code owner review, or the team has no write access.

Fix: Put the general rule first, turn on the required-review setting, give owners write access and run the checker.

A production log is pasted into an assistant to explain an error.

Why it happens: The fault was urgent, and the log held the answer. Nobody thought of it as personal data.

Fix: Stop and follow rule 4. Next time, copy only the error type and reference id, and recreate the case with synthetic data.

Owners are named as people, and the list is wrong within a month.

Why it happens: People change roles and leave.

Fix: Name the role in the document, and keep the list of who holds each role somewhere that the clinic owner maintains.

Validation checklist

Tick each item once you have confirmed it.

Hands-on exercise

Governance for Ferngate Cycle Repairs

Write a short governance pack for Ferngate's parts tracker: an ownership table, review rules for a solo developer, a CODEOWNERS file and a data classification table.

You will need

  • Roles: developer (one person), workshop owner. There is one contractor who can act as second reviewer.
  • Areas: code and migrations, the low-stock threshold (to be agreed), hosting and backups.
  • Data held: customer names and phone numbers for bike pick-ups, the parts list and supplier price lists, and the key for the supplier's ordering service.
  • Files: db/migrations/, src/features/parts/, docs/, .env.local.

Acceptance criteria

Your work is done when every one of these is true.

Hints (2)
  • Ask which change would hurt most if nobody noticed it, and give that change a second reviewer.
  • Price lists may be commercially sensitive. The workshop owner decides whether they count as internal or something stricter.
Show a model answer

A strong answer names the workshop owner as the decider for the threshold and for data questions, and the developer as the owner of code. It tells the solo developer to answer a checklist and wait a night, and sends migrations to the contractor. The CODEOWNERS file starts with the general rule and then adds the contractor for the migrations folder. The classification puts customer names and phones under personal, so they never go into an assistant. The supplier key is secret, the parts list is internal and the price lists are a question for the workshop owner.

Knowledge check

Choose an answer, then check it. Nothing is recorded — this is for you.

  1. 1.In a CODEOWNERS file on GitHub, which order protects the migrations folder?
    Show the answer and explanation

    Answer: A. When several lines match, the last one wins, so the specific rule must come after the general one. Putting * last is tempting because it looks like a catch-all, but it overrides everything above it.

  2. 2.An urgent error appears in production. May you paste the whole log into an assistant to get help?
    Show the answer and explanation

    Answer: B. Logs can contain names, emails and booking times, so they count as personal data. Removing only the password is tempting but leaves the rest. Calling the assistant 'only a tool' ignores that your text leaves your control when you send it.

  3. 3.Does a CODEOWNERS file alone stop an unreviewed merge?
    Show the answer and explanation

    Answer: B. The file says who should review. A setting on the branch makes the review required. Believing that a committed file enforces itself is tempting, but without the setting a merge can still go through.

Frequently asked questions

What is a CODEOWNERS file?

It is a file in a repository that lists file patterns and the people or teams responsible for them. On GitHub, the listed owners are asked to review changes to those files, and a branch protection setting can require their approval. Other hosting tools have similar features.

Can I paste production data into an AI assistant?

As a rule, no. Real personal data, secrets and production logs should stay out of assistants unless your organisation has approved a specific tool and use, with proper advice. Use synthetic data instead, and check your own policy and local law.

How do I review my own code if I work alone?

Answer a written checklist in the pull request, wait until the next day, then read the whole diff again as if someone else wrote it. For risky changes such as sign-in or migrations, find a second person, such as a trusted contractor.

What is a data classification table?

It is a short table that sorts your information into classes, such as public, internal, personal and secret. For each class it says what may be done with it, for example whether it can be sent to an AI tool. It turns a vague worry into a clear rule.

Written by
PromptFable Editorial
Last updated 19 Nov 2026
Review
Reviewed by Waseem Nadir, Technical Reviewer
Last reviewed 27 Nov 2026

References

Primary sources for the technical details in this lesson. Vendor platforms change — check the official page if anything here looks different from what you see.

PromptFable is independent and is not affiliated with, endorsed by or sponsored by Anthropic, Google, OpenAI or any other vendor. Claude, Gemini, Google AI Studio and other product names are trademarks of their respective owners.