diff options
Diffstat (limited to 'pkgs/development/tools/appthreat-depscan/default.nix')
-rw-r--r-- | pkgs/development/tools/appthreat-depscan/default.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/tools/appthreat-depscan/default.nix b/pkgs/development/tools/appthreat-depscan/default.nix new file mode 100644 index 0000000000000..e93dfe845436e --- /dev/null +++ b/pkgs/development/tools/appthreat-depscan/default.nix @@ -0,0 +1,52 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "appthreat-depscan"; + version = "2.1.2"; + + src = fetchFromGitHub { + owner = "AppThreat"; + repo = "dep-scan"; + rev = "v${version}"; + hash = "sha256-hRmTx0qs/QnDLl4KhGbKw5Mucq4wQCaCIkeObrZlJSI="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + appthreat-vulnerability-db + defusedxml + pyyaml + rich + ]; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pytest.ini \ + --replace " --cov-append --cov-report term --cov depscan" "" + ''; + + preCheck = '' + export HOME=$(mktemp -d); + ''; + + disabledTests = [ + # Assertion Error + "test_query_metadata2" + ]; + + pythonImportsCheck = [ + "depscan" + ]; + + meta = with lib; { + description = "Tool to audit dependencies based on known vulnerabilities and advisories"; + homepage = "https://github.com/AppThreat/dep-scan"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |