1{ lib
2, buildPythonPackage
3, click
4, fetchFromGitHub
5, mock
6, pytestCheckHook
7, pythonOlder
8, requests
9, tldextract
10, urllib3
11, validators
12}:
13
14buildPythonPackage rec {
15 pname = "corsair-scan";
16 version = "0.2.0";
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "Santandersecurityresearch";
21 repo = "corsair_scan";
22 rev = "v${version}";
23 sha256 = "09jsv5bag7mjy0rxsxjzmg73rjl7qknzr0d7a7himd7v6a4ikpmk";
24 };
25
26 propagatedBuildInputs = [
27 validators
28 requests
29 urllib3
30 tldextract
31 click
32 ];
33
34 checkInputs = [
35 mock
36 pytestCheckHook
37 ];
38
39 postPatch = ''
40 substituteInPlace setup.py \
41 --replace "'pytest-runner'," ""
42 '';
43
44 pythonImportsCheck = [ "corsair_scan" ];
45
46 meta = with lib; {
47 description = "Python module to check for Cross-Origin Resource Sharing (CORS) misconfigurations";
48 homepage = "https://github.com/Santandersecurityresearch/corsair_scan";
49 license = with licenses; [ mit ];
50 maintainers = with maintainers; [ fab ];
51 };
52}