-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
259 lines (227 loc) · 7.2 KB
/
Copy pathsetup.py
File metadata and controls
259 lines (227 loc) · 7.2 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
#!/usr/bin/env python3
"""
HawkEye - Hidden Application Weaknesses & Key Entry-point Yielding Evaluator
Setup script for package distribution
"""
import os
import sys
from pathlib import Path
from setuptools import setup, find_packages
# Ensure we're using Python 3.8+
if sys.version_info < (3, 8):
sys.exit("HawkEye requires Python 3.8 or higher")
# Get the long description from README
here = Path(__file__).parent.resolve()
long_description = (here / "README.md").read_text(encoding="utf-8")
# Read requirements from requirements.txt
def read_requirements(filename):
"""Read requirements from file and return as list"""
requirements_file = here / filename
if requirements_file.exists():
with open(requirements_file, 'r', encoding='utf-8') as f:
return [line.strip() for line in f if line.strip() and not line.startswith('#')]
return []
# Get version from package
def get_version():
"""Get version from package __init__.py"""
version_file = here / "src" / "hawkeye" / "__init__.py"
if version_file.exists():
with open(version_file, 'r', encoding='utf-8') as f:
for line in f:
if line.startswith('__version__'):
return line.split('=')[1].strip().strip('"').strip("'")
return "1.0.0"
# Package metadata
PACKAGE_NAME = "hawkeye-security"
VERSION = get_version()
DESCRIPTION = "MCP Security Reconnaissance Tool - Hidden Application Weaknesses & Key Entry-point Yielding Evaluator"
AUTHOR = "HawkEye Security Team"
AUTHOR_EMAIL = "security@hawkeye-project.org"
URL = "https://github.com/yourusername/hawkeye"
LICENSE = "MIT"
# Classifiers for PyPI
CLASSIFIERS = [
# Development Status
"Development Status :: 5 - Production/Stable",
# Intended Audience
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Intended Audience :: Developers",
# Topic
"Topic :: Security",
"Topic :: System :: Networking :: Monitoring",
"Topic :: System :: Systems Administration",
"Topic :: Software Development :: Testing",
# License
"License :: OSI Approved :: MIT License",
# Programming Language
"Programming Language :: Python :: 3",
"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",
# Operating System
"Operating System :: OS Independent",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
# Environment
"Environment :: Console",
"Environment :: No Input/Output (Daemon)",
]
# Keywords for PyPI search
KEYWORDS = [
"security", "reconnaissance", "scanning", "mcp", "vulnerability",
"network", "assessment", "penetration-testing", "security-audit",
"compliance", "risk-assessment", "cybersecurity"
]
# Project URLs
PROJECT_URLS = {
"Homepage": URL,
"Documentation": f"{URL}/docs",
"Source": URL,
"Tracker": f"{URL}/issues",
"Security": f"{URL}/security",
"Changelog": f"{URL}/blob/main/CHANGELOG.md",
}
# Entry points for console scripts
ENTRY_POINTS = {
"console_scripts": [
"hawkeye=hawkeye.cli.main:main",
"hawkeye-scan=hawkeye.cli.scan_commands:scan_main",
"hawkeye-detect=hawkeye.cli.detect_commands:detect_main",
"hawkeye-report=hawkeye.cli.report_commands:report_main",
],
}
# Package data to include
PACKAGE_DATA = {
"hawkeye": [
"config/*.yaml",
"config/*.json",
"reporting/templates/*.html",
"reporting/templates/*.css",
"reporting/templates/*.js",
"data/*.json",
"data/*.yaml",
],
}
# Additional data files
DATA_FILES = [
("share/hawkeye/docs", [
"docs/user_manual.md",
"docs/security_guidelines.md",
"docs/troubleshooting.md",
"docs/installation.md",
]),
("share/hawkeye/examples", [
"examples/basic_scan.py",
"examples/enterprise_scan.py",
"examples/compliance_scan.py",
]),
("etc/hawkeye", [
"config/hawkeye.yaml.example",
]),
]
# Read requirements
install_requires = read_requirements("requirements.txt")
extras_require = {
"dev": read_requirements("requirements-dev.txt"),
"test": [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.10.0",
"pytest-asyncio>=0.21.0",
"coverage>=7.0.0",
],
"docs": [
"sphinx>=5.0.0",
"sphinx-rtd-theme>=1.2.0",
"myst-parser>=1.0.0",
"sphinx-autodoc-typehints>=1.19.0",
],
"performance": [
"uvloop>=0.17.0; sys_platform != 'win32'",
"orjson>=3.8.0",
"msgpack>=1.0.0",
],
"enterprise": [
"redis>=4.5.0",
"celery>=5.2.0",
"sqlalchemy>=2.0.0",
"alembic>=1.10.0",
],
}
# All extras combined
extras_require["all"] = list(set(sum(extras_require.values(), [])))
setup(
# Basic package information
name=PACKAGE_NAME,
version=VERSION,
description=DESCRIPTION,
long_description=long_description,
long_description_content_type="text/markdown",
# Author information
author=AUTHOR,
author_email=AUTHOR_EMAIL,
maintainer=AUTHOR,
maintainer_email=AUTHOR_EMAIL,
# URLs
url=URL,
project_urls=PROJECT_URLS,
# License
license=LICENSE,
# Package discovery
packages=find_packages(where="src"),
package_dir={"": "src"},
package_data=PACKAGE_DATA,
data_files=DATA_FILES,
include_package_data=True,
# Dependencies
python_requires=">=3.8",
install_requires=install_requires,
extras_require=extras_require,
# Entry points
entry_points=ENTRY_POINTS,
# Metadata for PyPI
classifiers=CLASSIFIERS,
keywords=", ".join(KEYWORDS),
# Options
zip_safe=False,
platforms=["any"],
# Additional metadata
options={
"bdist_wheel": {
"universal": False,
},
"egg_info": {
"tag_build": "",
"tag_date": False,
},
},
# Command classes for custom commands
cmdclass={},
)
# Post-installation message
if __name__ == "__main__":
print("\n" + "="*60)
print("🦅 HawkEye Installation Complete!")
print("="*60)
print("Thank you for installing HawkEye - MCP Security Reconnaissance Tool")
print("\nQuick Start:")
print(" hawkeye --help # Show help")
print(" hawkeye scan --target 127.0.0.1 # Test scan")
print(" hawkeye config init # Initialize config")
print("\nDocumentation:")
print(" User Manual: docs/user_manual.md")
print(" Security Guidelines: docs/security_guidelines.md")
print(" Installation Guide: docs/installation.md")
print("\nSecurity Notice:")
print(" ⚠️ Always obtain proper authorization before scanning")
print(" 📖 Read security guidelines before use")
print(" 🔒 Use responsibly and ethically")
print("\nSupport:")
print(f" 🐛 Issues: {URL}/issues")
print(f" 📚 Docs: {URL}/docs")
print(f" 🔐 Security: {AUTHOR_EMAIL}")
print("="*60)