@@ -0,0 +1,57 @@
1+{ lib
2+, fetchFromGitHub
3+, python3
4+}:
5+
6+python3.pkgs.buildPythonApplication rec {
7+ pname = "kube-hunter";
8+ version = "0.6.3";
9+
10+ src = fetchFromGitHub {
11+ owner = "aquasecurity";
12+ repo = pname;
13+ rev = "v${version}";
14+ sha256 = "sha256-OXiFWdbp6L9S57gRIROzuvXZ0R16lvKDqZR0kW0eEYQ=";
15+ };
16+
17+ nativeBuildInputs = with python3.pkgs; [
18+ setuptools-scm
19+ ];
20+
21+ propagatedBuildInputs = with python3.pkgs; [
22+ netaddr
23+ netifaces
24+ scapy
25+ requests
26+ prettytable
27+ urllib3
28+ ruamel-yaml
29+ future
30+ packaging
31+ pluggy
32+ kubernetes
33+ ];
34+
35+ checkInputs = with python3.pkgs; [
36+ pytestCheckHook
37+ requests-mock
38+ ];
39+
40+ postPatch = ''
41+ substituteInPlace setup.cfg \
42+ --replace "dataclasses" "" \
43+ --replace "kubernetes==12.0.1" "kubernetes" \
44+ --replace "--cov=kube_hunter" ""
45+ '';
46+
47+ pythonImportsCheck = [
48+ "kube_hunter"
49+ ];
50+
51+ meta = with lib; {
52+ description = "Tool to search issues in Kubernetes clusters";
53+ homepage = "https://github.com/aquasecurity/kube-hunter";
54+ license = with licenses; [ asl20 ];
55+ maintainers = with maintainers; [ fab ];
56+ };
57+}