2025-11-26 21:11:12 +08:00
|
|
|
[project]
|
2025-12-08 21:35:09 +08:00
|
|
|
name = "deepaudit-backend"
|
2025-12-19 00:01:10 +08:00
|
|
|
version = "3.0.2"
|
2025-12-15 02:00:34 +08:00
|
|
|
description = "DeepAudit Backend API - AI-Powered Code Security Audit Platform"
|
2025-12-15 10:24:58 +08:00
|
|
|
requires-python = ">=3.11"
|
2025-12-15 02:00:34 +08:00
|
|
|
readme = "README.md"
|
|
|
|
|
license = { text = "MIT" }
|
|
|
|
|
authors = [
|
|
|
|
|
{ name = "DeepAudit Team" }
|
|
|
|
|
]
|
|
|
|
|
keywords = ["security", "audit", "code-review", "vulnerability", "ai", "llm"]
|
|
|
|
|
|
2025-11-26 21:11:12 +08:00
|
|
|
dependencies = [
|
2025-12-15 02:00:34 +08:00
|
|
|
# ============ Web Framework ============
|
2025-11-26 21:11:12 +08:00
|
|
|
"fastapi>=0.100.0",
|
2025-12-15 02:00:34 +08:00
|
|
|
"uvicorn[standard]>=0.23.0",
|
2026-01-08 17:00:13 +08:00
|
|
|
"gunicorn>=21.2.0",
|
2025-12-15 02:00:34 +08:00
|
|
|
"sse-starlette>=1.8.2",
|
|
|
|
|
|
|
|
|
|
# ============ Database ============
|
2025-11-26 21:11:12 +08:00
|
|
|
"sqlalchemy>=2.0.0",
|
2025-12-15 02:00:34 +08:00
|
|
|
"asyncpg>=0.29.0",
|
|
|
|
|
"alembic>=1.13.0",
|
|
|
|
|
"greenlet>=3.0.0",
|
2025-12-15 15:18:55 +08:00
|
|
|
"redis>=5.0.0",
|
2025-12-15 02:00:34 +08:00
|
|
|
|
|
|
|
|
# ============ Data Validation ============
|
2025-11-26 21:11:12 +08:00
|
|
|
"pydantic>=2.0.0",
|
2025-12-15 02:00:34 +08:00
|
|
|
"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",
|
2025-12-31 16:40:33 +08:00
|
|
|
"bcrypt>=4.0.1",
|
2025-12-15 02:00:34 +08:00
|
|
|
|
|
|
|
|
# ============ HTTP Client ============
|
|
|
|
|
"httpx>=0.25.0",
|
|
|
|
|
|
|
|
|
|
# ============ LLM Integration ============
|
2025-11-28 16:41:39 +08:00
|
|
|
"litellm>=1.0.0",
|
2025-12-15 02:00:34 +08:00
|
|
|
"tiktoken>=0.5.2",
|
|
|
|
|
|
|
|
|
|
# ============ Report Generation ============
|
2025-11-28 20:34:15 +08:00
|
|
|
"reportlab>=4.0.0",
|
2025-12-15 02:00:34 +08:00
|
|
|
"weasyprint>=60.0",
|
2025-11-28 20:34:15 +08:00
|
|
|
"jinja2>=3.1.6",
|
2025-12-15 02:00:34 +08:00
|
|
|
|
|
|
|
|
# ============ Utilities ============
|
2025-12-08 21:45:58 +08:00
|
|
|
"json-repair>=0.30.0",
|
2025-12-15 02:00:34 +08:00
|
|
|
"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 ============
|
2025-12-17 14:52:59 +08:00
|
|
|
# 使用 tree-sitter-language-pack 替代已弃用的 tree-sitter-languages
|
|
|
|
|
"tree-sitter>=0.23.0",
|
|
|
|
|
"tree-sitter-language-pack>=0.4.0",
|
2025-12-15 02:00:34 +08:00
|
|
|
"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]
|
2025-12-15 10:24:58 +08:00
|
|
|
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"
|
2025-12-15 02:00:34 +08:00
|
|
|
|
|
|
|
|
[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:",
|
|
|
|
|
]
|
|
|
|
|
|
2025-12-16 20:00:00 +08:00
|
|
|
# ============ Dependency Groups (PEP 735) ============
|
2025-12-15 02:00:34 +08:00
|
|
|
|
2025-12-16 20:00:00 +08:00
|
|
|
[dependency-groups]
|
|
|
|
|
dev = [
|
2025-12-15 02:00:34 +08:00
|
|
|
"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",
|
2025-11-26 21:11:12 +08:00
|
|
|
]
|