·
Last changedVersion:
This version passed the hardening gate. Hardening applied 3 targeted changes and preserved all other text. Classified findings before hardening: 7. Classified findings closed: 1. Classified findings remaining: 6. Unclassified scanner findings remaining: 0. Review findings closed: 3. Review findings remaining: 21.
1
6
6
Expand | File | Group | Subtype | Severity | Status |
|---|---|---|---|---|---|
SKILL.md | Supply Chain & Install-Time Trust | — | Medium | Closed | |
references/cli-commands.md | Malicious Code & Command Execution | — | Low | Open | |
references/screen-catalog.md | Prompt Injection | Third-party content as instructions | Low | Open | |
SKILL.md | Prompt Injection | Third-party content as instructions | Low | Open | |
references/screen-catalog.md | Malicious Code & Command Execution | — | Low | Open | |
references/screen-catalog.md | Supply Chain & Install-Time Trust | Install-time download and execute | Low | Open | |
references/cli-commands.md | Supply Chain & Install-Time Trust | Install-time download and execute | Low | Open |
7 findings
Generates production-ready, fully themed Auth0 ACUL screen components. Follows a strict 9-phase workflow (Phases 0–8): CLI authentication → intent detection → project setup → screen requirements → tech stack and design → theme extraction → structured code generation → build validation & iterative fix → dev mode wiring.
Always resolve the correct reference for a screen using this priority order. Before running the CLI, check if the screen exists in auth0-acul-samples — if it does not, the CLI will fail.
For which screens are in auth0-acul-samples → read references/screen-catalog.md.
When a screen is available in auth0-acul-samples, generate code using this modular pattern — not a monolithic component.
Directory structure per screen:
index.tsx pattern:
hooks/use<ScreenName>Manager.ts pattern:
When a screen is not in auth0-acul-samples and the CLI doesn't support it, fall back to a single-file component based on the SDK example.
brew install auth0Parse the output and verify the major version is ≥ 22. If Node.js is not installed or the version is below 22:
nvm install 22 or download from nodejs.org).nvm install 22 && nvm use 22. The Auth0 CLI-generated ACUL projects require Node.js 22+ and will fail to build or run on older versions.Do NOT proceed to any subsequent phase until Node.js ≥ 22 is confirmed.
If auth0 acul config list returns an error about custom domain: stop and inform the customer they must configure a custom domain on their tenant before ACUL is available.
For full CLI flag reference → read references/cli-commands.md.
Ask the customer which mode they need:
This choice gates Phases 2A / 2B / 2C.
Gather: app name, framework (react or js), initial screen list.
Verify acul_config.json is created in the project directory.
The CLI-scaffolded code is your primary source. Read the generated screen files to understand the project structure, SDK imports, hook patterns, and component layout. Do NOT fetch from GitHub — the CLI output is the canonical starting point. Only customize or extend the generated code based on the customer’s requirements (branding, extra components, etc.).
Proceed to Phase 3.
Verify acul_config.json exists in the project directory.
auth0 acul init first.Check if the screen exists in auth0-acul-samples before attempting CLI.
Read references/screen-catalog.md and check the Samples (React) or Samples (React-JS) column for the requested screen. Then fetch the GitHub directory listing to confirm the screen actually exists at the expected path:
This check determines whether the CLI can scaffold the screen. If the screen is NOT present in auth0-acul-samples, the CLI auth0 acul screen add command will fail — so skip it entirely and go straight to Step 4.
Screen IS in auth0-acul-samples → try the CLI:
Screen is NOT in auth0-acul-samples (or CLI failed) → skip CLI, fetch reference directly.
Since the CLI does not support this screen, do NOT attempt auth0 acul screen add — it will error. Instead, build the screen from reference code.
Step 4a — Capture project structure (if not already known): If this is the first screen being added manually (i.e., you don’t already have a reference for the project’s directory layout, config wiring, and build setup from a previous CLI-generated screen), create a dummy page:
If you already have the project structure from a previous CLI-generated or manually-created screen, skip this step.
Step 4b — Fetch the screen reference code: Determine the tech stack of the existing project (React or JS/Vanilla) by inspecting the project files. Then fetch the reference:
https://github.com/auth0/universal-login/blob/master/packages/auth0-acul-react/examples/<screen-name>.mdhttps://github.com/auth0/universal-login/blob/master/packages/auth0-acul-js/examples/<screen-name>.mdDetermine whether the example is React (JSX/TSX, hooks) or plain JS (class-based manager) and match it to the project’s framework. If the project is React but only a JS example exists (or vice versa), adapt the patterns accordingly using the appropriate SDK reference (references/acul-react-sdk.md or references/acul-js-sdk.md).
Step 4c — Generate the screen files using the project structure, populated with the SDK reference data from step 4b. This ensures correct directory layout, config integration, and build compatibility. Follow the modular architecture pattern from the "auth0-acul-samples Architecture" section if React, or a single-file component if the example is simple enough.
Step 4d — Register the screen so local dev mode can resolve it (REQUIRED).
The CLI auto-registers screens it scaffolds, but manually generated screens are not registered — so auth0 acul dev (local mode) renders "Screen '<screen-name>' is not implemented" even though the files exist and the build passes. (Connected mode reads screens from the tenant, so it works without this step — which is why the bug only shows in local dev.) The screen resolves through a SCREEN_COMPONENTS map in src/utils/screen/screenLoader.ts.
First determine how the project maintains that map — do NOT assume it is hand-edited:
screenLoader.ts is auto-generated. Open it and look for a banner like // Auto-generated file, and check package.json scripts for a generator (e.g. generate:screenLoader) and scripts/generate-screen-loader.js.
src/screens/*/index.tsx against an allowlist (e.g. src/constants/validScreens.js). Do NOT hand-edit screenLoader.ts — your edit will be overwritten. Instead:
<screen-name> is present in the allowlist (VALID_SCREENS). If missing, add it there.npm run generate:screenLoader (use the actual script name from package.json).screenLoader.ts.SCREEN_COMPONENTS map directly:
index.tsx has a default export (export default <ScreenName>Screen) — lazy() resolves the default export. A named-only export compiles but loads as blank / "not implemented".For all screen names and their availability → read references/screen-catalog.md.
Verify acul_config.json exists.
Fetch current rendering configuration:
Read the existing screen file from the customer's codebase. The local code is your primary reference. Understand its current structure, SDK imports, and hook patterns before making any changes.
Only fetch from GitHub references if the local code is missing critical SDK patterns (e.g., wrong hook pattern, missing action functions) and you cannot determine the correct pattern from the existing codebase. Use the Reference Hierarchy (samples availability → CLI scaffolded code when supported → SDK examples) to validate.
Gather from the customer:
references/screen-catalog.mdConfirm or detect:
@auth0/auth0-acul-react) or JS (@auth0/auth0-acul-js)tailwind.config.ts, styles/tokens.css, theme/index.tsLoad the appropriate SDK reference:
references/acul-react-sdk.mdreferences/acul-js-sdk.mdFor social button implementation → read references/social-providers.md.
Option A — Image or mockup (jpeg / png / screenshot): Analyze the image and extract:
Option B — Brand colors only (no image): Derive the full token set from the provided hex values:
For theme file patterns per styling library → read references/theming-patterns.md.
Theme file to generate per styling library (all-screens scope):
| Styling library | Template to use | Output file |
|---|---|---|
Tailwind |
|
|
CSS Modules |
|
|
styled-components |
|
|
Plain CSS |
|
|
Replace all {{TOKEN}} placeholders with extracted token values.
Generation approach depends on the source of the screen code.
When the CLI successfully generates the screen (via auth0 acul init or auth0 acul screen add), use the CLI output as the base. Read the generated files and customise them based on the customer's requirements:
Do NOT discard CLI-generated code to re-generate from a GitHub reference.
Use the project structure captured from the CLI dummy-page strategy (Phase 2B, Step 4a) as the foundation. Generate the screen directory using the samples pattern (see "auth0-acul-samples Architecture" above), matching the directory layout and config wiring from the dummy page:
index.tsx — thin: calls use<ScreenName>Manager(), calls applyAuth0Theme(), renders ULThemePageLayout → ULThemeCard → sub-componentsuse<ScreenName>Manager.ts — wraps SDK hooks from the samples reference, exposes typed handlers and feature flagsen.json — fallback strings matching keys used in screen.texts.*Apply design tokens from Phase 5 to the layout components and form component styling.
Generate a single <screen-name>.tsx (React) or <screen-name>.js (JS) using the structure from assets/react-templates/ or assets/js-templates/ as a pattern, with hooks and actions sourced entirely from the SDK example fetched in Phase 2.
JSX structure order:
The CLI auto-registers any screen it scaffolds (Path A). Manually generated screens (Path B, Path C) must be registered, or local auth0 acul dev renders "Screen '<screen-name>' is not implemented" — even though the files exist and the build succeeds. (Connected mode resolves screens from the tenant, so it works without this step — which is why the bug only shows in local dev.) Screens resolve through a SCREEN_COMPONENTS map in src/utils/screen/screenLoader.ts.
For each manually generated screen:
screenLoader.ts is maintained — do not assume it's hand-edited. If it carries an // Auto-generated file banner or package.json has a generator script (e.g. generate:screenLoader backed by scripts/generate-screen-loader.js), it is regenerated by scanning src/screens/*/index.tsx against an allowlist:
<screen-name> is in the allowlist (e.g. src/constants/validScreens.js), then run npm run generate:screenLoader. Do not hand-edit the generated file — it will be overwritten."<screen-name>": lazy(() => import("@/screens/<screen-name>")),index.tsx (or single-file component) has a export default — React.lazy resolves the default export, not a named one.@auth0/auth0-acul-react/mfa-otp-challenge)useScreen() vs screen-specific hook) sourced from the CLI-generated code or reference, not assumedhasErrors / getErrors()) — never local-only error statescreen.texts.* with locale fallbackapplyAuth0Theme() called in index.tsx when using modular architecture (Path A, Path B)src/utils/screen/screenLoader.ts with a matching export default — required for local auth0 acul devAll-screens scope: repeat Path A, B, or C (whichever applies per screen) for every screen in the project, all importing from the shared theme file. Consistent component structure within each path.
After generating or modifying screen code, always validate the output before moving on. Generated code may contain incorrect import paths, wrong import styles (default vs named), invalid component props, or references to non-existent exports. This phase catches and fixes those issues automatically.
If the generated or modified code introduced new dependencies in package.json (entries under dependencies / devDependencies that aren't already installed in node_modules), run npm install from the project root before linting/building. Skip this step if no new packages were added.
If install fails (peer-dependency conflict, registry error, version mismatch), surface the error to the customer and stop — do not proceed to lint/build until resolved.
Run the project's linter to surface import errors, type mismatches, and invalid props:
If lint or build produces errors, parse each error and apply the appropriate fix:
| Error pattern | Root cause | Fix |
|---|---|---|
| Using | Change to |
| Importing a symbol that doesn't exist in the module | Read the source module to find the correct export name |
| Wrong import path | Verify the correct path from |
| Invalid prop passed to a component | Read the component's type definition or source to find valid props |
| Prop type mismatch | Cast or transform the value to match the expected type |
| Component imported incorrectly or doesn't exist | Verify the component exists and is exported correctly from its module |
Fix workflow:
node_modules or project source) to find the correct export names and paths.npm run build 2>&1.Iteration cap: Use a hard cap of 5 iterations. If errors plateau (same count or same errors across 2 consecutive iterations), stop immediately before the cap. When the cap is reached and errors remain, present the remaining errors to the customer and ask for guidance rather than continuing to modify code.
import Component from './Component' when the file uses export const Component (named export) — fix: import { Component } from './Component'import { useLoginId } from '@auth0/auth0-acul-react' instead of the screen-specific path @auth0/auth0-acul-react/login-id — fix: use the correct sub-path import<ULThemeCard title={...}> when ULThemeCard doesn't accept a title prop — fix: remove the invalid prop and use a <Header> child component insteadapplyAuth0Theme as a named import when it's a default export (or vice versa) — fix: match the module's actual export styleA clean npm run build does not guarantee a manually added screen renders in local dev. The build passes, but auth0 acul dev shows "Screen '<screen-name>' is not implemented" when:
SCREEN_COMPONENTS map in src/utils/screen/screenLoader.ts, ORindex.tsx has no export default (so lazy() can't resolve the component).For every screen generated via Path B or Path C, verify both before finishing. This is a runtime/registry gap, not a compile error — lint and tsc will not flag it. If the project auto-generates screenLoader.ts, register via its generator (npm run generate:screenLoader) rather than hand-editing. (See "Screen Registration" in Phase 6.)
Once the build completes with exit code 0 and no lint errors, and every manually added screen is registered in screenLoader.ts with a export default, proceed to Phase 8.
Provide the customer with ready-to-run commands:
⚠️ Always include this warning when connected mode is suggested:
| File | Load when |
|---|---|
| Framework is React |
| Framework is JS / Vanilla |
| Selecting screen type or triggering CLI fallback |
| Social login buttons are needed |
| Generating or applying a shared theme file |
| Need full CLI flag details |
| File | Use when |
|---|---|
| Tailwind, all-screens scope |
| CSS Modules, all-screens scope |
| styled-components |
| Plain CSS, all-screens scope |
| React component boilerplate base |
| JS component boilerplate base |
Get started with chainctlchainctl skill install public/auth0/acul-screen-generator:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.cgr.dev/public/github.com/auth0/plugins/auth0/skills/acul-screen-generator:latest
Apache-2.0
HARDENING.md
LICENSE
SKILL.md
assets/js-templates/login-id.js
assets/js-templates/login-password.js
assets/react-templates/login-id.tsx
assets/react-templates/login-password.tsx
assets/theme-templates/globals.css
assets/theme-templates/tailwind.config.ts
assets/theme-templates/theme-provider.ts
assets/theme-templates/tokens.css
references/acul-js-sdk.md
references/acul-react-sdk.md
references/cli-commands.md
references/screen-catalog.md
references/social-providers.md
references/theming-patterns.md
tests/evals.json