ai-kit-python 1.4.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. ai_kit_python-1.4.2.dist-info/METADATA +132 -0
  2. ai_kit_python-1.4.2.dist-info/RECORD +278 -0
  3. ai_kit_python-1.4.2.dist-info/WHEEL +5 -0
  4. ai_kit_python-1.4.2.dist-info/entry_points.txt +2 -0
  5. ai_kit_python-1.4.2.dist-info/licenses/LICENSE +21 -0
  6. ai_kit_python-1.4.2.dist-info/licenses/template/ai-kit/vendor/security-audit/LICENSE +21 -0
  7. ai_kit_python-1.4.2.dist-info/licenses/template/ai-kit/vendor/strix/LICENSE +201 -0
  8. ai_kit_python-1.4.2.dist-info/top_level.txt +1 -0
  9. aikit/.agents/skills/go-work/SKILL.md +8 -0
  10. aikit/.agents/skills/laravel-work/SKILL.md +8 -0
  11. aikit/.agents/skills/moodle-work/SKILL.md +8 -0
  12. aikit/.agents/skills/project-continuity/SKILL.md +34 -0
  13. aikit/.agents/skills/python-work/SKILL.md +8 -0
  14. aikit/.dockerignore +90 -0
  15. aikit/.gitattributes +3 -0
  16. aikit/.github/workflows/check-kit.yml +70 -0
  17. aikit/.github/workflows/publish-pypi.yml +108 -0
  18. aikit/.gitignore +60 -0
  19. aikit/BOOTSTRAP_PROMPT.md +18 -0
  20. aikit/CHANGELOG.md +85 -0
  21. aikit/CLAUDE.md +3 -0
  22. aikit/CONTRIBUTING.md +46 -0
  23. aikit/Dockerfile +44 -0
  24. aikit/KIMI.md +3 -0
  25. aikit/LICENSE +21 -0
  26. aikit/MANIFEST.in +22 -0
  27. aikit/MANUS.md +3 -0
  28. aikit/Makefile +70 -0
  29. aikit/README.md +1161 -0
  30. aikit/SECURITY.md +8 -0
  31. aikit/SKILL.md +105 -0
  32. aikit/VERSION +1 -0
  33. aikit/__init__.py +1 -0
  34. aikit/ai-kit/ADAPTERS.md +5 -0
  35. aikit/ai-kit/CONTAINERS.md +5 -0
  36. aikit/ai-kit/ENGINEERING.md +5 -0
  37. aikit/ai-kit/INTENT.md +5 -0
  38. aikit/ai-kit/MODELS.md +5 -0
  39. aikit/ai-kit/SKILLS.md +5 -0
  40. aikit/ai-kit/stacks/GO.md +5 -0
  41. aikit/ai-kit/stacks/LARAVEL.md +5 -0
  42. aikit/ai-kit/stacks/MOODLE.md +5 -0
  43. aikit/ai-kit/stacks/PYTHON.md +5 -0
  44. aikit/aikit_cli.py +59 -0
  45. aikit/deploy/k8s/install-preview-job.yaml +56 -0
  46. aikit/docker/build-requirements.txt +4 -0
  47. aikit/docker/check_version.py +29 -0
  48. aikit/docker/pypi-requirements.txt +3 -0
  49. aikit/docs/ADAPTER_PATH_FIX.md +23 -0
  50. aikit/docs/BENCHMARK.md +106 -0
  51. aikit/docs/CONTEXT7.md +33 -0
  52. aikit/docs/DECISIONS.md +22 -0
  53. aikit/docs/DEVELOPMENT_PLAN.md +16 -0
  54. aikit/docs/DIALOGUE_MEMORY.md +70 -0
  55. aikit/docs/DOCKER.md +74 -0
  56. aikit/docs/DOCKER_HUB_OVERVIEW.md +311 -0
  57. aikit/docs/EVALUATION.md +30 -0
  58. aikit/docs/IMPLEMENTATION.md +134 -0
  59. aikit/docs/MANUS_REVIEW.md +46 -0
  60. aikit/docs/PYPI.md +87 -0
  61. aikit/docs/PYPI_DESCRIPTION.md +103 -0
  62. aikit/docs/SECURITY_AUDIT.md +26 -0
  63. aikit/docs/STRIX.md +28 -0
  64. aikit/docs/V0_5_0.md +27 -0
  65. aikit/docs/V0_6_4.md +25 -0
  66. aikit/docs/V1_4_0.md +73 -0
  67. aikit/docs/V1_4_1.md +55 -0
  68. aikit/docs/V1_4_2.md +33 -0
  69. aikit/docs/WEB_DESIGN.md +72 -0
  70. aikit/docs/WINDOWS_CI_FIX.md +39 -0
  71. aikit/docs/adr/0000-template.md +24 -0
  72. aikit/docs/adr/0001-adaptive-model-routing.md +30 -0
  73. aikit/docs/adr/0002-template-separation.md +24 -0
  74. aikit/docs/adr/0003-agent-registry-and-router.md +24 -0
  75. aikit/docs/adr/0004-onboarding-and-project-facts.md +24 -0
  76. aikit/docs/adr/0005-client-settings-ownership.md +30 -0
  77. aikit/docs/adr/0006-routing-evidence-and-local-measurements.md +26 -0
  78. aikit/docs/adr/0007-generated-client-configuration-and-presets.md +34 -0
  79. aikit/docs/adr/0008-unified-cli-and-fact-drift.md +20 -0
  80. aikit/docs/adr/0009-provider-review-doctor-fix-and-ci-self-install.md +20 -0
  81. aikit/docs/adr/0010-metrics-analysis-and-gemini-verification.md +20 -0
  82. aikit/docs/adr/0011-evidence-lifecycle-and-evaluation.md +20 -0
  83. aikit/docs/adr/0012-measurement-led-routing.md +31 -0
  84. aikit/docs/adr/0013-docker-cli-image.md +24 -0
  85. aikit/docs/adr/0014-local-dialogue-memory.md +22 -0
  86. aikit/docs/history/original-bundle-checks.md +11 -0
  87. aikit/docs/history/v0.1-changelog.txt +37 -0
  88. aikit/docs/history/v0.10-changelog.md +12 -0
  89. aikit/docs/history/v0.2-changelog.md +35 -0
  90. aikit/docs/history/v0.3-changelog.md +25 -0
  91. aikit/docs/history/v0.4-changelog.md +31 -0
  92. aikit/docs/history/v0.5-changelog.md +14 -0
  93. aikit/docs/history/v0.6.4-changelog.md +12 -0
  94. aikit/docs/history/v0.6.5-v0.9-changelog.md +35 -0
  95. aikit/docs/history/v1.1.0-changelog.md +12 -0
  96. aikit/docs/history/v1.2.0-changelog.md +11 -0
  97. aikit/docs/history/verification-before-measurements.md +53 -0
  98. aikit/integrations/CONVENTIONS.md +3 -0
  99. aikit/integrations/README.md +7 -0
  100. aikit/integrations/agents.json +136 -0
  101. aikit/integrations/ai-kit-check.yml +66 -0
  102. aikit/integrations/ai-kit-cline.md +4 -0
  103. aikit/integrations/ai-kit-roo.md +4 -0
  104. aikit/integrations/ai-kit-windsurf.md +4 -0
  105. aikit/integrations/ai-kit.mdc +6 -0
  106. aikit/integrations/claude-settings.data-ask.json +23 -0
  107. aikit/integrations/claude-settings.git-ask.json +10 -0
  108. aikit/integrations/copilot-instructions.md +3 -0
  109. aikit/integrations/security-audit.json +135 -0
  110. aikit/integrations/strix.json +69 -0
  111. aikit/pyproject.toml +60 -0
  112. aikit/scripts/__init__.py +1 -0
  113. aikit/scripts/adapters.py +184 -0
  114. aikit/scripts/adaptive.py +167 -0
  115. aikit/scripts/adr.py +61 -0
  116. aikit/scripts/benchmark.py +543 -0
  117. aikit/scripts/changelog.py +55 -0
  118. aikit/scripts/check_distribution.py +178 -0
  119. aikit/scripts/check_kit.py +406 -0
  120. aikit/scripts/context.py +184 -0
  121. aikit/scripts/docker_test_usage.py +55 -0
  122. aikit/scripts/doctor.py +313 -0
  123. aikit/scripts/evaluate.py +125 -0
  124. aikit/scripts/install.py +1584 -0
  125. aikit/scripts/learning.py +260 -0
  126. aikit/scripts/memory.py +344 -0
  127. aikit/scripts/memory_import.py +177 -0
  128. aikit/scripts/memory_store.py +125 -0
  129. aikit/scripts/metrics.py +351 -0
  130. aikit/scripts/router.py +399 -0
  131. aikit/template/.agents/hooks/session-start.md +3 -0
  132. aikit/template/.agents/hooks/session-start.sh +21 -0
  133. aikit/template/.agents/skills/ai-kit-bootstrap/SKILL.md +14 -0
  134. aikit/template/.agents/skills/ai-kit-review/SKILL.md +11 -0
  135. aikit/template/.agents/skills/ai-kit-sync-context/SKILL.md +12 -0
  136. aikit/template/.agents/skills/context7-docs/SKILL.md +11 -0
  137. aikit/template/.agents/skills/design-extract/SKILL.md +9 -0
  138. aikit/template/.agents/skills/dotnet-work/SKILL.md +9 -0
  139. aikit/template/.agents/skills/filament-work/SKILL.md +9 -0
  140. aikit/template/.agents/skills/frontend-work/SKILL.md +9 -0
  141. aikit/template/.agents/skills/go-work/SKILL.md +9 -0
  142. aikit/template/.agents/skills/infra-work/SKILL.md +9 -0
  143. aikit/template/.agents/skills/java-work/SKILL.md +9 -0
  144. aikit/template/.agents/skills/laravel-blade-ui/SKILL.md +9 -0
  145. aikit/template/.agents/skills/laravel-work/SKILL.md +10 -0
  146. aikit/template/.agents/skills/library-work/SKILL.md +9 -0
  147. aikit/template/.agents/skills/moodle-work/SKILL.md +9 -0
  148. aikit/template/.agents/skills/php-work/SKILL.md +9 -0
  149. aikit/template/.agents/skills/project-continuity/SKILL.md +21 -0
  150. aikit/template/.agents/skills/python-work/SKILL.md +9 -0
  151. aikit/template/.agents/skills/rust-work/SKILL.md +9 -0
  152. aikit/template/.agents/skills/security-audit/SKILL.md +16 -0
  153. aikit/template/.agents/skills/security-audit/agents/openai.yaml +2 -0
  154. aikit/template/.agents/skills/strix/SKILL.md +16 -0
  155. aikit/template/.agents/skills/strix/agents/openai.yaml +2 -0
  156. aikit/template/.agents/skills/ui-review/SKILL.md +9 -0
  157. aikit/template/.agents/skills/web-design/SKILL.md +9 -0
  158. aikit/template/AGENTS.md +16 -0
  159. aikit/template/CHANGELOG.md +6 -0
  160. aikit/template/CLAUDE.md +5 -0
  161. aikit/template/GEMINI.md +4 -0
  162. aikit/template/KIMI.md +4 -0
  163. aikit/template/MANUS.md +4 -0
  164. aikit/template/PROJECT_CONTEXT.md +35 -0
  165. aikit/template/README.md +6 -0
  166. aikit/template/WIKI.md +37 -0
  167. aikit/template/ai-kit/ADAPTERS.md +100 -0
  168. aikit/template/ai-kit/BOOTSTRAP.md +15 -0
  169. aikit/template/ai-kit/CONTAINERS.md +63 -0
  170. aikit/template/ai-kit/CONTEXT7.md +96 -0
  171. aikit/template/ai-kit/CORE.md +23 -0
  172. aikit/template/ai-kit/ENGINEERING.md +34 -0
  173. aikit/template/ai-kit/MCP.md +17 -0
  174. aikit/template/ai-kit/METRICS.md +83 -0
  175. aikit/template/ai-kit/SECURITY-AUDIT.md +21 -0
  176. aikit/template/ai-kit/SECURITY.md +34 -0
  177. aikit/template/ai-kit/SKILLS.md +37 -0
  178. aikit/template/ai-kit/STRIX.md +44 -0
  179. aikit/template/ai-kit/UPSTREAM.md +38 -0
  180. aikit/template/ai-kit/WEB-DESIGN.md +37 -0
  181. aikit/template/ai-kit/profiles/OWNER.md +19 -0
  182. aikit/template/ai-kit/project.json +14 -0
  183. aikit/template/ai-kit/router/POLICY.md +79 -0
  184. aikit/template/ai-kit/router/providers/anthropic.json +44 -0
  185. aikit/template/ai-kit/router/providers/anthropic.md +14 -0
  186. aikit/template/ai-kit/router/providers/gemini.json +13 -0
  187. aikit/template/ai-kit/router/providers/gemini.md +10 -0
  188. aikit/template/ai-kit/router/providers/kimi.json +26 -0
  189. aikit/template/ai-kit/router/providers/kimi.md +13 -0
  190. aikit/template/ai-kit/router/providers/local.json +18 -0
  191. aikit/template/ai-kit/router/providers/local.md +10 -0
  192. aikit/template/ai-kit/router/providers/openai.json +48 -0
  193. aikit/template/ai-kit/router/providers/openai.md +14 -0
  194. aikit/template/ai-kit/router/routing.json +11 -0
  195. aikit/template/ai-kit/router/selection.json +14 -0
  196. aikit/template/ai-kit/settings.json +11 -0
  197. aikit/template/ai-kit/stacks/DOTNET.md +13 -0
  198. aikit/template/ai-kit/stacks/FILAMENT.md +18 -0
  199. aikit/template/ai-kit/stacks/FRONTEND.md +9 -0
  200. aikit/template/ai-kit/stacks/GO.md +19 -0
  201. aikit/template/ai-kit/stacks/INFRA.md +12 -0
  202. aikit/template/ai-kit/stacks/JAVA.md +13 -0
  203. aikit/template/ai-kit/stacks/LARAVEL.md +15 -0
  204. aikit/template/ai-kit/stacks/LIBRARY.md +9 -0
  205. aikit/template/ai-kit/stacks/MOODLE.md +12 -0
  206. aikit/template/ai-kit/stacks/PHP.md +11 -0
  207. aikit/template/ai-kit/stacks/PYTHON.md +11 -0
  208. aikit/template/ai-kit/stacks/RUST.md +18 -0
  209. aikit/template/ai-kit/vendor/security-audit/AI-AND-LLM.md +83 -0
  210. aikit/template/ai-kit/vendor/security-audit/ATTACK-CLASSES.md +130 -0
  211. aikit/template/ai-kit/vendor/security-audit/CLIENT-SIDE.md +83 -0
  212. aikit/template/ai-kit/vendor/security-audit/CLOUD-AND-DEPLOYMENT.md +86 -0
  213. aikit/template/ai-kit/vendor/security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -0
  214. aikit/template/ai-kit/vendor/security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -0
  215. aikit/template/ai-kit/vendor/security-audit/HUNTING.md +251 -0
  216. aikit/template/ai-kit/vendor/security-audit/LICENSE +21 -0
  217. aikit/template/ai-kit/vendor/security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -0
  218. aikit/template/ai-kit/vendor/security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -0
  219. aikit/template/ai-kit/vendor/security-audit/RECONNAISSANCE.md +156 -0
  220. aikit/template/ai-kit/vendor/security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -0
  221. aikit/template/ai-kit/vendor/security-audit/SKILL.md +192 -0
  222. aikit/template/ai-kit/vendor/security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -0
  223. aikit/template/ai-kit/vendor/security-audit/VALIDATION-AND-REPORTING.md +186 -0
  224. aikit/template/ai-kit/vendor/security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -0
  225. aikit/template/ai-kit/vendor/security-audit/report-schema.json +461 -0
  226. aikit/template/ai-kit/vendor/security-audit/validate-coverage-ledger.cjs +872 -0
  227. aikit/template/ai-kit/vendor/security-audit/validate-coverage-ledger.test.cjs +740 -0
  228. aikit/template/ai-kit/vendor/security-audit/validate-findings.cjs +773 -0
  229. aikit/template/ai-kit/vendor/security-audit/validate-findings.test.cjs +652 -0
  230. aikit/template/ai-kit/vendor/strix/LICENSE +201 -0
  231. aikit/template/ai-kit/vendor/strix/api-security-testing/SKILL.md +61 -0
  232. aikit/template/ai-kit/vendor/strix/application-security-testing/SKILL.md +66 -0
  233. aikit/template/ai-kit/vendor/strix/ci-security-scanning-with-strix/SKILL.md +149 -0
  234. aikit/template/ai-kit/vendor/strix/find-security-vulnerabilities-in-code/SKILL.md +62 -0
  235. aikit/template/ai-kit/vendor/strix/fix-security-vulnerabilities-with-strix/SKILL.md +77 -0
  236. aikit/template/ai-kit/vendor/strix/managed-pentesting-with-strix/SKILL.md +321 -0
  237. aikit/template/ai-kit/vendor/strix/owasp-top-10-testing/SKILL.md +64 -0
  238. aikit/template/ai-kit/vendor/strix/penetration-testing-with-strix/SKILL.md +162 -0
  239. aikit/template/ai-kit/vendor/strix/web-app-penetration-testing/SKILL.md +54 -0
  240. aikit/template/ai-kit/web-design/LARAVEL.md +51 -0
  241. aikit/template/ai-kit/web-design/LIBRARIES.md +39 -0
  242. aikit/template/ai-kit/web-design/REVIEW.md +37 -0
  243. aikit/template/ai-kit/web-design/TOOLS.md +43 -0
  244. aikit/template/docs/DECISIONS.md +7 -0
  245. aikit/template/docs/adr/0000-template.md +20 -0
  246. aikit/template/docs/design/ACCEPTANCE.md +24 -0
  247. aikit/template/docs/design/BRIEF.md +26 -0
  248. aikit/template/docs/design/SYSTEM.md +30 -0
  249. aikit/templates/agent-secrets.ignore +19 -0
  250. aikit/templates/gitignore.private +160 -0
  251. aikit/templates/gitignore.team +139 -0
  252. aikit/tests/build_distribution.py +73 -0
  253. aikit/tests/docker_smoke.py +172 -0
  254. aikit/tests/fixtures/create-junction.ps1 +18 -0
  255. aikit/tests/fixtures/golden/claude-settings-local.json +58 -0
  256. aikit/tests/test_adapters.py +105 -0
  257. aikit/tests/test_aikit.py +79 -0
  258. aikit/tests/test_benchmark.py +241 -0
  259. aikit/tests/test_check_kit.py +203 -0
  260. aikit/tests/test_context.py +76 -0
  261. aikit/tests/test_context7.py +153 -0
  262. aikit/tests/test_context_selection.py +70 -0
  263. aikit/tests/test_distribution.py +181 -0
  264. aikit/tests/test_docker_image.py +63 -0
  265. aikit/tests/test_docker_test_usage.py +54 -0
  266. aikit/tests/test_doctor.py +148 -0
  267. aikit/tests/test_evaluate.py +66 -0
  268. aikit/tests/test_install.py +939 -0
  269. aikit/tests/test_learning.py +247 -0
  270. aikit/tests/test_memory.py +371 -0
  271. aikit/tests/test_metrics.py +209 -0
  272. aikit/tests/test_native.py +342 -0
  273. aikit/tests/test_onboarding.py +301 -0
  274. aikit/tests/test_router.py +336 -0
  275. aikit/tests/test_security_audit.py +237 -0
  276. aikit/tests/test_strix.py +245 -0
  277. aikit/tests/test_web_design.py +219 -0
  278. aikit/tests/wheel_smoke.py +104 -0
