DEV Community

StarkMan
StarkMan

Posted on

Promptfoo self-hosting needs an external access boundary

Promptfoo self-hosting needs an external access boundary

Promptfoo's self-hosted documentation describes an Express server that serves a web UI and API. The same page says the self-hosted app does not provide built-in authentication, SSO, multi-team support, or role-based access control. [1] Those are product-scope statements, not a claim that every deployment is unsafe. They do change where the access boundary has to live.

The application is useful for model evaluation and red-team projects. Its UI and API can contain prompts, targets, test results, provider configuration, and artifacts from security testing. Treat the server as an internal engineering system, not as a public documentation site.

What the measurement returned

On 2026-11-25 at 23:42 UTC, ZoomEye queries for app="Promptfoo" returned zero. title="Promptfoo" returned 56. Both used sub_type=all, page 1, and page size 1. The two observations are not comparable as an installation count. The app field identifies a fingerprint match; the title field can include documentation, repositories, dashboards, and unrelated pages that mention the name. [2]

The title count is useful as a lead-generation signal. It does not prove that 56 Promptfoo servers are reachable, and the zero app count does not prove that no server exists. A reverse proxy can remove or alter the page title, while an evaluation workspace may be deployed under an internal hostname that the index does not map to the product name.

Put authentication in front

If the product does not provide authentication, place the self-hosted service behind an identity-aware proxy or a private network. Require strong authentication for every route, including the API and any static assets that contain results. Avoid relying on a hard-to-guess URL or a network position alone.

Map the proxy identity to an application role. A read-only reviewer should not be able to change targets, add providers, or run a red-team job. If the product has no role model, use separate deployments or separate proxies for different teams. A shared service with one broad account is difficult to audit.

Protect provider credentials

Evaluation configurations can contain API keys for model providers, cloud services, or internal endpoints. Store those credentials in a secret manager and inject them at runtime. Do not commit them to a shared project file or paste them into a prompt example. Restrict access to the environment variables and logs of the server process.

Red-team targets can make the server send requests into internal networks. Add an egress policy and an SSRF-safe fetch layer. A model evaluation tool that can reach arbitrary HTTP targets is a powerful testing capability, but it is also a route to metadata services, admin panels, and data stores. Require an owner and a network allowlist for each target class.

Make results a data classification

Test prompts may contain customer data, source code, internal URLs, or credentials. Red-team findings may describe an unpatched weakness. Decide who can view results, how long they are retained, and whether exports are allowed. Separate production data from public demo datasets. If the UI stores results on a shared volume, protect the volume as an application data store rather than a temporary cache.

Back up the configuration and results only when the backup system can protect them as sensitive data. Test deletion across the database, object storage, and cached pages. A deleted evaluation can remain in a proxy cache or a browser download.

Monitor the boundary

Log authentication decisions, administrative changes, job creation, provider configuration updates, and exports. Alert on a new public listener, a proxy rule change, or a service account creating an unusual number of jobs. Monitor outbound requests for destinations outside the approved target list.

The next inventory step is to combine the title matches with certificate and DNS data, then validate each candidate from an external network and from the expected internal path. Keep the raw query and timestamp with the result, and label the count as an observation rather than a population estimate.

Promptfoo can be useful precisely because it handles sensitive evaluation material. The deployment should make that material reachable only through an identity and network boundary that the product itself does not provide.

References

[1] Promptfoo, "Self-hosting." https://www.promptfoo.dev/docs/usage/self-hosting/

[2] ZoomEye title query. https://www.zoomeye.ai/searchResult?q=dGl0bGU9IlByb21wdGZvbyI%3D

Top comments (0)