npm / sharp / 0.35.6

sharp 0.35.6

Source
https://github.com/lovell/sharp
Artifact scanned
sharp-0.35.6.tgz (npm tarball · 211.3 KB · SHA-256 a25cc735c635…)
Compared with
sharp-0.35.5.tgz (0 signals introduced since)
Files
45 scanned, 2 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 16 info
Scan time
9.5 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 16 of 16 warn and critical signals; 16 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-11-29 09:13

Signals

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

  1. info warn → info by review dynamic-import dist/libvips.cjs:54:12

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

      try {
        return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
      } catch {
        try {
    likely benign LLM, confidence 0.92 Optional require of a platform-specific libvips-dev include package, chosen by build platform.
    Reasoning

    This is sharp's standard libvips resolver. The template literal only interpolates a platform/arch string from buildPlatformArch() into an @img/sharp-libvips-dev package path, inside try/catch fallbacks. The dynamic specifier is an expected packaging pattern, not obfuscation.

  2. info warn → info by review dynamic-import dist/libvips.cjs:72:12

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

      try {
        return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
      } catch {
        try {
    likely benign LLM, confidence 0.92 Optional require of a platform-specific libvips-dev lib package.
    Reasoning

    Same sharp libvips resolution pattern: a platform-interpolated @img/sharp-libvips-dev lib path inside a try/catch fallback chain. It is a routine dynamic module lookup with no decoding or execution.

  3. info warn → info by review dynamic-import dist/libvips.cjs:75:14

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

        try {
          return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
        } catch {}
      }
    likely benign LLM, confidence 0.92 Fallback require of the platform-specific libvips runtime package.
    Reasoning

    A fallback require of a platform-specific @img/sharp-libvips package, wrapped in an empty catch. This is the normal way sharp locates its prebuilt native dependency for the host platform.

  4. info warn → info by review dynamic-import dist/libvips.mjs:54:12

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

      try {
        return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
      } catch {
        try {
    likely benign LLM, confidence 0.92 Optional require of a platform-specific libvips-dev include package.
    Reasoning

    Mirror of the CJS build with the same platform-interpolated require of a libvips-dev include package inside try/catch. Legitimate sharp packaging behavior.

  5. info warn → info by review dynamic-import dist/libvips.mjs:72:12

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

      try {
        return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
      } catch {
        try {
    likely benign LLM, confidence 0.92 Optional require of a platform-specific libvips-dev lib package.
    Reasoning

    Same platform-specific libvips-dev lib lookup as the CJS build, in a fallback chain. No sign of hidden payload loading.

  6. info warn → info by review dynamic-import dist/libvips.mjs:75:14

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

        try {
          return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
        } catch {}
      }
    likely benign LLM, confidence 0.92 Fallback require of the platform-specific libvips runtime package.
    Reasoning

    Fallback require of the platform-specific libvips package with an empty catch, matching the CJS build. Normal native-dependency resolution.

  7. info warn → info by review dynamic-import dist/sharp.cjs:25:11

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

    try {
      sharp = require(`../src/build/Release/sharp-${runtimePlatform}-${version}.node`);
    } catch (err) {
      errors.push(err);
    likely benign LLM, confidence 0.93 Loads the platform-specific sharp native .node binary.
    Reasoning

    Sharp loads its own native addon by building a filename from runtimePlatform and version under src/build/Release. This is the expected native binding loader, with the error captured and retried against other candidates.

  8. info warn → info by review dynamic-import dist/sharp.cjs:31:13

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

      try {
        sharp = require(`../src/build/Release/sharp-wasm32-${version}.node`);
      } catch (err) {
        errors.push(err);
    likely benign LLM, confidence 0.93 Fallback require of the wasm32 sharp native binding.
    Reasoning

    Fallback loader for the wasm32 sharp native build, selected by version string. This is the normal multi-target binding fallback, and failures are only collected into errors.

  9. info warn → info by review dynamic-import dist/sharp.cjs:146:26

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

        try {
          const { config } = require(`@img/sharp-libvips-${runtimePlatform}/package`);
          const libcFound = `${familySync()} ${versionSync()}`;
          const libcRequires = `${config.musl ? "musl" : "glibc"} ${config.musl || config.glibc}`;
    likely benign LLM, confidence 0.90 Requires the platform libvips package config to report libc compatibility.
    Reasoning

    Inside a try block, this requires the platform's libvips package/config to compare the detected libc with the required libc for diagnostics. It is an ordinary dynamic lookup for error reporting.

  10. info warn → info by review dynamic-import dist/sharp.mjs:25:11

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

    try {
      sharp = require(`../src/build/Release/sharp-${runtimePlatform}-${version}.node`);
    } catch (err) {
      errors.push(err);
    likely benign LLM, confidence 0.93 Loads the platform-specific sharp native .node binary.
    Reasoning

    Same native addon loader as the CJS build: a platform/version-derived .node path with errors collected for fallback. Expected for a native module.

  11. info warn → info by review dynamic-import dist/sharp.mjs:31:13

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

      try {
        sharp = require(`../src/build/Release/sharp-wasm32-${version}.node`);
      } catch (err) {
        errors.push(err);
    likely benign LLM, confidence 0.93 Fallback require of the wasm32 sharp native binding.
    Reasoning

    Same wasm32 native binding fallback as the CJS build, selected by version. Standard sharp behavior.

  12. info warn → info by review dynamic-import dist/sharp.mjs:146:26

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

        try {
          const { config } = require(`@img/sharp-libvips-${runtimePlatform}/package`);
          const libcFound = `${familySync()} ${versionSync()}`;
          const libcRequires = `${config.musl ? "musl" : "glibc"} ${config.musl || config.glibc}`;
    likely benign LLM, confidence 0.90 Requires the platform libvips package config for libc diagnostics.
    Reasoning

    Same libc-diagnostic require of the platform libvips package config as the CJS build, inside a try block. Ordinary dynamic lookup, not an attack.

  13. info warn → info by review dynamic-import dist/utility.cjs:68:18

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

        try {
          versions = require(`@img/sharp-${runtimePlatform}/versions`);
        } catch (_) {
          try {
    likely benign LLM, confidence 0.92 Optional require of platform-specific sharp versions metadata.
    Reasoning

    Sharp's utility module tries to load a platform-specific versions metadata module, falling back to a libvips variant. The specifier is only a package name built from runtimePlatform, and the loads are wrapped in try/catch.

  14. info warn → info by review dynamic-import dist/utility.cjs:71:20

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

          try {
            versions = require(`@img/sharp-libvips-${runtimePlatform}/versions`);
          } catch (_) {}
        }
    likely benign LLM, confidence 0.92 Fallback require of libvips versions metadata for the platform.
    Reasoning

    Fallback to the libvips-specific versions metadata package, with the error swallowed. Routine version-metadata lookup.

  15. info warn → info by review dynamic-import dist/utility.mjs:68:18

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

        try {
          versions = require(`@img/sharp-${runtimePlatform}/versions`);
        } catch (_) {
          try {
    likely benign LLM, confidence 0.92 Optional require of platform-specific sharp versions metadata.
    Reasoning

    Same versions metadata lookup as the CJS utility module, with platform-derived package name and try/catch fallback. Benign.

  16. info warn → info by review dynamic-import dist/utility.mjs:71:20

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

          try {
            versions = require(`@img/sharp-libvips-${runtimePlatform}/versions`);
          } catch (_) {}
        }
    likely benign LLM, confidence 0.92 Fallback require of libvips versions metadata for the platform.
    Reasoning

    Same libvips versions fallback as the CJS build, with the error swallowed. Standard package resolution.

Reproduce This Scan

Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. 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.3.0
curl -fsSL -o sharp-0.35.6.tgz https://registry.npmjs.org/sharp/-/sharp-0.35.6.tgz
printf '%s  %s\n' a25cc735c6353da86410bbdbd2d8de88d66f6bf392cb791f2a70c3b784df2022 sharp-0.35.6.tgz | shasum -a 256 -c -
mkdir pkg && tar -xzf sharp-0.35.6.tgz -C pkg --strip-components 1
disclude scan --untrusted --severity info pkg