12 src = fetchFromGitHub {
16 sha256 = "sha256-/F1wmP1hfhrAmx2jJtAn02LkTabi0RJu36T/oW3tyZw=";
17 # populate values that require us to use git. By doing this in postFetch we
18 # can delete .git afterwards and maintain better reproducibility of the src.
22 git rev-parse HEAD > $out/COMMIT
23 find "$out" -name .git -print0 | xargs -0 rm -rf
26 vendorSha256 = "sha256-rDJFowbOj77n/sBoDgFEF+2PgghxufvIgzbMqrHehws=";
28 nativeBuildInputs = [ installShellFiles ];
30 # static to be easily copied into containers since it's an in-pod pen-testing tool
36 "-X github.com/quarkslab/kdigger/commands.VERSION=v${version}"
37 "-X github.com/quarkslab/kdigger/commands.BUILDERARCH=${stdenv.hostPlatform.linuxArch}"
41 ldflags+=" -X github.com/quarkslab/kdigger/commands.GITCOMMIT=$(cat COMMIT)"
45 installShellCompletion --cmd kdigger \
46 --bash <($out/bin/kdigger completion bash) \
47 --fish <($out/bin/kdigger completion fish) \
48 --zsh <($out/bin/kdigger completion zsh)
51 doInstallCheck = true;
52 installCheckPhase = ''
53 runHook preInstallCheck
55 $out/bin/kdigger --help
57 runHook postInstallCheck
61 homepage = "https://github.com/quarkslab/kdigger";
62 changelog = "https://github.com/quarkslab/kdigger/releases/tag/v${version}";
63 description = "An in-pod context discovery tool for Kubernetes penetration testing";
65 kdigger, short for "Kubernetes digger", is a context discovery tool for
66 Kubernetes penetration testing. This tool is a compilation of various
67 plugins called buckets to facilitate pentesting Kubernetes from inside a
70 license = licenses.asl20;
71 maintainers = with maintainers; [ jk ];
72 platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];