8 versionMetadata = import ./sysdig-cli-scanner.versions.nix;
9 fetchForSystem = versionMetadata.${stdenv.system} or (throw "unsupported system ${stdenv.system}");
11 wrapper = writeShellScript "sysdig-cli-scanner-wrapper" ''
13 # We must not pass --dbpath to the cli in case it has been called with --iac
14 # IaC Scanning does not make use of the vulnerability database
15 if [ "$arg" = "--iac" ]; then
16 exec @out@/libexec/sysdig-cli-scanner-unwrapped "$@"
20 # --dbpath argument is needed for vulnerability scanning mode, otherwise it tries to download
21 # the vulnerability database in the same path as the binary, which is read-only in the case of the
23 exec @out@/libexec/sysdig-cli-scanner-unwrapped \
24 --dbpath="$HOME/.cache/sysdig-cli-scanner/" "$@"
28 pname = "sysdig-cli-scanner";
29 version = versionMetadata.version;
31 src = fetchurl { inherit (fetchForSystem) url hash; };
37 install -Dm755 -T $src $out/libexec/sysdig-cli-scanner-unwrapped
38 install -Dm755 -T ${wrapper} $out/bin/sysdig-cli-scanner
39 substituteInPlace $out/bin/sysdig-cli-scanner --subst-var out
44 passthru.updateScript = ./update.sh;
47 description = "Tool for scanning container images and directories using Sysdig";
49 The Sysdig Vulnerability CLI Scanner, sysdig-cli-scanner, is a versatile tool designed to
50 manually scan container images and directories, whether they are located locally or remotely.
51 Depending on your specific use case, you have the flexibility to execute sysdig-cli-scanner
52 in Vulnerability Management (VM) mode for image scanning or Infrastructure as Code (IaC) mode
53 for scanning directories.
55 homepage = "https://docs.sysdig.com/en/docs/installation/sysdig-secure/install-vulnerability-cli-scanner/";
56 mainProgram = "sysdig-cli-scanner";
57 license = licenses.unfreeRedistributable;
58 maintainers = with maintainers; [ tembleking ];
65 sourceProvenance = with sourceTypes; [ binaryNativeCode ];