Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
81 lines (72 loc) · 2.63 KB
/
Copy pathpyproject.toml
File metadata and controls
81 lines (72 loc) · 2.63 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
[build-system]
requires = ["setuptools>=77", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "aisrf"
version = "1.1.0"
description = "AISRF - AI Security & Research Framework: human-in-the-loop interception, analysis and red teaming for LLM traffic"
readme = "README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
license-files = ["LICENSE"]
dependencies = [
"fastapi>=0.115",
"uvicorn[standard]>=0.30",
"sqlalchemy[asyncio]>=2.0",
"aiosqlite>=0.20",
"httpx>=0.27",
"structlog>=24",
"pydantic>=2.7",
"pydantic-settings>=2.3",
"jinja2>=3.1",
"python-multipart>=0.0.9",
"typer>=0.12",
"rich>=13",
"itsdangerous>=2.2",
"sse-starlette>=2.1",
"orjson>=3.10",
"pyyaml>=6",
"cryptography>=42",
"mcp>=1.10",
"reportlab>=4",
"openpyxl>=3.1",
]
[project.optional-dependencies]
postgres = ["asyncpg>=0.29"]
mitm = ["mitmproxy>=10"]
guardrails = ["llm-guard>=0.3,<0.4", "transformers>=4.40,<5", "nemoguardrails>=0.24,<0.26", "rebuff>=0.0.5"]
scanners = ["garak>=0.17,<0.18", "pyrit>=0.13,<1"]
codereview = ["semgrep>=1.100", "bandit>=1.7"]
desktop = ["pywebview>=5"]
all = ["asyncpg>=0.29", "mitmproxy>=10", "llm-guard>=0.3,<0.4", "transformers>=4.40,<5", "nemoguardrails>=0.24,<0.26", "rebuff>=0.0.5", "semgrep>=1.100", "bandit>=1.7"]
dev = ["pytest>=8", "pytest-asyncio>=0.23", "ruff>=0.5", "asgi-lifespan>=2"]
[project.scripts]
aisrf = "aisrf.cli:app"
aisrf-desktop = "aisrf.desktop:main"
[tool.setuptools.packages.find]
include = ["aisrf*"]
[tool.setuptools.package-data]
aisrf = ["dashboard/templates/*.html", "dashboard/static/*", "redteam/corpus/*.yaml", "guardrails/nemo_default/*", "codereview/rules/semgrep/*.yaml"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
filterwarnings = ["ignore::DeprecationWarning"]
[tool.ruff]
line-length = 110
target-version = "py311"
extend-exclude = ["docs/images", "sdk", ".venv"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP", "SIM", "RUF", "C4", "PIE", "T20"]
ignore = [
"B008", # FastAPI Depends() in defaults is the framework idiom
"E501", # line length is handled by the formatter
"RUF012", # mutable class attributes are used deliberately for pydantic models
"SIM108", # ternaries are not always clearer
"B904", # exception chaining is not required in request handlers
"RUF001", "RUF002", "RUF003", # analyzers intentionally contain confusable unicode in detection patterns
"T201", # the CLI prints
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["E402", "F401", "B011", "F841", "RUF018", "SIM117", "PIE"]
"examples/*" = ["E402", "T20"]
"aisrf/analysis/analyzers/*" = ["RUF001", "RUF002", "RUF003", "E741", "PLE2515"]