2021-02-19 19:06:45 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, hyperscan
|
|
|
|
, pkg-config
|
2023-07-15 17:15:38 +00:00
|
|
|
, protobuf
|
|
|
|
, protoc-gen-go
|
|
|
|
, protoc-gen-go-grpc
|
2021-02-19 19:06:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "secretscanner";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.2.0";
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepfence";
|
|
|
|
repo = "SecretScanner";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
hash = "sha256-lTUZLuEiC9xpHYWn3uv4ZtbvHX6ETsjxacjd/O0kU8I=";
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
vendorHash = "sha256-lB+fiSdflIYGw0hMN0a9IOtRcJwYEUPQqaeU7mAfSQs=";
|
2021-02-19 19:06:45 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
excludedPackages = [
|
|
|
|
"./agent-plugins-grpc/proto" # No need to build submodules
|
|
|
|
];
|
2021-02-19 19:06:45 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
protobuf
|
|
|
|
protoc-gen-go
|
|
|
|
protoc-gen-go-grpc
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
hyperscan
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
# Compile proto files
|
|
|
|
make -C agent-plugins-grpc go
|
|
|
|
'';
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/SecretScanner $out/bin/$pname
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool to find secrets and passwords in container images and file systems";
|
|
|
|
homepage = "https://github.com/deepfence/SecretScanner";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/deepfence/SecretScanner/releases/tag/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-02-19 19:06:45 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|