2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildGoModule,
|
|
|
|
testers,
|
|
|
|
trufflehog,
|
2022-12-17 10:02:37 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "trufflehog";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.73.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trufflesecurity";
|
|
|
|
repo = "trufflehog";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-5tyjSwuhrtiAzvS5F8TyPCZhjSasTWQE9wcNGDevucE=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
vendorHash = "sha256-eK4YwNkBvC7VW5Cn6/M4clN83LGRNuw5jpjtnM0B9g8=";
|
|
|
|
|
|
|
|
proxyVendor = true;
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion=${version}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
# Test cases run git clone and require network access
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
postInstall = ''
|
|
|
|
rm $out/bin/{generate,snifftest}
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
passthru = {
|
2024-04-21 15:54:59 +00:00
|
|
|
tests.version = testers.testVersion { package = trufflehog; };
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Find credentials all over the place";
|
|
|
|
homepage = "https://github.com/trufflesecurity/trufflehog";
|
|
|
|
changelog = "https://github.com/trufflesecurity/trufflehog/releases/tag/v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
license = with licenses; [ agpl3Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
}
|