Hub rules-playwright

rules-playwright

v4 public Verified

Playwright

Playwright is a framework for Web testing and automation that allows testing across all modern rendering engines. These rules govern browser automation, end-to-end testing, and cross-browser compatibility.

@sigmashakeinc 3 pulls 10 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-playwright →
Severity
5 error 5 warn 0 info
demo.cast
Playwright is a framework for Web testing and automation that allows testing across all modern rendering engines. These rules govern browser automation, end-to-end testing, and cross-browser compatibility.

Rules index

10 governance rules

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

playwright

playwright-exposefunction-shell error block

RISK: exposing a Node function that shells out gives the page-under-test RCE on the test host via any compromised script. FIX: never bridge child_process through exposeFunction; use a narrowly typed helper with fixed args.

Rule source requires an active Pro or Enterprise subscription.
playwright-hardcoded-credentials error block

RISK: hardcoded credentials in spec files leak through git history and shared repos. FIX: read from process.env / CI secret store and reference via env vars in playwright.config.

Rule source requires an active Pro or Enterprise subscription.
playwright-launch-no-sandbox warning log

RISK: launching Chromium with --no-sandbox disables the OS-level renderer sandbox and lets a compromised page escalate to the host. FIX: run tests as a non-root user in CI so the sandbox works, or use the official mcr.microsoft.com/playwright image.

Rule source requires an active Pro or Enterprise subscription.
playwright-mcp-vulnerable-cve-2025-9611 error block

RISK: Playwright MCP Server < 0.0.40 is vulnerable to CVE-2025-9611 (DNS rebinding via unvalidated Origin). FIX: upgrade to >= 0.0.40 and set allowedHosts.

Rule source requires an active Pro or Enterprise subscription.
playwright-no-wait-for-timeout warning log

RISK: page.waitForTimeout() is a flaky anti-pattern (too short on slow CI, too slow on fast machines) and is deprecated for production tests. FIX: use web-first assertions (expect(locator).toBeVisible()), waitForResponse, or waitForLoadState.

Rule source requires an active Pro or Enterprise subscription.
playwright-storagestate-not-gitignored warning ask

RISK: storageState files contain live session cookies/tokens and must never be committed. FIX: add playwright/.auth/ to .gitignore and regenerate the state via a global setup.

Rule source requires an active Pro or Enterprise subscription.
playwright-unsanitized-route-fulfill warning log

RISK: interpolating request-controlled values into route.fulfill() body can inject HTML/JS into the page under test, masking real XSS. FIX: JSON.stringify structured bodies or escape untrusted fields before fulfilling.

Rule source requires an active Pro or Enterprise subscription.
playwright-vulnerable-version-cve-2025-59288 error block

RISK: Playwright < 1.55.1 is affected by CVE-2025-59288 — the browser installer used curl -k and skipped TLS verification, enabling MitM RCE. FIX: upgrade to playwright >= 1.55.1.

Rule source requires an active Pro or Enterprise subscription.
playwright-warn-evaluate-injection warning log

RISK: string-interpolated template literals in page.evaluate() allow arbitrary JS execution in page context if any value is attacker-influenced. FIX: pass values as the second arg to evaluate(fn, arg) so they are serialized, not concatenated.

Rule source requires an active Pro or Enterprise subscription.
playwright-warn-ignore-https-errors error block

RISK: ignoreHTTPSErrors: true disables TLS validation and exposes tests to MitM/credential theft. FIX: remove the option and trust the test CA via NODE_EXTRA_CA_CERTS or a proper cert.

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
v4
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
f84c79ebbbeaf8392b697952d02cd10865eea8546de9ed6104e2e2e29e13a2c5
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

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

No commit history available.