blob: db23b87058f418ca831bce41ba8ed080be75403a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{ lib
, buildGoModule
, fetchFromGitHub
, hyperscan
, pkg-config
, protobuf
, protoc-gen-go
, protoc-gen-go-grpc
}:
buildGoModule rec {
pname = "secretscanner";
version = "1.2.0";
src = fetchFromGitHub {
owner = "deepfence";
repo = "SecretScanner";
rev = "refs/tags/v${version}";
fetchSubmodules = true;
hash = "sha256-lTUZLuEiC9xpHYWn3uv4ZtbvHX6ETsjxacjd/O0kU8I=";
};
vendorHash = "sha256-lB+fiSdflIYGw0hMN0a9IOtRcJwYEUPQqaeU7mAfSQs=";
excludedPackages = [
"./agent-plugins-grpc/proto" # No need to build submodules
];
nativeBuildInputs = [
pkg-config
protobuf
protoc-gen-go
protoc-gen-go-grpc
];
buildInputs = [
hyperscan
];
preBuild = ''
# Compile proto files
make -C agent-plugins-grpc go
'';
postInstall = ''
mv $out/bin/SecretScanner $out/bin/$pname
'';
meta = with lib; {
description = "Tool to find secrets and passwords in container images and file systems";
mainProgram = "secretscanner";
homepage = "https://github.com/deepfence/SecretScanner";
changelog = "https://github.com/deepfence/SecretScanner/releases/tag/v${version}";
platforms = [ "x86_64-linux" ];
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}
|