From 58fa3c0b06baa866ca260c793eebccba5b41082e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 18 Aug 2024 10:23:04 +0200 Subject: [PATCH 1/2] python312Packages.prance: refactor --- .../python-modules/prance/default.nix | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/prance/default.nix b/pkgs/development/python-modules/prance/default.nix index 36d40f0711d9..0017582e25cc 100644 --- a/pkgs/development/python-modules/prance/default.nix +++ b/pkgs/development/python-modules/prance/default.nix @@ -13,6 +13,7 @@ setuptools-scm, six, swagger-spec-validator, + pytest-cov-stub, pytestCheckHook, openapi-spec-validator, }: @@ -20,26 +21,21 @@ buildPythonPackage rec { pname = "prance"; version = "23.06.21.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "RonnyPfannschmidt"; - repo = pname; - rev = "v${version}"; + repo = "prance"; + rev = "refs/tags/v${version}"; fetchSubmodules = true; hash = "sha256-p+LZbQal4DPeMp+eJ2O83rCaL+QIUDcU34pZhYdN4bE="; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" "" - ''; + build-system = [ setuptools-scm ]; - nativeBuildInputs = [ setuptools-scm ]; - - propagatedBuildInputs = [ + dependencies = [ chardet packaging requests @@ -56,6 +52,7 @@ buildPythonPackage rec { }; nativeCheckInputs = [ + pytest-cov-stub pytestCheckHook ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); @@ -70,11 +67,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "prance" ]; meta = with lib; { - changelog = "https://github.com/RonnyPfannschmidt/prance/blob/${src.rev}/CHANGES.rst"; description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser"; - mainProgram = "prance"; homepage = "https://github.com/RonnyPfannschmidt/prance"; + changelog = "https://github.com/RonnyPfannschmidt/prance/blob/${src.rev}/CHANGES.rst"; license = licenses.mit; maintainers = [ ]; + mainProgram = "prance"; }; } From 890f637ca685be08b49537457f59bcb9f2008c45 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 18 Aug 2024 10:26:35 +0200 Subject: [PATCH 2/2] wapiti: 3.1.8 -> 3.2.0 Changelog: https://github.com/wapiti-scanner/wapiti/blob/3.2.0/doc/ChangeLog_Wapiti --- pkgs/tools/security/wapiti/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/security/wapiti/default.nix b/pkgs/tools/security/wapiti/default.nix index 77be8d9d5358..c2e2e742ab04 100644 --- a/pkgs/tools/security/wapiti/default.nix +++ b/pkgs/tools/security/wapiti/default.nix @@ -6,27 +6,26 @@ python3.pkgs.buildPythonApplication rec { pname = "wapiti"; - version = "3.1.8"; + version = "3.2.0"; pyproject = true; src = fetchFromGitHub { owner = "wapiti-scanner"; repo = "wapiti"; rev = "refs/tags/${version}"; - hash = "sha256-2ssbczUa4pTA5Fai+sK1hES8skJMIHxa/R2hNIiEVLs="; + hash = "sha256-Ekh31MXqxY6iSyQRX0YZ0Tl7DFhYqGtOepYS/VObZc0="; }; postPatch = '' # Remove code coverage checking substituteInPlace pyproject.toml \ - --replace "--cov --cov-report=xml" "" + --replace-fail "--cov --cov-report=xml" "" ''; pythonRelaxDeps = true; build-system = with python3.pkgs; [ setuptools ]; - dependencies = with python3.pkgs; [ @@ -41,10 +40,12 @@ python3.pkgs.buildPythonApplication rec { httpcore httpx httpx-ntlm + humanize loguru mako markupsafe mitmproxy + prance pyasn1 six sqlalchemy @@ -52,7 +53,8 @@ python3.pkgs.buildPythonApplication rec { yaswfp ] ++ httpx.optional-dependencies.brotli - ++ httpx.optional-dependencies.socks; + ++ httpx.optional-dependencies.socks + ++ prance.optional-dependencies.osv; __darwinAllowLocalNetworking = true; @@ -103,6 +105,7 @@ python3.pkgs.buildPythonApplication rec { "test_save_and_restore_state" "test_script" "test_ssrf" + "test_swagger_parser" "test_tag_name_escape" "test_timeout" "test_title_false_positive" @@ -124,6 +127,7 @@ python3.pkgs.buildPythonApplication rec { "test_cookies" "test_fallback_to_html_injection" "test_loknop_lfi_to_rce" + "test_open_redirect" "test_redirect" "test_timesql" "test_xss_inside_href_link"