Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@tailor-platform/sdk-plugin-frontend

Latest version: v0.4.1

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: jackchuka-tailor, npm-tailor
9 Stars
3 Forks
6 Versions
16.7K Downloads
TypeScript Repo language

Scan summary

@tailor-platform/sdk-plugin-frontend was last scanned on 27 Nov 2026 at version 0.4.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 6 versions; the latest 2 were published within 2 days (26 and 27 Nov 2026).
  • Findings: No rules fired in version 0.4.1.
  • Downloads: 16,654 downloads.

Versions

6 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.4.1 LATEST 27 Nov 2026 No rules fired
0.4.0 26 Nov 2026 No rules fired
0.3.0 19 Nov 2026 No rules fired
0.2.0 16 Nov 2026 Not shown
0.1.1 13 Nov 2026 Not shown

No rules fired in 0.4.1

Findings

Findings for v0.4.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.4.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Frontend Plugin

frontendPlugin builds frontend assets and uploads them to Static Websites after tailor deploy applies your application. It can provide deployed URLs and public OAuth client IDs as build environment variables.

Installation

pnpm add -D @tailor-platform/sdk-plugin-frontend

Use an SDK version whose onDeployed hooks receive staticWebsites. When testing a PR before that SDK release, install both the SDK and frontend plugin from the same pkg.pr.new commit.

Monorepo example

Given this layout:

apps/
  backend/
    tailor.config.ts
  web/
    package.json
    dist/

Register the plugin in apps/backend/tailor.config.ts:

import { defineConfig, definePlugins, defineStaticWebSite } from "@tailor-platform/sdk";
import { frontendPlugin } from "@tailor-platform/sdk-plugin-frontend";

const website = defineStaticWebSite("my-frontend", { description: "Web app" });

export default defineConfig({
  name: "my-app",
  staticWebsites: [website],
});

export const plugins = definePlugins(
  frontendPlugin({
    site: website,
    workingDir: "../web",
    build: "pnpm run build",
    distDir: "dist",
    env: ({ site, applications }) => {
      const app = applications.find(({ name }) => name === "my-app");
      return {
        ...(app?.url ? { VITE_TAILOR_APP_URL: app.url } : {}),
        VITE_SITE_URL: site.url,
        VITE_OAUTH2_CLIENT_ID:
          app?.auth?.oauth2Clients.find((client) => client.name === "web")?.clientId ?? "",
      };
    },
  }),
);

Run tailor deploy --config apps/backend/tailor.config.ts from the repository root. workingDir is where build runs, relative to the config's directory, so this example builds in apps/web. distDir is the directory your build writes its assets to, relative to workingDir, so this example publishes apps/web/dist. Set it to match your build tool's output setting; the plugin does not change where the build writes. Omitting workingDir uses the config's directory. Absolute paths are also accepted.

site accepts either a defineStaticWebSite() result or a site name. The site must be declared in staticWebsites of the same config that registers frontendPlugin. With multiple configs, register each frontend in the config that declares its site; a site from another config fails before the build starts. The env callback can still read the URLs of other configs' sites from applications. A defineWorkspace() or defineApp() config (Beta) declares every site of the workspace, so its frontendPlugin can build any of them.

Build environment

env is an optional function that returns environment variables, synchronously or asynchronously. Its values override matching variables inherited from the parent process. Choose variable names for your frontend framework; the plugin does not add a prefix.

The callback receives the destination site, all applications in the deploy, the staticWebsites of the registering config, and workspaceId. staticWebsites lists the config's sites by name, so staticWebsites.admin?.url reads another site of the same config, and each application lists its config's sites the same way. application, the registering application, is deprecated: find it in applications by name instead. Only public OAuth client IDs are provided. Values embedded into browser assets are visible to visitors, so supply only values intended for public use.

Build commands run in a shell. Their stdout and stderr both go to stderr, keeping tailor deploy --json stdout available for the JSON result. Builds have no timeout.

Build with a function

Pass an async function as build when the build needs more than a shell command, such as writing a runtime configuration file into the assets before they are uploaded:

import { CustomDomainStatus, initOperatorClient, loadAccessToken } from "@tailor-platform/sdk/cli";

