Data Protection

This is the standard the Quality Gate's Security lens holds work to whenever a system handles personal data โ€” the data a user entrusts to us. It sits alongside the Security Policy (which keeps that data safe from attackers) and describes the other half of the duty: the user's own rights over their data โ€” to know what they agreed to, to see it, to take it, to leave with it โ€” and the discipline that makes those rights answerable years later rather than promised in prose. It builds on the Infrastructure Planning Policy (data residency, backups, durability) and the Database Guidelines (schema and history design).

This is an engineering standard: how we design schemas, record consent, keep history, and send mail so that personal data is handled correctly by construction. The user-facing Privacy Policy โ€” the legal notice of what we collect and why โ€” is the organisation-level Privacy Policy standard; this page is what the system must actually do so that policy is truthful. As everywhere in the handbook, deviations are allowed but must be deliberate and justified in the project's design notes.

Data protection is where OSBR's values become load-bearing. Be Nice: the user always knows what they agreed to and what we hold, and can retrieve both โ€” and anyone who comes after us, human or AI, can see how a record reached its current state without having to guess. Be Kind: the user owns their data; we only ever hold it on loan, so leaving must be as easy as joining, we never sneak a material change past someone by burying it in "continued use," and we never quietly erase a fact someone may later depend on. Be Strong: we build the audit trail before we need it, so that under scrutiny โ€” a regulator, a dispute, a breach, a corrupted write โ€” the truth is already recorded, tamper-evident, and reconstructable. Humans and AI agents design and review these systems here as collaborators, held to one bar.

Silence is not consent, and the past is a fact, not a field. If we cannot show a clear affirmative act against a specific version, we do not have consent. If we overwrite state in place, we are choosing โ€” usually without deciding to โ€” that history is worthless. It rarely is.

How to read this policy

1. Goal

The goal of data protection at OSBR is that personal data is handled correctly by design, and every promise we make about it is one the system can actually keep. Concretely, for any personal data we hold, we can:

These capabilities are almost impossible to retrofit. They MUST be designed into the very first user-data model, because a schema that never planned for deletion, history, or consent versioning cannot grow them later โ€” the history you need has already been overwritten by the time you need it.

2. Responsibility

Privacy is everyone's job, not a compliance team's โ€” this is Cavoukian's principle of protection embedded into design rather than bolted on afterwards.

3. Practices

3-1. Design data protection into the first schema

Export, deletion, retention, minimization, consent versioning, and change history MUST be decided when the first user-data model is designed, not deferred. For every table holding personal data, the design notes MUST answer, before the first migration ships: what category each field is, its retention period, what happens to it on account deletion (hard delete, anonymise, or retain under a lawful exception), and where else the data flows. A schema with no answer for "what happens to this row when the user leaves?" is not finished.

3-2. If a record holds state, history is a requirement โ€” not an enhancement

For any record that carries status, state, a mutable classification, a price, a policy version, or any field whose previous value could later be asked about, a change-history structure MUST be designed in from the start.

3-3. Choose a history structure that fits the record

There is more than one well-established way to keep history. Engineering MUST choose deliberately from these (or a documented equivalent) rather than default to overwrite because it is less code today. All are appropriate; the wrong choice is none.

Structure Keeps Best when Anchor
Append-only / immutable audit log One immutable row per change (who/what/when), separate from the live row You need a tamper-evident trail alongside a normal mutable table WORM / audit-log discipline
System-versioned temporal table Every row version with [valid-from, valid-to] system time, queryable "AS OF" a past instant The database can own history transparently and you want point-in-time SQL SQL
system-versioned tables
Bi-temporal Two timelines โ€” valid time (when the fact was true) and transaction time (when we recorded it) The real-world effective date differs from when we learned it (back-dated corrections, retroactive consent) SQL
bi-temporal
Slowly Changing Dimension (Type 2) A new row per change with effective/expiry dates and a "current" flag Analytical / warehouse dimensions reporting over historical attribute values Kimball SCD Type 2
Event Sourcing The full sequence of state-changing events; current state is a derived projection State is inherently a sequence of business events and the event log is the source of truth Fowler / Greg Young Event Sourcing

Whichever is chosen, the previous value MUST remain retrievable after a change. A change that leaves no recoverable prior state is an overwrite, whatever it is called. Corrections SHOULD be new records that supersede, not edits that erase.

3-4. Derive "current", don't destroy "past"

The current state of a stateful record MUST be derivable from its history, not maintained by destroying the history.

3-5. Make history queryable, not just retained

Retained history no one can query is a liability, not an asset โ€” it costs storage and answers nothing.

3-6. Data minimization

The least data we can hold is the safest data โ€” data we never collected can never leak, never needs exporting, and never needs deleting.

3-7. Documented retention, audited against the running system

