about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/apachetomcatscanner/default.nix
blob: 22492472162039a87011aa46370c6317b4a9fafd (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
{ lib
, python3
, fetchFromGitHub
}:

python3.pkgs.buildPythonApplication rec {
  pname = "apachetomcatscanner";
  version = "3.5";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "p0dalirius";
    repo = "ApacheTomcatScanner";
    rev = "refs/tags/${version}";
    hash = "sha256-ChVVXUjm6y71iRs64Kv63oiOG1GSqmx6J0YiGtEI0ao=";
  };

  # Posted a PR for discussion upstream that can be followed:
  # https://github.com/p0dalirius/ApacheTomcatScanner/pull/32
  postPatch = ''
    sed -i '/apachetomcatscanner=apachetomcatscanner\.__main__:main/d' setup.py
  '';

  propagatedBuildInputs = with python3.pkgs; [
    requests
    sectools
    xlsxwriter
  ];

  # Project has no test
  doCheck = false;

  pythonImportsCheck = [
    "apachetomcatscanner"
  ];

  meta = with lib; {
    description = "Tool to scan for Apache Tomcat server vulnerabilities";
    mainProgram = "ApacheTomcatScanner";
    homepage = "https://github.com/p0dalirius/ApacheTomcatScanner";
    changelog = "https://github.com/p0dalirius/ApacheTomcatScanner/releases/tag/${version}";
    license = with licenses; [ gpl2Only ];
    maintainers = with maintainers; [ fab ];
  };
}