trufflehog: 2.2.1 -> 3.21.0

This commit is contained in:
Sandro Jäckel
2022-12-30 05:01:53 +01:00
parent a8ce53810a
commit c18d193adc
+24 -35
View File
@@ -1,43 +1,32 @@
{ lib
, python3Packages
, fetchFromGitHub
, buildGoModule
}:
let
truffleHogRegexes = python3Packages.buildPythonPackage rec {
pname = "truffleHogRegexes";
version = "0.0.7";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "b81dfc60c86c1e353f436a0e201fd88edb72d5a574615a7858485c59edf32405";
};
buildGoModule rec {
pname = "trufflehog";
version = "3.21.0";
src = fetchFromGitHub {
owner = "trufflesecurity";
repo = "trufflehog";
rev = "v${version}";
sha256 = "sha256-rse5uyQ7EUBhs0IyC92B/Z7YCeNIXTlZEqrlcjFekgA=";
};
in
python3Packages.buildPythonApplication rec {
pname = "truffleHog";
version = "2.2.1";
src = python3Packages.fetchPypi {
inherit pname version;
hash = "sha256-fw0JyM2iqQrkL4FAXllEozJdkKWELS3eAURx5NZcceQ=";
};
vendorSha256 = "sha256-KyyJ7hUWF29L8oB9GkJ918/BQoLMsz+tStT2T9Azunk=";
# Relax overly restricted version constraint
postPatch = ''
substituteInPlace setup.py --replace "GitPython ==" "GitPython >= "
'';
# Test cases run git clone and require network access
doCheck = false;
propagatedBuildInputs = [
python3Packages.gitpython
truffleHogRegexes
];
postInstall = ''
rm $out/bin/{generate,snifftest}
'';
# Test cases run git clone and require network access
doCheck = false;
meta = with lib; {
homepage = "https://github.com/dxa4481/truffleHog";
description = "Searches through git repositories for high entropy strings and secrets, digging deep into commit history";
license = with licenses; [ gpl2 ];
maintainers = with maintainers; [ bhipple ];
};
}
meta = with lib; {
description = "Find credentials all over the place";
homepage = "https://github.com/trufflesecurity/trufflehog";
license = with licenses; [ agpl3 ];
maintainers = with maintainers; [ ];
};
}