@@ -0,0 +1,48 @@
1
+ {
2
+ "verified_documentation_date": "2026-10-08",
3
+ "roles": {
4
+ "cheap": {
5
+ "model": "gpt-6-luna",
6
+ "effort": "low"
7
+ },
8
+ "work": {
9
+ "model": "gpt-6.1-sol",
10
+ "effort": "medium"
11
+ },
12
+ "escalation": {
13
+ "model": "gpt-6-astra",
14
+ "effort": "high"
15
+ }
16
+ },
17
+ "reasoning_mode": "standard",
18
+ "service_tier_policy": "standard",
19
+ "supported_efforts": {
20
+ "cheap": [
21
+ "none",
22
+ "low",
23
+ "medium",
24
+ "high",
25
+ "xhigh",
26
+ "max"
27
+ ],
28
+ "work": [
29
+ "low",
30
+ "medium",
31
+ "high",
32
+ "xhigh",
33
+ "max"
34
+ ],
35
+ "escalation": [
36
+ "low",
37
+ "medium",
38
+ "high",
39
+ "xhigh",
40
+ "max"
41
+ ]
42
+ },
43
+ "sources": [
44
+ "https://developers.openai.com/api/docs/models/gpt-6-luna",
45
+ "https://developers.openai.com/api/docs/models/gpt-6.1-sol",
46
+ "https://developers.openai.com/api/docs/models/gpt-6-astra"
47
+ ]
48
+ }
@@ -0,0 +1,14 @@
1
+ # OpenAI provider controls
2
+
3
+ Load only with a routing/runtime task. [openai.json](openai.json) is the single owner of active model IDs and default role/effort mappings.
4
+ Its documentation date is not proof of account access. Verify current runtime registry, endpoint, region, tool support, efforts, modes, context/output limits, prices, and actual served tier.
5
+
6
+ - Prefer Responses for reasoning-enabled function/tool workflows. Some Chat Completions model combinations lack tool calling or require none effort.
7
+ - reasoning.effort and reasoning.mode are separate controls. Default standard; pro adds billed work and needs a supported endpoint/model and justified expected benefit.
8
+ - Policy standard tier maps to service_tier default; auto follows project settings. Flex/fast/priority/ultrafast availability varies by model/region/account. Observe the actual served tier.
9
+ - For applicable models, check the large-input pricing boundary against current model documentation before a large call; do not put a fixed pricing threshold into universal policy.
10
+ - max_output_tokens includes reasoning; a short visible reply can require a larger reasoning allowance.
11
+ - Verify prompt caching eligibility and cached-token observations; a stable prefix alone is not a cache hit.
12
+
13
+ Sources: [model catalog](https://developers.openai.com/api/docs/models), [reasoning](https://developers.openai.com/api/docs/guides/reasoning), [Responses create](https://developers.openai.com/api/reference/java/resources/responses/methods/create), [prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
14
+ No model-switching runtime or API credentials are installed by this distribution.
@@ -0,0 +1,11 @@
1
+ {
2
+ "schema": 1,
3
+ "mode": "recommended",
4
+ "profile": "balanced",
5
+ "project_pin": null,
6
+ "task_pins": {},
7
+ "minimum_cases": 20,
8
+ "quality_floor": 0.8,
9
+ "context_bytes": {"economy": 16000, "balanced": 32000, "quality": 64000},
10
+ "orchestration": {"planner": "work", "executor": "work", "reviewer": "work", "escalation": "escalation"}
11
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "schema": 1,
3
+ "default_provider": null,
4
+ "roles": {
5
+ "cheap": null,
6
+ "work": null,
7
+ "escalation": null
8
+ },
9
+ "local_models": {
10
+ "cheap": null,
11
+ "work": null,
12
+ "escalation": null
13
+ }
14
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "project_language": "English",
3
+ "chat_language": "Russian",
4
+ "sharing_mode": "private",
5
+ "conventions": "owner",
6
+ "upstream": {
7
+ "url": "https://github.com/tigusigalpa/ai-kit",
8
+ "ref": "main",
9
+ "source_directory": "template"
10
+ }
11
+ }
@@ -0,0 +1,13 @@
1
+ # .NET
2
+
3
+ Confirm target frameworks (global.json, *.csproj/*.fsproj), solution layout, and configured checks before editing.
4
+ - Respect nullable reference types and the project's existing warning policy; do not silence nullable or analyzer warnings without a documented reason.
5
+ - Use async/await for I/O end to end and propagate CancellationToken; avoid sync-over-async (Task.Result, .Wait) and unbounded parallelism.
6
+ - Manage IDisposable/IAsyncDisposable with using/await using so handles and connections close deterministically.
7
+ - Throw typed exceptions, preserve inner exceptions, and validate arguments at public boundaries (ArgumentNullException.ThrowIfNull and explicit messages).
8
+ - Prefer records and LINQ where they clarify intent; keep hot paths allocation-conscious without premature optimization.
9
+ - Use ILogger with structured properties and secret redaction; no secrets in exceptions or log output.
10
+ - Test with the configured xUnit/NUnit/MSTest setup, covering async and error paths; use WebApplicationFactory/TestServer for HTTP contracts.
11
+ - Run dotnet build/test plus the project's format and analyzer commands; pin SDKs with global.json when the repository does and review dependency upgrades.
12
+
13
+ Sources: [C# language reference](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/), [nullable reference types](https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references), [.NET CLI](https://learn.microsoft.com/en-us/dotnet/core/tools/).
@@ -0,0 +1,18 @@
1
+ # Filament
2
+
3
+ Apply only to confirmed Filament work. Inspect composer.json and composer.lock for Filament, Laravel, PHP, Livewire, and plugins; inspect frontend locks when assets change. A detected dependency suggests this profile but does not establish panel usage or a supported runtime. Combine the [Laravel baseline](LARAVEL.md) with this profile for Laravel modules; apply [owner conventions](../profiles/OWNER.md) only when selected.
4
+
5
+ ## Version and structure
6
+
7
+ - Match APIs and generators to the installed major version. Confirm compatibility before a new installation or upgrade; preserve an existing application's version and layout. The official [installation guide](https://filamentphp.com/docs/5.x/introduction/installation) covers panel and component installations; do not run a fresh-app scaffold over an existing project.
8
+ - Follow the project's Resource, Page, RelationManager, Widget, and schema conventions. Keep forms, tables, filters, and actions focused on presentation; put reusable business operations in the existing application service layer. Avoid creating duplicate domain logic in UI callbacks.
9
+ - Bound queries and loading: eager-load displayed relations, paginate large tables, and check reactive fields/widgets for repeated queries. Validate submitted data and uploads on the server. Review what public Livewire state exposes to the browser.
10
+
11
+ ## Authorization and verification
12
+
13
+ - Enforce panel access, model policies, action authorization, and tenant scope on the server. Hidden navigation or controls do not protect a callable operation. Check related-owner access and additional model properties explicitly; never assume an extra property receives the resource record's checks.
14
+ - Review the [resource authorization contract](https://filamentphp.com/docs/5.x/resources/overview#authorization) for single-record and bulk operations. Test mixed selections, denied records, and cross-tenant access. Do not remove query scopes or skip authorization to make a screen work.
15
+ - Keep effects, retries, transactions, and money handling under the Laravel baseline. When owner conventions apply, verify public UUID URLs and bindings through Resources and relation pages.
16
+ - Use the project's PHPUnit/Pest and Livewire setup. Test affected list/filter behavior, create/edit validation and persistence, direct denied requests, actions/bulk actions, and tenant isolation. A visible button or a successful page load alone is insufficient verification.
17
+
18
+ Version-match the official [security guide](https://filamentphp.com/docs/5.x/advanced/security) and [resource tests](https://filamentphp.com/docs/5.x/testing/testing-resources). Report application checks that could not run; kit validation does not execute a Filament application.
@@ -0,0 +1,9 @@
1
+ # Frontend / JavaScript / TypeScript
2
+
3
+ Confirm package.json, lockfile/package manager, Node version, bundler, and framework/module boundaries. Do not assume Vite/Inertia/Livewire solely from Laravel.
4
+ - Honor the pinned package manager/Node version and use reproducible lock-based installation. Keep generated assets separate from source.
5
+ - Run actual type/lint/unit/build commands; new TypeScript code should have a documented strictness baseline. Avoid unrelated tool migrations.
6
+ - Check accessibility, keyboard/focus behavior, loading/error states, escaping, and server-side authorization boundaries.
7
+ - Treat browser-exposed configuration as public; secrets belong on the server. Audit dependencies after relevant changes.
8
+ - Test affected interactions with the project's tooling; distinguish a successful asset build from a verified browser interaction.
9
+ - Preserve asset URL/cache behavior and generated manifest contracts with the backend. Bound fetch requests and cancel obsolete work.
@@ -0,0 +1,19 @@
1
+ # Go
2
+
3
+ Confirm go.mod/toolchain, module boundaries, supported platforms, vendoring, and actual CI before editing.
4
+ - Keep package boundaries simple; expose small interfaces at consumers. Do not force a speculative internal/pkg layout.
5
+ - Propagate context.Context through I/O. Honor cancellation in handlers/workers; use configured http.Client and server timeouts, close response bodies, and bound payloads.
6
+ - Wrap errors with %w when callers must inspect the cause; use errors.Is/As and keep errors actionable. Document nil/zero-value behavior for public types.
7
+ - Make goroutine ownership/termination explicit. Use structured cancellation (such as errgroup when already appropriate), bounded concurrency, and clear synchronization.
8
+ - Use log/slog or the established logger with structured fields and secret redaction.
9
+ - Use table-driven tests and httptest for HTTP contracts; cover cancellation, timeout, race-sensitive scenarios, and errors.
10
+ - Run gofmt, targeted tests, go test ./..., and go vet as appropriate; use the project's staticcheck/golangci-lint configuration. New CI should include supported -race scenarios and govulncheck.
11
+ - Preserve go.mod/go.sum and deliberate vendor/modules.txt. Review go mod tidy diffs; do not add unrelated dependency churn.
12
+
13
+ Example preserving a cause:
14
+
15
+ ~~~go
16
+ return fmt.Errorf("load account: %w", err)
17
+ ~~~
18
+
19
+ Sources: [HTTP client](https://pkg.go.dev/net/http#Client), [Go security](https://go.dev/doc/security/best-practices), [module reference](https://go.dev/doc/modules/gomod-ref).
@@ -0,0 +1,12 @@
1
+ # Infrastructure (Terraform/Helm)
2
+
3
+ Confirm tool versions, state backend, environments/workspaces, and the apply/review workflow before editing.
4
+ - Format and validate before plan: terraform fmt -check, terraform validate, then plan against the intended workspace; apply only after review and an explicit request.
5
+ - Keep state remote, locked, and separated per environment; never commit state, .terraform/, or secrets. Supply values through variables/TF_VAR or a secrets manager, not literals in tracked .tf/.tfvars files.
6
+ - Pin provider and module versions; review upgrade diffs and state-migration risk; keep modules small and composable with explicit variables and outputs.
7
+ - Prefer data sources and remote state over duplicating values; document required inputs in descriptions or the module README.
8
+ - Charts: lint and render before installing (helm lint, helm template with representative values); pin chart and image versions, set resource requests/limits, and honor values.schema.json where present.
9
+ - Keep rendered Kubernetes manifests aligned with the container contract (non-root, probes, resource requests); wire secrets through existing secret mechanisms, never plain values.
10
+ - Review plans and diffs for destructive changes (replace/destroy); protect production with approvals and, where configured, policy checks in CI.
11
+
12
+ Sources: [Terraform CLI](https://developer.hashicorp.com/terraform/cli), [Terraform language](https://developer.hashicorp.com/terraform/language), [Helm documentation](https://helm.sh/docs/).
@@ -0,0 +1,13 @@
1
+ # Java (Maven/Gradle)
2
+
3
+ Confirm the build tool and version (pom.xml, build.gradle(.kts), wrapper), language level, and configured checks before editing.
4
+ - Build through the Maven/Gradle wrapper (mvnw/gradlew) so CI and contributors share one toolchain; never edit generated build output.
5
+ - Keep packages cohesive and public APIs minimal; prefer composition and small interfaces over deep inheritance.
6
+ - Use Optional as a return type only, never as fields or parameters; use streams where they clarify and loops where they perform.
7
+ - Handle checked exceptions at boundaries, wrap with context, and preserve causes; validate arguments with Objects.requireNonNull and explicit messages.
8
+ - Manage resources with try-with-resources so streams and connections close deterministically.
9
+ - Use SLF4J (or the established logger) with secret redaction; no secrets in exceptions or logs.
10
+ - Test with the configured JUnit 5/Mockito stack, covering error paths and concurrency; keep tests hermetic, repeatable, and free of real data.
11
+ - Run the wrapper's test/verify plus the project's format/static analysis; keep plugin and dependency versions pinned and review upgrades.
12
+
13
+ Sources: [Maven guides](https://maven.apache.org/guides/), [Gradle user manual](https://docs.gradle.org/current/userguide/userguide.html), [Java SE documentation](https://docs.oracle.com/en/java/javase/).
@@ -0,0 +1,15 @@
1
+ # Laravel
2
+
3
+ Confirm installed Laravel/PHP/Filament versions and composer scripts. Apply the [PHP baseline](PHP.md) and, when conventions=owner, [owner rules](../profiles/OWNER.md).
4
+ For confirmed Filament UI work also apply the [Filament profile](FILAMENT.md).
5
+ - Read env() only from configuration files; use config() in application code so cached configuration works.
6
+ - Validate request boundaries; policies/gates protect APIs, jobs, tenants, and admin UI. Hidden UI controls are not authorization.
7
+ - Keep database transactions bounded. Dispatch dependent jobs/events after commit using supported framework configuration/APIs; rolled-back work must not escape.
8
+ - Make business effects idempotent. Unique jobs/locks help coordination but do not guarantee exactly-once external effects; handle retry/replay explicitly.
9
+ - Set outbound timeouts and retry predicates; do not blindly retry non-idempotent writes. Test remote errors with fakes.
10
+ - Check N+1 queries, pagination, indexes, mass assignment, cache invalidation, and transaction/deletion races.
11
+ - Use exact money representation. Factories create valid minimal records; seeders are safe to rerun. migrate:fresh is only for an isolated disposable database.
12
+ - Use configured PHPUnit/Pest tests. For a new application prefer Pint, an explicitly chosen Larastan level, and a documented test runner; preserve existing tooling.
13
+ - Test UUID route binding, policies, lifecycle, fresh/upgrade migrations, and factories/seeders when affected.
14
+
15
+ Version-match the official [configuration](https://laravel.com/framework/docs/configuration), [queues](https://laravel.com/framework/docs/queues), [HTTP client](https://laravel.com/framework/docs/http-client), and [Eloquent](https://laravel.com/framework/docs/eloquent) docs to the installed major version.
@@ -0,0 +1,9 @@
1
+ # Reusable library / SDK
2
+
3
+ Confirm package type, supported language versions, exported API, versioning policy, and publishing workflow.
4
+ - Preserve public API/serialization/error contracts. Use semantic versioning where adopted; breaking changes require the policy's appropriate version and migration notes.
5
+ - Document examples and compatibility requirements; test consumer use, including Go example tests or Composer autoload where appropriate.
6
+ - Keep protocol numbers/IDs exact, distinguish retryable errors, and expose cancellation/timeouts without leaking provider credentials.
7
+ - Review dependency additions for consumer impact. Check go mod tidy/Go compatibility or composer validate and a supported dependency matrix.
8
+ - Track Go manifests/checksums; for PHP libraries follow the explicit lockfile policy. Keep source/tests/docs rather than unintentionally ignoring release artifacts.
9
+ - Publishing, tags, releases, and external notifications need an explicit task. A passing test suite does not authorize release.
@@ -0,0 +1,12 @@
1
+ # Moodle installation or plugin
2
+
3
+ Confirm Moodle/PHP versions, plugin type, component, version.php, upgrade history, and actual PHPUnit/Behat commands.
4
+ - Extend supported plugin APIs rather than editing core. Use Moodle data, forms, events, output, and language APIs.
5
+ - Pair the correct context with require_capability/checks; protect state-changing requests with sesskey and avoid trusting client roles.
6
+ - Use get_string and component lang files; escape output according to the renderer/data type. Keep authored project strings English unless explicitly requested otherwise.
7
+ - For schema changes update install.xml, add version-gated upgrade.php steps/savepoints, and bump the plugin version appropriately. Test fresh and existing installations; batch large backfills and bound locks/reruns.
8
+ - Audit personal data storage/export/deletion. Implement the applicable Privacy API provider; use a null provider only after establishing that no personal data is stored.
9
+ - Use Moodle cache APIs with defined keys/invalidation; do not cache capabilities or personal content across contexts incorrectly.
10
+ - Test role/context/capability combinations, migration paths, and privacy behavior. Avoid course/user data in diagnostics.
11
+
12
+ Match the installed branch of [Privacy API](https://moodledev.io/docs/5.1/apis/subsystems/privacy) and [plugin upgrades](https://moodledev.io/docs/5.1/guides/upgrade).
@@ -0,0 +1,11 @@
1
+ # PHP
2
+
3
+ Confirm PHP versions/extensions, composer manifests/lock, autoload boundaries, and framework before edits. Laravel and Moodle add their own profiles.
4
+ - Use Composer autoload/PSR conventions and the project's formatter/static analyzer. Do not impose a new directory layout or analyzer on an existing package.
5
+ - Validate inputs, escape output by its context, parameterize SQL, and enforce authorization; use the shared security baseline.
6
+ - Keep money/quantities exact (integer minor units or decimal/string contracts), not binary floats. Preserve protocol formats.
7
+ - Bound HTTP/connect timeouts, response sizes, retries, and stream ownership. Retry writes only with proven idempotency.
8
+ - Use narrow exceptions, preserve causes, and avoid logging secrets. Test failure paths and public contracts.
9
+ - Run composer validate, configured unit/static/format checks, and dependency audit when applicable. Track application locks; honor deliberate library lock policy.
10
+
11
+ Sources: [Composer](https://getcomposer.org/doc/03-cli.md), [PSR standards](https://www.php-fig.org/psr/).
@@ -0,0 +1,11 @@
1
+ # Python scripts and packages
2
+
3
+ Confirm supported Python version, entry points, pyproject/requirements/lock, and configured checks.
4
+ - Separate I/O from core logic. Executables use main() and a __main__ guard; importing must not run the script's work.
5
+ - Use argparse or the existing CLI library; document arguments, output, errors, and exit codes.
6
+ - Use pathlib, explicit encodings, context managers, and streams for large inputs. Validate resolved paths before bulk changes; preview destructive operations.
7
+ - Use subprocess argument lists without a shell; never interpolate untrusted input into commands, eval, or unsafe deserialization.
8
+ - Annotate public/complex boundaries, catch expected exceptions, and preserve causes. Bound network timeouts.
9
+ - Use an isolated environment and versioned manifests/locks. New packages may prefer uv, ruff, and a chosen mypy/pyright baseline; standalone standard-library scripts need no packaging framework.
10
+ - Test success, invalid/boundary input, reruns, and file preservation with temporary directories and substituted external services.
11
+ - Run configured tests/format/lint/type checks; audit trusted dependencies where applicable. Keep real data/secrets out of fixtures and reports.
@@ -0,0 +1,18 @@
1
+ # Rust
2
+
3
+ Confirm the toolchain (rust-toolchain.toml), workspace members, supported targets, and configured checks before editing.
4
+ - Follow ownership and borrowing: prefer references over cloning, add explicit lifetimes only where inference fails, and reach for Rc/Arc/RefCell for a diagnosed need, not by default.
5
+ - Keep `unsafe` behind a reviewed boundary: minimal blocks, a safety comment, and encapsulation behind a safe API; never add unsafe to silence the borrow checker.
6
+ - Use Result<T, E> for recoverable failures with meaningful errors (thiserror for libraries, anyhow for applications when already used); panic only on programmer errors, never on user input.
7
+ - Prefer exhaustive matches, iterators, and small focused functions; respect the edition and MSRV before adopting new syntax.
8
+ - Use structured logging (tracing/log) with secret redaction; keep secrets out of panics and error text.
9
+ - Write unit tests beside the code and integration tests under tests/; cover error paths and concurrency. Run cargo fmt, cargo clippy, and cargo test; deny warnings only when CI already does.
10
+ - Keep Cargo.lock for binaries and applications; review dependency additions (cargo audit where configured) and preserve rust-toolchain.toml and the workspace layout.
11
+
12
+ Example of an explicit error boundary:
13
+
14
+ ~~~rust
15
+ return Err(BuildError::MissingManifest(path.display().to_string()));
16
+ ~~~
17
+
18
+ Sources: [Cargo book](https://doc.rust-lang.org/cargo/), [Rust API guidelines](https://rust-lang.github.io/api-guidelines/), [Clippy](https://doc.rust-lang.org/clippy/).
@@ -0,0 +1,83 @@
1
+ # AI, LLM, and Agent Hunting
2
+
3
+ #### When to use this file
4
+
5
+ Reach for this file when a language model participates in a trust-sensitive decision: chatbots and assistants, RAG pipelines, persistent agent memory, agent/tool-calling loops, MCP servers and clients, code that builds prompts from untrusted input, or code that consumes model output and acts on it. The important data flow is *untrusted content → model or memory → capability, authority, or sink*.
6
+
7
+ Use this alongside `ATTACK-CLASSES.md`, not instead of it. Transport, access control, query construction, filesystem use, and output rendering remain ordinary trust boundaries. This file covers the model-specific delegation layer. Split large targets by retrieval, memory, tool dispatch, MCP, and output handling.
8
+
9
+ ## Core discipline (include in every agent prompt for this domain)
10
+
11
+ ```
12
+ - Prompt injection alone is not a finding. Require a code-level boundary failure: content reaches another principal's context, invokes authority the requester lacks, discloses data they cannot read, or drives a sink they cannot reach directly.
13
+ - Model output, memory, tool descriptions, and MCP responses are untrusted inputs. Point to the code that grants authority, trusts output, writes durable state, or feeds a sink.
14
+ - A guardrail prompt is not a security boundary. Count only deterministic checks, resource-scoped authorization, isolation, binding, and constrained credentials.
15
+ - State the attacker, affected principal, effective execution identity, resource, exact action, authority used, and observable impact. An intentional direct request to use the requester's existing authority is not a delegation defect merely because a model executes it.
16
+ - Authorization and action binding are separate controls. Attacker-controlled content that causes an action under an affected principal's valid authority is an action-binding failure when that principal did not intentionally request or approve the exact action.
17
+ - Classify every candidate as `confirmed` only after source evidence and bounded local validation establish the boundary and result. Use `needs_validation` when a required provider, deployment, model, renderer, or identity behavior is not observable locally.
18
+ ```
19
+
20
+ ## Context, retrieval, and memory attack classes (subagent_type: `general`)
21
+
22
+ **Indirect injection through retrieved or ingested content**
23
+ An attacker can write a RAG document, indexed page, file, email, issue body, tool response, or metadata that enters a different principal's model context. Trace who can write each source, how retrieval scopes it, whose session consumes it, and what capability is enabled there. Check isolation, resource authorization, and binding to the consuming principal's intent separately. The defect is a missing deterministic control, not persuasive text by itself.
24
+
25
+ **Cross-session or cross-tenant context bleed**
26
+ Conversation history, embeddings, retrieval results, or prompt caches are keyed too broadly. Verify tenant and ACL filters in the query itself and every cache key. A tenant field stored on an object is not enforcement if an alternate query, shared cache, or batch path omits it.
27
+
28
+ **Persistent memory poisoning**
29
+ Attacker-controlled content or model summaries are written into memory that later shapes another task, user, or privileged session. Review who may create, update, merge, and delete memory; its provenance and tenant scope; whether low-trust observations become durable instructions or facts; and whether retrieval distinguishes user preferences from tool policy. Memory intentionally saved by a user and used only for that user's intentional, allowed requests is not a cross-boundary finding.
30
+
31
+ **Prompt role and provenance confusion**
32
+ Prompt assembly lets untrusted text impersonate a system message, prior turn, tool result, policy, or memory record. Look for string concatenation, untyped history, caller-controlled role fields, and serialization round trips that lose source labels. Confirm that the forged provenance changes a deterministic trust decision or reaches a meaningful capability.
33
+
34
+ ## Tool and action attack classes (subagent_type: `general`)
35
+
36
+ **Tool-argument injection into a downstream sink**
37
+ Model-produced arguments reach SQL, shell, file, URL-fetch, or privileged APIs without handler-side validation. Treat the tool schema as input parsing, then follow each field from decoded call to sink. Structured output narrows shape; it does not establish authorization, safe paths, safe URLs, or query semantics.
38
+
39
+ **Excessive agency and confused-deputy authority**
40
+ The agent uses a service identity or broad credential, while the tool handler does not re-check the requesting principal's permission on the named resource. Verify both the effective identity and whether the caller could perform that exact operation through the normal product interface. A shared credential with enforced per-user query scope is not a defect.
41
+
42
+ **Action-confirmation and approval binding**
43
+ A user approves one described action but execution can use changed arguments, a different resource, a different principal, or a later model turn. An action-binding defect also exists when attacker-controlled content causes a side effect under a victim's valid authority without the victim's intentional request or approval, even if generic authorization permits the victim to perform it. Review whether intent or confirmation binds the normalized tool name, complete argument object, requester, target, amount, expiry, and batch membership. Check retries and resumed sessions: an approval must not authorize a mutated or duplicate side effect.
44
+
45
+ **Tool-schema and dispatcher disagreement**
46
+ The schema accepts aliases, extra fields, duplicate keys, coercions, nested free-form objects, or out-of-range values that the dispatcher or handler interprets differently. Compare schema validation, canonicalization, generated bindings, and handler defaults. Validate again where values become resource selectors or security-relevant options.
47
+
48
+ **Unbounded delegated action loops**
49
+ A bounded request can enqueue repeated spend, send, mutation, or external API work without a per-request budget, per-action authorization, cancellation, or idempotency control. Confirm impact on shared cost, quotas, other users, or durable state. Do not test by exhausting a service; use code-level accounting and a locally bounded loop.
50
+
51
+ ## MCP and sub-agent trust classes (subagent_type: `general`)
52
+
53
+ **Sub-agent and MCP trust inheritance**
54
+ A delegated task receives the full session, credentials, memory, or capabilities rather than the least authority required. Check the principal and tenant carried into each call, capability narrowing, credential audience, and whether delegated results are treated as untrusted on return.
55
+
56
+ **MCP server and tool identity confusion**
57
+ Calls or results are routed by attacker-influenceable server names, tool names, request IDs, resource URIs, or model-selected aliases rather than the authenticated connection and outstanding request. Check whether two servers can claim the same tool or resource identity, whether reconnect changes the binding, and whether a response from one server can satisfy another server's pending call.
58
+
59
+ **MCP metadata and schema as policy**
60
+ Tool descriptions, resource metadata, prompts, completion hints, or schemas supplied by an MCP peer are trusted as policy or authorization. These fields can guide the model but cannot grant capability. Find the deterministic allowlist, server identity check, and handler authorization that remain authoritative when metadata conflicts.
61
+
62
+ ## Output and disclosure attack classes (subagent_type: `general`)
63
+
64
+ **Insecure output rendering**
65
+ Model output reaches an executing HTML, Markdown, template, URL, or command sink without the sink's required encoding and policy. For browser rendering, verify auto-loaded resources and CSP or sanitization in `CLIENT-SIDE.md`; renderer behavior outside the repository makes the candidate `needs_validation`.
66
+
67
+ **Sensitive context extraction**
68
+ The assembled context contains credentials, another user's data, private source, or policy values that themselves grant access, and user-influenced output exposes them. Read prompt assembly and data-fetch code. Disclosure of generic instructions or behavior that does not cross a data boundary is not a finding.
69
+
70
+ ## Universal moves (apply across the above)
71
+
72
+ - Draw four maps first: each execution identity, each capability, every writable context or memory source, and each output destination. Then connect the principal at the start to the authority at the end.
73
+ - Start at side-effecting tools and work backward through dispatcher, schema, confirmation, model context, retrieval, and ingestion. Start at durable memory reads and trace every writer.
74
+ - Compare direct, queued, retry, resume, batch, and delegated paths for the same action. The strongest gate must apply after arguments are final and before every side effect.
75
+
76
+ ## Validation rules (apply before reporting ANY finding here)
77
+
78
+ 1. Name the crossed boundary and observable result: attacker, affected principal or shared resource, execution identity, target, and unauthorized or unrequested action or disclosure.
79
+ 2. For confused-deputy authority claims, prove the tool lacks requester-and-resource authorization and that the attacker cannot perform the same action normally. For action-binding claims, instead prove attacker-controlled content caused an action under the affected principal's authority that the principal did not intentionally request or approve. Valid generic authorization does not establish that intent.
80
+ 3. For memory or retrieval claims, cite both the attacker-controlled write and the later cross-principal read or privileged decision. A shared record without a reachable consumer is not enough.
81
+ 4. For action binding, establish the intentional request or normalized approved object, if any, and compare it with the object the handler uses. Confirm a locally observable unrequested action, mutation, duplicate, or authority change without extending the test into harmful execution. For schema disagreement, compare the normalized validated object with the handler's object.
82
+ 5. For MCP identity claims, verify the authenticated connection, request correlation, tool namespace, and effective credential. Mark `needs_validation` if external server identity or deployment routing is required.
83
+ 6. Return `confirmed` findings only with a complete source trace and meaningful result. Return `needs_validation` for a specific unresolved boundary fact and state the bounded local or owner-observed check needed to resolve it.
@@ -0,0 +1,130 @@
1
+ # Attack Classes
2
+
3
+ #### Attack classes — choose and split based on Phase 1
4
+
5
+ Select attack classes relevant to the application type. Not every class applies to every codebase. The list below is a starting point; add application-specific classes from Phase 1 and split large codebases per subsystem. Frame work as finding, validating, fixing, and prioritizing vulnerabilities. Keep validation to source review and bounded local fixtures; do not develop payload chains, test availability on live services, or take action in shared environments.
6
+
7
+ Use `confirmed` only when source evidence and bounded validation establish the full boundary and meaningful result. Use `needs_validation` when a specific deployment, provider, platform, identity, or runtime fact is unavailable; state the missing fact and the safe owner-observed or local check that resolves it.
8
+
9
+ > **Native / binary / kernel targets** (C/C++/Rust-unsafe, kernel modules, parsers and decoders, FFI, concurrent runtimes, binary loaders, JITs, firmware): use the memory-safety, integer/ABI, concurrency, binary-loader, and privileged-interface classes in [MEMORY-SAFETY-AND-BINARY.md](MEMORY-SAFETY-AND-BINARY.md).
10
+ >
11
+ > **AI / LLM / agent targets** (chatbots, RAG, persistent memory, tool-calling agents, MCP servers/clients, prompt assembly, or model-controlled actions): use the context, memory-poisoning, action-binding, tool-schema, MCP-identity, and output classes in [AI-AND-LLM.md](AI-AND-LLM.md).
12
+ >
13
+ > **HTTP, web, and identity targets** (ordinary web apps, APIs, reverse proxies, CDNs, gateways, custom HTTP parsers, sessions, CSRF, JWT, OAuth/OIDC, SAML, MFA, passkeys, account recovery/linking, API keys, or mTLS): use [WEB-PROTOCOL-AND-AUTH.md](WEB-PROTOCOL-AND-AUTH.md).
14
+ >
15
+ > **Client-side and browser targets** (SPAs, browser extensions, embedded webviews, service workers, browser storage, cross-window messaging, CORS, WebSockets, or DOM rendering): use [CLIENT-SIDE.md](CLIENT-SIDE.md).
16
+ >
17
+ > **Supply-chain and release targets** (dependency resolution, generated inputs, CI, release/signing/promotion, updates, plugins, or extensions): use [SUPPLY-CHAIN-AND-RELEASE.md](SUPPLY-CHAIN-AND-RELEASE.md).
18
+ >
19
+ > **Cloud and deployment targets** (IAM, infrastructure as code, containers/Kubernetes, service mesh, serverless/edge, ingress, provider events, or runtime configuration): use [CLOUD-AND-DEPLOYMENT.md](CLOUD-AND-DEPLOYMENT.md).
20
+ >
21
+ > **Protocol, RPC, and messaging targets** (gRPC, GraphQL transports, Protobuf/Cap'n Proto/Thrift, custom protocols, queues, brokers, pub/sub, webhooks, or streaming RPC): use [PROTOCOLS-RPC-AND-MESSAGING.md](PROTOCOLS-RPC-AND-MESSAGING.md).
22
+ >
23
+ > **Resource-exhaustion and availability targets** (untrusted work can consume shared CPU, memory, disk, connections, workers, queues, quotas, or operator-owned spend): use [RESOURCE-EXHAUSTION-AND-AVAILABILITY.md](RESOURCE-EXHAUSTION-AND-AVAILABILITY.md).
24
+ >
25
+ > **Data-isolation and lifecycle targets** (multi-tenant stores, caches/search, object links, analytics, export/backup, migration, deletion, retention, or restore): use [DATA-ISOLATION-AND-LIFECYCLE.md](DATA-ISOLATION-AND-LIFECYCLE.md).
26
+ >
27
+ > **Desktop, mobile, and local-IPC targets** (native apps, deep links, webview bridges, exported components, privileged helpers, local daemons, Unix sockets/XPC/Binder/D-Bus): use [DESKTOP-MOBILE-AND-LOCAL-IPC.md](DESKTOP-MOBILE-AND-LOCAL-IPC.md).
28
+
29
+ **Injection** (subagent_type: `general`)
30
+ Trace untrusted input from entry point to dangerous sink. What counts as a "dangerous sink" depends on the application:
31
+ - Web apps: SQL queries, HTML output, shell commands, template engines, file paths, HTTP redirects, deserialization
32
+ - Libraries: any function that processes caller-supplied data without validation — buffer operations, parsers, format strings
33
+ - CLI tools: shell command construction, file path handling, environment variable interpolation
34
+ - Services: query construction, message serialization, log injection, LDAP/XPATH queries
35
+ - Client-side (browser/JS): DOM XSS, prototype pollution, `postMessage`/origin trust, and other browser-side classes — covered by the [CLIENT-SIDE.md](CLIENT-SIDE.md) companion blocks when selected
36
+
37
+ Do not stop at the obvious direct paths. Look for indirect injection: data stored safely, then retrieved and used in a dangerous context by different code. Look for injection through field names, keys, headers, and metadata — not just values. Look for injection into secondary systems (logs, caches, search indexes, analytics).
38
+
39
+ **Access control** (subagent_type: `general`)
40
+ Verify that a caller cannot do something outside its authority. Go beyond checking whether permission checks exist — verify they check the *right* permission for the *right* resource via the *right* mechanism:
41
+ - Is there a path to the same state change that checks a different (weaker) permission?
42
+ - Can a field in the request body override what the permission system intended to restrict?
43
+ - Are there endpoints that gate on authentication but forget authorization?
44
+ - Does the same resource have multiple access paths with inconsistent checks?
45
+ - What about bulk/batch/export/import operations — do they enforce per-item permissions?
46
+
47
+ For complex access models, split into separate agents for auth bypass vs authorization logic.
48
+
49
+ **Resource and file handling** (subagent_type: `general`)
50
+ - Path traversal (reading/writing outside intended directories) — including through symlinks, encoded sequences, and null bytes
51
+ - SSRF (making the application fetch attacker-controlled URLs) — including through redirects, DNS rebinding, and URL parser differentials
52
+ - Unsafe deserialization, archive extraction (zip slip), temp file handling
53
+ - Memory safety (if applicable): buffer overflows, use-after-free, integer overflow
54
+ - Race conditions on file operations (TOCTOU between check and use)
55
+
56
+ **Cryptography and secrets** (subagent_type: `general`)
57
+ - Weak randomness for security-critical values (tokens, keys, nonces)
58
+ - Hardcoded secrets, secrets in logs, error messages, URLs, or client-visible responses
59
+ - Broken key derivation, missing HMAC verification, nonce reuse
60
+ - Timing side-channels on secret comparison
61
+ - Misuse of crypto primitives (ECB mode, unauthenticated encryption, static IVs, etc.)
62
+ - What happens when crypto operations fail? Does the error path fall back to no-crypto?
63
+
64
+ **Business logic** (subagent_type: `general`)
65
+ Hunt logic errors by hand: standard scanners cannot find them, and they yield high-impact findings. For each major workflow:
66
+ - **State machine violations**: Can you skip steps? Go backwards? Reach an invalid state? What happens if you replay a completed flow? What about partial failure — if step 2 of 3 fails, is step 1 rolled back?
67
+ - **Race conditions with business impact**: Concurrent operations that produce invalid states (double-spend, double-approve, lost updates). Focus on operations that check-then-act non-atomically.
68
+ - **Numeric/quantity manipulation**: Negative values, zero values, overflow, precision loss, type coercion between string and number.
69
+ - **Access boundary violations**: Not "does the permission check exist" but "is it the right check for the business rule?" Can input to one operation bypass a restriction enforced on a different operation for the same effect?
70
+ - **Implicit trust assumptions**: Data from storage, config, other components, or plugins assumed safe because "we validated it on the way in." What if a different code path wrote it?
71
+ - **Time-based logic**: Expiry checks, scheduling, rate windows, clock skew. What happens at exact boundary moments? What about timezone differences between components?
72
+ - **Default and fallback behavior**: What is the security posture when config is missing? When a feature flag is off? When a dependency is unavailable? When the system is mid-migration?
73
+
74
+ **Feature abuse and data leakage** (subagent_type: `general`)
75
+ Legitimate features used for unintended purposes. Look for bugs in the design, not only in the code:
76
+ - **Export/backup as exfiltration**: Can a low-privilege user trigger an export, snapshot, or backup that includes data above their access level? Can they export other users' data? Does the export include deleted/draft/private content? Revision history that was supposed to be pruned?
77
+ - **Import/restore as injection**: Can import overwrite existing data? Can it create records that bypass normal validation? Can it inject content into collections the user has no write access to? Does it respect the same permission model as the UI?
78
+ - **Search/filter/sort as oracle**: Can search queries reveal whether content exists that the user cannot directly access? Do filter parameters let users probe statuses, roles, or fields they should not know about? Does sorting by a hidden field reveal its values through result ordering?
79
+ - **Enumeration through side effects**: Do error messages differ between "does not exist" and "no access"? Do response times differ? Response sizes? HTTP status codes? Can you enumerate users through password reset, invite, or registration flows?
80
+ - **Preview/draft/staging leakage**: Are preview tokens scoped to one item or do they unlock broader access? Can draft content be discovered through search, RSS feeds, sitemaps, or API listing endpoints? Can cache headers cause a CDN to serve private content publicly?
81
+ - **Notification/webhook as SSRF**: Can a user set a notification URL, webhook URL, or callback URL that the server fetches? Is it validated against internal networks? What about after a redirect?
82
+
83
+ **Chained vulnerabilities and trust boundaries** (subagent_type: `general`)
84
+ Individually allowed or contained behavior can become a vulnerability when another component or lifecycle step relies on a stronger guarantee:
85
+ - **Multi-step boundary failures**: Map what a low-privilege principal may read, write, invoke, and retain, then connect only concrete outputs to later trust decisions. Confirm each prerequisite and do not assume a downstream effect.
86
+ - **Cross-component trust gaps**: Component A validates input and passes it to component B. Compare the exact guarantee A produces with what B assumes, including truncation, type coercion, normalization, tenant scope, and plugin/extension access.
87
+ - **Second-order use**: Data safe when stored may become dangerous in a later context. A field name becomes a JSON path, a slug becomes a file path, escaped text enters raw rendering, or a stored string becomes a URL, regex, template, or policy expression.
88
+ - **Scope and capability growth**: Token, API-key, plugin, OAuth, MCP, or AI capabilities become broader after delegation, refresh, caching, role change, or composition. Name the concrete operation the resulting principal should not have.
89
+ - **Timing and ordering**: Review setup, migration, soft-delete, revoke/cache expiry, check/use, and validate/consume windows. Confirm stale state is accepted before reporting.
90
+ - **Rollback and recovery**: Undelete, restore, revision rollback, and cancellation must apply current ownership, validation, and authorization. Confirm which invalid state is restored.
91
+
92
+ **Wildcard** (subagent_type: `general`)
93
+ You are not given a category. Find vulnerabilities outside the standard classes already assigned.
94
+
95
+ Read code that looks boring or disconnected from security. Follow incomplete, experimental, compatibility, and fallback features, but retain the same concrete boundary and validation requirements as every other class.
96
+
97
+ Use these starting points, but do not limit yourself to them:
98
+ - What is the strangest code in the codebase? Why does it exist? What happens if it is abused?
99
+ - Are there any features that feel half-finished, experimental, or bolted on? Those have the weakest security because they got the least review.
100
+ - What happens if you use the API in a way the frontend never would? The UI constrains users, but the API does not. What API calls are possible but never made by the client?
101
+ - Are there any hidden or undocumented endpoints, parameters, headers, or features? Look at route registrations, middleware, and config for things that are not in the docs.
102
+ - What happens when you mix features that were not designed to work together? Localization + preview + caching. Import + plugins + webhooks. OAuth + impersonation + API keys.
103
+ - Is there anything interesting in the git history? Reverted security fixes, commented-out auth checks, secrets that were committed then removed (still in history).
104
+ - Which valid-account actions affect other users, shared integrity, availability, or operator-owned cost? Verify containment, quotas, authorization, and recovery around those actions.
105
+ - Which operations are irreversible or require elevated confirmation? Bind authorization and approval to the final principal, action, and resource.
106
+ - What assumptions does the code make about the environment? That the database is local, that the clock is accurate, that DNS is trustworthy, that the filesystem is case-sensitive?
107
+ - Look at the test files — what are they **not** testing? Compare the edge cases the developer thought about (tests exist) with the ones they did not (no tests).
108
+
109
+ Pursue anomalies inside your assigned scope until the invariant is settled. If something looks strange, read it until you can state whether it is safe. If a function has a comment explaining why it is safe, verify the explanation. If a variable is named `temp` or `hack` or `legacy`, read it closely.
110
+
111
+ **Obvious things** (subagent_type: `general`)
112
+ Other agents hunt subtle bugs. This agent checks the basic exposures that are easy to overlook because everyone assumes someone else already checked them:
113
+ - Are there any hardcoded passwords, API keys, tokens, or secrets in the source? (grep for `password`, `secret`, `apikey`, `token`, `Bearer`, `-----BEGIN`, common default passwords)
114
+ - Are there any TODO/FIXME/HACK/XXX comments that reference security? (`TODO: add auth`, `FIXME: validate input`, `HACK: skip permission check`)
115
+ - Is debug mode / dev mode properly gated? Can it be enabled in production via environment variable, query parameter, or header?
116
+ - Are there test/example/seed credentials that work in production?
117
+ - Is there a `/debug`, `/admin`, `/test`, `/status`, `/health`, `/metrics`, `/env`, `/.env`, `/config` endpoint that is unprotected?
118
+ - Are there any `.env`, `.env.local`, `credentials.json`, `*.pem`, `*.key` files checked into the repo?
119
+ - Does the `.gitignore` actually cover secrets, uploads, and local config?
120
+ - Are dependencies pinned? Are there known CVEs in the dependency tree? (check lockfiles)
121
+ - Are there any `eval()`, `exec()`, `child_process`, `Function()`, `vm.runInContext`, `import()` with dynamic input?
122
+ - Are CORS headers set to `*` or overly permissive? Is `Access-Control-Allow-Credentials` combined with a wildcard origin?
123
+ - Are cookies missing `HttpOnly`, `Secure`, or `SameSite` attributes?
124
+ - Are there any open redirects? (parameters named `redirect`, `return`, `next`, `url`, `goto`, `continue` that feed into redirects without validation)
125
+ - Is TLS enforced? Are there any HTTP-only endpoints?
126
+ - Are error responses in production returning stack traces, internal paths, or SQL errors?
127
+
128
+ This agent does not need to be creative. It needs to be thorough and literal. Check every item. Report each result.
129
+
130
+ **Important**: For any finding this agent reports, it must verify the full code path, not just surface appearance. If a cookie is missing `HttpOnly`, check whether the cookie contains security-sensitive data and whether JS needs to read it by design. If an error message contains a field name, check whether the field is ever actually populated with sensitive data. A flag is not a finding — trace the impact before reporting.