Skip to content
Skills Library
Security · Analysis

stackblitz-security-basics

/stackblitz-security-basics

Threat-model a WebContainer or StackBlitz embed across host, runtime, user-code, filesystem, dependency, network, preview, secret, and persistence boundaries. Use when preparing to execute untrusted code, enable private packages, or ship an interactive browser IDE. Trigger with "StackBlitz security review", "secure WebContainers", or "WebContainer threat model".

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Threat-model a WebContainer or StackBlitz embed across host, runtime, user-code, filesystem, dependency, network, preview, secret, and persistence boundaries. Use when preparing to execute untrusted code, enable private packages, or ship an interactive browser IDE. Trigger with "StackBlitz security review", "secure WebContainers", or "WebContainer threat model".

Triggers from the description

StackBlitz security reviewsecure WebContainersWebContainer threat model

Arguments

/stackblitz-security-basics [project-path] [trust-boundary]
Original author description

Threat-model a WebContainer or StackBlitz embed across host, runtime, user-code, filesystem, dependency, network, preview, secret, and persistence boundaries. Use when preparing to execute untrusted code, enable private packages, or ship an interactive browser IDE. Trigger with "StackBlitz security review", "secure WebContainers", or "WebContainer threat model".

How it works

  1. Overview
  2. Prerequisites
  3. Tool Discipline
  4. Current Contract
  5. Authentication
  6. Workflow
  7. Approval Boundaries
  8. Output
  9. Error Handling
  10. Examples
Original SKILL.md headings · 66 lines, 578 words
SKILL.md preview
---
name: stackblitz-security-basics
description: >-
  Threat-model a WebContainer or StackBlitz embed across host, runtime, user-code, filesystem, dependency, network, preview, secret, and persistence boundaries. Use when preparing to execute untrusted code, enable private packages, or ship an interactive browser IDE. Trigger with "StackBlitz security review", "secure WebContainers", or "WebContainer threat model".
argument-hint: "[project-path] [trust-boundary]"
allowed-tools: Read, Glob, Grep, WebFetch, Write, Edit
version: 1.7.0
author: Jeremy Longshore <jeremy@intentsolutions.io>
license: MIT
tags:
- saas
- stackblitz
- security
- threat-modeling
model: inherit
effort: high
compatibility: Designed for Claude Code
---
# WebContainer Security Review

## Overview

This skill produces a repo-grounded threat model and bounded hardening plan. Browser containment reduces host risk, but it does not make user code trustworthy, prevent all network activity, protect secrets mounted into the runtime, or replace host-page CSP and data-governance controls.

## Prerequisites

- A named application, data classification, and intended code/dependency sources
- Identified owners for the host page, runtime lifecycle, auth, preview, persistence, and deployment headers
- Permission to inspect security-sensitive configuration without reading secret values

## Tool Discipline

Use `Read`, `Glob`, and `Grep` to trace input, filesystem, process, dependency, network, preview, auth, CSP, and persistence paths. Use `WebFetch` only for current official StackBlitz or WebContainers documentation. Use `Write` for an approved threat model and `Edit` only for narrow reviewed controls.

## Current Contract

- Treat mounted files, spawned commands, installed packages, terminal input, preview messages, and exported artifacts as untrusted flows.
- Never mount host secrets or ambient `.env` files into user-controlled projects; code running there may read them.
- Validate virtual paths component by component and reject traversal, absolute paths, ambiguous separators, duplicates, and dangerous overwrite targets.
- Pin dependencies and preserve install provenance; browser execution does not remove package supply-chain risk.
- Derive CSP and frame/connect allowances from observed official runtime behavior and the chosen embed mode; do not copy a universal permissive header.
- Match cross-origin isolation headers and iframe requirements without weakening unrelated host protections.
- Define retention and review for any saved or exported user project; the runtime filesystem alone is ephemeral.

## Authentication

Keep commercial API keys in existing runtime secret bindings and configure them before boot. Organization auth for private packages is a separate user-authorized flow. Do not log auth parameters, tokens, cookies, private registry settings, or package contents.

## Workflow

1. Map assets, actors, entrypoints, trust boundaries, data flows, and privileged operations.
2. Classify code, files, dependencies, terminal input, previews, exports, and auth material by trust level.
3. Identify abuse cases for path traversal, secret exposure, dependency compromise, runaway processes, network exfiltration, preview-to-host messaging, and persistence.
4. Map existing preventive, detective, and recovery controls to each abuse case.
5. Implement only the highest-value bounded control with tests for expected, hostile, and rollback paths.
6. Record residual risk, production approval, monitoring, incident response, and the exact deployment/header verification.

## Approval Boundaries

Require explicit approval before enabling arbitrary code, private packages, network-capable dependencies, host-preview messaging, project persistence/export, telemetry, or production CSP/header changes. Security review and commercial licensing are release gates, not inferred setup details.

## Output

Return the trust-boundary diagram or table, abuse cases, current controls, gaps by severity, changes made or proposed, verification, data handling, release decision, rollback, and residual risk owner.

## Error Handling

| Condition | Response |
|---|---|
| A secret is mounted into the runtime | Stop, remove the flow, rotate if exposure occurred, and use a mediated service boundary. |
| User paths are concatenated directly | Add component-safe normalization and hostile-path tests before writes. |
| CSP needs broad wildcards | Inventory actual origins and redesign the integration rather than disabling protection. |
| Preview messages are trusted blindly | Validate origin, schema, direction, and allowed actions at the host boundary. |

## Examples

Before launching an AI coding playground, map prompts-to-files, package installation, process/network behavior, preview messaging, exports, and auth; then block secret mounting and add tested path and message validation.

## Resources

- [Official StackBlitz and WebContainers references](references/official-docs.md)
- [WebContainers introduction](https://webcontainers.io/guides/introduction)
- [Configuring headers](https://webcontainers.io/guides/configuring-headers)
Files in this package (2)
  • SKILL.md 5 KB
  • references/official-docs.md 1 KB

Versions

The database has no other skills named stackblitz-security-basics.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version eb42be1b8629 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100stackblitz-common-errors
    Diagnose WebContainer startup, isolation, Service Worker, dependency, process, preview, and browser failures from evidence before changing code or headers. Use when a StackBlitz runtime or embed fails, hangs, or behaves differently across browsers. Trigger with "StackBlitz…
  • 100stackblitz-install-auth
    Prepare a StackBlitz WebContainer or JavaScript SDK integration with pinned packages, compatible isolation headers, and the correct commercial or private-package authentication path. Use when adding StackBlitz to an existing web application or reviewing its startup contract.…
  • 100nobrainer-security
    Use when the owner says nb-security or security-review, requests a threat model or security review, or when a change crosses authentication, authorization, secrets, untrusted input, sensitive data, dependency, installer, or production trust boundaries.
  • 100security-review
    When the user needs a security assessment — threat modeling, vulnerability review, auth flow audit, dependency scanning, or says "is this secure", "review for vulnerabilities", "threat model", "security audit", "pen test prep".
  • 100threat-model
    Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.
  • 90threat-model
    Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.