Skip to content

Release hardening: dev fixtures, ATS, Face ID and a cleartext guard - #85

Merged
PapiCuche merged 1 commit into
mainfrom
chore/release-hardening
Oct 22, 2026
Merged

PapiCuche merged 1 commit into
mainfrom
chore/release-hardening

Conversation

@PapiCuche

Copy link
Copy Markdown
Owner

A pass over what a store build would actually contain. Three things it was
carrying that it should not, one new fail-closed rule, and a document that says
what is still open and why it cannot be settled from here.

Verified on Backend origin/master 97c2dd0 — its delta since fb7fcee is
the fiscal double-submit fix, which touches no v1 contract, so no parity work
was reopened.

The demo password was in the production bundle

DevQuickLogin returns null outside a development build, and that was never
the whole job: a component that renders nothing is still a module Metro packs.
Exporting with production env and running strings over the Hermes bytecode
found Demo123! and the seeded .invalid addresses sitting in the iOS bundle.

The login screen now requires the module under __DEV__, which the release
build replaces with false, so the branch is dead code and the module is
dropped. Three matches before, zero after — and the check is written into
docs/RELEASE_READINESS.md so it can be repeated before a submission.

App Transport Security was off for every build

Expo's iOS template ships NSAllowsArbitraryLoads: true. That is right for a
development client reaching Metro and Django over plain HTTP on a LAN, and
wrong for a binary somebody downloads: it stops the system refusing a cleartext
or downgraded connection for the whole app.

app.config.js sets it to false for every profile except development.
__tests__/release-native-config.test.ts asserts both shapes and that nothing
else about the app changed.

The app asked for Face ID, which nothing uses

expo-secure-store writes an English NSFaceIDUsageDescription by default,
for a requireAuthentication option this app never passes.
faceIDPermission: false deletes the key. What remains is the camera and the
photo library, both in Spanish, both naming the shop.

A cleartext API is now unshippable

Next to the rule that already refuses localhost and friends: a non-development
build that resolves to anything but https: resolves to no API at all and says
it is unconfigured on the first screen. iOS refuses cleartext under ATS and
Android under its network config, so such a build does not have a weaker
connection — it has no working request, after somebody has typed their password
into it.

Open, and deliberately not decided here

  • The EAS slug is BlackDogStore-mobile-temp. Not user-facing and not the
    store identity, but it names the EAS project: changing it later means new
    build history and new channels. Worth settling before the first submission.
  • Android inherits READ_/WRITE_EXTERNAL_STORAGE from Expo's template.
    Nothing in the app needs them and Play flags them, but blocking them cannot
    be verified without an Android device, and blocking blind risks the evidence
    picker on Android 10–12. Written up with the exact follow-up.
  • Preview still points at production (STAGING-01), so destructive QA stays
    on the development build against the scratch backend.
  • No crash reporting and no OTA. A crash reporter is a new processor of
    other people's data; the document says what a decision needs to cover instead
    of adding an SDK during a hardening pass.

Verification

npm run verify (114 suites, 2089 tests), npm run doctor (21/21), iOS and
Android exports with production env, git diff --check clean. Maestro smoke on
the development build: 01, 02, 03, 04, 18, 19 all pass.

One QA-environment fault was found and fixed outside the app: a second Django
on 127.0.0.1:8000 took the port the scratch backend had, and the dev build's
.env.local pinned the API to localhost, so every request 404'd against the
wrong server. Local file, now pointed at the LAN address; no app code involved.

🤖 Generated with Claude Code

Three things a store build was carrying that it should not.

THE DEMO PASSWORD WAS IN THE PRODUCTION BUNDLE. `DevQuickLogin` returns
null outside a development build, and that was never the whole job: a
component that renders nothing is still a module Metro packs, so
`Demo123!` and the seeded `.invalid` addresses were readable strings
inside the iOS bundle. The login screen now requires the module under
`__DEV__`, which the release build replaces with `false`, so the branch
is dead code and the module is dropped. Proven by exporting with
production env and running `strings` over the Hermes bytecode: three
matches before, zero after.

APP TRANSPORT SECURITY WAS OFF EVERYWHERE. Expo's iOS template ships
`NSAllowsArbitraryLoads: true`, which is right for a development client
reaching Metro and Django over plain HTTP on a LAN and wrong for a
binary somebody downloads — it stops the system refusing a cleartext or
downgraded connection for the whole app. `app.config.js` now sets it to
`false` for every profile except `development`, which keeps the QA loop
exactly as it was.

AND THE APP ASKED FOR FACE ID. `expo-secure-store` writes an English
`NSFaceIDUsageDescription` by default, for a `requireAuthentication`
option this app never passes. Configured with `faceIDPermission: false`,
which deletes the key rather than renaming it.

Also: a release build that resolves to a non-HTTPS API now resolves to
no API at all, next to the rule that already refuses a local host. iOS
refuses cleartext under ATS and Android under its network config, so a
cleartext release is not a working build with a weaker connection — it
is one whose every request fails after somebody typed their password
into it.

`docs/RELEASE_READINESS.md` records what was checked, against what, and
what is still open: the temporary EAS slug, Android's inherited storage
permissions (which need a device to verify before blocking), Preview
still pointing at production until STAGING-01, and the absence of crash
reporting — which is a decision about processing other people's data,
not a dependency to add during a hardening pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PapiCuche
PapiCuche merged commit 4789c62 into main Oct 22, 2026
3 checks passed
@PapiCuche
PapiCuche deleted the chore/release-hardening branch October 22, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant