Skip to content

[FEA]: Pin the Kaizen UI stylesheets the UI build downloads by sha256 #276

Open

Description

@anandj91

Problem

ui/scripts/fetch-kui-styles.js downloads base-external.css and components.css from https://webassets.nvidia.com/kaizen-ui-foundations/<version>/ before every UI build, and bundles whatever it receives. The version comes from the installed @nvidia/foundations-react-core, but nothing checks the files' content. If a file at that URL changes, the next make ui-build bundles it into the dashboard that ccluster server embeds. CI's only signal is that the committed internal/server/ui/dist/ is stale, which looks like an ordinary forgotten rebuild. This came up in review of #260.

Proposal

Pin a sha256 for each stylesheet, keyed by Kaizen version, and fail the fetch on a mismatch with a message that names the file and both hashes. Upgrading @nvidia/foundations-react-core then also means updating the pinned hashes, deliberately.

Open points

  • Keep the hashes in the script, or in a small JSON file beside package.json?
  • Should a version with no pinned hashes fail, or be fetched with a warning? Failing is safer; a warning makes upgrades easier.

Activity

  1. linear commented on Nov 11, 2026

    @linear
  2. buzludeniz commented on Nov 26, 2026

    @buzludeniz

    Hi @anandj91, @xtdong96, I'd like to take this one. My plan: keep the pins in a small kui-styles.lock.json beside package.json (Kaizen version → file → sha256). fetch-kui-styles.js checks each download before writing it and fails on a mismatch, naming the file and both hashes. A version with no pins fails too, with a message on how to add them. Tests use a stubbed fetch. Does that fit what you had in mind for the two open points?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions