lol
1{ lib
2, buildGoModule
3, fetchFromGitHub
4, testers
5, kics
6}:
7
8buildGoModule rec {
9 pname = "kics";
10 version = "1.7.10";
11
12 src = fetchFromGitHub {
13 owner = "Checkmarx";
14 repo = "kics";
15 rev = "v${version}";
16 hash = "sha256-3guudT+PidrgHcJ6/lA/XWHmZXdvjGOhtpoO+9hkYOY=";
17 };
18
19 vendorHash = "sha256-gJu3B30IPp8A/xgtE5fzThQAtnFbbzr8ZwucAsObBxs=";
20
21 subPackages = [ "cmd/console" ];
22
23 postInstall = ''
24 mv $out/bin/console $out/bin/kics
25 '';
26
27 ldflags = [
28 "-s" "-w"
29 "-X github.com/Checkmarx/kics/internal/constant.SCMCommits=${version}"
30 "-X github.com/Checkmarx/kics/internal/constants.Version=${version}"
31 ];
32
33 passthru.tests.version = testers.testVersion {
34 package = kics;
35 command = "kics version";
36 };
37
38 meta = with lib; {
39 description = ''
40 Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development
41 cycle of your infrastructure-as-code with KICS by Checkmarx.
42 '';
43 homepage = "https://github.com/Checkmarx/kics";
44 license = licenses.asl20;
45 maintainers = with maintainers; [ patryk4815 ];
46 };
47}