
Gixy-Next v0.7.1
Gixy-Next: ماسح أمان تهيئة NGINX ومدقق الأداء
Gixy-Next: ماسح أمني لإعدادات NGINX لعمليات التدقيق الأمني
نظرة عامة
Gixy-Next (Gixy) هو ماسح أمني مفتوح المصدر لإعدادات NGINX وأداة تقوية تقوم بتحليل ملف nginx.conf بشكل ثابت للكشف عن الأخطاء الأمنية في الإعدادات، وثغرات التقوية، والمزالق الشائعة في الأداء قبل وصولها إلى بيئة الإنتاج. وهو fork يُصان بنشاط من Gixy الخاص بـ Yandex. الكود المصدري لـ Gixy-Next متاح على GitHub.
يمكن أيضًا تشغيل Gixy-Next في المتصفح من هذه الصفحة. لا حاجة للتنزيل؛ يمكنك فحص إعداداتك على الموقع الإلكتروني (محليًا، باستخدام WebAssembly).
البدء السريع
يُوزَّع Gixy-Next (واجهة سطر الأوامر gixy أو gixy-next) على PyPI. يمكنك تثبيته باستخدام pip أو uv:
# pip
pip3 install gixy-next
# uv
uv pip install gixy-next
يمكنك بعد ذلك تشغيله:
# gixy defaults to reading /etc/nginx/nginx.conf
gixy
# But you can also specify a path to the configuration
gixy /opt/nginx.conf
يمكنك أيضًا تصدير إعدادات NGINX الخاصة بك إلى ملف تفريغ واحد (انظر nginx -T Live Configuration Dump):
# Dumps the full NGINX configuration into a single file (including all includes)
nginx -T > ./nginx-dump.conf
# Scan the dump elsewhere (or via stdin):
gixy ./nginx-dump.conf
# or
cat ./nginx-dump.conf | gixy -
الماسح القائم على الويب
بدلًا من تنزيل Gixy-Next وتشغيله محليًا، يمكنك استخدام هذه الصفحة وفحص إعدادات من متصفح الويب الخاص بك (محليًا، باستخدام WebAssembly).
الفحص باستخدام Docker
يتوفر Gixy-Next كصورة Docker من Docker Hub أو GitHub Registry.
افحص ملف إعدادات محلي عن طريق تحميله (mount) داخل الحاوية:
# Use Github Registry
docker run --pull=always --rm -v "$PWD/nginx.conf:/nginx.conf:ro" ghcr.io/megamansec/gixy-next /nginx.conf
# Or Docker Hub
docker run --pull=always --rm -v "$PWD/nginx.conf:/nginx.conf:ro" megamansec/gixy-next /nginx.conf
افحص تفريغ إعدادات NGINX الحية:
# Dumps the full NGINX configuration into a single file (including all includes)
nginx -T > ./nginx-dump.conf
# Use Github Registry
docker run --pull=always --rm -v "$PWD/nginx-dump.conf:/nginx-dump.conf:ro" ghcr.io/megamansec/gixy-next /nginx-dump.conf
# Or Docker Hub
docker run --pull=always --rm -v "$PWD/nginx-dump.conf:/nginx-dump.conf:ro" megamansec/gixy-next /nginx-dump.conf
افحص من stdin:
# Use Github Registry
nginx -T | docker run --pull=always --rm -i ghcr.io/megamansec/gixy-next gixy-next -
# Or Docker Hub
nginx -T | docker run --pull=always --rm -i megamansec/gixy-next gixy-next -
ما الذي يمكنه فعله
يستطيع Gixy-Next اكتشاف مجموعة واسعة من الأخطاء الأمنية وأخطاء الأداء في إعدادات NGINX عبر nginx.conf وملفات الإعدادات المُضمَّنة. الإضافات التالية مدعومة:
- [add_header_content_type] Setting Content-Type via add_header
- [add_header_multiline] Multiline response headers
- [add_header_redefinition] Redefining of response headers by "add_header" directive
- [alias_traversal] Path traversal via misconfigured alias
- [allow_without_deny] Allow specified without deny
- [default_server_flag] Missing default_server flag
- [error_log_off]
error_logset tooff - [hash_without_default] Missing default in hash blocks
- [host_spoofing] Request's Host header forgery
- [http2_misdirected_request] Missing HTTP/2 misdirected-request safeguard
- [http_splitting] HTTP Response Splitting
- [if_is_evil] If is evil when used in location context
- [invalid_regex] Invalid regex capture groups
- [low_keepalive_requests] Low
keepalive_requests - [missing_worker_processes] Missing
worker_processes - [mixed_case_variable] Mixed-case variable references
- [origins] Problems with referer/origin header validation
- [overlapping_captures] Overlapping captures in rewrite redirect/args context
- [proxy_buffering_off] Disabling
proxy_buffering - [proxy_pass_normalized]
proxy_passpath normalization issues - [proxy_set_header_redefinition] Redefining of proxied request headers by "proxy_set_header" directive
- [quic_bpf_reuseport] QUIC connections silently dropped after reload
- [regex_redos] Regular expression denial of service (ReDoS)
- [resolver_external] Using external DNS nameservers
- [return_bypasses_allow_deny] Return directive bypasses allow/deny restrictions
- [ssl_ecdh_curve] Post-quantum groups stop NGINX from starting on older OpenSSL
- [ssl_stapling_letsencrypt] OCSP stapling does nothing for a Let's Encrypt certificate
- [ssl_stapling_without_resolver] OCSP stapling silently fails without a resolver
- [ssrf] Server Side Request Forgery
- [stale_dns_cache] Outdated/stale cached DNS records used in proxy_pass
- [status_page_exposed] Ensures that status_page is not exposed to the world
- [try_files_is_evil_too]
try_filesdirective is evil without open_file_cache - [unanchored_regex] Unanchored regular expressions
- [unnamed_groups] Unnamed capture groups in rewrite query string
- [valid_referers] none/blocked in valid_referers
- [version_disclosure] Using insecure values for server_tokens
- [worker_rlimit_nofile_vs_connections]
worker_rlimit_nofilemust be at least twiceworker_connections
هل هناك شيء لم يتم اكتشافه؟ يُرجى فتح issue على GitHub مع توضيح ما هو المفقود!
الاستخدام (الخيارات)
يقرأ gixy افتراضيًا إعدادات NGINX الخاصة بالنظام من /etc/nginx/nginx.conf. يمكنك أيضًا تحديد الموقع بتمريره إلى gixy:
# Analyze the configuration in /opt/nginx.conf
gixy /opt/nginx.conf
يمكنك تشغيل مجموعة فرعية مركّزة من الفحوصات باستخدام --tests:
# Only run these checks
gixy --tests http_splitting,ssrf,version_disclosure
أو تخطي بعض الفحوصات المزعجة باستخدام --skips:
