forked from AISecurityLab/hackagent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (135 loc) · 3.88 KB
/
pyproject.toml
File metadata and controls
148 lines (135 loc) · 3.88 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
[project]
name = "hackagent"
version = "0.10.1"
description = "HackAgent is an open-source security toolkit to detect vulnerabilities of your AI Agents."
authors = [
{name = "AI Security Lab", email = "ais@ai4i.it"}
]
readme = "README.md"
requires-python = ">=3.10"
license = {text = "Apache-2.0"}
keywords = ["security", "ai", "agents", "vulnerabilities", "testing"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"requests>=2.31.0",
"httpx>=0.27.0",
"pydantic[email]>=2.0",
"litellm>=1.69.2",
"openai>=1.0.0",
"rich>=14.0.0",
"click>=8.1.0",
"pyyaml>=6.0.0",
"textual>=1.0.0",
"python-dateutil>=2.8.0",
"faiss-cpu>=1.13.2",
"datasets>=2.14.0",
"nicegui>=2.0",
]
[dependency-groups]
dev = [
"datamodel-code-generator[http,ruff]>=0.54.0",
"openapi-python-client>=0.24.3,<0.29.0",
"ruff>=0.11.9",
"pytest>=8.3.5",
"pre-commit>=4.2.0",
"commitizen>=4.7.1",
"cz-conventional-gitmoji>=0.7.0",
"pytest-cov>=6.1.1",
"pytest-rerunfailures>=14.0",
"pytest-xdist>=3.0",
"pytest-timeout>=2.0",
"google-adk>=1.4.2",
"anyio>=4.3.0",
"pytest-asyncio>=0.23.7,<1.4.0",
"flask>=3.1.2",
"mcp>=1.21.2",
"vllm>=0.11.0; sys_platform != 'win32'",
"transformers>=4.40,<6.0; sys_platform != 'win32'",
]
docs = [
"pydoc-markdown>=4.8.2",
"toml>=0.10.2",
"packaging>=24,<27",
"requests>=2.31.0",
]
[project.scripts]
hackagent = "hackagent.cli.main:cli"
[tool.commitizen]
name = "cz_gitmoji"
tag_format = "v$version"
version_scheme = "pep440"
version_provider = "pep621"
update_changelog_on_bump = true
major_version_zero = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["hackagent"]
artifacts = [
"hackagent/examples/**",
]
[tool.hatch.build.targets.sdist]
include = [
"/hackagent",
"/assets",
]
[tool.coverage.run]
data_file = "reports/.coverage"
source = ["hackagent"]
omit = [
"hackagent/cli/tui/*",
]
[tool.coverage.report]
fail_under = 50
precision = 1
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
"@overload",
'if __name__ == "__main__":',
"if TYPE_CHECKING:",
]
[tool.coverage.xml]
output = "reports/coverage.xml"
[tool.pytest.ini_options]
testpaths = ["tests/unit", "tests/integration", "tests/e2e"]
addopts = "--ignore=tests/e2e/attacks --timeout=120"
markers = [
"integration: marks integration tests (use --run-integration to enable)",
"ollama: marks tests that require a running Ollama instance",
"openai_sdk: marks tests that require OpenAI/OpenRouter API key",
"google_adk: marks tests that require a live Google ADK server (use --run-google-adk to enable)",
"litellm: marks tests that require a LiteLLM-compatible backend",
"e2e: marks end-to-end tests that require external services",
"hackagent_backend: marks tests that require the HackAgent backend API",
"slow: marks slow-running tests (excluded from CI, run nightly)",
]
[tool.datamodel-codegen]
# Generation options – input/output are supplied at call time via scripts/generate_models.sh
input-file-type = "openapi"
output-model-type = "pydantic_v2.BaseModel"
target-python-version = "3.10"
capitalise-enum-members = true
collapse-root-models = true
enable-faux-immutability = true
field-constraints = true
formatters = ["ruff-format", "ruff-check"]
reuse-model = true
set-default-enum-member = true
snake-case-field = true
strict-nullable = true
use-annotated = true
use-double-quotes = true
use-field-description = true
use-standard-collections = true