Retention MUST be a decision on the record, not an accident of "we never delete anything" (PDPA Retention Principle; the APPI's retention limits; GDPR Art. 5(1)(e), storage limitation).

3-8. Self-service data export (portability)

A user MUST be able to export their own data themselves, without emailing support and without a developer running a query (PDPA Access Principle and the data-portability right added by the 2024 Amendment; the APPI's ้–‹็คบ access right; GDPR Art. 20).

3-9. Complete account and data deletion (erasure)

A user MUST be able to delete their account and have their personal data actually deleted (PDPA Access Principle and the right to withdraw consent; the APPI's ๅˆฉ็”จๅœๆญขใƒปๆถˆๅŽป cease-use/erasure right; GDPR Art. 17; CCPA/CPRA right to delete).

3-10. Data subject request (DSR) workflow

Even with self-service, some access/deletion/portability requests arrive by other channels. Have a defined path for them.

3-11. Data residency and sovereignty

"Data sovereignty" also means honouring where the data is legally allowed to live โ€” the PDPA's cross-border transfer rule (under the 2024 Amendment, transfer only to a place with substantially similar or an adequate level of protection, or on another permitted ground such as consent), the APPI's cross-border-provision rule, and the GDPR's Chapter V transfer safeguards.

Each ToS and Privacy Policy MUST carry a persistent, immutable version identifier. A published version is frozen โ€” never edited in place; a change produces a new version.

Every act of consent MUST be written to an append-only, immutable audit trail as a discrete event โ€” a specific application of the history discipline in ยง3-2 to ยง3-5. The event is a fact about the past; it is never updated or deleted.

Each consent event MUST capture at minimum:

Rules:

3-14. Classify changes: material vs non-material

Every new version MUST be classified by Legal before publication, with the rationale recorded alongside the version.

When in doubt, classify as material. The cost of over-classifying is one extra prompt; the cost of under-classifying is processing personal data without a valid legal basis. Be Kind โ€” err toward asking again.

On a material change, OSBR MUST obtain fresh, affirmative consent against the new version before continuing to process personal data under the new scope.

3-16. Notice at collection

At the point personal data is first collected, OSBR MUST present a notice at collection identifying the categories of data and the purposes, and link to the current Privacy Policy version (the PDPA Notice and Choice Principle; the APPI's purpose-of-use notice; CCPA/CPRA notice-at-collection; the informed limb of GDPR consent). The version shown at collection MUST match the version recorded in the consent event.

3-17. Justify and review every email trigger

An email trigger is any code path that sends a message to a person. Each new or changed trigger MUST be described in the PR that introduces it: what event fires it, who receives it, why it needs to exist, and how often it can fire per recipient. A trigger that cannot be justified in a sentence should not ship โ€” reviewers treat an unexplained send_email(...) the way they treat an unexplained network call.

3-18. Classify transactional vs marketing

Every trigger MUST be classified as transactional or marketing / notification, because the classification determines the legal and consent rules that apply.

The primary purpose of a message, not its label, decides classification (the CAN-SPAM "primary purpose" test): a "receipt" padded with promotions is a marketing message. When a message mixes purposes, the stricter rule wins.

3-19. Authenticate the domain before the first production send

The sending domain MUST have SPF, DKIM, and DMARC configured and verified before any production email is sent from it โ€” not after deliverability problems appear. Unauthenticated mail is filtered, spoofable, and increasingly rejected.

Bulk senders MUST additionally meet the Google & Yahoo 2024 bulk-sender requirements: authenticate with SPF and DKIM, publish a DMARC policy, keep reported spam rates below the 0.3% threshold, send from aligned domains, and provide one-click unsubscribe (RFC 8058) honoured within two days.

3-20. Send through a managed service

Production email MUST go through a managed email service provider (ESP) โ€” never a self-operated SMTP server or a raw library talking directly to recipient MX hosts. Managed providers give us authenticated sending, reputation monitoring, and bounce/complaint handling a hand-rolled sender does not. Bounces and complaints MUST feed a suppression list so we stop mailing addresses that hard-bounce or complain; ignoring them is the fastest way to lose sender reputation and get all our mail โ€” including transactional โ€” filtered.

3-21. Unsubscribe and preference management before any marketing send

No marketing or notification email may be sent in production until unsubscribe and preference management are in place. Every such message MUST include a clear, working unsubscribe mechanism that takes effect promptly and requires no login or reply. This is both an OSBR courtesy and a hard legal requirement in every market we operate in:

Where these regimes overlap for a recipient, apply the strictest: default to opt-in, keep consent records, and make opting out trivial.

3-22. Protect deliverability and sender reputation as a shared asset

Sender reputation is domain-wide: a noisy marketing trigger degrades delivery of password resets and receipts too. Send only wanted mail, keep volume and cadence steady rather than spiky, warm up new sending domains/IPs, monitor bounce and complaint rates against provider thresholds, and remove addresses that bounce or complain. Reputation is earned slowly and lost in a single bad send.

3-23. Keep personal identifiers out of version-control history

Personal data in a git repository is the one place ยง3-6's minimization is hardest to undo: commits are content-addressed, so an address committed once survives every later edit, propagates to every clone and fork, and persists in the forge's API even after a rewrite. Treat the repository as append-only for personal data and prevent the write rather than plan the deletion.

Once an address is in history, there are exactly two honest outcomes, and doing neither is not one of them:

  1. Rewrite โ€” purge it and force-push. Complete, but it rewrites every affected SHA, breaks existing clones and open pull requests, and the forge may retain the unreferenced objects regardless. Coordinate with everyone holding a clone.
  2. Accept โ€” record it as an accepted risk in the project's register (ยง4 of the Supply Chain & Risk policy) with a named owner and the reasoning, per the Quality Gate's rule that every accepted risk is named and owned.

Record the acceptance without restating the address โ€” a register entry that quotes the personal data it is about defeats its own purpose.

4. Design-time checklist

Before the first user-data migration ships, the design notes SHOULD answer:

If personal-data state can be overwritten with no recoverable prior value, or consent cannot be tied to an exact version, the design is not ready.

References

Privacy law. The organisation-level notice these controls uphold is the Privacy Policy.

Malaysia

Japan

EU / US / international

Privacy engineering frameworks

History & temporal patterns

Email authentication & deliverability

Related OSBR standards