npm / sharp / 0.35.6-rc.0

sharp 0.35.6-rc.0

Source
https://github.com/lovell/sharp
Artifact scanned
sharp-0.35.6-rc.0.tgz (npm tarball · 211.3 KB · SHA-256 2eda16af263e…)
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
10.4 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-28 09:12

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.90 Loads the libvips include directory from a platform-specific sharp package.
    Reasoning

    The require specifier is a template literal filled with buildPlatformArch(), which selects the platform-specific libvips development package. This is the standard way sharp locates its native dependencies, and the require sits inside a try/catch fallback chain with no decoding or process execution.

  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.90 Loads the libvips lib directory from a platform-specific package in a fallback chain.
    Reasoning

    Same pattern as the sibling finding: a platform-derived package name selects the libvips lib directory for a fallback resolution attempt. The specifier is constrained to the @img/sharp-libvips scope and nothing else is done with the result.

  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.90 Falls back to loading the runtime libvips package for the current platform.
    Reasoning

    The non-dev fallback resolves the runtime libvips package by platform name and swallows errors. This is ordinary optional-dependency resolution with no network, shell, or decoding behaviour.

  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.90 Loads the libvips include directory from a platform-specific sharp package.
    Reasoning

    This is the ESM build of the same libvips resolver, with the same platform-derived package name and try/catch fallback. Nothing in the snippet is malicious.

  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.90 Loads the libvips lib directory from a platform-specific package in a fallback chain.
    Reasoning

    Mirror of the CJS build's lib resolution with a platform-derived scoped package name inside a fallback chain. Expected for a native-image library.

  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.90 Falls back to loading the runtime libvips package for the current platform.
    Reasoning

    Runtime libvips fallback resolved by platform name with errors suppressed. Standard optional-dependency loading for a native module.

  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.90 Loads the sharp native addon binary for the current platform and version.
    Reasoning

    The native binding path is built from runtimePlatform and version, and it points at a relative build/Release .node file. This is how sharp loads its prebuilt addon, and the failure is collected into an errors array rather than hidden.

  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.90 Loads the wasm32 sharp addon as a fallback when the native build is missing.
    Reasoning

    The wasm32 fallback path is built from the version string and loads a local .node binary inside a try/catch. This is a normal fallback for an alternative build target.

  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 Reads libvips package config to compare libc family and version for diagnostics.
    Reasoning

    Reads the package config of the platform-specific libvips package to compare libc versions, which is a diagnostic step in sharp's install-error reporting. It only reads metadata and executes nothing.

  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.90 Loads the sharp native addon binary for the current platform and version.
    Reasoning

    ESM copy of the native addon loader using the same platform and version path construction. Expected behaviour.

  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.90 Loads the wasm32 sharp addon as a fallback when the native build is missing.
    Reasoning

    ESM copy of the wasm32 fallback loader. A normal alternative build path inside a try/catch.

  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 Reads libvips package config to compare libc family and version for diagnostics.
    Reasoning

    ESM copy of the libc diagnostic step that reads the platform package's config. Read-only metadata access.

  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.90 Loads the platform package's versions metadata for reporting.
    Reasoning

    Loads a versions metadata module from a platform-named sharp package, with a fallback to the libvips package. The result is used only to report version strings.

  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.90 Falls back to the libvips package versions metadata for reporting.
    Reasoning

    Fallback to the libvips package versions module, with errors suppressed. Ordinary 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.90 Loads the platform package's versions metadata for reporting.
    Reasoning

    ESM copy of the versions metadata lookup, with the same platform-named package and fallback. Read-only reporting, no execution.

  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.90 Falls back to the libvips package versions metadata for reporting.
    Reasoning

    ESM copy of the libvips versions fallback with errors suppressed. Ordinary metadata access.

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-rc.0.tgz https://registry.npmjs.org/sharp/-/sharp-0.35.6-rc.0.tgz
printf '%s  %s\n' 2eda16af263e5baec2d68ffea5787fda3bca8085369757db0337abbb70923447 sharp-0.35.6-rc.0.tgz | shasum -a 256 -c -
mkdir pkg && tar -xzf sharp-0.35.6-rc.0.tgz -C pkg --strip-components 1
disclude scan --untrusted --severity info pkg