{"record":{"id":"2ce8a1c7081b055f","repo":"slimtoolkit/slim","slug":"dependency-resolver-not-found","errorCode":null,"errorMessage":"dependency resolver not found","messagePattern":"dependency resolver not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/app/sensor/inspector/sodeps/sodeps.go","lineNumber":20,"sourceCode":"\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/slimtoolkit/slim/pkg/app/sensor/detector/binfile\"\n\n\tlog \"github.com/sirupsen/logrus\"\n)\n\n// Inspector errors\nvar (\n\tErrFilePathNotAbs      = errors.New(\"file path is not absolute\")\n\tErrFileNotBin          = errors.New(\"file is not a binary\")\n\tErrDepResolverNotFound = errors.New(\"dependency resolver not found\")\n)\n\nconst (\n\tresolverExeName = \"ldd\"\n)\n\nfunc AllExeDependencies(exeFileName string, find bool) ([]string, error) {\n\tif !strings.HasPrefix(exeFileName, \"/\") {\n\t\tif !find {\n\t\t\treturn nil, ErrFilePathNotAbs\n\t\t}\n\n\t\texePath, err := exec.LookPath(exeFileName)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\texeFileName = exePath","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/slimtoolkit/slim/blob/81940d17fa112cc678e32209214bcb2355cb3004/pkg/app/sensor/inspector/sodeps/sodeps.go#L2-L38","documentation":"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.","triggerScenarios":"Running the sensor in a minimal container image (distroless, scratch, alpine without libc tooling) that lacks ldd; PATH stripped so LookPath fails.","commonSituations":"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.","solutions":["Install ldd (glibc tooling, e.g., apk add glibc / apt-get install libc-bin) in the environment running the sensor","Ensure PATH includes the directory containing ldd when launching the sensor","Use an image variant with standard libc utilities for probing","Fall back to static dependency analysis if ldd cannot be provided"],"exampleFix":"# before\nFROM alpine\nRUN apk add --no-cache ca-certificates\n# after\nFROM alpine\nRUN apk add --no-cache ca-certificates glibc libc6-compat # provides ldd/ld-linux","handlingStrategy":"validation","validationCode":"// Go: verify ldd is available before dependency analysis\nif _, err := exec.LookPath(\"ldd\"); err != nil {\n    return fmt.Errorf(\"ldd must be installed in the probe environment\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install glibc tooling (ldd) in images used for dynamic analysis","Keep PATH intact when launching the sensor","Prefer standard base images for probing rather than scratch/minimal ones"],"tags":["environment","missing-tool","dependency-inspection","go"],"backgroundTag":"missing-system-tool","analyzedSha":"81940d17fa112cc678e32209214bcb2355cb3004","analyzedAt":"2026-08-31T23:06:12.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}