hackagent 0.7.0__tar.gz → 0.8.0__tar.gz

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 (298) hide show
  1. {hackagent-0.7.0 → hackagent-0.8.0}/.gitignore +1 -0
  2. hackagent-0.8.0/PKG-INFO +154 -0
  3. hackagent-0.8.0/README.md +122 -0
  4. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/__init__.py +1 -1
  5. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/agent.py +16 -23
  6. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/evaluator/base.py +21 -3
  7. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/evaluator/evaluation_step.py +355 -11
  8. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/evaluator/metrics.py +105 -9
  9. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/evaluator/sync.py +123 -7
  10. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/orchestrator.py +111 -43
  11. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/registry.py +1 -1
  12. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/advprefix/config.py +5 -5
  13. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/config.py +2 -2
  14. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/core.py +6 -2
  15. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/dashboard_tracing.py +1 -1
  16. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/evaluation.py +15 -5
  17. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/lifelong.py +6 -1
  18. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/warm_up.py +6 -1
  19. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/baseline/attack.py +11 -1
  20. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/baseline/config.py +2 -2
  21. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/baseline/evaluation.py +248 -57
  22. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/baseline/generation.py +14 -7
  23. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/config.py +13 -13
  24. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/h4rm3l/decorators.py +3 -5
  25. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/h4rm3l/generation.py +6 -10
  26. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pair/attack.py +112 -13
  27. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pair/config.py +2 -4
  28. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/tap/generation.py +16 -8
  29. hackagent-0.8.0/hackagent/cli/commands/attack.py +884 -0
  30. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/commands/config.py +4 -9
  31. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/commands/examples.py +200 -6
  32. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/commands/results.py +17 -65
  33. hackagent-0.8.0/hackagent/cli/commands/scan.py +335 -0
  34. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/config.py +5 -40
  35. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/main.py +31 -153
  36. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/app.py +2 -2
  37. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/attack_specs.py +2 -2
  38. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/base.py +5 -42
  39. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/views/agents.py +23 -22
  40. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/views/attacks.py +148 -28
  41. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/views/config.py +17 -110
  42. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/views/dashboard.py +30 -84
  43. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/views/results.py +16 -30
  44. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/jailbreak/profile.py +18 -2
  45. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/profile_types.py +0 -1
  46. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/adapters/litellm.py +4 -29
  47. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/router.py +2 -9
  48. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/tracking/category_classifier.py +107 -6
  49. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/tracking/coordinator.py +19 -3
  50. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/tracking/step.py +1 -1
  51. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/tracking/tracker.py +55 -17
  52. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/dashboard/__init__.py +2 -2
  53. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/dashboard/_api.py +92 -18
  54. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/dashboard/_components.py +18 -4
  55. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/dashboard/_helpers.py +8 -8
  56. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/dashboard/_page.py +2932 -691
  57. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/dashboard/templates/index.html +2 -2
  58. hackagent-0.8.0/hackagent/server/errors.py +23 -0
  59. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/storage/base.py +3 -3
  60. hackagent-0.8.0/hackagent/server/storage/enums.py +34 -0
  61. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/storage/local.py +7 -8
  62. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/storage/remote.py +99 -64
  63. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/utils.py +25 -37
  64. {hackagent-0.7.0 → hackagent-0.8.0}/pyproject.toml +2 -2
  65. hackagent-0.7.0/PKG-INFO +0 -144
  66. hackagent-0.7.0/README.md +0 -112
  67. hackagent-0.7.0/hackagent/cli/commands/attack.py +0 -425
  68. hackagent-0.7.0/hackagent/server/errors.py +0 -25
  69. {hackagent-0.7.0 → hackagent-0.8.0}/LICENSE +0 -0
  70. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/__init__.py +0 -0
  71. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/base.py +0 -0
  72. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/evaluator/__init__.py +0 -0
  73. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/evaluator/judge_evaluators.py +0 -0
  74. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/evaluator/pattern_evaluators.py +0 -0
  75. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/generator/__init__.py +0 -0
  76. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/generator/templates.py +0 -0
  77. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/objectives/__init__.py +0 -0
  78. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/objectives/base.py +0 -0
  79. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/objectives/harmful_behavior.py +0 -0
  80. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/objectives/jailbreak.py +0 -0
  81. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/objectives/policy_violation.py +0 -0
  82. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/shared/__init__.py +0 -0
  83. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/shared/progress.py +0 -0
  84. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/shared/prompt_parser.py +0 -0
  85. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/shared/response_utils.py +0 -0
  86. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/shared/router_factory.py +0 -0
  87. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/shared/tui.py +0 -0
  88. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/shared/utils.py +0 -0
  89. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/__init__.py +0 -0
  90. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/advprefix/__init__.py +0 -0
  91. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/advprefix/attack.py +0 -0
  92. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/advprefix/completions.py +0 -0
  93. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/advprefix/evaluation.py +0 -0
  94. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/advprefix/generate.py +0 -0
  95. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/advprefix/utils.py +0 -0
  96. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/__init__.py +0 -0
  97. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/attack.py +0 -0
  98. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/log_styles.py +0 -0
  99. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/strategy_library.py +0 -0
  100. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/autodan_turbo/summarizer.py +0 -0
  101. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/base.py +0 -0
  102. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/baseline/__init__.py +0 -0
  103. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/bon/__init__.py +0 -0
  104. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/bon/attack.py +0 -0
  105. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/bon/config.py +0 -0
  106. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/bon/evaluation.py +0 -0
  107. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/bon/generation.py +0 -0
  108. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/cipherchat/__init__.py +0 -0
  109. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/cipherchat/attack.py +0 -0
  110. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/cipherchat/config.py +0 -0
  111. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/cipherchat/encode_experts.py +0 -0
  112. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/cipherchat/evaluation.py +0 -0
  113. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/cipherchat/generation.py +0 -0
  114. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/cipherchat/prompts_and_demonstrations.py +0 -0
  115. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/flipattack/__init__.py +0 -0
  116. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/flipattack/attack.py +0 -0
  117. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/flipattack/config.py +0 -0
  118. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/flipattack/evaluation.py +0 -0
  119. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/flipattack/generation.py +0 -0
  120. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/h4rm3l/__init__.py +0 -0
  121. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/h4rm3l/attack.py +0 -0
  122. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/h4rm3l/config.py +0 -0
  123. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/h4rm3l/evaluation.py +0 -0
  124. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pair/__init__.py +0 -0
  125. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pair/evaluation.py +0 -0
  126. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pap/__init__.py +0 -0
  127. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pap/attack.py +0 -0
  128. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pap/config.py +0 -0
  129. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pap/evaluation.py +0 -0
  130. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pap/generation.py +0 -0
  131. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/pap/taxonomy.py +0 -0
  132. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/tap/__init__.py +0 -0
  133. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/tap/attack.py +0 -0
  134. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/tap/config.py +0 -0
  135. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/attacks/techniques/tap/evaluation.py +0 -0
  136. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/__init__.py +0 -0
  137. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/commands/__init__.py +0 -0
  138. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/commands/agent.py +0 -0
  139. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/commands/web.py +0 -0
  140. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/__init__.py +0 -0
  141. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/actions_logger.py +0 -0
  142. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/logger.py +0 -0
  143. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/views/__init__.py +0 -0
  144. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/widgets/__init__.py +0 -0
  145. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/widgets/actions.py +0 -0
  146. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/tui/widgets/logs.py +0 -0
  147. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/cli/utils.py +0 -0
  148. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/datasets/__init__.py +0 -0
  149. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/datasets/base.py +0 -0
  150. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/datasets/presets.py +0 -0
  151. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/datasets/providers/__init__.py +0 -0
  152. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/datasets/providers/file.py +0 -0
  153. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/datasets/providers/huggingface.py +0 -0
  154. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/datasets/registry.py +0 -0
  155. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/errors.py +0 -0
  156. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/logger.py +0 -0
  157. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/__init__.py +0 -0
  158. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/base.py +0 -0
  159. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/craft_adversarial_data/__init__.py +0 -0
  160. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/craft_adversarial_data/profile.py +0 -0
  161. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/craft_adversarial_data/types.py +0 -0
  162. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/craft_adversarial_data/vulnerabilities.py +0 -0
  163. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/credential_exposure/__init__.py +0 -0
  164. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/credential_exposure/profile.py +0 -0
  165. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/credential_exposure/types.py +0 -0
  166. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/credential_exposure/vulnerabilities.py +0 -0
  167. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/excessive_agency/__init__.py +0 -0
  168. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/excessive_agency/profile.py +0 -0
  169. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/excessive_agency/types.py +0 -0
  170. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/excessive_agency/vulnerabilities.py +0 -0
  171. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/input_manipulation_attack/__init__.py +0 -0
  172. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/input_manipulation_attack/profile.py +0 -0
  173. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/input_manipulation_attack/types.py +0 -0
  174. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/input_manipulation_attack/vulnerabilities.py +0 -0
  175. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/jailbreak/__init__.py +0 -0
  176. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/jailbreak/types.py +0 -0
  177. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/jailbreak/vulnerabilities.py +0 -0
  178. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/malicious_tool_invocation/__init__.py +0 -0
  179. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/malicious_tool_invocation/profile.py +0 -0
  180. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/malicious_tool_invocation/types.py +0 -0
  181. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/malicious_tool_invocation/vulnerabilities.py +0 -0
  182. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/misinformation/__init__.py +0 -0
  183. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/misinformation/profile.py +0 -0
  184. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/misinformation/types.py +0 -0
  185. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/misinformation/vulnerabilities.py +0 -0
  186. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/model_evasion/__init__.py +0 -0
  187. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/model_evasion/profile.py +0 -0
  188. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/model_evasion/types.py +0 -0
  189. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/model_evasion/vulnerabilities.py +0 -0
  190. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/profile_helpers.py +0 -0
  191. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/prompt_injection/__init__.py +0 -0
  192. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/prompt_injection/profile.py +0 -0
  193. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/prompt_injection/templates.py +0 -0
  194. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/prompt_injection/types.py +0 -0
  195. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/prompt_injection/vulnerabilities.py +0 -0
  196. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/public_facing_application_exploitation/__init__.py +0 -0
  197. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/public_facing_application_exploitation/profile.py +0 -0
  198. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/public_facing_application_exploitation/types.py +0 -0
  199. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/public_facing_application_exploitation/vulnerabilities.py +0 -0
  200. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/registry.py +0 -0
  201. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/sensitive_information_disclosure/__init__.py +0 -0
  202. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/sensitive_information_disclosure/profile.py +0 -0
  203. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/sensitive_information_disclosure/types.py +0 -0
  204. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/sensitive_information_disclosure/vulnerabilities.py +0 -0
  205. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/system_prompt_leakage/__init__.py +0 -0
  206. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/system_prompt_leakage/profile.py +0 -0
  207. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/system_prompt_leakage/types.py +0 -0
  208. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/system_prompt_leakage/vulnerabilities.py +0 -0
  209. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/utils.py +0 -0
  210. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/vector_embedding_weaknesses_exploit/__init__.py +0 -0
  211. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/vector_embedding_weaknesses_exploit/profile.py +0 -0
  212. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/vector_embedding_weaknesses_exploit/types.py +0 -0
  213. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/risks/vector_embedding_weaknesses_exploit/vulnerabilities.py +0 -0
  214. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/__init__.py +0 -0
  215. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/adapters/__init__.py +0 -0
  216. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/adapters/base.py +0 -0
  217. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/adapters/google_adk.py +0 -0
  218. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/adapters/ollama.py +0 -0
  219. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/adapters/openai.py +0 -0
  220. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/tracking/__init__.py +0 -0
  221. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/tracking/context.py +0 -0
  222. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/tracking/decorators.py +0 -0
  223. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/tracking/utils.py +0 -0
  224. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/router/types.py +0 -0
  225. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/__init__.py +0 -0
  226. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/__init__.py +0 -0
  227. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/agent/__init__.py +0 -0
  228. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/agent/agent_create.py +0 -0
  229. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/agent/agent_destroy.py +0 -0
  230. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/agent/agent_list.py +0 -0
  231. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/agent/agent_partial_update.py +0 -0
  232. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/agent/agent_retrieve.py +0 -0
  233. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/agent/agent_update.py +0 -0
  234. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/apilogs/__init__.py +0 -0
  235. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/apilogs/apilogs_list.py +0 -0
  236. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/apilogs/apilogs_retrieve.py +0 -0
  237. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/apilogs/apilogs_summary_retrieve.py +0 -0
  238. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/attack/__init__.py +0 -0
  239. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/attack/attack_create.py +0 -0
  240. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/attack/attack_destroy.py +0 -0
  241. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/attack/attack_list.py +0 -0
  242. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/attack/attack_partial_update.py +0 -0
  243. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/attack/attack_retrieve.py +0 -0
  244. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/attack/attack_update.py +0 -0
  245. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/checkout/__init__.py +0 -0
  246. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/checkout/checkout_create.py +0 -0
  247. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/generate/__init__.py +0 -0
  248. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/generate/v1_chat_completions_create.py +0 -0
  249. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/judge/__init__.py +0 -0
  250. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/judge/judge_create.py +0 -0
  251. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/key/__init__.py +0 -0
  252. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/key/key_context_retrieve.py +0 -0
  253. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/key/key_create.py +0 -0
  254. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/key/key_destroy.py +0 -0
  255. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/key/key_list.py +0 -0
  256. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/key/key_retrieve.py +0 -0
  257. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/models.py +0 -0
  258. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/organization/__init__.py +0 -0
  259. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/organization/organization_create.py +0 -0
  260. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/organization/organization_destroy.py +0 -0
  261. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/organization/organization_list.py +0 -0
  262. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/organization/organization_me_retrieve.py +0 -0
  263. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/organization/organization_partial_update.py +0 -0
  264. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/organization/organization_retrieve.py +0 -0
  265. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/organization/organization_update.py +0 -0
  266. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/result/__init__.py +0 -0
  267. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/result/result_create.py +0 -0
  268. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/result/result_destroy.py +0 -0
  269. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/result/result_list.py +0 -0
  270. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/result/result_partial_update.py +0 -0
  271. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/result/result_retrieve.py +0 -0
  272. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/result/result_trace_create.py +0 -0
  273. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/result/result_update.py +0 -0
  274. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/run/__init__.py +0 -0
  275. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/run/run_create.py +0 -0
  276. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/run/run_destroy.py +0 -0
  277. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/run/run_list.py +0 -0
  278. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/run/run_partial_update.py +0 -0
  279. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/run/run_result_create.py +0 -0
  280. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/run/run_retrieve.py +0 -0
  281. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/run/run_run_tests_create.py +0 -0
  282. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/run/run_update.py +0 -0
  283. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/scripts/generate.py +0 -0
  284. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/scripts/generate.sh +0 -0
  285. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/scripts/openapi-python-client.yaml +0 -0
  286. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/user/__init__.py +0 -0
  287. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/user/user_create.py +0 -0
  288. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/user/user_destroy.py +0 -0
  289. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/user/user_list.py +0 -0
  290. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/user/user_me_retrieve.py +0 -0
  291. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/user/user_me_update.py +0 -0
  292. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/user/user_partial_update.py +0 -0
  293. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/user/user_retrieve.py +0 -0
  294. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/api/user/user_update.py +0 -0
  295. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/client.py +0 -0
  296. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/dashboard/app.py +0 -0
  297. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/storage/__init__.py +0 -0
  298. {hackagent-0.7.0 → hackagent-0.8.0}/hackagent/server/types.py +0 -0
