git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #117984 from fabaff/wapiti
commit59d78cf030cee819c79239230970d022d097c09a authorSandro <sandro.jaeckel@gmail.com> dateThu 1 Apr 2021, 01:35 (6 years ago) parent4a2a8d0be91fea
4 files changed+140
pkgs/development/python-modules/yaswfp/default.nix+30 pkgs/tools/security/wapiti/default.nix+106 pkgs/top-level/all-packages.nix+2 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/yaswfp/default.nixnew file+30
@@ -0,0 +1,30 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestCheckHook
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "yaswfp";
9+ version = "unstable-20210331";
10+
11+ src = fetchFromGitHub {
12+ owner = "facundobatista";
13+ repo = pname;
14+ rev = "2a2cc6ca4c0b4d52bd2e658fb5f80fdc0db4924c";
15+ sha256 = "1dxdz89hlycy1rnn269fwl1f0qxgxqarkc0ivs2m77f8xba2qgj9";
16+ };
17+
18+ checkInputs = [
19+ pytestCheckHook
20+ ];
21+
22+ pythonImportsCheck = [ "yaswfp" ];
23+
24+ meta = with lib; {
25+ description = "Python SWF Parser";
26+ homepage = "https://github.com/facundobatista/yaswfp";
27+ license = with licenses; [ gpl3Only ];
28+ maintainers = with maintainers; [ fab ];
29+ };
30+}
pkgs/tools/security/wapiti/default.nixnew file+106
@@ -0,0 +1,106 @@
1+{ lib
2+, fetchFromGitHub
3+, python3
4+}:
5+
6+python3.pkgs.buildPythonApplication rec {
7+ pname = "wapiti";
8+ version = "3.0.4";
9+
10+ src = fetchFromGitHub {
11+ owner = "wapiti-scanner";
12+ repo = pname;
13+ rev = version;
14+ sha256 = "0wnz4nq1q5y74ksb1kcss9vdih0kbrmnkfbyc2ngd9id1ixfamxb";
15+ };
16+
17+ nativeBuildInputs = with python3.pkgs; [
18+ pytest-runner
19+ ];
20+
21+ propagatedBuildInputs = with python3.pkgs; [
22+ beautifulsoup4
23+ browser-cookie3
24+ Mako
25+ markupsafe
26+ pysocks
27+ requests
28+ six
29+ tld
30+ yaswfp
31+ ] ++ lib.optionals (python3.pythonOlder "3.8") [ importlib-metadata ];
32+
33+ checkInputs = with python3.pkgs; [
34+ responses
35+ pytestCheckHook
36+ ];
37+
38+ postPatch = ''
39+ # Is already fixed in the repo. Will be part of the next release
40+ substituteInPlace setup.py \
41+ --replace "importlib_metadata==2.0.0" "importlib_metadata"
42+ '';
43+
44+ disabledTests = [
45+ # Tests requires network access
46+ "test_attr"
47+ "test_bad_separator_used"
48+ "test_blind"
49+ "test_chunked_timeout"
50+ "test_cookies_detection"
51+ "test_csrf_cases"
52+ "test_detection"
53+ "test_direct"
54+ "test_escape_with_style"
55+ "test_explorer_filtering"
56+ "test_false"
57+ "test_frame"
58+ "test_headers_detection"
59+ "test_html_detection"
60+ "test_implies_detection"
61+ "test_inclusion_detection"
62+ "test_meta_detection"
63+ "test_no_crash"
64+ "test_options"
65+ "test_out_of_band"
66+ "test_partial_tag_name_escape"
67+ "test_prefix_and_suffix_detection"
68+ "test_qs_limit"
69+ "test_rare_tag_and_event"
70+ "test_redirect_detection"
71+ "test_request_object"
72+ "test_script"
73+ "test_ssrf"
74+ "test_tag_name_escape"
75+ "test_timeout"
76+ "test_title_false_positive"
77+ "test_title_positive"
78+ "test_true_positive_request_count"
79+ "test_url_detection"
80+ "test_warning"
81+ "test_whole"
82+ "test_xss_inside_tag_input"
83+ "test_xss_inside_tag_link"
84+ "test_xss_uppercase_no_script"
85+ "test_xss_with_strong_csp"
86+ "test_xss_with_weak_csp"
87+ "test_xxe"
88+ ];
89+
90+ pythonImportsCheck = [ "wapitiCore" ];
91+
92+ meta = with lib; {
93+ description = "Web application vulnerability scanner";
94+ longDescription = ''
95+ Wapiti allows you to audit the security of your websites or web applications.
96+ It performs "black-box" scans (it does not study the source code) of the web
97+ application by crawling the webpages of the deployed webapp, looking for
98+ scripts and forms where it can inject data. Once it gets the list of URLs,
99+ forms and their inputs, Wapiti acts like a fuzzer, injecting payloads to see
100+ if a script is vulnerable.
101+ '';
102+ homepage = "https://wapiti-scanner.github.io/";
103+ license = with licenses; [ gpl2Only ];
104+ maintainers = with maintainers; [ fab ];
105+ };
106+}
pkgs/top-level/all-packages.nix+2
@@ -26296,6 +26296,8 @@ in
2629626296 pythonPackages = python3Packages;
2629726297 };
2629826298
26299+ wapiti = callPackage ../tools/security/wapiti { };
26300+
2629926301 way-cooler = throw ("way-cooler is abandoned by its author: " +
2630026302 "https://way-cooler.org/blog/2020/01/09/way-cooler-post-mortem.html");
2630126303
pkgs/top-level/python-packages.nix+2
@@ -9028,6 +9028,8 @@ in {
90289028
90299029 yarl = callPackage ../development/python-modules/yarl { };
90309030
9031+ yaswfp = callPackage ../development/python-modules/yaswfp { };
9032+
90319033 yattag = callPackage ../development/python-modules/yattag { };
90329034
90339035 ydiff = callPackage ../development/python-modules/ydiff { };