# noUnsafeIframeSandbox

Rule `biome/noUnsafeIframeSandbox`. Disallow an unsafe combination of the `sandbox` attribute.

- Source: biome
- Technologies: React
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #573 by reach, #208 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noUnsafeIframeSandbox` | yes | no | group nursery, since 2.5.13 | [docs](https://biomejs.dev/linter/rules/no-unsafe-iframe-sandbox/) |

## Code examples

### Incorrect: the rule reports this

```jsx
function MyComponent() {
  return <iframe src="https://example.com" sandbox="allow-scripts allow-same-origin" />;
}
```

### Correct: the rule accepts this

```jsx
function MyComponent() {
  return <iframe src="https://example.com" sandbox="allow-popups" />;
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noUnsafeIframeSandbox": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noUnmatchableAnbSelector](https://lintradar.dev/rules/biome/noUnmatchableAnbSelector.md): Disallow `An+B` formulas that cannot select an element.
- [biome/noUnusedFunctionParameters](https://lintradar.dev/rules/biome/noUnusedFunctionParameters.md): Disallow unused function parameters.
- [biome/noUnknownUnit](https://lintradar.dev/rules/biome/noUnknownUnit.md): Disallow unrecognized CSS units.
- [biome/noUnusedImports](https://lintradar.dev/rules/biome/noUnusedImports.md): Disallow unused imports.
- [biome/noUnknownTypeSelector](https://lintradar.dev/rules/biome/noUnknownTypeSelector.md): Disallow unrecognized element names in type selectors.
- [biome/noUselessContinue](https://lintradar.dev/rules/biome/noUselessContinue.md): Avoid using unnecessary `continue`.

---

Web page: https://lintradar.dev/rules/biome/noUnsafeIframeSandbox. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
