2022-06-16 17:23:12 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "badrobot";
|
2023-03-27 19:17:25 +00:00
|
|
|
version = "0.1.3";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "controlplaneio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-27 19:17:25 +00:00
|
|
|
sha256 = "sha256-mLBJLeB85QeC4PYH4FyOI8lHz1OxIJlJbqgDfXTNnhM=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
2023-03-27 19:17:25 +00:00
|
|
|
vendorHash = "sha256-SB7gGgm7BwMSo4ocKX4UGB+OdjVY92S5YZfOmTl4VEk=";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/controlplaneio/badrobot/cmd.version=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd badrobot \
|
|
|
|
--bash <($out/bin/badrobot completion bash) \
|
|
|
|
--fish <($out/bin/badrobot completion fish) \
|
|
|
|
--zsh <($out/bin/badrobot completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/controlplaneio/badrobot";
|
|
|
|
changelog = "https://github.com/controlplaneio/badrobot/blob/v${version}/CHANGELOG.md";
|
|
|
|
description = "Operator Security Audit Tool";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "badrobot";
|
2022-06-16 17:23:12 +00:00
|
|
|
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 licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ jk ];
|
|
|
|
};
|
|
|
|
}
|