forked from yandex/gixy
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.py
More file actions
174 lines (147 loc) · 4.8 KB
/
Copy pathsetup.py
File metadata and controls
174 lines (147 loc) · 4.8 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
import pathlib
import re
from setuptools import find_packages, setup
# FileNotFoundError is not there in Python 2, define it:
try:
FileNotFoundError
except NameError:
FileNotFoundError = IOError
here = pathlib.Path(__file__).parent
# Extract version from gixy/__init__.py
with open(here / "gixy" / "__init__.py", "r", encoding="utf-8") as fd:
version = re.search(
r'^version\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(),
re.MULTILINE,
).group(1)
if not version:
raise RuntimeError("Cannot find version information")
install_requires = [
"crossplane>=0.5.8",
'cached-property>=1.2.0;python_version<"3.8"',
'argparse>=1.4.0;python_version<"3.2"',
"Jinja2>=2.8",
"ConfigArgParse>=0.11.0",
'tldextract==3.1.2; python_version>="3.6" and python_version<"3.7"',
'tldextract==4.0.0; python_version>="3.7" and python_version<"3.8"',
'tldextract>=5.1.2,<5.3.0; python_version>="3.8" and python_version<"3.9"',
'tldextract>=5.3.0; python_version>="3.9"',
]
tests_requires = [
"pytest>=7.0.0",
"pytest-xdist",
]
dev_requires = tests_requires + [
"coverage>=4.3",
"flake8>=3.2",
"tox>=2.7.0",
"setuptools",
"twine",
]
long_description = None
readme_path = here / "README.md"
docs_index_path = here / "docs" / "en" / "index.md"
try:
text = readme_path.read_text(encoding="utf-8")
single_line = text.strip()
if single_line.endswith(".md") and "\n" not in single_line:
candidate = here / single_line
try:
long_description = candidate.read_text(encoding="utf-8")
except FileNotFoundError:
long_description = text
else:
long_description = text
except FileNotFoundError:
try:
long_description = docs_index_path.read_text(encoding="utf-8")
except FileNotFoundError:
long_description = None
setup(
name="Gixy-Next",
version=version,
description=(
"Open source NGINX configuration security scanner for "
"detecting nginx security/performance misconfigurations"
),
long_description=long_description,
long_description_content_type="text/markdown",
keywords=[
"nginx",
"nginx security",
"nginx hardening",
"nginx configuration",
"nginx config",
"nginx config scanner",
"nginx configuration checker",
"nginx config linter",
"nginx security scanner",
"nginx configuration static analyzer",
"nginx vulnerability scanner",
"nginx.conf security audit",
"configuration compliance",
"configuration security",
"static analysis",
"ssrf",
"http response splitting",
"host header spoofing",
"version disclosure",
"redos",
"gixy",
"gixy next",
"gixy-ng",
"gixyng",
],
author="Joshua Rogers",
author_email="gixy@joshua.hu",
url="https://gixy.io/",
project_urls={
"Homepage": "https://gixy.io/",
"Documentation": "https://gixy.io/",
"Source": "https://github.com/MegaManSec/gixy-next",
"Issue Tracker": "https://github.com/MegaManSec/gixy-next/issues",
"Original Gixy": "https://github.com/yandex/gixy",
},
packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True,
install_requires=install_requires,
extras_require={
"tests": tests_requires,
"dev": dev_requires,
# Optional: ReDoS checks via external API
"redos": ["requests>=2.20.0"],
},
entry_points={
"console_scripts": [
"gixy=gixy.cli.main:main",
"gixy-next=gixy.cli.main:main",
],
},
license="MPL-2.0",
license_files=["LICENSE"],
classifiers=[
"Environment :: Console",
"Intended Audience :: System Administrators",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Topic :: Security",
"Topic :: System :: Systems Administration",
"Topic :: Internet :: WWW/HTTP :: Site Management",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
],
python_requires=">=3.6",
)