nixpkgs/pkgs/tools/security/gitleaks/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
933 B
Nix
Raw Normal View History

2021-03-01 22:30:56 +00:00
{ lib
, buildGoModule
2021-01-19 20:56:03 +00:00
, fetchFromGitHub
}:
buildGoModule rec {
pname = "gitleaks";
2022-04-24 20:50:22 +00:00
version = "8.8.2";
2021-01-19 20:56:03 +00:00
src = fetchFromGitHub {
owner = "zricethezav";
repo = pname;
rev = "v${version}";
2022-04-24 20:50:22 +00:00
sha256 = "sha256-WEVlddqG7t01yl05EujxH/XXBYZxePSKY6IQwkKUkws=";
2021-01-19 20:56:03 +00:00
};
2022-04-21 06:15:14 +00:00
vendorSha256 = "sha256-X8z9iKRR3PptNHwy1clZG8QsClsjbW45nZb2fHGfSYk=";
2021-01-19 20:56:03 +00:00
2021-08-21 08:23:50 +00:00
ldflags = [
2021-12-19 17:54:19 +00:00
"-s"
"-w"
"-X github.com/zricethezav/gitleaks/v${lib.versions.major version}/version.Version=${version}"
2021-08-21 08:23:50 +00:00
];
2021-12-19 17:54:19 +00:00
# With v8 the config tests are are blocking
doCheck = false;
2021-01-19 20:56:03 +00:00
meta = with lib; {
description = "Scan git repos (or files) for secrets";
longDescription = ''
Gitleaks is a SAST tool for detecting hardcoded secrets like passwords,
2021-12-19 17:54:19 +00:00
API keys and tokens in git repos.
2021-01-19 20:56:03 +00:00
'';
homepage = "https://github.com/zricethezav/gitleaks";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}