2024-04-10 10:42:22 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python3,
|
2023-12-14 10:38:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-09-01 15:46:42 +00:00
|
|
|
let
|
|
|
|
appthreat-vulnerability-db = (
|
|
|
|
python3.pkgs.appthreat-vulnerability-db.overrideAttrs (oldAttrs: rec {
|
|
|
|
version = "5.7.3";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-MrlgBUx3T2G46Pnah3obe5b4yKDzsAFVC/B7AHM0kZY=";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
);
|
|
|
|
|
|
|
|
in
|
2023-12-14 10:38:52 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "dep-scan";
|
2024-09-01 15:46:42 +00:00
|
|
|
version = "5.4.3";
|
2023-12-14 10:38:52 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "owasp-dep-scan";
|
|
|
|
repo = "dep-scan";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-01 15:46:42 +00:00
|
|
|
hash = "sha256-m0vDsCetOSfScu1eprrGaDJ1VuXxuNFBitK8N5GtfSQ=";
|
2023-12-14 10:38:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-10 10:42:22 +00:00
|
|
|
build-system = with python3.pkgs; [ setuptools ];
|
2023-12-14 10:38:52 +00:00
|
|
|
|
2024-03-30 10:52:37 +00:00
|
|
|
dependencies = with python3.pkgs; [
|
2023-12-14 10:38:52 +00:00
|
|
|
appthreat-vulnerability-db
|
2024-03-10 15:39:14 +00:00
|
|
|
cvss
|
2023-12-14 10:38:52 +00:00
|
|
|
defusedxml
|
|
|
|
jinja2
|
|
|
|
oras
|
2024-03-10 15:39:14 +00:00
|
|
|
packageurl-python
|
2023-12-14 10:38:52 +00:00
|
|
|
pdfkit
|
|
|
|
pygithub
|
|
|
|
pyyaml
|
|
|
|
quart
|
|
|
|
rich
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
|
|
httpretty
|
2024-08-23 13:12:04 +00:00
|
|
|
pytest-cov-stub
|
2023-12-14 10:38:52 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-04-10 10:42:22 +00:00
|
|
|
pythonImportsCheck = [ "depscan" ];
|
2023-12-14 10:38:52 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test is not present
|
|
|
|
"test_query_metadata2"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Security and risk audit tool based on known vulnerabilities, advisories, and license limitations for project dependencies";
|
|
|
|
homepage = "https://github.com/owasp-dep-scan/dep-scan";
|
|
|
|
changelog = "https://github.com/owasp-dep-scan/dep-scan/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
mainProgram = "dep-scan";
|
|
|
|
};
|
|
|
|
}
|