python310Packages.bc-detect-secrets: init at 1.4.14

This commit is contained in:
Fabian Affolter 2023-03-13 23:40:12 +01:00
parent 2b66b9019f
commit e0c6fb80a3
2 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,80 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, gibberish-detector
, mock
, pkgs
, pyahocorasick
, pytestCheckHook
, pythonOlder
, pyyaml
, requests
, responses
, unidiff
}:
buildPythonPackage rec {
pname = "bc-detect-secrets";
version = "1.4.14";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bridgecrewio";
repo = "detect-secrets";
rev = "refs/tags/${version}";
hash = "sha256-WgUbVpn5KoayiWv3sYp+hZxqfQg73k0pXkxgUK8wrPg=";
};
propagatedBuildInputs = [
pyyaml
requests
unidiff
];
passthru.optional-dependencies = {
word_list = [
pyahocorasick
];
gibberish = [
gibberish-detector
];
};
nativeCheckInputs = [
mock
pkgs.gitMinimal
pytestCheckHook
responses
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
preCheck = ''
export HOME=$(mktemp -d);
'';
disabledTests = [
# Tests are failing for various reasons (missing git repo, missing test data, etc.)
"test_baseline_filters_out_known_secrets"
"test_make_decisions"
"test_saves_to_baseline"
"test_start_halfway"
"TestCreate"
"TestDiff"
"TestGetFilesToScan"
"TestLineNumberChanges"
"TestModifiesBaselineFromVersionChange"
];
pythonImportsCheck = [
"detect_secrets"
];
meta = with lib; {
description = "Tool to detect secrets in the code";
homepage = "https://github.com/bridgecrewio/detect-secrets";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -1209,6 +1209,8 @@ self: super: with self; {
bbox = callPackage ../development/python-modules/bbox { };
bc-detect-secrets = callPackage ../development/python-modules/bc-detect-secrets { };
bc-python-hcl2 = callPackage ../development/python-modules/bc-python-hcl2 { };
bcdoc = callPackage ../development/python-modules/bcdoc { };