We shipped a mini-program last year for a merchant that wanted to show nearby stores. The feature needed location, so the team set it to always-on GPS. Nobody flagged it. Then a user in the EU wrote in asking why a bakery finder needed their exact coordinates every hour. That note is the whole problem in miniature: the permission you forgot to ask for is the one that ends up costing you, in fines or in churn.

In a native app, permission is a system dialog the user grants once and mostly forgets. In a mini-program it's murkier, because there are three parties in the room instead of two. The host owns the device relationship and the user's trust. The merchant owns the feature and the backend. The runtime sits between them and decides what the merchant's code is actually allowed to touch. Most privacy failures we've seen come from pretending that third seat isn't there.

What the mini-program can and cannot read

A mini-program doesn't hold device permissions the way a native app does. It runs inside the host, and the host brokers every request. That should make things safer, but only if the runtime is honest about the boundary. Here's the surface we design against.

Signal the merchant wantsWhat a native app seesWhat a regulated mini-program sees
Precise locationGPS coordinates, always onCoarse city-level, or nothing until real consent
ContactsFull address book on requestNever exposed to merchant code
CameraRaw stream while openFramed capture, only while the view is visible
Device identifierStable hardware IDsAn opaque per-host session token
Browsing historyLocal storage and cookiesSandboxed, cleared when the session ends

The point isn't that mini-programs are weaker. It's that the access is brokered, and a broker can say no. A native app that wants the address book just asks the OS. A mini-program that tries the same thing hits a wall the runtime put there, and the merchant's code never learns the difference. That wall is the single most useful privacy feature we have, and it only works if someone maintains it deliberately.

Data minimization is a design constraint, not a policy

We push back on the industry habit of collecting first and apologizing later. Minimization sounds like compliance paperwork, but it's really a question of how many fields your checkout screen has. Every extra input is a liability you're storing, defending, and eventually explaining. The runtime can enforce this at the boundary: if the merchant requests a field the feature doesn't need, the sandbox can strip it before it ever reaches their server. We've watched teams quietly request full profiles just in case — the runtime is where that just-in-case gets refused.

And minimization isn't only about collection. It's about retention. A session token that expires when the tab closes is worth more than a database of identities you swore you'd delete. The merchants who sleep well at night are the ones whose backend never received the data in the first place.

GDPR-style expectations travel with the user

Overseas markets don't share one rulebook, but the patterns rhyme. The EU's GDPR asks for explicit, withdrawable consent and a right to be forgotten. Brazil's LGPD reads similarly. What matters for us is that these expectations follow the user, not the border. A mini-program running in a messaging app in São Paulo is held to the same instinct as one in Berlin: tell people what you're taking, let them take it back, and don't hoard.

This is where per-merchant drift gets dangerous. If every merchant builds their own consent flow, you get ten thousand slightly different interpretations of informed. Some will be defensible; many won't. A regulator doesn't care that your merchant was small. They care that the user wasn't told.

The runtime is the one baseline that scales

Here's the argument we keep making: a universal runtime can enforce a single privacy baseline across many hosts, instead of letting each merchant reinvent the contract. The host provides the trust relationship, the merchant provides the service, and the runtime provides the floor that neither can quietly lower. When the baseline lives in the runtime, a merchant can't ship a mini-program that reads contacts just because their competitor did.

We're not naive about it. A runtime baseline is a floor, not a ceiling, and a careless merchant can still mistreat data on their own backend after it leaves the sandbox. Residency adds real cost too — keeping EU data in the EU means more infrastructure and a little latency, and someone has to pay for that. Consent prompts add friction to conversion; we've seen the numbers, and pretending they don't cost anything is how teams skip them.

But the alternative is worse and we've watched it happen: hundreds of merchants each making the same privacy decisions from scratch, most of them under ship pressure, none of them with the incentive to be strict. Centralizing the floor doesn't make every merchant virtuous. It makes the cheap, lazy choice the safe one.

A small thing to try

Before your next release, list every permission your mini-program requests and cross out the ones no screen actually uses. Then check whether the consent you show matches the access you grant — most gaps we find are mismatches, not malice. The user who notices is rarely the loudest, and by then the permission is already spent.

Cross Mini App tries to keep that wall in one place so merchants don't each rebuild it. The rest is still on you.

Sources