c7e6337bd0
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, testers
|
|
, trufflehog
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "trufflehog";
|
|
version = "3.33.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "trufflesecurity";
|
|
repo = "trufflehog";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-ZbsWPyLPN6qTMyEuisLA589B5JgYV9LixuRV91G/6oY=";
|
|
};
|
|
|
|
vendorHash = "sha256-sSpRu6zLIvllrDYdtrj3oD3pCVs9ucSXbu3IYTqjT+k=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=github.com/trufflesecurity/trufflehog/v3/pkg/version.BuildVersion=${version}"
|
|
];
|
|
|
|
# Test cases run git clone and require network access
|
|
doCheck = false;
|
|
|
|
postInstall = ''
|
|
rm $out/bin/{generate,snifftest}
|
|
'';
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion {
|
|
package = trufflehog;
|
|
};
|
|
};
|
|
|
|
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}";
|
|
license = with licenses; [ agpl3Only ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|