Security
One manifest defines everything an application can reach
Reviewing agent-written software on conventional cloud infrastructure forces a reviewer to work backward. Establishing what a single service can touch means tracing IAM roles, VPC egress rules, container images, environment variables, database grants and hundreds of transitive packages before reading a line of business logic. Every new service repeats that reconstruction, and silent permission creep accumulates between releases.
Ferrite inverts the review order. Every application carries one short manifest, ferrite.json, sitting alongside its source code. That file declares every primitive, public route, forwarded header, external URL prefix, secret name and resource ceiling the application may use, and the platform grants typed capability handles strictly for those entries. Every Ferrite application runs safe by construction and by default, with nothing to assemble, and this manifest lets a founder or principal security architect establish the full blast radius in minutes.
How the manifest binds code to capabilities
A Ferrite application composes six primitives (record stores, streams, queues, transactions, object storage and functions) and receives zero ambient operating-system or network authority. Because ferrite.json is committed in the repository next to the Rust source, pull-request reviews, ownership rules and automated policy checks govern capability grants directly.
The platform enforces the declaration across admission, offline compilation, signed storage tokens, outbound gateway routing and fail-closed kernel containment. Any resource omitted from ferrite.json does not exist from the running process's perspective, and adding a capability requires an explicit manifest change that passes every check on deployment.
Walking through a production declaration
Northlight Yoga is a full booking application with class schedules, five-minute seat holds, waitlists, staff administration behind sign-in and an MCP interface for customers' AI assistants. Five stanzas of its ferrite.json define its complete operational authority.
Storage and messaging primitives
The manifest declares seven resources and the runtime hands the application one typed handle per resource:
data, a 1,024 MiB record store holding studio schedules, bookings, holds and reminder state.cache, a 256 MiB record store holding reusable rendered page data between requests.nonces, a dedicated record store where the sign-in package keeps session and replay-protection records.tags, a 512 MiB transactions service coordinating atomic multi-record commits and tag-based cache invalidation.site, a 512 MiB object store serving the application's static assets.requestsandreplies, two queues carrying inbound public traffic into the application and outbound responses back to the edge.
Every storage call carries a signed capability token scoped exclusively to these seven resources, preventing the code from addressing storage belonging to another application in the same account or any other tenant.
Public routes and forwarded header allowlists
External traffic enters through five URL prefixes, all routed onto the requests queue. The edge strips every request header not explicitly listed on the matching route before application code sees the payload:
/forwardscookie,accept,originandsec-fetch-sitefor document rendering./api/and/__alloy/forward those four headers plus the idempotency header used to recognise retried mutations./mcpforwards those five headers plusmcp-method,mcp-nameandmcp-protocol-versionfor customer AI assistants./assets/forwardsaccept-encodingandif-none-matchalone for static file delivery.
Any unlisted header, including authorization, never crosses the edge into the application. Forwarding origin and sec-fetch-site gives cookie-authenticated staff routes the exact browser metadata needed to reject cross-site state changes.
Compute ceilings
Each running instance is capped at 128 MiB of memory and a quarter of one CPU core through hard kernel cgroup limits. Memory exhaustion terminates that instance alone, and CPU saturation queues that instance without affecting neighbouring workloads.
Outbound egress destinations
Northlight Yoga leaves its egress list empty. From that single absent section, a security reviewer establishes immediately that no coding mistake, logic flaw or crafted input can exfiltrate bookings, customer names or session state to an external server, email API, payment processor or model provider.
Required secrets and build metadata
The manifest names two required secrets, sso_broker_origin and sso_shared_secret, supporting staff sign-in. Deployment fails closed if any declared secret is missing, preventing broken or half-configured startups. Secret values never appear in source or in ferrite.json; they are written separately as write-only sealed entries, inspectable by name via ferrite secrets list (where secrets live). The remaining metadata lines specify expected load profiles, build configuration and the SHA-256 provenance slot filled in by Ferrite's offline builder.
How widening reach appears in a release diff
Suppose the studio adds automated booking confirmation emails in a later release. Expanding the application's reach modifies exactly two sections of ferrite.json:
- An outbound egress section appears, binding handle
emailto the single literal prefixhttps://api.mail-provider.example/v1/send. - The required secrets list adds one name,
email_api_token.
Storage primitives, ingress routes, forwarded headers and compute ceilings remain identical. Reviewing that two-line diff tells an architect the complete delta in blast radius: outbound traffic can now reach URLs beginning with that exact path prefix and nowhere else, using one named credential whose scope is bounded to that destination. Code review then narrows directly to the handler assembling the email payload.
Prefix matching is literal, character by character. Ending the entry with a concrete path admits only endpoints under that path; granting an entire host requires a trailing slash (https://api.mail-provider.example/) because omitting the slash would also match longer hostnames sharing the same prefix.
Admission enforces structural egress rules before compilation begins. Every destination must use an explicit https:// prefix, and any target pointing at loopback, private RFC 1918 ranges, link-local addresses, cloud metadata services or platform-owned domains is rejected outright. The running service keeps its previous envelope until the new release deploys, after which the egress gateway enforces the updated prefix allowlist, rejects undeclared hosts at connect time and records every outbound request. A pull request whose diff leaves ferrite.json unchanged confirms immediately that the application's authority envelope stayed fixed.
What the declaration settles before code review begins
A single read of ferrite.json resolves six questions that typically dominate application security reviews:
- Every permitted outbound URL prefix is enumerated explicitly, and the egress gateway blocks and logs every external call outside that list.
- Every owned record store, queue, transaction service and object volume is named, backed by signed capability tokens that reject cross-application operations.
- Every public route and forwarded request header is allowlisted at the edge, stripping unlisted headers before application code executes.
- Every secret the application depends on is declared by name, stored write-only with no read-back path and bounded to declared egress destinations.
- Per-instance memory and CPU limits are enforced as hard kernel cgroup ceilings so runaway code cannot starve neighbouring workloads.
- Every vendored Ferrite package compiles directly into the application and inherits the exact same manifest, gaining no extra ambient privileges.
Every line of the manifest is backed by independent enforcement across admission, offline compilation, signed capability tokens, egress gatewaying and kernel containment, reviewed continuously under Ferrite's verification programme. Human and automated code review can therefore concentrate on domain-level rules inside that boundary, such as which authenticated role may view a customer booking or how cancellation windows calculate refunds.
Auditing and gating manifests in practice
Read any ferrite.json in order of blast radius: start with outbound egress destinations, inspect public routes and forwarded headers, review owned storage primitives, verify required secret names and confirm per-instance compute ceilings.
Run ferrite check --remote to obtain the platform's own admission verdict on both manifest and Rust source at zero cost without triggering a deployment; any policy violation returns a structured diagnostic code naming the broken rule. Because ferrite.json lives in version control alongside the code, engineering teams can require security-team approval on any pull request that touches ferrite.json while letting routine business-logic releases ship on fast tracks. For a structured single-service pilot, see the security evaluation guide.