frontendPlugin({
  site: website,
  workingDir: "../web",
  distDir: "dist",
  build: async ({ site, applications, workspaceId, profile, distDir, exec, node }) => {
    await exec("pnpm run build");
    const client = await initOperatorClient(await loadAccessToken({ profile }));
    const { customDomains } = await client.listCustomDomains({
      workspaceId,
      staticWebsiteName: site.name,
    });
    const active = customDomains.find((domain) => domain.status === CustomDomainStatus.ACTIVE);
    const origin = active ? `https://${active.domain}` : site.url;
    await node.fs.writeFile(
      node.path.join(distDir, "config.json"),
      JSON.stringify({ origin, apiUrl: applications.find(({ name }) => name === "my-app")?.url }),
    );
  },
});

node.fs is Node.js's fs/promises module, and node.path is pathe, which works like path but uses / separators on every OS. tailor.config.ts is also bundled into functions that run on the Platform, such as auth hooks, so importing node: modules there fails the bundle. Use node instead.

listCustomDomains also returns domains that are not usable yet, such as one that is pending or being removed, so the example picks the first domain whose status is CustomDomainStatus.ACTIVE, which @tailor-platform/sdk/cli exports.

The function runs after env resolves and before the upload, with the same context env receives plus env (the values it returned), the absolute workingDir and distDir, a logger, node, and exec. exec runs a shell command in workingDir with those env values added; pass workingDir, env, or output to override them for one command. When the function rejects, the frontend is not uploaded and later frontends and deploy hooks do not run, as with a failed build command.

To call the Platform from the function, use the functions exported from @tailor-platform/sdk/cli, such as initOperatorClient, which returns a typed client for the Platform API. Pass loadAccessToken the profile the function receives, which is the profile tailor deploy ran with (--profile), so the client calls the Platform as the same user. Without a profile it uses TAILOR_PLATFORM_TOKEN, then TAILOR_PLATFORM_PROFILE, then the logged-in user, as the tailor command does. Importing it in tailor.config.ts is safe, and using it inside the build function is what it is for. Code that runs on the Platform, such as a resolver or an auth hook, cannot use it, because it only works where tailor deploy runs. tailor.config.ts is bundled into an auth hook, but the plugins you register with definePlugins in its plugins export are left out, so the CLI functions a plugin uses do not reach the bundle. Write the registration as export const plugins = definePlugins(...), as the examples do. Any other form is not left out, so a plugin that uses the CLI there stops tailor deploy. If code that runs on the Platform still uses them, such as a call at the top level of tailor.config.ts, tailor deploy stops with DEPLOY_ONLY_CLI_IMPORT and names the file.

Running tailor deploy again after a failure runs the function again, so write what it does to be repeatable: look up or create a resource instead of always creating a new one.

Upload existing assets

Omit build to upload an existing directory:

export const plugins = definePlugins(
  frontendPlugin({ site: "my-frontend", workingDir: "../web", distDir: "dist" }),
);

For multiple frontends, pass each one as another argument, as in frontendPlugin(web, admin); register the plugin only once. Each site may appear only once. Frontends are built and uploaded sequentially, in argument order. At least one frontend is required, and each distDir must be non-empty. A build that is empty or only whitespace is rejected; omit build instead to publish without building.

Deploy behavior and failures

Selecting the same site more than once fails while loading the config, including during tailor generate. With --json, the error code is FRONTEND_SITE_DUPLICATE; error.context.duplicates lists every duplicated name and its zero-based argument indices in frontendPlugin(). Configure each site only once.

The plugin runs even if no platform resources changed. It does not run during dry-run, build-only, generation, or migration test deployments. Dry-run lists the plugin as a pending deploy hook.

An unknown site, a site declared in another config, failed build, missing output directory, or failed upload stops later frontends and deploy hooks. Platform resources have already been applied; fix the error and run tailor deploy again. Successfully uploaded frontends are not rolled back. Skipped upload files produce warnings and are listed in the result.

With --json, the result contains a deployedHooks entry for @tailor-platform/frontend. Its outputs.frontends array contains each site's site, published url, and skippedFiles.

The same deploy result includes workspaceId and applications, including each config's Static Website URLs, AI Gateway URLs, and public OAuth client IDs. The application endpoint URL and domain are present when a Platform Application with the config's name exists. Read these directly from tailor deploy --json; a separate show command is not required.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @tailor-platform/sdk-plugin-frontend

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229