Files
nixpkgs/pkgs/by-name/ba/badrobot/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

53 lines
1.6 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "badrobot";
version = "0.1.4";
src = fetchFromGitHub {
owner = "controlplaneio";
repo = "badrobot";
rev = "v${version}";
sha256 = "sha256-U3b5Xw+GjnAEXteivztHdcAcXx7DYtgaUbW5oax0mIk=";
};
vendorHash = "sha256-oYdkCEdrw1eE5tnKveeJM3upRy8hOVc24JNN1bLX+ec=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X github.com/controlplaneio/badrobot/cmd.version=v${version}"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd badrobot \
--bash <($out/bin/badrobot completion bash) \
--fish <($out/bin/badrobot completion fish) \
--zsh <($out/bin/badrobot completion zsh)
'';
meta = {
homepage = "https://github.com/controlplaneio/badrobot";
changelog = "https://github.com/controlplaneio/badrobot/blob/v${version}/CHANGELOG.md";
description = "Operator Security Audit Tool";
mainProgram = "badrobot";
longDescription = ''
Badrobot is a Kubernetes Operator audit tool. It statically analyses
manifests for high risk configurations such as lack of security
restrictions on the deployed controller and the permissions of an
associated clusterole. The risk analysis is primarily focussed on the
likelihood that a compromised Operator would be able to obtain full
cluster permissions.
'';
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ jk ];
};
}