-
-
Notifications
You must be signed in to change notification settings - Fork 818
Expand file tree
/
Copy pathpyproject.toml
More file actions
215 lines (185 loc) · 4.66 KB
/
Copy pathpyproject.toml
File metadata and controls
215 lines (185 loc) · 4.66 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
[project]
name = "deepaudit-backend"
version = "3.0.4"
description = "DeepAudit Backend API - AI-Powered Code Security Audit Platform"
requires-python = ">=3.11"
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "DeepAudit Team" }
]
keywords = ["security", "audit", "code-review", "vulnerability", "ai", "llm"]
dependencies = [
# ============ Web Framework ============
"fastapi>=0.100.0",
"uvicorn[standard]>=0.23.0",
"sse-starlette>=1.8.2",
# ============ Database ============
"sqlalchemy>=2.0.0",
"asyncpg>=0.29.0",
"alembic>=1.13.0",
"greenlet>=3.0.0",
"redis>=5.0.0",
# ============ Data Validation ============
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"email-validator>=2.1.0",
# ============ Authentication ============
"passlib[bcrypt]>=1.7.4",
"python-jose[cryptography]>=3.3.0",
"python-multipart>=0.0.6",
"bcrypt>=4.0.0,<5.0.0",
# ============ HTTP Client ============
"httpx>=0.25.0",
# ============ LLM Integration ============
"litellm>=1.0.0",
"tiktoken>=0.5.2",
# ============ Report Generation ============
"reportlab>=4.0.0",
"weasyprint>=60.0",
"jinja2>=3.1.6",
# ============ Utilities ============
"json-repair>=0.30.0",
"aiofiles>=23.2.1",
# ============ LangChain & LangGraph ============
"langchain>=0.1.0",
"langchain-community>=0.0.20",
"langchain-openai>=0.0.5",
"langgraph>=0.0.40",
# ============ Vector Database ============
"chromadb>=0.4.22",
# ============ Code Parsing ============
# 使用 tree-sitter-language-pack 替代已弃用的 tree-sitter-languages
"tree-sitter>=0.23.0",
"tree-sitter-language-pack>=0.4.0",
"pygments>=2.17.0",
# ============ Docker Sandbox ============
"docker>=7.0.0",
# ============ Security Tools ============
"bandit>=1.7.0",
"safety>=2.3.0",
"pip-audit>=2.6.0",
# ============ Kunlun-M Dependencies (MIT License) ============
# https://github.com/LoRexxar/Kunlun-M
"pyjsparser>=2.7.1",
"phply>=1.2.6",
"esprima>=4.0.1",
"jsbeautifier>=1.14.0",
"colorlog>=6.0.0",
"portalocker>=2.0.0",
"prettytable>=3.0.0",
"rarfile>=4.0",
"beautifulsoup4>=4.12.0",
"django>=4.2.0",
]
[project.optional-dependencies]
# MySQL support for Kunlun-M web mode
mysql = ["mysqlclient>=2.2.0"]
# Development tools
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.5.0",
"pre-commit>=3.5.0",
]
# Documentation
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.4.0",
"mkdocstrings[python]>=0.23.0",
]
[project.urls]
Homepage = "https://github.com/lintsinghua/DeepAudit"
Documentation = "https://github.com/lintsinghua/DeepAudit/tree/main/docs"
Repository = "https://github.com/lintsinghua/DeepAudit"
Issues = "https://github.com/lintsinghua/DeepAudit/issues"
Changelog = "https://github.com/lintsinghua/DeepAudit/blob/main/CHANGELOG.md"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["app"]
# ============ Tool Configurations ============
[tool.black]
line-length = 100
target-version = ["py311", "py312", "py313"]
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| migrations
)/
'''
[tool.ruff]
line-length = 100
target-version = "py311"
exclude = [
".git",
".hg",
".mypy_cache",
".tox",
".venv",
"_build",
"buck-out",
"build",
"dist",
"migrations",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by black)
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
exclude = [
"migrations/",
".venv/",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "-v --tb=short"
[tool.coverage.run]
source = ["app"]
omit = ["*/migrations/*", "*/tests/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]
# ============ Dependency Groups (PEP 735) ============
[dependency-groups]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.5.0",
]