-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
72 lines (62 loc) · 2.07 KB
/
Copy pathpyproject.toml
File metadata and controls
72 lines (62 loc) · 2.07 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
[project]
name = "stackone-defender"
version = "0.8.2"
description = "Indirect prompt injection defense for AI agents using tool calls"
readme = "README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
license-files = ["LICENSE"]
authors = [{ name = "StackOne", email = "support@stackone.com" }]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Security",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = []
[project.urls]
Homepage = "https://github.com/StackOneHQ/stackone-defender"
Repository = "https://github.com/StackOneHQ/stackone-defender"
[project.optional-dependencies]
onnx = ["onnxruntime>=1.16.0", "tokenizers>=0.15.0", "numpy>=1.24.0"]
# fasttext-ng provides the `fasttext` module (maintained bindings; supports 3.13).
# Pulls numpy>=2.3; SFE still fail-opens when import/load fails.
sfe = ["fasttext-ng>=0.9.3"]
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"ruff>=0.9",
"onnxruntime>=1.16.0",
"tokenizers>=0.15.0",
"numpy>=1.24.0",
"fasttext-ng>=0.9.3",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/stackone_defender"]
[tool.hatch.build.targets.sdist]
exclude = ["/models", "/.github"] # legacy model + CI, dev-only
[tool.ruff]
target-version = "py311"
line-length = 120
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "W", "F", "I", "N", "UP", "B", "C4", "SIM", "RUF"]
# E501/RUF003 by design; SIM*/UP007 deferred to cleanup.
ignore = ["E501", "RUF003", "SIM102", "SIM103", "SIM108", "SIM110", "SIM118", "UP007"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["RUF012", "N814", "F841", "F811"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--strict-markers --strict-config -ra"
markers = [
"model: requires the bundled ONNX model + onnxruntime extra",
"sfe: requires the fasttext extra",
]