interplane.Get Omega
Read in your language

aien-edge

aien-dev/aien-edge

Brought by drakestapleton

branch main Branches Tags History

aien-edge / AUDIT_SCOPE.md

96 lines · 4758 bytes Raw Blame History Source

Audit scope

Written for an outside, independent security audit. Revision described: cf3369b10a167f028e705456626088ae2c1307d5 on main, 2026-11-01. Everything below is taken from the repository's own files at that revision; items marked NOT_RUN were not executed while writing this document.

What this repository is

aien-edge is a small native Rust web server (hyper and rustls) that serves prebuilt static sites from memory, with brotli and gzip precompression, ETags, virtual hosts and automatic Let's Encrypt TLS (TLS-ALPN-01). It was built to run on a Raspberry Pi at the network edge. Status (README, 2026-10-18): not in use; the sites are served by GitHub Pages. It is hosting infrastructure, not part of the AIEN core. One binary crate.

What to review, in priority order

  1. src/site.rs: site loading into memory, traversal-safe path normalization against an in-memory map, exclusion of hidden files and source maps, encoding negotiation, ETags.
  2. src/handler.rs: GET and HEAD only, canonical host and apex to www redirects, HTTP to HTTPS redirects, 421 for unknown hosts, security headers (HSTS, nosniff, frame denial, referrer policy).
  3. src/main.rs: listeners (plain HTTP and TLS-ALPN-01), connection cap, header-read and TLS handshake timeouts, SIGHUP reload that keeps the old site if the new one fails to load.
  4. src/config.rs: TOML schema with deny_unknown_fields; [tls] with production switching between Let's Encrypt staging and production; cache_dir for ACME state.
  5. deploy/aien-edge.service: DynamicUser=yes, CAP_NET_BIND_SERVICE only, read-only /srv/sites.
  6. deploy/publish-site.sh and deploy/publish.env.example: builds a site, uploads it over ssh and rsync to EDGE_HOST, repoints a symlink and reloads.
  7. There are no CI workflows in this repository.

Trust boundaries

Threat model summary

Build from source at a pin

A stable Rust toolchain; edition 2021; no rust-toolchain.toml, so the exact version is unknown from the repository. Cargo.lock is committed.

git clone https://github.com/aien-dev/aien-edge.git
cd aien-edge
cargo build --release

Run every test

cargo test
cargo clippy --release -- -D warnings

Known limitations and NOT_RUN

Dependencies and provenance

Evidence