CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

statelyai/model-based-testing

Write model-based tests with @xstate/test 2.0 beta, replace end-to-end tests with model-based tests without losing coverage, and visualize the model in Stately. Use for model-based testing, @xstate/test, generating tests from a state machine, testing every path, replacing Playwright, Cypress, Vitest, or Jest end-to-end tests with a model, coverage parity, or migrating from @xstate/test 0.x or 1.0 beta.

Quality

100%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

Overview
Quality
Evals
Security
Files
Medium

E004: Prompt injection in skill

What this means

Detected a prompt injection in the skill instructions. The skill contains hidden or deceptive instructions that fall outside its stated purpose and attempt to override the agent’s safety guidelines or intended behavior.

Why it was flagged

The skill's purpose is model-based testing, and its only sketchy element is that the coverage viewer embeds a live STATELY_API_KEY in the HTML served without authentication on localhost, which weakens protection of the user's credential beyond what the task needs, without evidence of malicious intent.

Where we found it

[REDACTED]

secret · 2 sites

The API key env var is interpolated into the HTML page served unauthenticated at / on localhost.

scripts/coverage-viewer.mjs

83

apiKey: ${JSON.stringify(process.env.[REDACTED])},

scripts/coverage-viewer.mjs

181

if (url.pathname === '/') return res.end(page);

Report incorrect finding
Medium

W007: Insecure credential handling in skill

What this means

The skill handles credentials insecurely by requiring the agent to include secret values verbatim in its generated output. This exposes credentials in the agent’s context and conversation history, creating a risk of data exfiltration.

Why it was flagged

The main replacement path has the model read legacy test bodies and record their user actions, including login payloads such as a password fill, as ledger events, so any real test credential passes through its context.

Where we found it

[REDACTED]

secret · 6 sites

Agent records legacy test actions, including password fills, verbatim into a committed ledger/evidence JSON.

Low

W011: Exposure to untrusted third-party content

What this means

The skill exposes the agent to untrusted, user-generated content from public third-party sources, creating a risk of indirect prompt injection. This includes browsing arbitrary URLs, reading social media posts or forum comments, and analyzing content from unknown websites.

Why it was flagged

The required workflow reads first-party `@xstate/test`/`xstate` docs and official npm tarballs, and drives the user-specified application under test through Playwright, where `read()` could surface page text; no outsider can post into a feed the workflow monitors, so the exposure is limited to content the agent must actively fetch or navigate to.

Where we found it

registry.npmjs.org

domain · 2 sites

npm pack fetches @xstate/test@beta and xstate@beta tarballs from registry.npmjs.org, and the agent then reads their README/docs and acts on them.

SKILL.md

22

If the packages are not installed, read the tarballs:

SKILL.md

28

npm pack @xstate/test@beta xstate@beta

User-specified application under test pages (Playwright read())

content-type · 1 site

Playwright SUT navigates the app and reads page text via allTextContents.

SKILL.md

64

`projectModel(snapshot)` and `read()` return the same shape, containing only what the UI shows.

Audited
Security analysis
Snyk