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
63 lines
1.3 KiB
Nix
63 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
python3,
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "kube-hunter";
|
|
version = "0.6.8";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "aquasecurity";
|
|
repo = "kube-hunter";
|
|
tag = "v${version}";
|
|
hash = "sha256-+M8P/VSF9SKPvq+yNPjokyhggY7hzQ9qLLhkiTNbJls=";
|
|
};
|
|
|
|
pythonRemoveDeps = [ "future" ];
|
|
|
|
build-system = with python3.pkgs; [ setuptools-scm ];
|
|
|
|
dependencies = with python3.pkgs; [
|
|
netaddr
|
|
netifaces
|
|
requests
|
|
prettytable
|
|
urllib3
|
|
ruamel-yaml
|
|
packaging
|
|
pluggy
|
|
kubernetes
|
|
];
|
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
pytest-cov-stub
|
|
pytestCheckHook
|
|
requests-mock
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg \
|
|
--replace "dataclasses" "" \
|
|
--replace "kubernetes==12.0.1" "kubernetes"
|
|
'';
|
|
|
|
pythonImportsCheck = [ "kube_hunter" ];
|
|
|
|
disabledTests = [
|
|
# Test is out-dated
|
|
"test_K8sCveHunter"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Tool to search issues in Kubernetes clusters";
|
|
homepage = "https://github.com/aquasecurity/kube-hunter";
|
|
changelog = "https://github.com/aquasecurity/kube-hunter/releases/tag/${src.tag}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ fab ];
|
|
mainProgram = "kube-hunter";
|
|
};
|
|
}
|