Анализируем конфигурационные файлы Nginx
Должен ли я установить статический анализатор конфигурации Gixy для Nginx в операционной системе GNU / Linux, чтобы предотвратить неправильную конфигурацию безопасности и автоматизировать обнаружение дефектов?
На странице проекта:
Gixy — это инструмент для анализа конфигурации Nginx. Основная цель Gixy — предотвратить неправильную настройку безопасности и автоматизировать обнаружение дефектов. В настоящее время поддерживаемые версии Python — 2.7 и 3.5+. Сейчас Gixy может найти:
- [Ssrf] Подделка запроса на стороне сервера
- [Http_splitting] Разделение HTTP
- [origins] Проблемы с проверкой источника ссылки / происхождения
- [Add_header_redefinition] Переопределение заголовков ответов директивой «add_header»
- [Host_spoofing] Подделка заголовка запроса Host
- [Valid_referers] none в valid_referers
- [Add_header_multiline] Многострочные заголовки ответа
Установка
Введите следующую команду:
1 |
$ pip install gixy |
Пример результата:
Как мне использовать Gixy?
Синтаксис:
1 2 |
$ gixy /etc/nginx/nginx.conf $ gixy [options] /etc/nginx/nginx.conf |
Опции
Чтобы увидеть все возможные опции gixy:
$ gixy -h
Пример результата
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 |
positional arguments: nginx.conf Path to nginx.conf, e.g. /etc/nginx/nginx.conf optional arguments: -h, --help show this help message and exit --write-config CONFIG_OUTPUT_PATH -c CONFIG_FILE, --config CONFIG_FILE config file path takes the current command line args and writes them out to a config file at the given path, then exits -l, --level Report issues of a given severity level or higher (-l for LOW, -ll for MEDIUM, -lll for HIGH) -v, --version show program's version number and exit -f {text,json,console}, --format {text,json,console} Specify output format -o OUTPUT_FILE, --output OUTPUT_FILE Write report to file -d, --debug Turn on debug mode --skips SKIPS Comma-separated list of tests to skip --tests TESTS Comma-separated list of tests to run --disable-includes Disable "include" directive processing plugins options: --origins-domains domains Default: * --origins-https-only https_only Default: False --add-header-redefinition-headers headers Default: x-frame-options,x-xss-protection,content- security-policy,x-content-type-options,cache-control available plugins: add_header_multiline http_splitting host_spoofing origins add_header_redefinition valid_referers ssrf |
Установка, настройка и поддержка веб сервера, [email protected]