npm / playwright-core / 1.65.0-alpha-2026-10-18

playwright-core 1.65.0-alpha-2026-10-18

Source
https://github.com/microsoft/playwright
Commit scanned
b335271cdc2b (recorded by npm)
Directory
packages/playwright-core (only this part of the repository was scanned)
Compared with
6bbe2475ba79 (0 signals introduced since)
Files
370 scanned, 49 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 1 warn · 25 info
Scan time
17.7 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 17 of 17 warn and critical signals; 16 demoted to info.
Disclude version
4.0.0
Scanned (UTC)
2026-10-19 04:56

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. `require` called with a non-literal specifier (ast pass, confidence 0.60)

          try {
            const { default: func } = require(initPage);
            await func({ page: this.page });
          } catch (e) {
    likely benign LLM, confidence 0.60 Dynamically requires a configured init-page module and calls its default export with the page object.
    Reasoning

    The require path comes from an initPage variable, which appears to be a user- or config-supplied init script that is loaded and invoked with the page. This is a plugin-style hook, a legitimate pattern, though a configurable executable path does widen the attack surface. The snippet does not show where initPage originates, so the verdict rests on the plausible reading.

  2. info warn → info by review obfuscated-command-name packages/playwright-core/bin/reinstall_chrome_beta_mac.sh:13:1

    command name contains 4 backslash-escape sequences — hiding the true command (ast pass, confidence 0.85)

    
    /Applications/Google\ Chrome\ Beta.app/Contents/MacOS/Google\ Chrome\ Beta --version
    dismissed LLM, confidence 0.90 Runs Chrome Beta's --version from its app bundle path, with spaces escaped.
    Reasoning

    The backslash escapes are just shell quoting for spaces in the macOS app bundle path. The command is a plain version check on the installed browser, with no hidden command.

  3. info warn → info by review obfuscated-command-name packages/playwright-core/bin/reinstall_msedge_beta_mac.sh:11:1

    command name contains 4 backslash-escape sequences — hiding the true command (ast pass, confidence 0.85)

    rm -rf /tmp/msedge_beta.pkg
    /Applications/Microsoft\ Edge\ Beta.app/Contents/MacOS/Microsoft\ Edge\ Beta --version
    dismissed LLM, confidence 0.90 Runs Microsoft Edge Beta --version from its app bundle path, with spaces escaped.
    Reasoning

    The escapes are ordinary spaces in the Edge Beta app path, and the same script removes a local pkg file and then checks the version. Nothing is obscured.

  4. info warn → info by review obfuscated-command-name packages/playwright-core/bin/reinstall_msedge_dev_mac.sh:11:1

    command name contains 4 backslash-escape sequences — hiding the true command (ast pass, confidence 0.85)

    rm -rf /tmp/msedge_dev.pkg
    /Applications/Microsoft\ Edge\ Dev.app/Contents/MacOS/Microsoft\ Edge\ Dev --version
    dismissed LLM, confidence 0.90 Runs Microsoft Edge Dev --version from its app bundle path, with spaces escaped.
    Reasoning

    Same pattern as the Edge Beta script: backslash-escaped spaces in the app path for a version check. This is ordinary shell quoting.

  5. info warn → info by review dynamic-import packages/playwright-core/src/cli/installActions.ts:49:25

    `require` called with a non-literal specifier (ast pass, confidence 0.60)

          continue;
        const packageJSON = require(path.join(browser.referenceDir, 'package.json'));
        const version = packageJSON.version;
        dirToVersion.set(browser.referenceDir, version);
    dismissed LLM, confidence 0.90 Reads a package.json via require to obtain a browser's version.
    Reasoning

    The require reads package.json from a browser reference directory to get a version string. Loading JSON this way is routine, and the path comes from the tool's own configuration.

  6. line length 614 characters (raw pass, confidence 0.50)

    import type { Binary, Channel, AndroidWebView, AndroidSelector, AndroidElementInfo, APIResponse, Metadata, ClientSideCallMetadata, SDKLanguage, WaitInfo, HttpCredentials, SetNetworkCookie, NetworkCookie, ResourceTiming, SecurityDetails, RequestSizes, RemoteAddr, ExpectedTextValue, SelectorEngine, FormField, LifecycleEv
  7. line length 614 characters (raw pass, confidence 0.50)

    export type { Binary, Channel, AndroidWebView, AndroidSelector, AndroidElementInfo, APIResponse, Metadata, ClientSideCallMetadata, SDKLanguage, WaitInfo, HttpCredentials, SetNetworkCookie, NetworkCookie, ResourceTiming, SecurityDetails, RequestSizes, RemoteAddr, ExpectedTextValue, SelectorEngine, FormField, LifecycleEv
  8. info warn → info by review dynamic-import packages/playwright-core/src/package.ts:22:28

    `require` called with a non-literal specifier (ast pass, confidence 0.60)

    export const packageRoot = path.join(__dirname, '..');
    export const packageJSON = require(path.join(packageRoot, 'package.json'));
    export const binPath = path.join(packageRoot, 'bin');
    dismissed LLM, confidence 0.90 Loads the project's own package.json through a computed path.
    Reasoning

    This loads the package's own package.json relative to __dirname. It is a standard self-reference with a fixed filename and no untrusted input.

  9. command name is a variable (`$cygwin`) that this file sets only to plain text (ast pass, confidence 0.40)

    # Increase the maximum file descriptors if we can.
    if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
        case $MAX_FD in #(
          max*)
  10. command name is a variable (`$darwin`) that this file sets only to plain text (ast pass, confidence 0.40)

    # Increase the maximum file descriptors if we can.
    if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
        case $MAX_FD in #(
          max*)
  11. command name is a variable (`$nonstop`) that this file sets only to plain text (ast pass, confidence 0.40)

    # Increase the maximum file descriptors if we can.
    if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
        case $MAX_FD in #(
          max*)
  12. command name is a variable (`$cygwin`) that this file sets only to plain text (ast pass, confidence 0.40)

    # For Cygwin or MSYS, switch paths to Windows format before running java
    if "$cygwin" || "$msys" ; then
        APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
        CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
  13. command name is a variable (`$msys`) that this file sets only to plain text (ast pass, confidence 0.40)

    # For Cygwin or MSYS, switch paths to Windows format before running java
    if "$cygwin" || "$msys" ; then
        APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
        CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
  14. info critical → info by review dynamic-execution packages/playwright-core/src/server/android/driver/gradlew:233:1

    `eval` called on a dynamic (variable/substitution) expression (ast pass, confidence 0.90)

    
    eval "set -- $(
            printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
            xargs -n1 |
    likely benign LLM, confidence 0.85 Gradle wrapper eval that word-splits JVM options into positional arguments.
    Reasoning

    This is the standard Gradle wrapper idiom for splitting JVM options with eval set --. The input comes from the local DEFAULT_JVM_OPTS and environment variables, not from the network. It is expected in a vendored gradlew.

  15. info critical → info by review dynamic-execution packages/playwright-core/src/server/android/driver/gradlew:240:1

    `exec` called with a dynamic (variable/substitution) path (ast pass, confidence 0.85)

    
    exec "$JAVACMD" "$@"
    likely benign LLM, confidence 0.90 Gradle wrapper exec that launches the resolved Java binary.
    Reasoning

    This is the standard final exec of the Java binary in the Gradle wrapper, passing the resolved JAVACMD and arguments. It is the expected launcher behavior.

  16. line length 614 characters (raw pass, confidence 0.50)

    import type { Binary, Channel, AndroidWebView, AndroidSelector, AndroidElementInfo, APIResponse, Metadata, ClientSideCallMetadata, SDKLanguage, WaitInfo, HttpCredentials, SetNetworkCookie, NetworkCookie, ResourceTiming, SecurityDetails, RequestSizes, RemoteAddr, ExpectedTextValue, SelectorEngine, FormField, LifecycleEv
  17. line length 614 characters (raw pass, confidence 0.50)

    export type { Binary, Channel, AndroidWebView, AndroidSelector, AndroidElementInfo, APIResponse, Metadata, ClientSideCallMetadata, SDKLanguage, WaitInfo, HttpCredentials, SetNetworkCookie, NetworkCookie, ResourceTiming, SecurityDetails, RequestSizes, RemoteAddr, ExpectedTextValue, SelectorEngine, FormField, LifecycleEv
  18. info warn → info by review dynamic-execution packages/playwright-core/src/server/dom.ts:714:43

    `atob` decodes a base64 value at runtime — common step before dynamic fetch or eval (ast pass, confidence 0.75)

              for (const p of payloads) {
                const bytes = Uint8Array.from(atob(p.buffer), c => c.charCodeAt(0));
                const file = new File([bytes], p.name, { type: p.mimeType, lastModified: p.lastModifiedMs });
                dt.items.add(file);
    likely benign LLM, confidence 0.85 Decodes base64 payloads into File objects for a synthetic DataTransfer.
    Reasoning

    The base64 decode rebuilds File objects for a DataTransfer when setting input files or dropping data. This is a normal browser-automation feature, and the decoded data is only wrapped in File objects, not executed.

  19. info critical → info by review dynamic-execution packages/playwright-core/src/server/javascript.ts:315:7

    `Function(...)` called with a non-literal body (ast pass, confidence 0.90)

        try {
          new Function('(' + expression + ')');
        } catch (e1) {
          // This means we might have a function shorthand. Try another
    likely benign LLM, confidence 0.85 Syntax-checks an expression string by constructing a Function from it.
    Reasoning

    new Function is used only as a syntax check on a serialized expression to decide whether it parses. It does not run the code, and this is a common pattern in evaluation utilities.

  20. info critical → info by review dynamic-execution packages/playwright-core/src/server/javascript.ts:324:9

    `Function(...)` called with a non-literal body (ast pass, confidence 0.90)

          try {
            new Function('(' + expression  + ')');
          } catch (e2) {
            // We tried hard to serialize, but there's a weird beast here.
    likely benign LLM, confidence 0.85 Second syntax-check Function construction in the expression serializer fallback.
    Reasoning

    Same as the other Function check: a parse-only attempt on a serialized expression within an error-handling fallback. It does not execute the expression.

  21. info warn → info by review dynamic-import packages/playwright-core/src/server/registry/index.ts:1201:30

    `require` called with a non-literal specifier (ast pass, confidence 0.60)

            linkTarget = (await fs.promises.readFile(linkPath)).toString();
            const browsersJSON = require(path.join(linkTarget, 'browsers.json'));
            const descriptors = readDescriptors(browsersJSON);
            for (const browserName of allDownloadableDirectoriesThatEverExisted) {
    likely benign LLM, confidence 0.75 Requires a browsers.json whose directory comes from a resolved symlink target.
    Reasoning

    The path is built from a symlink target read from the browsers directory, then loads browsers.json through require. Loading a JSON file is data-only, but the path is derived from a filesystem link, so it is worth a note, not a concern.

  22. info warn → info by review dynamic-import packages/playwright-core/src/server/registry/index.ts:1396:38

    `require` called with a non-literal specifier (ast pass, confidence 0.60)

    
    export const registry = new Registry(require(path.join(packageRoot, 'browsers.json')));
    
    export { runOopDownloadBrowserMain } from './oopDownloadBrowserMain';
    dismissed LLM, confidence 0.90 Loads the bundled browsers.json to construct the browser registry.
    Reasoning

    This loads the bundled browsers.json from the package root to build the registry. It is a fixed, expected data file.

  23. info critical → info by review dynamic-execution packages/playwright-core/src/tools/backend/evaluate.ts:50:25

    `eval` called with a non-literal expression (ast pass, confidence 0.90)

            evalResult = await locator.locator.evaluate(async (element, expr) => {
              const value = eval(`(${expr})`);
              const isFunction = typeof value === 'function';
              const result = await (isFunction ? value(element) : value);
    likely benign LLM, confidence 0.70 Evaluates a caller-supplied expression in the page for the evaluate tool.
    Reasoning

    This evaluates an expression supplied to a browser-automation evaluate tool inside the page context. Running caller-supplied JavaScript in the page is the tool's stated purpose, not hidden obfuscation. The risk is by design, not concealed.

  24. info critical → info by review dynamic-execution packages/playwright-core/src/tools/backend/evaluate.ts:57:25

    `eval` called with a non-literal expression (ast pass, confidence 0.90)

            evalResult = await tab.page.evaluate(async expr => {
              const value = eval(`(${expr})`);
              const isFunction = typeof value === 'function';
              const result = await (isFunction ? value() : value);
    likely benign LLM, confidence 0.70 Evaluates a caller-supplied expression in the page for the page-level evaluate tool.
    Reasoning

    Same as the locator variant: eval of a caller-provided expression in the page, which is the intended behavior of this automation tool. It is a dangerous capability that is expected here.

  25. info warn → info by review dynamic-import packages/playwright-core/src/tools/cli-client/program.ts:78:16

    `require` called with a non-literal specifier (ast pass, confidence 0.60)

      const clientInfo = createClientInfo();
      const help = require(libPath('tools', 'cli-client', 'help.json'));
    
      const argv = process.argv.slice(2);
    likely benign LLM, confidence 0.90 Loads a bundled help.json file via a path helper.
    Reasoning

    The require target is built with libPath from fixed segments ('tools', 'cli-client', 'help.json') pointing at a bundled JSON help file. The non-literal flag is a false positive from the helper call, and there is no sign of obfuscation or code execution.

  26. info warn → info by review dynamic-import packages/playwright-core/src/tools/utils/connect.ts:21:14

    `require` called with a non-literal specifier (ast pass, confidence 0.60)

    export async function connectToBrowserAcrossVersions(descriptor: BrowserDescriptor): Promise<playwright.Browser> {
      const pw = require(descriptor.playwrightLib);
      const browserType = pw[descriptor.browser.browserName] as playwright.BrowserType;
      return await browserType.connect(descriptorEndpoint(descriptor));
    likely benign LLM, confidence 0.70 Requires a configured Playwright library build and connects to a browser via its browser type.
    Reasoning

    The module is loaded from descriptor.playwrightLib, which lets the tool select a Playwright build matching the browser version, and the result is used only to look up a browser type and call connect. This matches the function's stated purpose. The risk depends on whether the descriptor can be attacker-controlled, which the snippet does not show.

Reproduce This Scan

Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.0.0
git clone https://github.com/microsoft/playwright playwright && cd playwright
git checkout b335271cdc2b57cac2be8ad37c5dd283ac6b8938
disclude scan --severity info --diff 6bbe2475ba79174c3df5f28a435958ef0351d515 packages/playwright-core