NGINX 配置分析工具
 
 
Go to file
buglloc 6e84bda60d Better regex parsing error message 2017-05-19 20:11:37 +03:00
docs Fix typo in addheadermultiline.md 2017-05-16 12:15:40 +03:00
gixy Better regex parsing error message 2017-05-19 20:11:37 +03:00
rpm Version bump to 0.1.4 2017-05-14 14:56:40 +03:00
tests Support multiple config files (#47) 2017-05-19 19:31:20 +03:00
.dockerignore Added dockerignore 2017-05-13 13:23:49 +03:00
.editorconfig Added editorconfig 2017-05-13 13:39:21 +03:00
.gitignore Added RPM specs 2017-04-29 13:18:47 +04:00
.travis.yml Added basic Python 2.6 support (#43) 2017-05-16 23:02:10 +03:00
AUTHORS Initial commit 2017-03-31 01:12:44 +03:00
CONTRIBUTING.md Replace CONTRIBUTING.md 2017-04-18 16:17:02 +03:00
Dockerfile Rebase docker image on python:2.7-alpine 2017-05-13 13:02:19 +03:00
LICENSE Initial commit 2017-03-31 01:12:44 +03:00
MANIFEST.in Initial commit 2017-03-31 01:12:44 +03:00
Makefile Added makefile 2017-04-16 21:57:26 +03:00
README.RU.md Minor readme improvements 2017-05-11 00:50:32 +03:00
README.md Minor docs update 2017-05-11 11:44:05 +03:00
requirements.dev.txt Added tox to dev dependencies 2017-05-12 17:22:46 +03:00
requirements.txt Resolve #12: renamed requirements*.pip to requirements*.txt 2017-04-28 17:55:01 +03:00
setup.py Minor improvements 2017-04-08 09:38:22 +03:00
tox.ini Added basic Python 2.6 support (#43) 2017-05-16 23:02:10 +03:00

README.md

GIXY

Mozilla Public License 2.0 Build Status Your feedback is greatly appreciated GitHub issues GitHub pull requests

Overview

Gixy is a tool to analyze Nginx configuration. The main goal of Gixy is to prevent security misconfiguration and automate flaw detection.

Currently supported Python versions are 2.7 and 3.5+.

Disclaimer: Gixy is well tested only on GNU/Linux, other OSs may have some issues.

What it can do

Right now Gixy can find:

You can find things that Gixy is learning to detect at Issues labeled with "new plugin"

Installation

Gixy is distributed on PyPI. The best way to install it is with pip:

pip install gixy

Run Gixy and check results:

gixy

Usage

By default Gixy will try to analyze Nginx configuration placed in /etc/nginx/nginx.conf.

But you can always specify needed path:

$ gixy /etc/nginx/nginx.conf

==================== Results ===================

Problem: [http_splitting] Possible HTTP-Splitting vulnerability.
Description: Using variables that can contain "\n" may lead to http injection.
Additional info: https://github.com/yandex/gixy/blob/master/docs/ru/plugins/httpsplitting.md
Reason: At least variable "$action" can contain "\n"
Pseudo config:
include /etc/nginx/sites/default.conf;

	server {

		location ~ /v1/((?<action>[^.]*)\.json)?$ {
			add_header X-Action $action;
		}
	}


==================== Summary ===================
Total issues:
    Unspecified: 0
    Low: 0
    Medium: 0
    High: 1

Or skip some tests:

$ gixy --skips http_splitting /etc/nginx/nginx.conf

==================== Results ===================
No issues found.

==================== Summary ===================
Total issues:
    Unspecified: 0
    Low: 0
    Medium: 0
    High: 0

Or something else, you can find all other gixy arguments with the help command: gixy --help

Contributing

Contributions to Gixy are always welcome! You can help us in different ways:

  • Open an issue with suggestions for improvements and errors you're facing;
  • Fork this repository and submit a pull request;
  • Improve the documentation.

Code guidelines:

  • Python code style should follow pep8 standards whenever possible;
  • Pull requests with new plugins must have unit tests for it.