2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
2022-12-17 10:02:37 +00:00
|
|
|
, pythonOlder
|
|
|
|
, gitpython
|
2020-04-24 23:36:52 +00:00
|
|
|
, pbr
|
|
|
|
, pyyaml
|
2022-12-17 10:02:37 +00:00
|
|
|
, rich
|
2020-04-24 23:36:52 +00:00
|
|
|
, stevedore
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bandit";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "1.7.7";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-UnkGvsYIjLSZquMbyWKGS053Vp6dUp7lHfOpO0uKsoo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
nativeBuildInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
pbr
|
2022-12-17 10:02:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
gitpython
|
2020-04-24 23:36:52 +00:00
|
|
|
pyyaml
|
2022-12-17 10:02:37 +00:00
|
|
|
rich
|
2020-04-24 23:36:52 +00:00
|
|
|
stevedore
|
|
|
|
];
|
|
|
|
|
|
|
|
# Framework is Tox, tox performs 'pip install' inside the virtual-env
|
|
|
|
# and this requires Network Connectivity
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"bandit"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Security oriented static analyser for python code";
|
2022-12-17 10:02:37 +00:00
|
|
|
homepage = "https://bandit.readthedocs.io/";
|
|
|
|
changelog = "https://github.com/PyCQA/bandit/releases/tag/${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ kamadorueda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|