From d5e77a5187b10c019d106a5447b0c49535e7aeb5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 1 Apr 2024 21:03:18 +0200 Subject: [PATCH] offat: init at 0.16.0 Tool to test APIs for prevalent vulnerabilities https://github.com/OWASP/OFFAT/ --- pkgs/by-name/of/offat/package.nix | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pkgs/by-name/of/offat/package.nix diff --git a/pkgs/by-name/of/offat/package.nix b/pkgs/by-name/of/offat/package.nix new file mode 100644 index 000000000000..e9942dbeb0c4 --- /dev/null +++ b/pkgs/by-name/of/offat/package.nix @@ -0,0 +1,60 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "offat"; + version = "0.16.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "OWASP"; + repo = "OFFAT"; + rev = "refs/tags/v${version}"; + hash = "sha256-ald+hanICvY0jTgL7GtIMiArLWazykaJAJSfzPKE4/I="; + }; + + sourceRoot = "${src.name}/src"; + + build-system = with python3.pkgs; [ + poetry-core + ]; + + dependencies = with python3.pkgs; [ + aiohttp + aiolimiter + fastapi + openapi-spec-validator + requests + rich + setuptools + tenacity + ]; + + passthru.optional-dependencies = { + api = with python3.pkgs; [ + fastapi + uvicorn + redis + rq + python-dotenv + ]; + }; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "offat" + ]; + + meta = with lib; { + description = "Tool to test APIs for prevalent vulnerabilities"; + homepage = "https://github.com/OWASP/OFFAT/"; + changelog = "https://github.com/OWASP/OFFAT/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + mainProgram = "offat"; + }; +}