about summary refs log tree commit diff
path: root/pkgs/tools/security/kube-hunter
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-12-07 23:46:14 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-12-07 23:54:13 +0100
commit0c785d39f608f54edd54ebdebce390f3a55d97cc (patch)
tree8ba2eaf1935b53c2ce4c9557e14ba98baf12801a /pkgs/tools/security/kube-hunter
parentce3ab712ca6430d745514bd422704a00805ce2c5 (diff)
kube-hunter: init at 0.6.3
Diffstat (limited to 'pkgs/tools/security/kube-hunter')
-rw-r--r--pkgs/tools/security/kube-hunter/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/tools/security/kube-hunter/default.nix b/pkgs/tools/security/kube-hunter/default.nix
new file mode 100644
index 0000000000000..6f15bde0104e3
--- /dev/null
+++ b/pkgs/tools/security/kube-hunter/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, fetchFromGitHub
+, python3
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "kube-hunter";
+  version = "0.6.3";
+
+  src = fetchFromGitHub {
+    owner = "aquasecurity";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-OXiFWdbp6L9S57gRIROzuvXZ0R16lvKDqZR0kW0eEYQ=";
+  };
+
+  nativeBuildInputs = with python3.pkgs; [
+    setuptools-scm
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    netaddr
+    netifaces
+    scapy
+    requests
+    prettytable
+    urllib3
+    ruamel-yaml
+    future
+    packaging
+    pluggy
+    kubernetes
+  ];
+
+  checkInputs = with python3.pkgs; [
+    pytestCheckHook
+    requests-mock
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "dataclasses" "" \
+      --replace "kubernetes==12.0.1" "kubernetes" \
+      --replace "--cov=kube_hunter" ""
+  '';
+
+  pythonImportsCheck = [
+    "kube_hunter"
+  ];
+
+  meta = with lib; {
+    description = "Tool to search issues in Kubernetes clusters";
+    homepage = "https://github.com/aquasecurity/kube-hunter";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ fab ];
+  };
+}