Skip to content

PyAerial 0.21.0 - security and correctness remediation

Choose a tag to compare

@quantumbagel quantumbagel released this 04 Nov 04:34
· 55 commits to master since this release

Originally released 2026-10-21.

Breaking changes

  • The raw JSON socket has been replaced with a reconstituted Beast binary output. Frames received across all stations are deduplicated, corrected, and published as dump1090 Beast binary on /ws/beast and via a dedicated TCP server (configured with web.beast_port, defaulting to 30005, and web.beast_host, defaulting to 127.0.0.1). Setting web.beast_port to null or setting PYAERIAL_BEAST_PORT=off disables the TCP listener.
  • Browser origin security has been tightened so that web.origins defaults to an empty list, requiring exact scheme://host[:port] matches. Localhost connections require setting web.allow_localhost_origins: true, and same-origin requests are accepted only when browsing by IP, loopback, or hostnames explicitly declared in web.allowed_hosts.
  • Docker Compose now requires an explicit REDIS_PASSWORD in the environment, binds published container ports strictly to 127.0.0.1, and drops root privileges across all services without requesting privileged container mode.

Added

  • Added configurable WebSocket connection caps and rate limits via ws_max_connections, ws_max_connections_per_ip, beast_max_clients, ws_max_inflight, ws_rate_limit, ws_rate_burst, and ws_request_workers.
  • Added support for reverse proxy header forwarding via trusted_proxies and made interactive OpenAPI documentation opt-in using enable_docs.
  • Standardized error codes across WebSocket RPC responses and injected defensive security headers (including Content Security Policy and frame restrictions) on all web responses.
  • Added the --force flag to pyaerial reset so operators can purge historical data when Redis is offline and engine status cannot be verified.

Fixed

  • Hardened webhook delivery by refusing HTTP redirects, retrying only on network drops, HTTP 5xx, or HTTP 429 status codes, restricting HTTP methods to POST and PUT, and redacting endpoint URLs in log output.
  • Prevented XML entity expansion attacks by validating external geofence files and enforcing a 20 MB size limit.
  • Redacted Redis credentials from console logs and runtime status outputs.
  • Bounded outgoing alert delivery queues and ensured notifications for a single alert episode are dispatched in chronological order.
  • Improved tracking resilience so that isolated bad position fixes no longer freeze aircraft tracks, multi-receiver merges execute faster, and non-monotonic receiver clocks are handled cleanly.
  • Resolved web portal rendering bugs to restore basemap display, surface clear status banners when connections are rejected, and apply jittered backoff during reconnect attempts.

Changed

  • Migrated to a multi-stage Docker build pinning dump1090 v11.1, locked runtime Python dependencies using sha256 hashes in requirements.lock, and bumped underlying libraries to patch known security vulnerabilities.

Full changelog: v0.20.2...v0.21.0