Extensions are trusted code
An extension is administrator-trusted code, with the same standing as the forge itself:
- Its backend runs as the forge's operating-system user, with access to everything that user can read and write.
- Its browser modules run on the forge's origin, inside native pages and the signed-in browser session.
- Process separation gives Fountain control over starting, stopping and crash isolation. It is not a sandbox for untrusted packages.
Only site administrators can install, enable or disable packages. Ordinary users cannot upload or activate them. Install a package only when you would be comfortable running its code as part of the forge.
What Fountain checks for you
Trust does not mean the host stops enforcing native rules. For every request it forwards, Fountain:
- Requires a native signed-in browser session. Access tokens, Basic authentication and reverse-proxy sign-in are not accepted on extension routes.
- Applies Forgejo's account-state checks and the contribution's declared permission, such as repository code read or site administration.
- Requires mutations to come from the forge's own origin, matching
ROOT_URL. - Replaces any authority the browser supplies with its own, and never forwards cookies or authorization headers to the backend.
- Rechecks the live session and the request's private admission on every native callback the backend makes.
An extension can narrow these decisions with an authorizer, but it can never grant access that Forgejo denies.
What an extension can reach
| Reach | Limited by |
|---|---|
| Native data and operations | The capabilities declared in its manifest; see the Capabilities reference |
| The signed-in person's identity | Requests made through its own pages and panels |
| Work without a browser | Actor bindings an administrator enrolls and the native token's scopes and repository restrictions |
| Persistent storage | Its private data directory, plus anything else the service user can access |
Review a package's manifest before installing it. The capabilities, policies and lifecycle_controller fields show which native interfaces it will use, and whether it participates in account policy or controls other packages.
Data ownership
Each extension owns its private data under .data/ID/ in the package directory. Fountain keeps it across disabling, replacement and removal, and never interprets it. Forgejo's own database tables remain behind the host; extensions do not write to them directly.
Continue
Enable extensions on your forge, or start building an extension.