data-protection
Business layer (business/README.md), touching step 3 and step 6 of the dev pipeline. GDPR is where
an engineering decision quietly becomes a legal exposure, usually at the moment someone adds a field
"we might need later" or wires in a convenient third-party API.
This is not legal advice. It's the set of questions that, unasked, turn into a problem nobody can
fix cheaply afterwards. Where a question has a legal answer, the answer comes from a lawyer or the DPO,
not from here.
When
As soon as a feature: adds a field holding personal data, exports or displays it in a new place, sends
it to a third party, or changes how long it's kept. Also when a new dependency or SaaS will process
it.
Steps
1. Name the data and why you have it
- List the personal data this feature touches, field by field. "Personal data" is wider than most
engineers assume: a name, an email, an IP address, a device id, a photo, free-text notes that
mention someone, and anything that identifies a person once combined with something else.
- Flag the special categories separately — health, biometrics, union membership, religion, sexual
orientation, criminal records. These carry much stricter obligations, and a "just a comment field"
that ends up holding health information is the standard way of acquiring them by accident.
- State why each field exists, in one sentence tied to the feature. A field nobody can justify is
a field to remove: that's not a legal nicety, it's the cheapest way to shrink the problem.
- Collect the minimum. "We might need it later" is not a purpose. Later, with a purpose, is when
to add it.
To keep this field list as a versioned file next to the code that feeds the DPO's record of
processing activities, with a category on each field and a check in CI, read
references/05-processing-record.md.
2. Settle the questions an engineer can't answer alone
Take these to the DPO/legal rather than guessing:
- On what basis are we allowed to hold this? (consent, contract, legal obligation, legitimate
interest — they are not interchangeable and they have different consequences in the code)
- If it's consent: it has to be freely given and withdrawable. Withdrawable means there's a code
path for withdrawal, which is a feature someone has to build.
- How long do we keep it, and what happens at the end? Deletion or anonymisation, and a mechanism
that actually runs. A retention rule with no job behind it is a sentence in a document.
- Does this need a formal impact assessment? Large-scale, sensitive or systematic-monitoring
processing may. That call isn't ours.
For a French project, or a French DPO/legal team, GDPR's open wording above ("appropriate",
"high risk") has a published, concrete answer from CNIL: the AIPD trigger grid, retention-period
figures by data category, the cookie-consent regime and the DPO-designation criteria are in
references/01-cnil-france.md. Read it before taking a retention
period or an AIPD call to the DPO, so the question arrives with CNIL's own figure attached rather
than "how long is normal?"
3. What the code has to provide
- Access and portability: a person can ask what you hold about them. If satisfying that request
means a developer writing a bespoke query each time, it will be slow and eventually wrong.
- Deletion: an actual mechanism, and know what it does about backups, logs, analytics and search
indexes. Deleting the row while the record survives in a search index and three log lines is the
normal outcome of not asking. Backups are not edited; deletion survives a restore by a method:
- Every erasure writes an entry to an erasure journal (subject identifier or its hash, date, scope),
stored outside the backed-up database, and kept as long as the oldest backup.
- The restore procedure replays the journal after the restore and before the service takes traffic.
A restore runbook without that step brings deleted people back.
- The proof is a restore drill (
skills/backup-restore-drill-pitfalls): erase a test subject, restore a
backup taken before, replay, and check the subject is gone from the database and the search index.
- Correction: editable, or a route to get it corrected.
- Never personal data in logs or URLs. Same reasoning as credentials
(
skills/auth-session-conventions §2.1 and §2.4): logs have wider read access and longer retention
than the system that produced them, and URLs travel into history, Referer and every proxy. The method
is an allowlist at the logger, not a cleanup later: log identifiers, never names, emails or bodies;
configure the logger's redaction for headers, cookies and known fields; and check it with a test that
sends a request carrying a marker email and asserts the captured log output does not contain it.
- Non-production environments. A production dump in a dev database is a real disclosure with real
consequences. Anonymise or generate; if you must copy, that's a decision someone senior takes
knowingly.
- Access is scoped: the same discipline as any authorisation
(
skills/security-hardening §3), applied to the data most likely to be requested.
For a concrete Laravel/Nuxt shape of items 2, 4 and 5 above — anonymising a record instead of a
hard delete, a scheduled purge job tied to a named retention figure, a cookie-consent integration,
and keeping personal data out of logs and exception reporters — see
references/02-code-patterns.md. Illustrative patterns to adapt,
not a certified implementation.
4. Third parties
- A new service that receives personal data is a decision, not a dependency choice. It needs a
data processing agreement, and where the data is hosted matters. Both are legal questions.
- Analytics, error reporting and session replay are the common unnoticed cases: an exception
reporter that serialises request bodies is exporting personal data to a third party, whatever the
feature intended.
- Write down what leaves the system, to whom, and why — you will be asked, and reconstructing it
later from the code is much harder than noting it now.
- The broader security/compliance review of the vendor itself — not just the data-processing
question — is
business/vendor-management's process. This section covers what to ask about a
vendor that will hold personal data specifically; that block covers assessing and tracking the
vendor relationship generally.
5. Email marketing: three questions, no default answer
A marketing list is personal data with a channel attached, and three questions recur in every conversation about
it. This block answers none of them; the person who owns data protection does, for the countries concerned,
from the regulator's current published guidance.
- What evidence of consent do we hold for each address? Who gave it, when, in what words and for which
purpose, and whether we can show it later. A list without that record is a list nobody can defend.
- How long may the suppression list be kept? It exists so a person is never mailed again, which argues for
keeping it; the same person's data should not outlive its purpose, which argues for a limit. The answer is
a decision with a named owner, not "forever" and not "delete with the rest".
- What applies to business-to-business mail? A work address belongs to a person; whether it changes what is
required before mailing them is a question for legal, not an assumption.
What CNIL's published pages state on the first and third question is in
references/01-cnil-france.md point 6; the suppression-list question has no
answer there. For the design of the flows themselves, see business/lifecycle-email-program-design-pitfalls.
Output / checkpoint
No pipeline checkpoint (business layer, see business/README.md). What it owes: the field list with a
purpose each, the questions routed to the DPO/legal with their answers when they come back, the
retention mechanism named, and the list of third parties receiving data. If the answers aren't in yet,
that's a blocker to state, not a reason to guess.
Guardrails
- Never decide a lawful basis or a retention period yourself. Wrong here is expensive and
invisible for a long time.
- Never widen collection because it's convenient. Every extra field is an obligation you now carry.
- Never copy production personal data to a local or shared dev environment on your own initiative.
- When in doubt about whether something is personal data, treat it as if it is and ask. The cost of
asking is a message; the cost of being wrong is a notification obligation.
Origin
Sourcing pass 2026-10-20 (status stays 🟡, nothing was run). Read for facts, rewritten in our own words:
CNIL pages on the AIPD (trigger grid: two of nine criteria, or a listed processing), the AIPD lists page, the
retention page and the retention guide (PDF), the cookies FAQ and the cookies recommendation page, the
register page, DPO designation, email prospecting and consent; each is a regulator's public page, no licence
statement read, so no text is reproduced. Confirmed: the AIPD trigger, the presumption-of-conformity wording,
the prospect retention rule, billing data kept 10 years, refusal as easy as acceptance, consent proof, register
contents and the narrow small-organisation exemption, the three mandatory DPO cases. Corrected: CNIL
describes DPO designation outside the mandatory cases as encouraged by the EDPB, not recommended by CNIL itself.
Still unverified: the 13- and 25-month cookie figures, the client "3 years after the end" figure, the
connection-log range. references/02-code-patterns.md stays our own engineering guidance.
Assembled from public sources: the GDPR text itself (lawful bases, data-subject rights, special
categories, impact assessments) and published regulator guidance. Written without internal legal
expertise, deliberately shaped as "which questions must reach a lawyer" rather than as answers. The
engineering consequences — logs and URLs, search indexes and backups surviving a deletion, exception
reporters exporting data unnoticed, non-production copies — are ours, and are the part this block adds
that a legal summary wouldn't.
Email-marketing questions added 2026-10-20 (§5): three questions named from an email-marketing review,
with no law restated and no source of ours for any answer.
Sectioned 2026-09-29, following the split already used by business/interface-design,
business/product-ownership and business/data-analytics: this file is now the router, and two
references/ files carry what a single generic GDPR file couldn't hold without either bloating past
the router's own budget or staying vague. references/01-cnil-france.md is sourced from CNIL's own
published guidance — its AIPD pages, its retention-period guide, its cookies recommendation/FAQ, its
DPO-designation guidance and its register-of-processing guidance, all cited by URL inline and checked
2026-09-29 — not itself CNIL-endorsed: it's this block's reading of CNIL's public documents,
same non-authoritative register as the rest of business/. One figure is flagged unresolved rather
than asserted: connection-log retention, where CNIL's own published range spans roughly 6 months to
1 year (references/01-cnil-france.md §1.2 states the range and defers the exact figure within it to
the DPO/legal team).
references/02-code-patterns.md is original engineering translation — Laravel/Nuxt patterns for
anonymisation, consent, scheduled purges and log scrubbing — written by us, not sourced from CNIL or
any external catalogue, and stated as illustrative rather than certified in its own opening
paragraph and guardrails.
references/05-processing-record.md (added 2026-10-16, 🟡 never dogfooded) restates GDPR Article 30
as published in the Official Journal, read on EUR-Lex 2026-10-16 (not the consolidated text), and
takes the field-annotation pattern from the ethyca/fides example files (Apache-2.0); the file says
which sentences are ours.
Independent verification 2026-10-21: 19 checked, 14 matched, 1 corrected, 4 unverified
1---2name: data-protection3description: Use when a feature collects, stores, exports or shares personal data, or when a new third party will receive it. Structured checklist, not legal advice.4metadata:5 source: https://skillmd.com/skills/techmefr/data-protection6---78# data-protection910Business layer (`business/README.md`), touching step 3 and step 6 of the dev pipeline. GDPR is where11an engineering decision quietly becomes a legal exposure, usually at the moment someone adds a field12"we might need later" or wires in a convenient third-party API.1314**This is not legal advice.** It's the set of questions that, unasked, turn into a problem nobody can15fix cheaply afterwards. Where a question has a legal answer, the answer comes from a lawyer or the DPO,16not from here.1718## When19As soon as a feature: adds a field holding personal data, exports or displays it in a new place, sends20it to a third party, or changes how long it's kept. Also when a new dependency or SaaS will process21it.2223## Steps2425### 1. Name the data and why you have it261. **List the personal data this feature touches**, field by field. "Personal data" is wider than most27 engineers assume: a name, an email, an IP address, a device id, a photo, free-text notes that28 mention someone, and anything that identifies a person once combined with something else.292. **Flag the special categories separately** — health, biometrics, union membership, religion, sexual30 orientation, criminal records. These carry much stricter obligations, and a "just a comment field"31 that ends up holding health information is the standard way of acquiring them by accident.323. **State why each field exists**, in one sentence tied to the feature. A field nobody can justify is33 a field to remove: that's not a legal nicety, it's the cheapest way to shrink the problem.344. **Collect the minimum.** "We might need it later" is not a purpose. Later, with a purpose, is when35 to add it.3637**To keep this field list as a versioned file next to the code** that feeds the DPO's record of38processing activities, with a category on each field and a check in CI, read39[`references/05-processing-record.md`](./references/05-processing-record.md).4041### 2. Settle the questions an engineer can't answer alone42Take these to the DPO/legal rather than guessing:43- **On what basis are we allowed to hold this?** (consent, contract, legal obligation, legitimate44 interest — they are not interchangeable and they have different consequences in the code)45- **If it's consent**: it has to be freely given and withdrawable. Withdrawable means there's a code46 path for withdrawal, which is a feature someone has to build.47- **How long do we keep it, and what happens at the end?** Deletion or anonymisation, and a mechanism48 that actually runs. A retention rule with no job behind it is a sentence in a document.49- **Does this need a formal impact assessment?** Large-scale, sensitive or systematic-monitoring50 processing may. That call isn't ours.5152**For a French project, or a French DPO/legal team**, GDPR's open wording above ("appropriate",53"high risk") has a published, concrete answer from CNIL: the AIPD trigger grid, retention-period54figures by data category, the cookie-consent regime and the DPO-designation criteria are in55[`references/01-cnil-france.md`](./references/01-cnil-france.md). Read it before taking a retention56period or an AIPD call to the DPO, so the question arrives with CNIL's own figure attached rather57than "how long is normal?"5859### 3. What the code has to provide601. **Access and portability**: a person can ask what you hold about them. If satisfying that request61 means a developer writing a bespoke query each time, it will be slow and eventually wrong.622. **Deletion**: an actual mechanism, and know what it does about backups, logs, analytics and search63 indexes. Deleting the row while the record survives in a search index and three log lines is the64 normal outcome of not asking. Backups are not edited; deletion survives a restore by a method:65 1. Every erasure writes an entry to an erasure journal (subject identifier or its hash, date, scope),66 stored outside the backed-up database, and kept as long as the oldest backup.67 2. The restore procedure replays the journal after the restore and before the service takes traffic.68 A restore runbook without that step brings deleted people back.69 3. The proof is a restore drill (`skills/backup-restore-drill-pitfalls`): erase a test subject, restore a70 backup taken before, replay, and check the subject is gone from the database and the search index.713. **Correction**: editable, or a route to get it corrected.724. **Never personal data in logs or URLs.** Same reasoning as credentials73 (`skills/auth-session-conventions` §2.1 and §2.4): logs have wider read access and longer retention74 than the system that produced them, and URLs travel into history, `Referer` and every proxy. The method75 is an allowlist at the logger, not a cleanup later: log identifiers, never names, emails or bodies;76 configure the logger's redaction for headers, cookies and known fields; and check it with a test that77 sends a request carrying a marker email and asserts the captured log output does not contain it.785. **Non-production environments.** A production dump in a dev database is a real disclosure with real79 consequences. Anonymise or generate; if you must copy, that's a decision someone senior takes80 knowingly.816. **Access is scoped**: the same discipline as any authorisation82 (`skills/security-hardening` §3), applied to the data most likely to be requested.8384**For a concrete Laravel/Nuxt shape of items 2, 4 and 5 above** — anonymising a record instead of a85hard delete, a scheduled purge job tied to a named retention figure, a cookie-consent integration,86and keeping personal data out of logs and exception reporters — see87[`references/02-code-patterns.md`](./references/02-code-patterns.md). Illustrative patterns to adapt,88not a certified implementation.8990### 4. Third parties911. **A new service that receives personal data is a decision, not a dependency choice.** It needs a92 data processing agreement, and where the data is hosted matters. Both are legal questions.932. **Analytics, error reporting and session replay are the common unnoticed cases**: an exception94 reporter that serialises request bodies is exporting personal data to a third party, whatever the95 feature intended.963. **Write down what leaves the system, to whom, and why** — you will be asked, and reconstructing it97 later from the code is much harder than noting it now.984. **The broader security/compliance review of the vendor itself — not just the data-processing99 question — is `business/vendor-management`'s process.** This section covers what to ask about a100 vendor that will hold personal data specifically; that block covers assessing and tracking the101 vendor relationship generally.102103### 5. Email marketing: three questions, no default answer104A marketing list is personal data with a channel attached, and three questions recur in every conversation about105it. This block answers none of them; the person who owns data protection does, for the countries concerned,106from the regulator's current published guidance.1071. **What evidence of consent do we hold for each address?** Who gave it, when, in what words and for which108 purpose, and whether we can show it later. A list without that record is a list nobody can defend.1092. **How long may the suppression list be kept?** It exists so a person is never mailed again, which argues for110 keeping it; the same person's data should not outlive its purpose, which argues for a limit. The answer is111 a decision with a named owner, not "forever" and not "delete with the rest".1123. **What applies to business-to-business mail?** A work address belongs to a person; whether it changes what is113 required before mailing them is a question for legal, not an assumption.114What CNIL's published pages state on the first and third question is in115[`references/01-cnil-france.md`](./references/01-cnil-france.md) point 6; the suppression-list question has no116answer there. For the design of the flows themselves, see `business/lifecycle-email-program-design-pitfalls`.117118## Output / checkpoint119No pipeline checkpoint (business layer, see `business/README.md`). What it owes: the field list with a120purpose each, the questions routed to the DPO/legal with their answers when they come back, the121retention mechanism named, and the list of third parties receiving data. If the answers aren't in yet,122that's a blocker to state, not a reason to guess.123124## Guardrails125- **Never decide a lawful basis or a retention period yourself.** Wrong here is expensive and126 invisible for a long time.127- **Never widen collection because it's convenient.** Every extra field is an obligation you now carry.128- Never copy production personal data to a local or shared dev environment on your own initiative.129- **When in doubt about whether something is personal data, treat it as if it is** and ask. The cost of130 asking is a message; the cost of being wrong is a notification obligation.131132## Origin133**Sourcing pass 2026-10-20 (status stays 🟡, nothing was run).** Read for facts, rewritten in our own words:134CNIL pages on the AIPD (trigger grid: two of nine criteria, or a listed processing), the AIPD lists page, the135retention page and the retention guide (PDF), the cookies FAQ and the cookies recommendation page, the136register page, DPO designation, email prospecting and consent; each is a regulator's public page, no licence137statement read, so no text is reproduced. Confirmed: the AIPD trigger, the presumption-of-conformity wording,138the prospect retention rule, billing data kept 10 years, refusal as easy as acceptance, consent proof, register139contents and the narrow small-organisation exemption, the three mandatory DPO cases. Corrected: CNIL140describes DPO designation outside the mandatory cases as encouraged by the EDPB, not recommended by CNIL itself.141Still unverified: the 13- and 25-month cookie figures, the client "3 years after the end" figure, the142connection-log range. `references/02-code-patterns.md` stays our own engineering guidance.143144Assembled from public sources: the GDPR text itself (lawful bases, data-subject rights, special145categories, impact assessments) and published regulator guidance. Written **without internal legal146expertise**, deliberately shaped as "which questions must reach a lawyer" rather than as answers. The147engineering consequences — logs and URLs, search indexes and backups surviving a deletion, exception148reporters exporting data unnoticed, non-production copies — are ours, and are the part this block adds149that a legal summary wouldn't.150151**Email-marketing questions added 2026-10-20** (§5): three questions named from an email-marketing review,152with no law restated and no source of ours for any answer.153154**Sectioned 2026-09-29**, following the split already used by `business/interface-design`,155`business/product-ownership` and `business/data-analytics`: this file is now the router, and two156`references/` files carry what a single generic GDPR file couldn't hold without either bloating past157the router's own budget or staying vague. `references/01-cnil-france.md` is sourced from CNIL's own158published guidance — its AIPD pages, its retention-period guide, its cookies recommendation/FAQ, its159DPO-designation guidance and its register-of-processing guidance, all cited by URL inline and checked1602026-09-29 — **not itself CNIL-endorsed**: it's this block's reading of CNIL's public documents,161same non-authoritative register as the rest of `business/`. One figure is flagged unresolved rather162than asserted: connection-log retention, where CNIL's own published range spans roughly 6 months to1631 year (`references/01-cnil-france.md` §1.2 states the range and defers the exact figure within it to164the DPO/legal team).165`references/02-code-patterns.md` is original engineering translation — Laravel/Nuxt patterns for166anonymisation, consent, scheduled purges and log scrubbing — written by us, not sourced from CNIL or167any external catalogue, and stated as illustrative rather than certified in its own opening168paragraph and guardrails.169`references/05-processing-record.md` (added 2026-10-16, 🟡 never dogfooded) restates GDPR Article 30170as published in the Official Journal, read on EUR-Lex 2026-10-16 (not the consolidated text), and171takes the field-annotation pattern from the `ethyca/fides` example files (Apache-2.0); the file says172which sentences are ours.173174Independent verification 2026-10-21: 19 checked, 14 matched, 1 corrected, 4 unverified