Hub rules-mui

rules-mui

v3 public Verified

MUI

Material UI (MUI) is a comprehensive suite of UI tools to help you ship new features faster. These rules govern the use of MUI components, ensuring consistent styling, proper theme usage, and accessible UI patterns.

@sigmashakeinc 2 pulls 5 rules published Apr 8, 2026 synced Nov 22, 2026 sigmashakeinc/rules/rulesets/rules-mui →
Severity
2 error 3 warn 0 info
demo.cast
Material UI (MUI) is a comprehensive suite of UI tools to help you ship new features faster. These rules govern the use of MUI components, ensuring consistent styling, proper theme usage, and accessible UI patterns.

Rules index

5 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

mui

mui-deprecated-make-styles warning log

makeStyles and the @mui/styles package (JSS-based) are removed in MUI v6 and were deprecated since MUI v5. Migrate to the sx prop, the styled() API from @mui/material/styles, or Emotion directly. @mui/styles is not compatible with React 18 Strict Mode and will not receive security fixes.

Rule source requires an active Pro or Enterprise subscription.
mui-no-dangerous-inner-html error block

dangerouslySetInnerHTML bypasses React's XSS protection (CWE-79). In a MUI component any attribute rendered via dangerouslySetInnerHTML can execute JavaScript if the value originates from user data or an API response. Use the DOMPurify library to sanitize the HTML string before rendering, or restructure the component to avoid raw HTML injection entirely.

Rule source requires an active Pro or Enterprise subscription.
mui-no-javascript-href error block

javascript: URI in href executes arbitrary JavaScript when the user clicks the link (CWE-79). MUI Button, Link, and MenuItem components all support href — if the value comes from user input or an API, an attacker can inject 'javascript:eval(...)' . Validate that href values start with 'https://' or '/' before rendering. Use a URL allowlist for external links.

Rule source requires an active Pro or Enterprise subscription.
mui-no-unsafe-component-prop-any-cast warning log

Passing a user-controlled or dynamically resolved value as the MUI 'component' prop bypasses TypeScript's type safety and can render unexpected DOM elements or custom components. Only pass statically known component references (e.g., component={RouterLink}); never derive the component type from user input or API responses.

Rule source requires an active Pro or Enterprise subscription.
mui-no-user-input-in-sx-prop warning log

User-controlled values spread into the MUI sx prop can inject arbitrary CSS. While CSS injection is less severe than XSS, it enables UI redress attacks (e.g., overlaying fake login prompts) and in some older browser environments can exfiltrate data via CSS attribute selectors. Validate and whitelist any dynamic style values; never spread arbitrary user data into sx.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v3
Published
Apr 8, 2026
Source commits
0
Synced
Nov 22, 2026
Hash
e739b0ec2ca919ab831888194c7dfb35da3ea6783b04565a847e1771b68a1dd8
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-mui/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-mui. The published version only bumps when a maintainer resyncs.

No commit history available.