2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "wapiti";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "3.1.6";
|
2021-12-30 13:39:12 +00:00
|
|
|
format = "setuptools";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wapiti-scanner";
|
|
|
|
repo = pname;
|
2023-02-09 11:40:11 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-b377nPXvpxg+WDNgjxm2RoJ5jNt7MTES2Bspxsvo/wc=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2021-12-26 17:43:05 +00:00
|
|
|
aiocache
|
|
|
|
aiosqlite
|
2023-02-09 11:40:11 +00:00
|
|
|
arsenic
|
2021-04-05 15:23:46 +00:00
|
|
|
beautifulsoup4
|
2021-12-30 13:39:12 +00:00
|
|
|
brotli
|
2021-04-05 15:23:46 +00:00
|
|
|
browser-cookie3
|
2021-08-05 21:33:18 +00:00
|
|
|
cryptography
|
2021-12-26 17:43:05 +00:00
|
|
|
dnspython
|
2022-04-15 01:41:22 +00:00
|
|
|
httpcore
|
2021-08-05 21:33:18 +00:00
|
|
|
httpx
|
2021-12-30 13:39:12 +00:00
|
|
|
humanize
|
2022-07-14 12:49:19 +00:00
|
|
|
importlib-metadata
|
2021-12-26 17:43:05 +00:00
|
|
|
loguru
|
|
|
|
Mako
|
|
|
|
markupsafe
|
2022-07-14 12:49:19 +00:00
|
|
|
mitmproxy
|
2021-04-05 15:23:46 +00:00
|
|
|
six
|
2021-12-26 17:43:05 +00:00
|
|
|
sqlalchemy
|
2021-04-05 15:23:46 +00:00
|
|
|
tld
|
|
|
|
yaswfp
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ httpx.optional-dependencies.brotli
|
2022-07-14 12:49:19 +00:00
|
|
|
++ httpx.optional-dependencies.socks;
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2021-08-05 21:33:18 +00:00
|
|
|
respx
|
|
|
|
pytest-asyncio
|
2021-04-05 15:23:46 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-08-05 21:33:18 +00:00
|
|
|
# Ignore pinned versions
|
2022-04-15 01:41:22 +00:00
|
|
|
sed -i -e "s/==[0-9.]*//;s/>=[0-9.]*//" setup.py
|
2022-07-14 12:49:19 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner"' ""
|
2021-08-05 21:33:18 +00:00
|
|
|
substituteInPlace setup.cfg \
|
2021-12-26 17:43:05 +00:00
|
|
|
--replace " --cov --cov-report=xml" ""
|
2021-08-05 21:33:18 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
2021-04-05 15:23:46 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests requires network access
|
|
|
|
"test_attr"
|
|
|
|
"test_bad_separator_used"
|
|
|
|
"test_blind"
|
|
|
|
"test_chunked_timeout"
|
|
|
|
"test_cookies_detection"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_cookies"
|
2021-04-05 15:23:46 +00:00
|
|
|
"test_csrf_cases"
|
|
|
|
"test_detection"
|
|
|
|
"test_direct"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_dom_detection"
|
|
|
|
"test_drop_cookies"
|
2021-04-05 15:23:46 +00:00
|
|
|
"test_escape_with_style"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_explorer_extract_links"
|
2021-04-05 15:23:46 +00:00
|
|
|
"test_explorer_filtering"
|
|
|
|
"test_false"
|
|
|
|
"test_frame"
|
|
|
|
"test_headers_detection"
|
|
|
|
"test_html_detection"
|
|
|
|
"test_implies_detection"
|
|
|
|
"test_inclusion_detection"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_merge_with_and_without_redirection"
|
2021-04-05 15:23:46 +00:00
|
|
|
"test_meta_detection"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_multi_detection"
|
2021-04-05 15:23:46 +00:00
|
|
|
"test_no_crash"
|
|
|
|
"test_options"
|
|
|
|
"test_out_of_band"
|
|
|
|
"test_partial_tag_name_escape"
|
|
|
|
"test_prefix_and_suffix_detection"
|
|
|
|
"test_qs_limit"
|
|
|
|
"test_rare_tag_and_event"
|
|
|
|
"test_redirect_detection"
|
|
|
|
"test_request_object"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_save_and_restore_state"
|
2021-04-05 15:23:46 +00:00
|
|
|
"test_script"
|
|
|
|
"test_ssrf"
|
|
|
|
"test_tag_name_escape"
|
|
|
|
"test_timeout"
|
|
|
|
"test_title_false_positive"
|
|
|
|
"test_title_positive"
|
|
|
|
"test_true_positive_request_count"
|
2021-12-26 17:43:05 +00:00
|
|
|
"test_unregistered_cname"
|
2021-04-05 15:23:46 +00:00
|
|
|
"test_url_detection"
|
2022-04-15 01:41:22 +00:00
|
|
|
"test_verify_dns"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_vulnerabilities"
|
2021-04-05 15:23:46 +00:00
|
|
|
"test_warning"
|
|
|
|
"test_whole"
|
|
|
|
"test_xss_inside_tag_input"
|
|
|
|
"test_xss_inside_tag_link"
|
|
|
|
"test_xss_uppercase_no_script"
|
|
|
|
"test_xss_with_strong_csp"
|
|
|
|
"test_xss_with_weak_csp"
|
|
|
|
"test_xxe"
|
2021-08-05 21:33:18 +00:00
|
|
|
# Requires a PHP installation
|
|
|
|
"test_cookies"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_loknop_lfi_to_rce"
|
2022-04-15 01:41:22 +00:00
|
|
|
"test_redirect"
|
2023-02-09 11:40:11 +00:00
|
|
|
"test_timesql"
|
|
|
|
"test_xss_inside_href_link"
|
|
|
|
"test_xss_inside_src_iframe"
|
2021-12-30 13:39:12 +00:00
|
|
|
# TypeError: Expected bytes or bytes-like object got: <class 'str'>
|
2021-09-18 10:52:07 +00:00
|
|
|
"test_persister_upload"
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
disabledTestPaths = [
|
2022-07-14 12:49:19 +00:00
|
|
|
# Requires sslyze which is obsolete and was removed
|
2022-04-15 01:41:22 +00:00
|
|
|
"tests/attack/test_mod_ssl.py"
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"wapitiCore"
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Web application vulnerability scanner";
|
|
|
|
longDescription = ''
|
|
|
|
Wapiti allows you to audit the security of your websites or web applications.
|
|
|
|
It performs "black-box" scans (it does not study the source code) of the web
|
|
|
|
application by crawling the webpages of the deployed webapp, looking for
|
|
|
|
scripts and forms where it can inject data. Once it gets the list of URLs,
|
|
|
|
forms and their inputs, Wapiti acts like a fuzzer, injecting payloads to see
|
|
|
|
if a script is vulnerable.
|
|
|
|
'';
|
|
|
|
homepage = "https://wapiti-scanner.github.io/";
|
2023-02-09 11:40:11 +00:00
|
|
|
changelog = "https://github.com/wapiti-scanner/wapiti/blob/${version}/doc/ChangeLog_Wapiti";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = with licenses; [ gpl2Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|