git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #149469 from fabaff/kh

kube-hunter: init at 0.6.3

commit0fdb0d6e5b3fa00b9f1fe10f1bf57ffef82749bc authorFabian Affolter <fabian@affolter-engineering.ch> dateFri 10 Dec 2021, 08:46 (5 years ago) parent8b1260c0c785d3
2 files changed+59
pkgs/tools/security/kube-hunter/default.nix+57 pkgs/top-level/all-packages.nix+2
pkgs/tools/security/kube-hunter/default.nixnew file+57
@@ -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+}
pkgs/top-level/all-packages.nix+2
@@ -14849,6 +14849,8 @@ with pkgs;
1484914849
1485014850 kube-aws = callPackage ../development/tools/kube-aws { };
1485114851
14852+ kube-hunter = callPackage ../tools/security/kube-hunter { };
14853+
1485214854 kubeaudit = callPackage ../tools/security/kubeaudit { };
1485314855
1485414856 kubectx = callPackage ../development/tools/kubectx { };