about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWinter <winter@winter.cafe>2022-07-27 11:09:35 -0400
committerGitHub <noreply@github.com>2022-07-27 11:09:35 -0400
commit4a1f5a1a7da8bcf205f4f691408f8cc0bd906fee (patch)
tree67e168af98cfc9f96e0b49f3249f90d57815bbbd
parent0af1562d4ef67cb10b289fe7c2bd4cc6656f3e74 (diff)
parentaa4613dc6c065adb5741fd2bb7f9e1d4ccd9ee48 (diff)
Merge pull request #182841 from patryk4815/feature/init-kics
kics: init at 1.5.12
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--pkgs/tools/admin/kics/default.nix37
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 45 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 802370d286ed5..78366a8fc6c43 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -9890,6 +9890,12 @@
       fingerprint = "196A BFEC 6A1D D1EC 7594  F8D1 F625 47D0 75E0 9767";
     }];
   };
+  patryk4815 = {
+    email = "patryk.sondej@gmail.com";
+    github = "patryk4815";
+    githubId = 3074260;
+    name = "Patryk Sondej";
+  };
   patternspandemic = {
     email = "patternspandemic@live.com";
     github = "patternspandemic";
diff --git a/pkgs/tools/admin/kics/default.nix b/pkgs/tools/admin/kics/default.nix
new file mode 100644
index 0000000000000..c6cc5db402783
--- /dev/null
+++ b/pkgs/tools/admin/kics/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, buildGoModule, fetchFromGitHub, lib }:
+
+buildGoModule rec {
+  pname = "kics";
+  version = "1.5.12";
+
+  src = fetchFromGitHub {
+    owner = "Checkmarx";
+    repo = "kics";
+    rev = "v${version}";
+    sha256 = "sha256-jHspStyjq5T9jzYDRYaf2gOI4F/X+h4nDn0PFUOHoBY=";
+  };
+
+  vendorSha256 = "sha256-q5NuuP04kOoLVj210s17fIW2cxrsC/tAyET8YYGai0M=";
+
+  subPackages = [ "cmd/console" ];
+
+  postInstall = ''
+    mv $out/bin/console $out/bin/kics
+  '';
+
+  ldflags = [
+    "-s" "-w"
+    "-X github.com/Checkmarx/kics/internal/constant.SCMCommits=${version}"
+    "-X github.com/Checkmarx/kics/internal/constants.Version=${version}"
+  ];
+
+  meta = with lib; {
+    description = ''
+      Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development
+      cycle of your infrastructure-as-code with KICS by Checkmarx.
+    '';
+    homepage = "https://github.com/Checkmarx/kics";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ patryk4815 ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index aaf2fe0d66c9a..6b19b4d67c60b 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5696,6 +5696,8 @@ with pkgs;
     ssh = openssh;
   };
 
+  kics = callPackage ../tools/admin/kics { };
+
   kramdown-asciidoc = callPackage ../tools/typesetting/kramdown-asciidoc { };
 
   lychee = callPackage ../tools/networking/lychee { };