@@ -134,3 +134,4 @@ dmypy.json
134
134
 
135
135
 
136
136
  .copilotignore
137
+ tests/e2e/attacks/
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.4
2
+ Name: hackagent
3
+ Version: 0.8.0
4
+ Summary: HackAgent is an open-source security toolkit to detect vulnerabilities of your AI Agents.
5
+ Author-email: AI Security Lab <ais@ai4i.it>
6
+ License: Apache-2.0
7
+ License-File: LICENSE
8
+ Keywords: agents,ai,security,testing,vulnerabilities
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: click>=8.1.0
19
+ Requires-Dist: datasets>=2.14.0
20
+ Requires-Dist: faiss-cpu>=1.13.2
21
+ Requires-Dist: httpx>=0.27.0
22
+ Requires-Dist: litellm>=1.69.2
23
+ Requires-Dist: nicegui>=2.0
24
+ Requires-Dist: openai>=1.0.0
25
+ Requires-Dist: pydantic[email]>=2.0
26
+ Requires-Dist: python-dateutil>=2.8.0
27
+ Requires-Dist: pyyaml>=6.0.0
28
+ Requires-Dist: requests>=2.31.0
29
+ Requires-Dist: rich>=14.0.0
30
+ Requires-Dist: textual>=1.0.0
31
+ Description-Content-Type: text/markdown
32
+
33
+ <div align="center">
34
+ <p align="center">
35
+ <img src="https://docs.hackagent.dev/img/banner.svg" alt="HackAgent - AI Agent Security Testing Toolkit" width="800">
36
+ </p>
37
+
38
+ <strong>AI Security Red-Team Toolkit</strong>
39
+
40
+ <br>
41
+
42
+ [App](https://app.hackagent.dev/) -- [Docs](https://docs.hackagent.dev/) -- [API](https://api.hackagent.dev/schema/redoc)
43
+
44
+ <br>
45
+
46
+ ![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)
47
+ ![License](https://img.shields.io/badge/license-Apache%202.0-green)
48
+ ![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)
49
+ [![Commitizen](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
50
+ ![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)
51
+ ![Test Coverage](https://img.shields.io/codecov/c/github/AISecurityLab/hackagent)
52
+ ![CI Status](https://img.shields.io/github/actions/workflow/status/AISecurityLab/hackagent/ci.yml)
53
+ </div>
54
+
55
+ ## What is HackAgent?
56
+
57
+ HackAgent is a comprehensive Python SDK and CLI designed to help security researchers, developers, and AI safety practitioners evaluate and strengthen the security of AI agents.
58
+
59
+
60
+
61
+ As AI agents become more powerful and autonomous, they face security challenges that traditional testing tools cannot address:
62
+
63
+ | Threat | Description |
64
+ |--------|-------------|
65
+ | **Prompt Injection** | Malicious inputs that hijack agent behavior |
66
+ | **Jailbreaking** | Bypassing safety guardrails and content filters |
67
+ | **Goal Hijacking** | Manipulating agents to pursue unintended objectives |
68
+ | **Tool Misuse** | Exploiting agent capabilities for unauthorized actions |
69
+
70
+ HackAgent automates testing for these vulnerabilities using research-backed attack techniques, helping you identify and fix security issues before they are exploited.
71
+
72
+ <div align="center">
73
+ <img src="docs/static/gifs/terminal.gif" alt="HackAgent CLI Demo" width="100%" />
74
+ <p><em>Interactive TUI with real-time attack progress and visual reporting.</em></p>
75
+ </div>
76
+
77
+ ## Get Started Now
78
+
79
+ ### Quick Install
80
+
81
+ ```bash
82
+ python3 -m venv .venv
83
+ source .venv/bin/activate
84
+ pip install hackagent
85
+ ```
86
+
87
+ No API key required: HackAgent works locally out of the box.
88
+
89
+
90
+ Questions? Join [community discussions](https://github.com/AISecurityLab/hackagent/discussions) or email ais@ai4i.it.
91
+
92
+ ## Architecture
93
+
94
+ HackAgent uses a modular pipeline to test agent robustness end-to-end.
95
+
96
+ | Component | Description |
97
+ |-----------|-------------|
98
+ | **Attack Engine** | Orchestrates attacks using AdvPrefix, AutoDAN-Turbo, PAIR, TAP, FlipAttack, BoN, h4rm3l, CipherChat, PAP, and Baseline |
99
+ | **Generator** | LLM role that creates adversarial prompts to test the target agent |
100
+ | **Judge** | LLM role that evaluates whether attacks bypass safety measures |
101
+ | **Target Agent** | Your AI agent under test across supported frameworks |
102
+ | **Datasets** | Pre-built benchmark presets plus custom HuggingFace/file datasets |
103
+
104
+ ## Supported Frameworks
105
+
106
+ [![Google ADK](https://img.shields.io/badge/Google-ADK-green?style=for-the-badge&logo=google)](https://google.github.io/adk-docs/)
107
+ [![OpenAI SDK](https://img.shields.io/badge/OpenAI-SDK-412991?style=for-the-badge&logo=openai)](https://platform.openai.com/docs)
108
+ [![LiteLLM](https://img.shields.io/badge/LiteLLM-blue?style=for-the-badge&logo=github)](https://github.com/BerriAI/litellm)
109
+ [![LangChain](https://img.shields.io/badge/LangChain-1C3C3C?style=for-the-badge)](https://python.langchain.com)
110
+
111
+ ## Reporting
112
+
113
+ HackAgent supports both local and remote reporting.
114
+
115
+ - Local mode stores test results in SQLite and includes a built-in dashboard.
116
+ - Cloud mode syncs runs to the HackAgent remote platform when an API key is configured.
117
+
118
+ ```bash
119
+ hackagent web
120
+ ```
121
+
122
+ Access cloud reporting at [https://app.hackagent.dev](https://app.hackagent.dev).
123
+
124
+ ## Responsible Use
125
+
126
+ HackAgent is designed for authorized security testing only. Always obtain explicit permission before testing any AI system.
127
+
128
+ ### Do
129
+
130
+ - Test your own agents
131
+ - Conduct authorized pentesting
132
+ - Follow coordinated disclosure
133
+ - Share security knowledge responsibly
134
+
135
+ ### Don't
136
+
137
+ - Test systems without permission
138
+ - Exploit vulnerabilities maliciously
139
+ - Violate terms of service
140
+ - Share harmful exploit instructions irresponsibly
141
+
142
+ Read the full guidelines: [Responsible Disclosure](docs/docs/security/responsible-disclosure.md)
143
+
144
+ ## Contributing
145
+
146
+ Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
147
+
148
+ ## License
149
+
150
+ Licensed under Apache-2.0. See [LICENSE](LICENSE).
151
+
152
+ ## Disclaimer
153
+
154
+ HackAgent is intended for security research and AI safety improvement. The authors are not responsible for misuse.
@@ -0,0 +1,122 @@
1
+ <div align="center">
2
+ <p align="center">
3
+ <img src="https://docs.hackagent.dev/img/banner.svg" alt="HackAgent - AI Agent Security Testing Toolkit" width="800">
4
+ </p>
5
+
6
+ <strong>AI Security Red-Team Toolkit</strong>
7
+
8
+ <br>
9
+
10
+ [App](https://app.hackagent.dev/) -- [Docs](https://docs.hackagent.dev/) -- [API](https://api.hackagent.dev/schema/redoc)
11
+
12
+ <br>
13
+
14
+ ![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)
15
+ ![License](https://img.shields.io/badge/license-Apache%202.0-green)
16
+ ![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)
17
+ [![Commitizen](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
18
+ ![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)
19
+ ![Test Coverage](https://img.shields.io/codecov/c/github/AISecurityLab/hackagent)
20
+ ![CI Status](https://img.shields.io/github/actions/workflow/status/AISecurityLab/hackagent/ci.yml)
21
+ </div>
22
+
23
+ ## What is HackAgent?
24
+
25
+ HackAgent is a comprehensive Python SDK and CLI designed to help security researchers, developers, and AI safety practitioners evaluate and strengthen the security of AI agents.
26
+
27
+
28
+
29
+ As AI agents become more powerful and autonomous, they face security challenges that traditional testing tools cannot address:
30
+
31
+ | Threat | Description |
32
+ |--------|-------------|
33
+ | **Prompt Injection** | Malicious inputs that hijack agent behavior |
34
+ | **Jailbreaking** | Bypassing safety guardrails and content filters |
35
+ | **Goal Hijacking** | Manipulating agents to pursue unintended objectives |
36
+ | **Tool Misuse** | Exploiting agent capabilities for unauthorized actions |
37
+
38
+ HackAgent automates testing for these vulnerabilities using research-backed attack techniques, helping you identify and fix security issues before they are exploited.
39
+
40
+ <div align="center">
41
+ <img src="docs/static/gifs/terminal.gif" alt="HackAgent CLI Demo" width="100%" />
42
+ <p><em>Interactive TUI with real-time attack progress and visual reporting.</em></p>
43
+ </div>
44
+
45
+ ## Get Started Now
46
+
47
+ ### Quick Install
48
+
49
+ ```bash
50
+ python3 -m venv .venv
51
+ source .venv/bin/activate
52
+ pip install hackagent
53
+ ```
54
+
55
+ No API key required: HackAgent works locally out of the box.
56
+
57
+
58
+ Questions? Join [community discussions](https://github.com/AISecurityLab/hackagent/discussions) or email ais@ai4i.it.
59
+
60
+ ## Architecture
61
+
62
+ HackAgent uses a modular pipeline to test agent robustness end-to-end.
63
+
64
+ | Component | Description |
65
+ |-----------|-------------|
66
+ | **Attack Engine** | Orchestrates attacks using AdvPrefix, AutoDAN-Turbo, PAIR, TAP, FlipAttack, BoN, h4rm3l, CipherChat, PAP, and Baseline |
67
+ | **Generator** | LLM role that creates adversarial prompts to test the target agent |
68
+ | **Judge** | LLM role that evaluates whether attacks bypass safety measures |
69
+ | **Target Agent** | Your AI agent under test across supported frameworks |
70
+ | **Datasets** | Pre-built benchmark presets plus custom HuggingFace/file datasets |
71
+
72
+ ## Supported Frameworks
73
+
74
+ [![Google ADK](https://img.shields.io/badge/Google-ADK-green?style=for-the-badge&logo=google)](https://google.github.io/adk-docs/)
75
+ [![OpenAI SDK](https://img.shields.io/badge/OpenAI-SDK-412991?style=for-the-badge&logo=openai)](https://platform.openai.com/docs)
76
+ [![LiteLLM](https://img.shields.io/badge/LiteLLM-blue?style=for-the-badge&logo=github)](https://github.com/BerriAI/litellm)
77
+ [![LangChain](https://img.shields.io/badge/LangChain-1C3C3C?style=for-the-badge)](https://python.langchain.com)
78
+
79
+ ## Reporting
80
+
81
+ HackAgent supports both local and remote reporting.
82
+
83
+ - Local mode stores test results in SQLite and includes a built-in dashboard.
84
+ - Cloud mode syncs runs to the HackAgent remote platform when an API key is configured.
85
+
86
+ ```bash
87
+ hackagent web
88
+ ```
89
+
90
+ Access cloud reporting at [https://app.hackagent.dev](https://app.hackagent.dev).
91
+
92
+ ## Responsible Use
93
+
94
+ HackAgent is designed for authorized security testing only. Always obtain explicit permission before testing any AI system.
95
+
96
+ ### Do
97
+
98
+ - Test your own agents
99
+ - Conduct authorized pentesting
100
+ - Follow coordinated disclosure
101
+ - Share security knowledge responsibly
102
+
103
+ ### Don't
104
+
105
+ - Test systems without permission
106
+ - Exploit vulnerabilities maliciously
107
+ - Violate terms of service
108
+ - Share harmful exploit instructions irresponsibly
109
+
110
+ Read the full guidelines: [Responsible Disclosure](docs/docs/security/responsible-disclosure.md)
111
+
112
+ ## Contributing
113
+
114
+ Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
115
+
116
+ ## License
117
+
118
+ Licensed under Apache-2.0. See [LICENSE](LICENSE).
119
+
120
+ ## Disclaimer
121
+
122
+ HackAgent is intended for security research and AI safety improvement. The authors are not responsible for misuse.
@@ -1,7 +1,7 @@
1
1
  # Copyright 2026 - AI4I. All rights reserved.
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
- """A client library for accessing HackAgent API"""
4
+ """A client library for HackAgent — AI Agent Security Testing"""
5
5
 
6
6
  from .agent import HackAgent
7
7
  from .server.client import AuthenticatedClient, Client
@@ -8,7 +8,6 @@ from hackagent import utils
8
8
  from hackagent.errors import HackAgentError
9
9
  from hackagent.router import AgentRouter
10
10
  from hackagent.router.types import AgentTypeEnum
11
- from hackagent.server.storage.base import StorageBackend
12
11
 
13
12
  # Lazy import for attack orchestrators to avoid ~0.5s startup delay
14
13
  if TYPE_CHECKING:
@@ -44,12 +43,11 @@ class HackAgent:
44
43
  - Executing automated security tests against the configured agents.
45
44
  - Retrieving and handling test results.
46
45
 
47
- It encapsulates complexities such as API authentication, agent registration
48
- with the backend (via `AgentRouter`), and the dynamic dispatch of various
46
+ It encapsulates complexities such as agent registration
47
+ with the local backend (via `AgentRouter`), and the dynamic dispatch of various
49
48
  attack methodologies.
50
49
 
51
50
  Attributes:
52
- client: An `AuthenticatedClient` instance for API communication.
53
51
  router: An `AgentRouter` instance managing the agent's representation
54
52
  in the HackAgent backend.
55
53
  attack_strategies: A dictionary mapping strategy names to their
@@ -72,7 +70,7 @@ class HackAgent:
72
70
  """
73
71
  Initializes the HackAgent client and prepares it for interaction.
74
72
 
75
- This constructor sets up the authenticated API client, loads default
73
+ This constructor sets up the local storage backend, loads default
76
74
  prompts, resolves the agent type, and initializes the agent router
77
75
  to ensure the agent is known to the backend. It also prepares available
78
76
  attack strategies.
@@ -90,10 +88,6 @@ class HackAgent:
90
88
  String values are automatically converted to the corresponding
91
89
  `AgentTypeEnum` member. Defaults to `AgentTypeEnum.UNKNOWN` if
92
90
  not specified or if an invalid string is provided.
93
- base_url: The base URL for the HackAgent API service.
94
- api_key: The API key for authenticating with the HackAgent API.
95
- If omitted, the client will attempt to retrieve it from the
96
- config file (~/.config/hackagent/config.json).
97
91
  raise_on_unexpected_status: If set to `True`, the API client will
98
92
  raise an exception for any HTTP status codes that are not typically
99
93
  expected for a successful operation. Defaults to `False`.
@@ -122,7 +116,7 @@ class HackAgent:
122
116
  raise_on_unexpected_status=raise_on_unexpected_status,
123
117
  timeout=timeout,
124
118
  )
125
- self.backend: StorageBackend = RemoteBackend(_client)
119
+ self.backend = RemoteBackend(_client)
126
120
  logger.info("HackAgent using remote backend → %s", _base_url)
127
121
  else:
128
122
  from hackagent.server.storage.local import LocalBackend
@@ -132,8 +126,7 @@ class HackAgent:
132
126
  "HackAgent using local backend → ~/.local/share/hackagent/hackagent.db"
133
127
  )
134
128
 
135
- # Keep self.client as the raw HTTP client for backward compat
136
- # (adapters that need it can access it via backend.get_api_key())
129
+ # Backward compatible raw HTTP client reference.
137
130
  self.client = getattr(self.backend, "_client", None)
138
131
 
139
132
  processed_agent_type = utils.resolve_agent_type(agent_type)
@@ -189,16 +182,16 @@ class HackAgent:
189
182
  )
190
183
 
191
184
  self._attack_strategies = {
192
- "advprefix": AdvPrefixOrchestrator(hack_agent=self),
193
- "autodan_turbo": AutoDANTurboOrchestrator(hack_agent=self),
194
- "baseline": BaselineOrchestrator(hack_agent=self),
195
- "bon": BoNOrchestrator(hack_agent=self),
196
- "cipherchat": CipherChatOrchestrator(hack_agent=self),
197
- "pair": PAIROrchestrator(hack_agent=self),
198
- "flipattack": FlipAttackOrchestrator(hack_agent=self),
199
- "tap": TAPOrchestrator(hack_agent=self),
200
- "h4rm3l": H4rm3lOrchestrator(hack_agent=self),
201
- "pap": PAPOrchestrator(hack_agent=self),
185
+ "advprefix": AdvPrefixOrchestrator(hackagent_agent=self),
186
+ "autodan_turbo": AutoDANTurboOrchestrator(hackagent_agent=self),
187
+ "baseline": BaselineOrchestrator(hackagent_agent=self),
188
+ "bon": BoNOrchestrator(hackagent_agent=self),
189
+ "cipherchat": CipherChatOrchestrator(hackagent_agent=self),
190
+ "pair": PAIROrchestrator(hackagent_agent=self),
191
+ "flipattack": FlipAttackOrchestrator(hackagent_agent=self),
192
+ "tap": TAPOrchestrator(hackagent_agent=self),
193
+ "h4rm3l": H4rm3lOrchestrator(hackagent_agent=self),
194
+ "pap": PAPOrchestrator(hackagent_agent=self),
202
195
  }
203
196
  return self._attack_strategies
204
197
 
@@ -238,7 +231,7 @@ class HackAgent:
238
231
  ValueError: If the 'attack_type' is missing from `attack_config` or
239
232
  if the specified 'attack_type' is not a supported/registered
240
233
  strategy.
241
- HackAgentError: For issues during API interaction, problems with backend
234
+ HackAgentError: For issues during backend
242
235
  agent operations, or other unexpected errors during the attack process.
243
236
  """
244
237
  try:
@@ -255,18 +255,36 @@ class BaseJudgeEvaluator(ABC):
255
255
  for idx, row in enumerate(data):
256
256
  row["_original_index"] = idx
257
257
 
258
+ # Preserve upstream execution errors and skip judge calls for those rows.
259
+ rows_error = [
260
+ row
261
+ for row in data
262
+ if row.get("is_error") is True
263
+ or (
264
+ (row.get("error") or row.get("error_message"))
265
+ and not str(row.get("completion") or "").strip()
266
+ )
267
+ ]
268
+
269
+ non_error_rows = [row for row in data if row not in rows_error]
270
+
258
271
  # Split into filtered and processable
259
272
  rows_trivial = [
260
273
  row
261
- for row in data
274
+ for row in non_error_rows
262
275
  if self._is_trivial_completion(row.get("completion", ""))
263
276
  ]
264
277
  rows_non_trivial = [
265
278
  row
266
- for row in data
279
+ for row in non_error_rows
267
280
  if not self._is_trivial_completion(row.get("completion", ""))
268
281
  ]
269
282
 
283
+ for row in rows_error:
284
+ row[self.eval_column] = 0
285
+ err = row.get("error") or row.get("error_message") or "Unknown error"
286
+ row[self.explanation_column] = f"execution/adapter error: {err}"
287
+
270
288
  if self.skip_length_filter:
271
289
  rows_to_filter: List[Dict[str, Any]] = []
272
290
  rows_to_process = rows_non_trivial
@@ -296,7 +314,7 @@ class BaseJudgeEvaluator(ABC):
296
314
 
297
315
  self.logger.info(
298
316
  f"Evaluation split: "
299
- f"total={len(data)} filtered_trivial={len(rows_trivial)} "
317
+ f"total={len(data)} errors={len(rows_error)} filtered_trivial={len(rows_trivial)} "
300
318
  f"filtered_short={len(rows_to_filter)} "
301
319
  f"to_process={len(rows_to_process)}"
302
320
  )