about summary refs log tree commit diff
path: root/pkgs/tools/security/pentestgpt/default.nix
blob: 328ba0ca9a8f933d0e93d69e6ad2654d04f07518 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 ];
  };
}