agent-firewall-security 2.1.0__tar.gz → 2.2.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 (190) hide show
  1. agent_firewall_security-2.2.0/PKG-INFO +627 -0
  2. agent_firewall_security-2.2.0/README.md +603 -0
  3. agent_firewall_security-2.2.0/agent_firewall_security.egg-info/PKG-INFO +627 -0
  4. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/agent_firewall_security.egg-info/SOURCES.txt +31 -1
  5. agent_firewall_security-2.2.0/firewall/adversarial/__init__.py +1700 -0
  6. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/agents/adapters.py +1 -3
  7. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/agents/base.py +2 -6
  8. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/attackgraph/engine.py +15 -3
  9. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/capability.py +27 -0
  10. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/capability2/constraints.py +75 -8
  11. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/containment/controller.py +102 -19
  12. agent_firewall_security-2.2.0/firewall/continuous_auth/__init__.py +75 -0
  13. agent_firewall_security-2.2.0/firewall/continuous_auth/engine.py +813 -0
  14. agent_firewall_security-2.2.0/firewall/continuous_auth/monitor.py +572 -0
  15. agent_firewall_security-2.2.0/firewall/continuous_auth/predicates.py +525 -0
  16. agent_firewall_security-2.2.0/firewall/correlation/__init__.py +552 -0
  17. agent_firewall_security-2.2.0/firewall/deception/__init__.py +749 -0
  18. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/defense/mesh.py +320 -45
  19. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/delegation.py +2 -0
  20. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/delegation_lineage.py +16 -1
  21. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/evidence_graph/__init__.py +4 -0
  22. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/evidence_graph/graph.py +84 -5
  23. agent_firewall_security-2.2.0/firewall/evidence_integrity/__init__.py +892 -0
  24. agent_firewall_security-2.2.0/firewall/invariants/__init__.py +88 -0
  25. agent_firewall_security-2.2.0/firewall/invariants/__main__.py +121 -0
  26. agent_firewall_security-2.2.0/firewall/invariants/model.py +216 -0
  27. agent_firewall_security-2.2.0/firewall/invariants/registry.py +358 -0
  28. agent_firewall_security-2.2.0/firewall/invariants/runtime.py +1173 -0
  29. agent_firewall_security-2.2.0/firewall/invariants/source.py +323 -0
  30. agent_firewall_security-2.2.0/firewall/invariants/static.py +469 -0
  31. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/network/simulator.py +8 -9
  32. agent_firewall_security-2.2.0/firewall/platform/__init__.py +36 -0
  33. agent_firewall_security-2.2.0/firewall/platform/provenance.py +184 -0
  34. agent_firewall_security-2.2.0/firewall/policy_analysis/__init__.py +409 -0
  35. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/sdk.py +481 -3
  36. agent_firewall_security-2.2.0/firewall/security_memory/__init__.py +1238 -0
  37. agent_firewall_security-2.2.0/firewall/twin/__init__.py +46 -0
  38. agent_firewall_security-2.2.0/firewall/twin/adversarial.py +1274 -0
  39. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/twin/twin.py +10 -2
  40. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/introspect.py +11 -0
  41. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/v21.py +321 -321
  42. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/pyproject.toml +1 -1
  43. agent_firewall_security-2.2.0/tests/test_continuous_auth.py +973 -0
  44. agent_firewall_security-2.2.0/tests/test_sdk_continuous_auth.py +121 -0
  45. agent_firewall_security-2.2.0/tests/test_v2_2_adversarial_defense.py +1260 -0
  46. agent_firewall_security-2.2.0/tests/test_v2_2_adversarial_twin.py +792 -0
  47. agent_firewall_security-2.2.0/tests/test_v2_2_capability_delegation.py +648 -0
  48. agent_firewall_security-2.2.0/tests/test_v2_2_deception_integrity.py +350 -0
  49. agent_firewall_security-2.2.0/tests/test_v2_2_evidence_integrity.py +965 -0
  50. agent_firewall_security-2.2.0/tests/test_v2_2_invariants.py +587 -0
  51. agent_firewall_security-2.2.0/tests/test_v2_2_platform_provenance.py +292 -0
  52. agent_firewall_security-2.2.0/tests/test_v2_2_security_memory.py +970 -0
  53. agent_firewall_security-2.1.0/PKG-INFO +0 -603
  54. agent_firewall_security-2.1.0/README.md +0 -579
  55. agent_firewall_security-2.1.0/agent_firewall_security.egg-info/PKG-INFO +0 -603
  56. agent_firewall_security-2.1.0/firewall/twin/__init__.py +0 -23
  57. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/agent_firewall_security.egg-info/dependency_links.txt +0 -0
  58. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/agent_firewall_security.egg-info/entry_points.txt +0 -0
  59. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/agent_firewall_security.egg-info/requires.txt +0 -0
  60. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/agent_firewall_security.egg-info/top_level.txt +0 -0
  61. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/__init__.py +0 -0
  62. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/a2a/__init__.py +0 -0
  63. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/a2a/auth.py +0 -0
  64. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/adapters/__init__.py +0 -0
  65. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/adapters/anthropic.py +0 -0
  66. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/adapters/generic.py +0 -0
  67. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/adapters/normalize.py +0 -0
  68. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/adapters/openai.py +0 -0
  69. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/agents/__init__.py +0 -0
  70. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/artifact/__init__.py +0 -0
  71. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/artifact/reader.py +0 -0
  72. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/artifact/writer.py +0 -0
  73. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/attackgraph/__init__.py +0 -0
  74. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/attenuation.py +0 -0
  75. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/attest/__init__.py +0 -0
  76. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/attest/authority.py +0 -0
  77. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/authorization.py +0 -0
  78. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/benchmarks.py +0 -0
  79. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/capability2/__init__.py +0 -0
  80. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/cli.py +0 -0
  81. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/cli_v19.py +0 -0
  82. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/cli_v20.py +0 -0
  83. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/cli_v21.py +0 -0
  84. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/containment/__init__.py +0 -0
  85. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/defense/__init__.py +0 -0
  86. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/delegation_budget.py +0 -0
  87. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/delegation_store.py +0 -0
  88. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/engine.py +0 -0
  89. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/evidence.py +0 -0
  90. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/explain.py +0 -0
  91. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/http.py +0 -0
  92. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ident/__init__.py +0 -0
  93. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ident/registry.py +0 -0
  94. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/identity.py +0 -0
  95. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/immune/__init__.py +0 -0
  96. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/immune/engine.py +0 -0
  97. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/incident/__init__.py +0 -0
  98. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/incident/package.py +0 -0
  99. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/intel/__init__.py +0 -0
  100. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/intel/engine.py +0 -0
  101. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/key_management.py +0 -0
  102. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/key_store.py +0 -0
  103. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/lab/__init__.py +0 -0
  104. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/lab/engine.py +0 -0
  105. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/lifecycle.py +0 -0
  106. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/lifecycle_store.py +0 -0
  107. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/mcp.py +0 -0
  108. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/namespace.py +0 -0
  109. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/network/__init__.py +0 -0
  110. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/network/attack_path.py +0 -0
  111. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/network/behavior.py +0 -0
  112. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/network/correlation.py +0 -0
  113. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/network/graph.py +0 -0
  114. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/network/model.py +0 -0
  115. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/network/response.py +0 -0
  116. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/network/state.py +0 -0
  117. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/north_star.py +0 -0
  118. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/passport/__init__.py +0 -0
  119. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/passport/builder.py +0 -0
  120. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/policy.py +0 -0
  121. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/posture/__init__.py +0 -0
  122. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/posture/engine.py +0 -0
  123. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/protect.py +0 -0
  124. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/provenance/__init__.py +0 -0
  125. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/provenance/registry.py +0 -0
  126. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/recorder/__init__.py +0 -0
  127. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/recorder/checkpoint.py +0 -0
  128. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/recorder/encoding.py +0 -0
  129. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/recorder/events.py +0 -0
  130. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/recorder/identity.py +0 -0
  131. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/recorder/recorder.py +0 -0
  132. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/recorder/redact.py +0 -0
  133. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/refusal_state.py +0 -0
  134. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/replay.py +0 -0
  135. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/replay_store.py +0 -0
  136. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/replaylab/__init__.py +0 -0
  137. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/replaylab/laboratory.py +0 -0
  138. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/research/__init__.py +0 -0
  139. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/research/lab.py +0 -0
  140. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/response2/__init__.py +0 -0
  141. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/response2/adaptive.py +0 -0
  142. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/revocation.py +0 -0
  143. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/revocation_store.py +0 -0
  144. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/risk_context.py +0 -0
  145. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/security_context.py +0 -0
  146. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/security_decision.py +0 -0
  147. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/semantic_chain.py +0 -0
  148. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/simulation/__init__.py +0 -0
  149. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/simulation/case.py +0 -0
  150. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/simulation/recorder.py +0 -0
  151. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/simulation/replay.py +0 -0
  152. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/simulation/report.py +0 -0
  153. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/simulation/rollout.py +0 -0
  154. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/simulation/ruleset.py +0 -0
  155. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/task/__init__.py +0 -0
  156. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/task/registry.py +0 -0
  157. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/timeline/__init__.py +0 -0
  158. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/timeline/graph.py +0 -0
  159. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/timeline/timeline.py +0 -0
  160. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/timeline/trajectory.py +0 -0
  161. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/tools.py +0 -0
  162. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/transport.py +0 -0
  163. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/trust/__init__.py +0 -0
  164. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/trust/graph.py +0 -0
  165. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/__init__.py +0 -0
  166. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/__main__.py +0 -0
  167. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/control.py +0 -0
  168. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/demo.py +0 -0
  169. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/server.py +0 -0
  170. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/service.py +0 -0
  171. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/console.css +0 -0
  172. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/console.js +0 -0
  173. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/control.js +0 -0
  174. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/index.html +0 -0
  175. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/recorder.css +0 -0
  176. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/recorder.js +0 -0
  177. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/soc.css +0 -0
  178. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/soc.js +0 -0
  179. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/v20.css +0 -0
  180. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/v20.js +0 -0
  181. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/v21.css +0 -0
  182. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/static/v21.js +0 -0
  183. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/v18.py +0 -0
  184. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/v19.py +0 -0
  185. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/ui/v20.py +0 -0
  186. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/verify/__init__.py +0 -0
  187. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/firewall/verify/verifier.py +0 -0
  188. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/setup.cfg +0 -0
  189. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/tests/test_engine.py +0 -0
  190. {agent_firewall_security-2.1.0 → agent_firewall_security-2.2.0}/tests/test_security_decision.py +0 -0
