SPB Git

Repository Public BSD-3-Clause

SECURITY.md 3.2 KB 45 lines markdown

1# ORIX Maps — security notes23## What is protected451. The device against hostile files: map packages, imported themes, GPX / GeoJSON / KML files, place backups.62. The user against a hostile or compromised download server or network.73. The user's location and activity against disclosure (see `docs/PRIVACY.md`).89## Trust model for map packages1011- A package is accepted only if its manifest is signed (Ed25519) by a key compiled into the app12  (`Apps/ORIXMaps/Sources/Regions/RegionsModel.swift`, `PackageTrust`) and every component matches the SHA-256 in that13  manifest. Where the file came from (the site, Files, AirDrop) does not matter.14- Production key: id `fd36c9d7c73db7e3`, generated on the build node on 2026-11-25; the private key is in15  `~/.config/orix-maps/signing/` on that node (mode 600) and nowhere else. **It has no backup yet: losing it means16  shipping an app update with a new key before new maps can be published. Owner action: back it up offline.**17- Debug builds additionally trust a development key whose private half is in the git-ignored `data/dev-signing/`.18  Release builds do not contain that key (`#if DEBUG`).19- Rotation and revocation: `docs/ORIXMAP_FORMAT.md` §5.1. A new key ships in an app update; packages are then signed20  with it; the old key is removed (or listed in `revokedKeyIds`) in a later update.2122| Attacker | Can | Cannot |23|---|---|---|24| Controls the network (TLS broken) or the web node | Serve an old catalog (freeze), withhold updates, refuse service, observe which region an IP address downloads | Install modified map data; install anything not signed by ORIX Labs; write outside the region directory (file names come from a fixed table) |25| Supplies a crafted `.orixmap` through Files | Make the app spend time verifying up to the size limits | Bypass the signature; overflow offsets (checked arithmetic); traverse paths; leave partial state (staging + atomic rename + recovery) |26| Holds an old validly signed package | Offer it for import | Replace a newer installed version: downgrades are refused |27| Supplies crafted GPX / GeoJSON / KML / theme / backup files | Cause a rejected import | Crash the parser (bounds checks, size and point limits, fuzz tests); resolve XML external entities; overwrite a built-in theme (imports always get a fresh identifier) |2829Residual risks, accepted for V1: the catalog is not signed (freeze and first-install rollback to an older signed30version are possible for a server-side attacker); SQLite, the routing graph and vector tiles inside a *signed* package31are trusted as produced by our pipeline, though their readers still validate structure; MapLibre Native parses the32tile archive in C++ — only signed archives reach it.3334## Dependencies3536One third-party runtime dependency: MapLibre Native 7.0.0 (BSD-2-Clause, binary XCFramework pinned by checksum in the37Swift package manifest). Everything else is Apple system frameworks. Build-time tools (Planetiler, osmium, Java) run on38the build node only.3940## Checks before a release4142- `scripts/build.sh packages` — every package's tests, including the corrupted-input suites.43- `scripts/check.sh` — no secret or key material in the tree, no tracked geodata.44- Release build has no development key: `strings` on the binary must not contain the development public key.45
Files main
Menu

Theme