about summary refs log tree commit diff
path: root/pkgs/tools/security/pentestgpt/default.nix
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-06-30 20:20:51 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2023-06-30 20:23:03 +0200
commit059e9e432c7e6f9e105afb29d0a5a15c265f3698 (patch)
treed00937e3761442c8139f52db54e351344c2b81be /pkgs/tools/security/pentestgpt/default.nix
parenta7e4673e15103ded6a90c5331bbf7cdd4942b5a6 (diff)
pentestgpt: init at unstable-2023-06-27
Diffstat (limited to 'pkgs/tools/security/pentestgpt/default.nix')
-rw-r--r--pkgs/tools/security/pentestgpt/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/tools/security/pentestgpt/default.nix b/pkgs/tools/security/pentestgpt/default.nix
new file mode 100644
index 0000000000000..328ba0ca9a8f9
--- /dev/null
+++ b/pkgs/tools/security/pentestgpt/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, fetchFromGitHub
+, python3
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "pentestgpt";
+  version = "unstable-2023-06-27";
+  format = "setuptools";
+
+  src = fetchFromGitHub {
+    owner = "GreyDGL";
+    repo = "PentestGPT";
+    rev = "e63a91f466a035e036827e8f492bc47c5c1135af";
+    hash = "sha256-m0R/kMmbr5Ixuqvw6ZRoaAGCnI3j86Iwk4+TYqv0WbU=";
+  };
+
+  postPatch = ''
+    substituteInPlace requirements.txt \
+      --replace "playwright==1.28.0" "playwright" \
+      --replace "beautifulsoup4~=4.11.2" "" \
+      --replace "black" "" \
+      --replace "pytest" ""
+  '';
+
+  propagatedBuildInputs = with python3.pkgs; [
+    beautifulsoup4
+    colorama
+    google
+    langchain
+    loguru
+    openai
+    playwright
+    prompt-toolkit
+    pycookiecheat
+    pyyaml
+    requests
+    rich
+    sqlmap
+    tiktoken
+  ];
+
+  # Tests require network access
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "pentestgpt"
+  ];
+
+  meta = with lib; {
+    description = "GPT-empowered penetration testing tool";
+    homepage = "https://github.com/GreyDGL/PentestGPT";
+    changelog = "https://github.com/GreyDGL/PentestGPT/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}