depot/third_party/nixpkgs/pkgs/tools/security/trufflehog/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

47 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, testers
, trufflehog
}:
buildGoModule rec {
pname = "trufflehog";
version = "3.63.8";
src = fetchFromGitHub {
owner = "trufflesecurity";
repo = "trufflehog";
rev = "refs/tags/v${version}";
hash = "sha256-vXHMTuYANVUigYKEYwfT9JwqoEYFIPbNkylqj3H+88E=";
};
vendorHash = "sha256-ikWC5QhLgPmXq304EhSrOBYBg2IeUDIBRVt9TuyOqsA=";
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 ];
};
}