slimtoolkit/slim · error

dependency resolver not found

Error message

dependency resolver not found

What it means

ErrDepResolverNotFound is returned by sodeps.AllDependencies when exec.LookPath cannot find the dependency resolver executable (ldd) on PATH. The shared-object dependency inspection depends on ldd being installed in the environment where the sensor runs.

Source

Thrown at pkg/app/sensor/inspector/sodeps/sodeps.go:20

import (
	"bytes"
	"errors"
	"os"
	"os/exec"
	"path/filepath"
	"strings"

	"github.com/slimtoolkit/slim/pkg/app/sensor/detector/binfile"

	log "github.com/sirupsen/logrus"
)

// Inspector errors
var (
	ErrFilePathNotAbs      = errors.New("file path is not absolute")
	ErrFileNotBin          = errors.New("file is not a binary")
	ErrDepResolverNotFound = errors.New("dependency resolver not found")
)

const (
	resolverExeName = "ldd"
)

func AllExeDependencies(exeFileName string, find bool) ([]string, error) {
	if !strings.HasPrefix(exeFileName, "/") {
		if !find {
			return nil, ErrFilePathNotAbs
		}

		exePath, err := exec.LookPath(exeFileName)
		if err != nil {
			return nil, err
		}

		exeFileName = exePath

View on GitHub (pinned to 81940d17fa)

Solutions

  1. Install ldd (glibc tooling, e.g., apk add glibc / apt-get install libc-bin) in the environment running the sensor
  2. Ensure PATH includes the directory containing ldd when launching the sensor
  3. Use an image variant with standard libc utilities for probing
  4. Fall back to static dependency analysis if ldd cannot be provided

Example fix

# before
FROM alpine
RUN apk add --no-cache ca-certificates
# after
FROM alpine
RUN apk add --no-cache ca-certificates glibc libc6-compat # provides ldd/ld-linux
Defensive patterns

Strategy: validation

Validate before calling

// Go: verify ldd is available before dependency analysis
if _, err := exec.LookPath("ldd"); err != nil {
    return fmt.Errorf("ldd must be installed in the probe environment")
}

Prevention

When it happens

Trigger: Running the sensor in a minimal container image (distroless, scratch, alpine without libc tooling) that lacks ldd; PATH stripped so LookPath fails.

Common situations: Analyzing slim/minimal images during dynamic analysis; containers built FROM scratch; alpine images with musl but no ldd installed; restricted PATH env in production images.

Related errors


AI-assisted analysis of slimtoolkit/slim@81940d17fa (2026-08-31). Data as JSON: /api/errors/2ce8a1c7081b055f. Report an issue: GitHub.