@@ -0,0 +1,627 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-firewall-security
3
+ Version: 2.2.0
4
+ Summary: Security and canonical authorization infrastructure for AI agents and automated tool use.
5
+ Project-URL: Homepage, https://github.com/Shubhbhangoo/agent-firewall
6
+ Project-URL: Repository, https://github.com/Shubhbhangoo/agent-firewall
7
+ Project-URL: Issues, https://github.com/Shubhbhangoo/agent-firewall/issues
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Security
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: PyYAML>=6.0
19
+ Requires-Dist: mcp>=2.0
20
+ Requires-Dist: cryptography>=41.0
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest>=9.0; extra == "dev"
23
+ Requires-Dist: hypothesis>=6.0; extra == "dev"
24
+
25
+ # Agent Firewall
26
+
27
+ **Security control-plane infrastructure for autonomous AI agents and automated tool use.**
28
+
29
+ Agent Firewall is built around one security boundary: **authorization remains deterministic, explicit, and fail-closed**. Identity, provenance, monitoring, behavioral analysis, simulation, evidence, and response provide security context around that boundary, but they do not become an alternative path to authorization.
30
+
31
+ > **v2.2** makes the control plane adaptive: authority is re-evaluated when the state it rested on changes, contradictions between independent claim sources are reported rather than resolved, and the architectural properties the design rests on are checked by code instead of asserted in prose.
32
+
33
+ ---
34
+
35
+ ## Security model
36
+
37
+ The central rule is simple:
38
+
39
+ ```text
40
+ IDENTITY -> TASK -> AUTHORITY -> CAPABILITY -> PROVENANCE -> POLICY
41
+ |
42
+ v
43
+ DECISION
44
+ |
45
+ v
46
+ EXECUTION
47
+ |
48
+ v
49
+ EVIDENCE -> POSTURE -> RISK -> RESPONSE
50
+ ```
51
+
52
+ The security system is deliberately layered.
53
+
54
+ ```text
55
+ signals / telemetry / history / analysis
56
+ |
57
+ v
58
+ security context and evidence
59
+ |
60
+ v
61
+ deterministic authorization gate
62
+ |
63
+ v
64
+ ALLOW / DENY / REFUSE
65
+ |
66
+ v
67
+ execution
68
+ ```
69
+
70
+ ### The authorization boundary
71
+
72
+ `FirewallSDK.authorize()` is the authoritative decision path. Security analysis may supply context, but no analyzer, LLM, detector, graph, recorder, or monitoring component can directly grant authority.
73
+
74
+ The design therefore rejects patterns such as:
75
+
76
+ ```text
77
+ LLM says safe -> allow
78
+ risk score is low -> allow
79
+ agent is trusted -> allow
80
+ monitoring saw no attack -> allow
81
+ ```
82
+
83
+ Instead:
84
+
85
+ ```text
86
+ security evidence -> policy/context -> authorization pipeline -> decision
87
+ ```
88
+
89
+ When required evidence is unavailable, verification fails, identity is unknown, or a security control cannot establish the required basis, the safe outcome is refusal.
90
+
91
+ ---
92
+
93
+ ## What v2.2 adds
94
+
95
+ ### Continuous authorization
96
+
97
+ `firewall.continuous_auth` re-evaluates a granted authority when the state
98
+ it rested on changes. Fifteen revalidation triggers cover identity, task,
99
+ capability, delegation, provenance, posture, risk, trust, policy,
100
+ environment, incident, time, and explicit request.
101
+
102
+ It is not a second decision engine. Revalidation re-invokes
103
+ `FirewallSDK.authorize()` and compares verdicts, and its gating can only
104
+ turn an allow into a deny — never the reverse.
105
+
106
+ Every watched subsystem is an explicit constructor argument. An omitted
107
+ dependency makes its change class **undetectable**, which is deliberate
108
+ and visible at the call site rather than silently defaulted. A *configured*
109
+ dependency that raises is recorded as `PROBE_FAILED` — distinct from
110
+ `UNKNOWN`, which means "not wired" — and turns an allow into
111
+ `security_dependency_unavailable`.
112
+
113
+ ### Machine-checked invariants
114
+
115
+ `firewall.invariants` states each architectural property once and checks it
116
+ with exactly one function, so an invariant with no check is a missing
117
+ registry entry rather than a silently absent property.
118
+
119
+ ```bash
120
+ python -m firewall.invariants
121
+ ```
122
+
123
+ Status is three-valued. `UNVERIFIABLE` is falsy, makes the whole report
124
+ falsy, and makes `assert_all` raise — accepting it would make the assertion
125
+ satisfiable by breaking the checker. A source-only run gates the three
126
+ structural and three self-contained invariants; the five state-dependent
127
+ ones need an exercised SDK.
128
+
129
+ ### Adversarial discrepancy analysis
130
+
131
+ `firewall.adversarial` compares what an agent claims about itself against
132
+ recorded control-plane facts. Profiles default to `unknown` risk and can
133
+ never report `low` while a required fact is unestablished. A check that
134
+ raises produces an explicit gap rather than a clean profile.
135
+
136
+ ### Deception and contradiction detection
137
+
138
+ `firewall.deception` compares eight independent classes of claim about an
139
+ agent — identity, task, capability, provenance, behaviour, posture,
140
+ delegation, authorization — and reports named contradictions between them.
141
+ It does not pick a winner: a contradiction is a finding for a human or a
142
+ containment operator, not a resolved fact.
143
+
144
+ ### Evidence integrity
145
+
146
+ `firewall.evidence_integrity` verifies the evidence graph with three-valued
147
+ reporting. *Proven tampered*, *could not be checked*, and *passed* are
148
+ three separate outcomes. Any tamper finding at all yields `failed`,
149
+ regardless of the finding's triage severity.
150
+
151
+ Statuses, worst first: `failed` (proof of tampering), `unverifiable` (an
152
+ event's authenticity is unknown), `incomplete` (authenticity held, some
153
+ check could not run), `verified` (every check ran and passed).
154
+
155
+ ### Long-lived security memory
156
+
157
+ `firewall.security_memory` maintains long-lived hash-linked chains with
158
+ signed checkpoints. `EvidenceChain.verified` is a cached result of an actual
159
+ `verify_chain()` call, never true by construction and never restored from
160
+ disk.
161
+
162
+ Imports are quarantined. An import that cannot be verified is refused
163
+ rather than stored as unverified, and imported chains are held apart from
164
+ the local evidence graph rather than merged into it.
165
+
166
+ ### Adversarial digital twin
167
+
168
+ `firewall.twin.adversarial` searches the recorded security graph for
169
+ weaknesses under an explicit node and time budget, so every search
170
+ terminates and reports whether it was cut short. Like the rest of the twin
171
+ it reads a deep copy and holds no live registry reference.
172
+
173
+ Every finding carries a `basis`, and a search may never label its own
174
+ conclusion `observed` — constructing one raises. A reachable path is
175
+ reachability, not exploitability.
176
+
177
+ ### Shared provenance vocabulary
178
+
179
+ `firewall.platform` holds the vocabulary the v2.2 analytical subsystems
180
+ agree on — how strongly something is known, never whether it is permitted.
181
+ It re-exports `firewall.network.model.Provenance` rather than declaring a
182
+ parallel enum, so a finding's provenance and an attack path's basis stay
183
+ directly comparable. Two representations of one security concept are a
184
+ hazard; the package exists to avoid adding another.
185
+
186
+ It is used by `firewall.adversarial` and `firewall.invariants`; the
187
+ remaining v2.2 subsystems still carry their own provenance handling and
188
+ have not been migrated onto it.
189
+
190
+ ---
191
+
192
+ ## v2.1 defense layer
193
+
194
+ v2.2 is layered on the v2.1 defense layer rather than replacing it.
195
+
196
+ ### Defense mesh
197
+
198
+ `firewall.defense` continuously evaluates agent identity, trust, posture, and capabilities. It supports quarantine, audited recovery, re-entry, revocation, and signed transition evidence.
199
+
200
+ The mesh does not authorize operations. It uses the existing containment and authorization mechanisms to enforce security state.
201
+
202
+ ### Agent-to-agent zero trust
203
+
204
+ `firewall.a2a` provides:
205
+
206
+ - mutual cryptographic authentication
207
+ - single-use, TTL-bound challenges
208
+ - scoped agent relationships
209
+ - task-bound delegation
210
+ - capability attenuation by intersection
211
+ - delegation-chain verification
212
+ - expiring grants
213
+ - recursive revocation
214
+ - trust establishment and teardown
215
+ - cross-agent authorization through an optional SDK provider
216
+
217
+ Delegation can narrow authority, never widen it.
218
+
219
+ ### Attack graph
220
+
221
+ `firewall.attackgraph` builds bounded attack-path analysis across agents, identities, tasks, capabilities, tools, resources, delegations, provenance, policy, trust, and incidents.
222
+
223
+ Paths can expose:
224
+
225
+ - privilege escalation opportunities
226
+ - dangerous capability combinations
227
+ - delegation abuse
228
+ - trust transitivity
229
+ - blast radius
230
+ - high-risk chokepoints
231
+
232
+ Every path retains an evidence basis such as `observed`, `derived`, `inferred`, or `simulated`. A path cannot become stronger than its weakest supporting basis.
233
+
234
+ ### Security digital twin
235
+
236
+ `firewall.twin` performs isolated counterfactual analysis over deep-copied security graphs.
237
+
238
+ Supported scenarios include:
239
+
240
+ - compromised agents
241
+ - capability revocation
242
+ - untrusted tools
243
+ - new delegation
244
+ - credential exposure
245
+
246
+ The twin does not hold a live registry reference and does not mutate production state. Results are explicitly marked `simulated`.
247
+
248
+ ### Cryptographic evidence graph
249
+
250
+ `firewall.evidence_graph` provides signed, hash-linked security events with:
251
+
252
+ - strict sequence ordering
253
+ - causal relationships
254
+ - hash and link verification
255
+ - signature verification
256
+ - tamper detection
257
+ - replayable incident timelines
258
+ - cryptographic provenance chains
259
+
260
+ Evidence types remain structurally distinct. An inference is not silently converted into an observation. Promotion to `observed` requires an explicit signed action and reason, while the original event remains intact.
261
+
262
+ ### Capability Firewall 2.0
263
+
264
+ `firewall.capability2` adds composable constraints over:
265
+
266
+ - resources
267
+ - scopes
268
+ - actions
269
+ - time
270
+ - context
271
+ - agent identity
272
+ - task identity
273
+ - delegation lineage
274
+ - provenance
275
+ - environment
276
+
277
+ Attenuation is structural. A delegated capability must be narrower than its parent and cannot acquire authority through delegation.
278
+
279
+ ### Agent immune system
280
+
281
+ `firewall.immune` implements:
282
+
283
+ ```text
284
+ OBSERVE -> DETECT -> REASON -> SIMULATE
285
+ -> CONTAIN -> RECOVER -> VERIFY
286
+ ```
287
+
288
+ The reasoner may be an LLM or deterministic default component, but its output is advisory. A deterministic policy rule is required before a defensive action executes. High-impact containment remains subject to the configured approval boundary.
289
+
290
+ ### Security Research Lab 3.0
291
+
292
+ `firewall.research` attacks the control plane itself using adversarial scenarios covering malicious agents, forged identities, delegation chains, capability escalation, revocation bypass, provenance poisoning, replay, trust manipulation, confused-deputy behavior, cross-agent escalation, and policy conflicts.
293
+
294
+ Discovered violations can become regression-test seeds.
295
+
296
+ ### Security intelligence
297
+
298
+ `firewall.intel` correlates evidence, posture, trust, attack paths, chokepoints, and response history into explainable security hypotheses and recommended containment actions.
299
+
300
+ Intelligence is analysis, not authority.
301
+
302
+ ---
303
+
304
+ ## v2.0 security foundation
305
+
306
+ v2.1 is layered on the v2.0 control plane rather than replacing it, and
307
+ v2.2 is layered on both.
308
+
309
+ ### Cryptographic identity
310
+
311
+ `firewall.ident` provides persistent agent identities with key rotation, revocation, retirement, fingerprints, and signed state.
312
+
313
+ **Identity is not authorization.** Possessing a valid identity does not automatically grant a capability.
314
+
315
+ ### Task-bound authority
316
+
317
+ `firewall.task` binds permissions to tasks and enforces narrowing delegation. A chain such as `A -> B -> C` cannot escalate beyond the authority inherited from its ancestors.
318
+
319
+ ### Security passports and attestation
320
+
321
+ `firewall.passport` and `firewall.attest` provide signed, exportable security statements about identity, posture, authority, delegation, decisions, and events.
322
+
323
+ Verification distinguishes valid, failed, and unverifiable evidence rather than treating missing evidence as trustworthy.
324
+
325
+ ### Supply-chain provenance
326
+
327
+ `firewall.provenance` tracks models, tools, MCP servers, skills, plugins, packages, adapters, configuration, and policies.
328
+
329
+ A component name is never treated as proof of integrity or trust. Revocation can propagate to dependent components.
330
+
331
+ ### Continuous posture
332
+
333
+ `firewall.posture` maintains evidence-backed states from `unknown` through healthy, degraded, suspicious, high-risk, compromised, contained, recovering, and retired states.
334
+
335
+ ### Trust and response
336
+
337
+ `firewall.trust`, `firewall.lab`, and `firewall.response2` provide trust analysis, isolated counterfactuals, and graduated evidence-backed response while preserving the authorization boundary.
338
+
339
+ ---
340
+
341
+ ## Fail-closed guarantees
342
+
343
+ The architecture is designed around explicit security invariants.
344
+
345
+ - **Authorization has one canonical decision path.**
346
+ - **Monitoring cannot authorize.**
347
+ - **Re-evaluation cannot grant.** Continuous authorization can only turn an allow into a deny.
348
+ - **Identity does not imply authority.**
349
+ - **Delegation cannot escalate authority.**
350
+ - **A signed lineage claim outranks the mutable delegation registry.**
351
+ - **Revocation propagates through delegation lineage.**
352
+ - **Unverified artifacts are not trusted as evidence.**
353
+ - **Inference, prediction, simulation, and observation remain distinct.**
354
+ - **Simulation and replay do not modify live security state.**
355
+ - **Tool output is data, not authority.**
356
+ - **LLM output cannot directly authorize or approve a protected operation.**
357
+ - **High-impact response actions remain policy and approval gated.**
358
+ - **A check that could not run is not a check that passed.**
359
+ - **Security failures default toward refusal rather than implicit trust.**
360
+
361
+ These are implementation properties of the system, not a claim that any deployment is universally secure. Eleven such properties are additionally stated once in `firewall.invariants` and checked by code rather than asserted in prose alone; see [`docs/v2.2-invariants.md`](docs/v2.2-invariants.md).
362
+
363
+ ---
364
+
365
+ ## Evidence model
366
+
367
+ Security facts are intentionally classified by their basis:
368
+
369
+ | Basis | Meaning |
370
+ | --- | --- |
371
+ | `observed` | Directly recorded security evidence |
372
+ | `derived` | Deterministically computed from recorded evidence |
373
+ | `inferred` | Analytical or heuristic finding |
374
+ | `simulated` | Produced by an isolated counterfactual |
375
+ | `unknown` | Required evidence is missing or unverifiable |
376
+
377
+ This distinction matters. A simulated attack path is not evidence that the attack occurred. An inference is not an observation. Unknown is not trusted.
378
+
379
+ The flight recorder extends this model with portable `.afw` artifacts, cryptographic hashes, signed checkpoints, declared redaction, and independent verification.
380
+
381
+ ```bash
382
+ firewall record --out session.afw --agent agent-demo
383
+ firewall verify session.afw
384
+ firewall timeline session.afw
385
+ firewall trajectory session.afw
386
+ ```
387
+
388
+ Verification distinguishes states including `verified`, `failed`, `unverifiable`, `incomplete`, and `redacted`.
389
+
390
+ ---
391
+
392
+ ## Installation
393
+
394
+ Python 3.10+ is required.
395
+
396
+ ```bash
397
+ pip install agent-firewall-security==2.2.0
398
+ ```
399
+
400
+ Development installation:
401
+
402
+ ```bash
403
+ git clone https://github.com/Shubhbhangoo/agent-firewall.git
404
+ cd agent-firewall
405
+ pip install -e ".[dev]"
406
+ ```
407
+
408
+ Runtime dependencies are intentionally small:
409
+
410
+ - PyYAML
411
+ - mcp
412
+ - cryptography
413
+
414
+ ---
415
+
416
+ ## Minimal authorization example
417
+
418
+ ```python
419
+ from firewall.sdk import FirewallSDK
420
+
421
+ sdk = FirewallSDK()
422
+ sdk.generate_key("key-1")
423
+
424
+ capability = sdk.issue(
425
+ agent="agent-a",
426
+ capability="payments.send",
427
+ constraints={"amount_max": 100},
428
+ )
429
+
430
+ result = sdk.authorize(
431
+ capability,
432
+ "payments.send",
433
+ {"amount": 20},
434
+ )
435
+
436
+ print(result.allowed)
437
+ ```
438
+
439
+ The authorization path evaluates the security conditions required by the capability and policy rather than delegating the final decision to a model or monitoring component.
440
+
441
+ ---
442
+
443
+ ## Command surface
444
+
445
+ v2.2 adds no new CLI subcommands. Its one new entry point is the invariant
446
+ checker, `python -m firewall.invariants`, shown above.
447
+
448
+ ```bash
449
+ # Defense mesh
450
+ firewall defense evaluate agent-a --registry identities.json
451
+ firewall defense quarantine agent-a --reason "incident" --registry identities.json
452
+ firewall defense recover agent-a --reason "clean" --registry identities.json
453
+ firewall defense reenter agent-a --reason "verified" --registry identities.json
454
+
455
+ # Agent-to-agent authorization
456
+ firewall delegate establish --initiator alice --responder bob \
457
+ --permissions '{"allowed_actions": ["read"]}' \
458
+ --registry identities.json
459
+ firewall delegate authorize --actor alice --target bob --action read
460
+
461
+ # Capability analysis
462
+ firewall capability eval policy.json '{"resource":"payments","action":"send"}'
463
+ firewall capability attenuate policy.json --out narrowed.json \
464
+ --narrowing '{"action":["send"]}'
465
+
466
+ # Attack-path analysis
467
+ firewall attack-graph build network.json --out attack-graph.json
468
+ firewall attack-graph paths attack-graph.json --target /etc/shadow
469
+
470
+ # Digital twin
471
+ firewall twin network.json --kind compromised_agent --agent agent-a
472
+
473
+ # Evidence
474
+ firewall evidence append --state evidence.json --kind observed \
475
+ --subject agent-a --type decision --payload '{"allowed":true}'
476
+ firewall evidence verify --state evidence.json
477
+
478
+ # Immune system
479
+ firewall immune demo --policy immune-policy.json
480
+
481
+ # Security research
482
+ firewall research run
483
+ firewall research properties
484
+
485
+ # Benchmarks
486
+ python -m firewall.benchmarks
487
+ ```
488
+
489
+ ---
490
+
491
+ ## Testing and adversarial validation
492
+
493
+ The repository contains unit, integration, adversarial, hardening, evidence, UI/API, benchmark, and research tests.
494
+
495
+ The v2.2 test surface covers, among other properties:
496
+
497
+ - capability attenuation
498
+ - delegation narrowing
499
+ - structural delegation monotonicity
500
+ - signed lineage agreeing with registered lineage
501
+ - continuous revalidation through the canonical authorization path
502
+ - unavailable security dependencies turning an allow into a deny
503
+ - identity and revocation behavior
504
+ - attack-path analysis
505
+ - digital-twin isolation
506
+ - evidence-chain integrity
507
+ - tamper detection
508
+ - causal ordering
509
+ - evidence promotion
510
+ - three-valued integrity and invariant reporting
511
+ - quarantined evidence import
512
+ - UI/API boundaries
513
+ - control-route authentication
514
+ - legacy v2.1, v2.0 and v1.9 compatibility
515
+ - benchmark execution
516
+ - credential and private-key scanning
517
+
518
+ Run the test suite with:
519
+
520
+ ```bash
521
+ pytest
522
+ ```
523
+
524
+ Check the architectural invariants against the source tree with:
525
+
526
+ ```bash
527
+ python -m firewall.invariants
528
+ ```
529
+
530
+ Run the benchmark suite with:
531
+
532
+ ```bash
533
+ python -m firewall.benchmarks
534
+ ```
535
+
536
+ Security testing is treated as part of the implementation rather than as a separate documentation claim.
537
+
538
+ ---
539
+
540
+ ## Architecture boundaries
541
+
542
+ The following separation is intentional:
543
+
544
+ ```text
545
+ ANALYSIS / INTELLIGENCE
546
+ +------------------------------------------+
547
+ | telemetry | evidence | posture | intel |
548
+ | graphs | twin | research | LLM |
549
+ +--------------------+---------------------+
550
+ |
551
+ v
552
+ SECURITY CONTEXT
553
+ |
554
+ v
555
+ +---------------------------+
556
+ | FirewallSDK |
557
+ | canonical authorization |
558
+ | deterministic gates |
559
+ | fail-closed decision |
560
+ +-------------+-------------+
561
+ |
562
+ ALLOW / DENY
563
+ |
564
+ v
565
+ EXECUTION
566
+ ```
567
+
568
+ The important property is not how much analysis surrounds the gate. It is that analysis cannot silently become a second authorization mechanism.
569
+
570
+ ---
571
+
572
+ ## Security limitations
573
+
574
+ Agent Firewall is security infrastructure, not a guarantee that an entire deployment is secure.
575
+
576
+ It cannot compensate for compromised operating systems, malicious administrators, insecure deployment configuration, compromised cryptographic keys, vulnerabilities in protected applications, or attacks outside the information supplied to the control plane.
577
+
578
+ The security properties described here depend on correct integration, key management, policy configuration, and preservation of the authorization boundary.
579
+
580
+ The digital twin, attack graph, intelligence engine, and reasoner produce analysis. Their output must not be interpreted as proof of future behavior or proof that an environment is safe.
581
+
582
+ ---
583
+
584
+ ## Responsible security research
585
+
586
+ Security findings should be reported privately before public disclosure when they could affect users or downstream deployments.
587
+
588
+ Please include:
589
+
590
+ - affected version or commit
591
+ - affected component
592
+ - reproduction steps
593
+ - expected security property
594
+ - observed behavior
595
+ - impact assessment
596
+ - proof-of-concept where appropriate
597
+
598
+ See [`SECURITY.md`](SECURITY.md) for the project's security reporting policy.
599
+
600
+ ---
601
+
602
+ ## Documentation
603
+
604
+ Detailed specifications are maintained in the repository:
605
+
606
+ - `docs/v2.2-architecture.md`
607
+ - `docs/v2.2-security-model.md`
608
+ - `docs/v2.2-threat-model.md`
609
+ - `docs/v2.2-invariants.md`
610
+ - `docs/v2.2-migration.md`
611
+ - `docs/v2.1-architecture.md`
612
+ - `docs/v2.1-threat-model.md`
613
+ - `docs/v2.1-invariants.md`
614
+ - `docs/v2.1-migration.md`
615
+ - `docs/v2.1-cli.md`
616
+ - `docs/v2.1-benchmarks.md`
617
+ - `docs/v2.0-architecture.md`
618
+ - `docs/v2.0-threat-model.md`
619
+ - `docs/v1.8-artifact-format.md`
620
+
621
+ The changelog records release-level changes in `CHANGELOG.md`.
622
+
623
+ ---
624
+
625
+ ## License
626
+
627
+ MIT