-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
224 lines (197 loc) · 5.31 KB
/
Copy pathpyproject.toml
File metadata and controls
224 lines (197 loc) · 5.31 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
[tool.poetry]
name = "hos-ls"
version = "0.3.3.17"
description = "HOS-LS: AI生成代码安全扫描工具 - 基于LangGraph的Multi-Agent架构,支持语义搜索、两阶段扫描、CVE集成、攻击链分析和断点续传"
authors = ["HOS Team <team@hos-ls.com>"]
readme = "README.md"
license = "MIT"
homepage = "https://github.com/hos-ls/hos-ls"
repository = "https://github.com/hos-ls/hos-ls"
documentation = "https://hos-ls.readthedocs.io"
keywords = ["security", "ai", "code-scanning", "vulnerability-detection", "static-analysis"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"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",
"Topic :: Security",
"Topic :: Software Development :: Quality Assurance",
]
[tool.poetry.dependencies]
python = "^3.8"
# Core dependencies
pydantic = "^2.0.0"
pydantic-settings = "^2.0.0"
click = "^8.1.0"
rich = "^13.0.0"
tqdm = "^4.66.0"
pyyaml = "^6.0.1"
python-dotenv = "^1.0.0"
# AI/LLM dependencies
anthropic = "^0.39.0"
openai = "^1.0.0"
langchain = "^0.1.0"
langchain-openai = "^0.1.0"
langgraph = "^1.0.0"
dspy = "^3.1.3"
langsmith = "^0.1.0"
# Code analysis dependencies
tree-sitter = "^0.20.0"
tree-sitter-python = "^0.20.0"
tree-sitter-javascript = "^0.20.0"
tree-sitter-typescript = "^0.20.0"
tree-sitter-java = "^0.20.0"
tree-sitter-cpp = "^0.20.0"
libcst = "^1.0.0"
# Graph and network analysis
networkx = "^3.0.0"
# Vector storage
chromadb = "^1.0.0"
faiss-cpu = "^1.7.4"
# Git operations
gitpython = "^3.1.0"
# HTTP clients
httpx = "^0.25.0"
aiohttp = "^3.9.0"
aiofiles = "^23.2.0"
# Database
aiosqlite = "^0.19.0"
diskcache = "^5.6.0"
neo4j = "^5.15.0"
neo4j-graphrag = "^1.0.0"
# Data processing
numpy = "^1.24.0"
scikit-learn = "^1.3.0"
# Embedding and model training
sentence-transformers = "^2.2.0"
torch = "^2.0.0"
# Report generation
jinja2 = "^3.1.0"
markdown = "^3.5.0"
python-docx = "^0.8.11"
# GitHub integration
pygithub = "^1.59.0"
requests = "^2.31.0"
# Web scraping and additional utilities
beautifulsoup4 = "^4.12.0"
lxml = "^4.9.0"
ratelimit = "^2.2.1"
# Local model support (optional, for advanced features)
transformers = { version = "^4.30.0", optional = true }
unsloth = { version = "^2024.0.0", optional = true }
# Testing
pytest = { version = "^7.4.0", optional = true }
pytest-asyncio = { version = "^0.21.0", optional = true }
pytest-cov = { version = "^4.1.0", optional = true }
# Development
black = { version = "^23.0.0", optional = true }
isort = { version = "^5.12.0", optional = true }
flake8 = { version = "^6.0.0", optional = true }
mypy = { version = "^1.5.0", optional = true }
[tool.poetry.extras]
local = ["transformers", "sentence-transformers", "torch"]
dev = ["pytest", "pytest-asyncio", "pytest-cov", "black", "isort", "flake8", "mypy"]
all = ["transformers", "sentence-transformers", "torch", "pytest", "pytest-asyncio", "pytest-cov", "black", "isort", "flake8", "mypy"]
[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-asyncio = "^0.21.0"
pytest-cov = "^4.1.0"
black = "^23.0.0"
isort = "^5.12.0"
flake8 = "^6.0.0"
mypy = "^1.5.0"
pre-commit = "^3.5.0"
[tool.poetry.scripts]
hos-ls = "src.cli.main:main"
hosls = "src.cli.main:main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 100
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
line_length = 100
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
ignore_missing_imports = true
exclude = [
"src/analyzers/verification/multi_lang_mocks\\.py$",
]
[[tool.mypy.overrides]]
module = [
"src.analyzers.verification.multi_lang_mocks",
"yaml",
"requests",
"requests.*",
"paramiko",
"aiofiles",
]
ignore_errors = true
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers --strict-config"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
norecursedirs = ["fixtures", ".venv", "venv", "build", "dist", ".git"]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow tests",
]
[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*", "*/test_*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]