SPB Git

Repository Public BSD-3-Clause

SECURITY.md 3.2 KB

# ORIX Maps — security notes

# What is protected

  1. The device against hostile files: map packages, imported themes, GPX / GeoJSON / KML files, place backups.
  2. The user against a hostile or compromised download server or network.
  3. The user's location and activity against disclosure (see docs/PRIVACY.md).

# Trust model for map packages

  • A package is accepted only if its manifest is signed (Ed25519) by a key compiled into the app (Apps/ORIXMaps/Sources/Regions/RegionsModel.swift, PackageTrust) and every component matches the SHA-256 in that manifest. Where the file came from (the site, Files, AirDrop) does not matter.
  • Production key: id fd36c9d7c73db7e3, generated on the build node on 2026-11-25; the private key is in ~/.config/orix-maps/signing/ on that node (mode 600) and nowhere else. It has no backup yet: losing it means shipping an app update with a new key before new maps can be published. Owner action: back it up offline.
  • Debug builds additionally trust a development key whose private half is in the git-ignored data/dev-signing/. Release builds do not contain that key (#if DEBUG).
  • Rotation and revocation: docs/ORIXMAP_FORMAT.md §5.1. A new key ships in an app update; packages are then signed with it; the old key is removed (or listed in revokedKeyIds) in a later update.
Attacker Can Cannot
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)
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)
Holds an old validly signed package Offer it for import Replace a newer installed version: downgrades are refused
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)

Residual risks, accepted for V1: the catalog is not signed (freeze and first-install rollback to an older signed version are possible for a server-side attacker); SQLite, the routing graph and vector tiles inside a signed package are trusted as produced by our pipeline, though their readers still validate structure; MapLibre Native parses the tile archive in C++ — only signed archives reach it.

# Dependencies

One third-party runtime dependency: MapLibre Native 7.0.0 (BSD-2-Clause, binary XCFramework pinned by checksum in the Swift package manifest). Everything else is Apple system frameworks. Build-time tools (Planetiler, osmium, Java) run on the build node only.

# Checks before a release

  • scripts/build.sh packages — every package's tests, including the corrupted-input suites.
  • scripts/check.sh — no secret or key material in the tree, no tracked geodata.
  • Release build has no development key: strings on the binary must not contain the development public key.
Files main
Menu

Theme