Security and privacy review of the participant server and app
This note was held back until the findings were fixed. No server has been deployed, so the weaknesses below were never exposed to participants.
Reviewed: 25 November 2026. Fixes: 29 November 2026. Scope: server/, android/, website/, .github/workflows/, PRIVACY.md. The review was static reading only. Each finding was checked against the code, and each fix has a test in server/tests/.
The participant experiment is still in development. Members of the public record a consumer IMU (inertial measurement unit) with the Android app and upload the recording to the server.
What was sound
- All database queries are parameterized. Client file names and archive member names never reach the file system.
- Only
json,zipfileandgzipparse uploads. Upload size, member sizes and gzip expansion are bounded. - Uploads cannot overwrite each other: identifiers are server-generated and the content hash is unique.
- Forged uploads cannot reach pooled results. Pooling excludes any session without curator approval (
analysis/lll/policy.py), and approval is tied to the server-computed content hash. - The Android app exports only its launcher, forbids cleartext traffic, holds no keys or analytics, and asks for consent on each upload.
- The website is built only from repository Markdown and escapes titles and attributes.
- No secrets were found in the reviewed directories.
Findings and what was done
| # | Finding | Severity | Now |
|---|---|---|---|
| 1 | No submitter authentication. Anyone could download a participant's archive, alter it and upload it as a new session carrying that participant's identifiers. It appeared in the public index as "unverified". | Medium | Reduced. A session ID belongs to the first upload that carried it. A later upload with the same ID, or with the ID of a removed session, is held for a curator. A copy given a new session ID is still published as an unverified session, because participants have no accounts. |
| 2 | Uploads were public the moment they were accepted. There was no moderation step and no total storage limit. Free-text notes and exact coordinates were published as typed. | Medium | Reduced. An upload is released automatically once the server has analysed it successfully; one that fails stays private. The public list, archive download, session report, pooled report and export cover released sessions only, and a curator can hold or remove one. Stored uploads are capped at 50 GB by default. Notes and coordinates are still published as typed, with no person reading them first; the app's consent text and the privacy page say so. Download rate limits are left to the proxy. |
| 3 | The archive directory was fully parsed before the 32-member limit applied. A large upload made of directory entries could exhaust memory. | Medium | Fixed. The member count and directory size are read from the end-of-archive record first. |
| 4 | One client could hold both upload slots by sending no body, for up to 300 seconds each. | Medium | Fixed. One address holds one slot, and a body that stops arriving for 20 seconds gives its slot back. An archive that expands to the full size budget still costs about a minute before it is rejected, on one slot. |
| 5 | Removal on request was not durable. There was no remove command, and the same bytes could be uploaded again. | Medium to low | Fixed. remove-session deletes the archive, reports and record, withdraws approval and blocks the content hash. |
| 6 | The privacy policy understated what the server recorded. The web log wrote plain client addresses, the address hash had no secret, expired rate-limit rows were cleared only by a later upload, and the receipt time is published. | Medium to low | Fixed. The request log is off unless asked for, the hash is keyed, expired rows are deleted every ten minutes, and PRIVACY.md states the receipt time and the proxy's own log. |
| 7 | Anyone could exhaust a participant's upload quota by uploading sessions that carried that participant's install identifier. | Low to medium | Fixed. The quota is per client address only. |
| 8 | The session index was unpaginated and echoed the kind field without a type check. |
Low to medium | Fixed. The index returns at most 500 sessions a request and ignores a kind that is not text. |
| 9 | Failed sessions were re-analysed on every processing run, and a session whose analysis was killed stayed first in the queue. | Low to medium | Fixed. process analyses new sessions only unless --retry-failed is given. |
| 10 | The app requests location permission that the stationary experiment does not need, and bench sessions record a coarse latitude by default. | Low | Open. The app is unchanged. PRIVACY.md now names the permission and what uses it. Removing it needs an app release. |
| 11 | Server dependencies were lower bounds that admitted versions with known flaws, and the automatic API documentation routes were enabled. | Low | Fixed for the known flaws: the floors are raised and the documentation routes are off. Exact versions are still not locked. |
| 12 | Two CI workflows set no token permissions, and actions were pinned by tag. | Low | Fixed. Both workflows are read-only and pin actions by commit. |
| 13 | The website loads two scripts from a public CDN with no integrity check. | Low | Open. A check on the first file would not cover the further files those libraries load. The full fix is to serve both libraries from the site. |
Two reviewer claims were corrected on checking: session and install identifiers are limited to 64 characters, and unapproved sessions are excluded from pooling.
Not determined
- Whether every part of a generated report escapes participant-supplied text. Reports are now served only for released sessions, with a content policy that stops any script from running, so a missed escape could not run code.
- The deployment: proxy, TLS, log retention, and whether the per-address limits see real client addresses. The curation guide states what the proxy must do.
What an operator needs to know
- Release needs no manual step: run
processon a timer.listshows what stayed held and why. - Keep the
address-keyfile in the data directory private. - Uploads from the current app keep working. The app retries when the server answers that it is busy.