agent-firewall-security 2.3.0__tar.gz → 2.5.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 (222) hide show
  1. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/PKG-INFO +259 -6
  2. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/README.md +258 -5
  3. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/agent_firewall_security.egg-info/PKG-INFO +259 -6
  4. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/agent_firewall_security.egg-info/SOURCES.txt +28 -1
  5. agent_firewall_security-2.5.0/firewall/a2a/__init__.py +34 -0
  6. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/a2a/auth.py +81 -4
  7. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/adapters/anthropic.py +94 -51
  8. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/adapters/generic.py +112 -49
  9. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/adapters/openai.py +87 -49
  10. agent_firewall_security-2.5.0/firewall/aegis/__init__.py +209 -0
  11. agent_firewall_security-2.5.0/firewall/aegis/blast.py +450 -0
  12. agent_firewall_security-2.5.0/firewall/aegis/controller.py +1177 -0
  13. agent_firewall_security-2.5.0/firewall/aegis/decay.py +267 -0
  14. agent_firewall_security-2.5.0/firewall/aegis/envelope.py +979 -0
  15. agent_firewall_security-2.5.0/firewall/aegis/explain.py +451 -0
  16. agent_firewall_security-2.5.0/firewall/aegis/preflight.py +614 -0
  17. agent_firewall_security-2.5.0/firewall/aegis/response.py +557 -0
  18. agent_firewall_security-2.5.0/firewall/aegis/restriction.py +523 -0
  19. agent_firewall_security-2.5.0/firewall/aegis/state.py +384 -0
  20. agent_firewall_security-2.5.0/firewall/attenuation.py +134 -0
  21. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/authorization.py +22 -1
  22. agent_firewall_security-2.5.0/firewall/benchmarks.py +1493 -0
  23. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/cli_v21.py +20 -4
  24. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/continuous_auth/engine.py +198 -0
  25. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/delegation.py +14 -0
  26. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/http.py +101 -74
  27. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/invariants/__init__.py +14 -2
  28. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/invariants/__main__.py +163 -159
  29. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/invariants/exercise.py +399 -269
  30. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/invariants/registry.py +438 -358
  31. agent_firewall_security-2.5.0/firewall/invariants/runtime.py +3339 -0
  32. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/invariants/source.py +397 -323
  33. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/invariants/static.py +185 -21
  34. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/sdk.py +1082 -122
  35. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/introspect.py +43 -0
  36. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/pyproject.toml +1 -1
  37. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_2_invariants.py +39 -19
  38. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_3_invariant_gate.py +436 -304
  39. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_3_self_attack.py +59 -12
  40. agent_firewall_security-2.5.0/tests/test_v2_4_aegis_adversarial.py +1468 -0
  41. agent_firewall_security-2.5.0/tests/test_v2_4_aegis_concurrency.py +1155 -0
  42. agent_firewall_security-2.5.0/tests/test_v2_4_aegis_controller.py +1450 -0
  43. agent_firewall_security-2.5.0/tests/test_v2_4_aegis_corrections.py +477 -0
  44. agent_firewall_security-2.5.0/tests/test_v2_4_aegis_fuzz.py +949 -0
  45. agent_firewall_security-2.5.0/tests/test_v2_4_aegis_gate.py +504 -0
  46. agent_firewall_security-2.5.0/tests/test_v2_4_aegis_state.py +633 -0
  47. agent_firewall_security-2.5.0/tests/test_v2_4_attenuation_narrowing.py +369 -0
  48. agent_firewall_security-2.5.0/tests/test_v2_4_benchmarks.py +337 -0
  49. agent_firewall_security-2.5.0/tests/test_v2_4_envelope_soundness.py +154 -0
  50. agent_firewall_security-2.5.0/tests/test_v2_4_integration_boundary.py +979 -0
  51. agent_firewall_security-2.5.0/tests/test_v2_5_benchmarks.py +252 -0
  52. agent_firewall_security-2.5.0/tests/test_v2_5_boundary_totality.py +1124 -0
  53. agent_firewall_security-2.5.0/tests/test_v2_5_composition.py +1269 -0
  54. agent_firewall_security-2.5.0/tests/test_v2_5_integration_divergence.py +932 -0
  55. agent_firewall_security-2.5.0/tests/test_v2_5_stale_revalidation.py +1242 -0
  56. agent_firewall_security-2.5.0/tests/test_v2_5_verdict_census.py +534 -0
  57. agent_firewall_security-2.3.0/firewall/a2a/__init__.py +0 -21
  58. agent_firewall_security-2.3.0/firewall/attenuation.py +0 -159
  59. agent_firewall_security-2.3.0/firewall/benchmarks.py +0 -295
  60. agent_firewall_security-2.3.0/firewall/invariants/runtime.py +0 -1173
  61. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/agent_firewall_security.egg-info/dependency_links.txt +0 -0
  62. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/agent_firewall_security.egg-info/entry_points.txt +0 -0
  63. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/agent_firewall_security.egg-info/requires.txt +0 -0
  64. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/agent_firewall_security.egg-info/top_level.txt +0 -0
  65. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/__init__.py +0 -0
  66. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/adapters/__init__.py +0 -0
  67. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/adapters/normalize.py +0 -0
  68. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/adversarial/__init__.py +0 -0
  69. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/agents/__init__.py +0 -0
  70. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/agents/adapters.py +0 -0
  71. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/agents/base.py +0 -0
  72. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/artifact/__init__.py +0 -0
  73. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/artifact/reader.py +0 -0
  74. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/artifact/writer.py +0 -0
  75. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/attackgraph/__init__.py +0 -0
  76. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/attackgraph/engine.py +0 -0
  77. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/attest/__init__.py +0 -0
  78. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/attest/authority.py +0 -0
  79. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/capability.py +0 -0
  80. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/capability2/__init__.py +0 -0
  81. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/capability2/constraints.py +0 -0
  82. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/cli.py +0 -0
  83. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/cli_v19.py +0 -0
  84. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/cli_v20.py +0 -0
  85. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/containment/__init__.py +0 -0
  86. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/containment/controller.py +0 -0
  87. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/continuous_auth/__init__.py +0 -0
  88. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/continuous_auth/monitor.py +0 -0
  89. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/continuous_auth/predicates.py +0 -0
  90. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/deception/__init__.py +0 -0
  91. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/defense/__init__.py +0 -0
  92. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/defense/mesh.py +0 -0
  93. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/delegation_budget.py +0 -0
  94. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/delegation_lineage.py +0 -0
  95. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/delegation_store.py +0 -0
  96. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/engine.py +0 -0
  97. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/evidence.py +0 -0
  98. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/evidence_graph/__init__.py +0 -0
  99. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/evidence_graph/graph.py +0 -0
  100. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/evidence_integrity/__init__.py +0 -0
  101. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/explain.py +0 -0
  102. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ident/__init__.py +0 -0
  103. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ident/registry.py +0 -0
  104. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/identity.py +0 -0
  105. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/immune/__init__.py +0 -0
  106. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/immune/engine.py +0 -0
  107. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/incident/__init__.py +0 -0
  108. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/incident/package.py +0 -0
  109. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/intel/__init__.py +0 -0
  110. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/intel/engine.py +0 -0
  111. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/invariants/model.py +0 -0
  112. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/key_management.py +0 -0
  113. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/key_store.py +0 -0
  114. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/lab/__init__.py +0 -0
  115. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/lab/engine.py +0 -0
  116. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/lifecycle.py +0 -0
  117. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/lifecycle_store.py +0 -0
  118. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/mcp.py +0 -0
  119. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/namespace.py +0 -0
  120. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/network/__init__.py +0 -0
  121. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/network/attack_path.py +0 -0
  122. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/network/behavior.py +0 -0
  123. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/network/correlation.py +0 -0
  124. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/network/graph.py +0 -0
  125. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/network/model.py +0 -0
  126. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/network/response.py +0 -0
  127. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/network/simulator.py +0 -0
  128. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/network/state.py +0 -0
  129. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/north_star.py +0 -0
  130. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/passport/__init__.py +0 -0
  131. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/passport/builder.py +0 -0
  132. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/platform/__init__.py +0 -0
  133. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/platform/provenance.py +0 -0
  134. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/policy.py +0 -0
  135. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/policy_analysis/__init__.py +0 -0
  136. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/posture/__init__.py +0 -0
  137. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/posture/engine.py +0 -0
  138. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/protect.py +0 -0
  139. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/provenance/__init__.py +0 -0
  140. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/provenance/registry.py +0 -0
  141. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/recorder/__init__.py +0 -0
  142. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/recorder/checkpoint.py +0 -0
  143. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/recorder/encoding.py +0 -0
  144. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/recorder/events.py +0 -0
  145. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/recorder/identity.py +0 -0
  146. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/recorder/recorder.py +0 -0
  147. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/recorder/redact.py +0 -0
  148. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/refusal_state.py +0 -0
  149. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/replay.py +0 -0
  150. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/replay_store.py +0 -0
  151. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/replaylab/__init__.py +0 -0
  152. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/replaylab/laboratory.py +0 -0
  153. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/research/__init__.py +0 -0
  154. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/research/lab.py +0 -0
  155. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/response2/__init__.py +0 -0
  156. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/response2/adaptive.py +0 -0
  157. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/revocation.py +0 -0
  158. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/revocation_store.py +0 -0
  159. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/risk_context.py +0 -0
  160. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/security_context.py +0 -0
  161. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/security_decision.py +0 -0
  162. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/security_memory/__init__.py +0 -0
  163. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/semantic_chain.py +0 -0
  164. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/simulation/__init__.py +0 -0
  165. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/simulation/case.py +0 -0
  166. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/simulation/recorder.py +0 -0
  167. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/simulation/replay.py +0 -0
  168. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/simulation/report.py +0 -0
  169. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/simulation/rollout.py +0 -0
  170. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/simulation/ruleset.py +0 -0
  171. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/task/__init__.py +0 -0
  172. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/task/registry.py +0 -0
  173. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/timeline/__init__.py +0 -0
  174. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/timeline/graph.py +0 -0
  175. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/timeline/timeline.py +0 -0
  176. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/timeline/trajectory.py +0 -0
  177. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/tools.py +0 -0
  178. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/transport.py +0 -0
  179. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/trust/__init__.py +0 -0
  180. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/trust/graph.py +0 -0
  181. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/twin/__init__.py +0 -0
  182. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/twin/adversarial.py +0 -0
  183. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/twin/twin.py +0 -0
  184. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/__init__.py +0 -0
  185. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/__main__.py +0 -0
  186. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/control.py +0 -0
  187. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/demo.py +0 -0
  188. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/server.py +0 -0
  189. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/service.py +0 -0
  190. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/console.css +0 -0
  191. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/console.js +0 -0
  192. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/control.js +0 -0
  193. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/index.html +0 -0
  194. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/recorder.css +0 -0
  195. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/recorder.js +0 -0
  196. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/soc.css +0 -0
  197. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/soc.js +0 -0
  198. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/v20.css +0 -0
  199. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/v20.js +0 -0
  200. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/v21.css +0 -0
  201. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/static/v21.js +0 -0
  202. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/v18.py +0 -0
  203. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/v19.py +0 -0
  204. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/v20.py +0 -0
  205. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/ui/v21.py +0 -0
  206. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/verify/__init__.py +0 -0
  207. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/firewall/verify/verifier.py +0 -0
  208. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/setup.cfg +0 -0
  209. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_continuous_auth.py +0 -0
  210. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_engine.py +0 -0
  211. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_sdk_continuous_auth.py +0 -0
  212. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_security_decision.py +0 -0
  213. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_2_adversarial_defense.py +0 -0
  214. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_2_adversarial_twin.py +0 -0
  215. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_2_capability_delegation.py +0 -0
  216. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_2_deception_integrity.py +0 -0
  217. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_2_evidence_integrity.py +0 -0
  218. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_2_platform_provenance.py +0 -0
  219. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_2_security_memory.py +0 -0
  220. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_3_duplicate_concepts.py +0 -0
  221. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_3_intel_coordination.py +0 -0
  222. {agent_firewall_security-2.3.0 → agent_firewall_security-2.5.0}/tests/test_v2_3_policy_analysis.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-firewall-security
3
- Version: 2.3.0
3
+ Version: 2.5.0
4
4
  Summary: Security and canonical authorization infrastructure for AI agents and automated tool use.
5
5
  Project-URL: Homepage, https://github.com/Shubhbhangoo/agent-firewall
6
6
  Project-URL: Repository, https://github.com/Shubhbhangoo/agent-firewall
@@ -28,6 +28,10 @@ Requires-Dist: hypothesis>=6.0; extra == "dev"
28
28
 
29
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
30
 
31
+ > **v2.5** is an attack release. It adds no subsystem and no authorization path: twenty-two attacks were run against v2.4's shipped boundary, and the twelve that found a place where `authorize()` raised instead of deciding are now denials that name what could not be read. An expired capability that returned `authorized` because the verifier had no clock is the one that mattered most.
32
+ >
33
+ > **v2.4** adds **Aegis**, an adaptive authority control plane: a live grant can be narrowed, suspended, revalidated or revoked while a task is running. It adds no second authorization path — Aegis reaches `FirewallSDK.authorize()` through one gate that can only deny or abstain, and learns what happened through one callback the SDK invokes *after* the decision exists.
34
+ >
31
35
  > **v2.3** is a correctness release. It adds no subsystem and no authorization path: the work was to attack v2.2's shipped behaviour, fix the three fail-open paths that broke, stop analytical output from reading as verified when it was not, and make the strict invariant gate something CI can actually fail on.
32
36
  >
33
37
  > **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.
@@ -92,6 +96,187 @@ When required evidence is unavailable, verification fails, identity is unknown,
92
96
 
93
97
  ---
94
98
 
99
+ ## What v2.5 changes
100
+
101
+ v2.5 adds no subsystem. The work was to attack v2.4's shipped boundary until
102
+ a guarantee broke; twenty-two attacks are recorded in
103
+ [`docs/v2.5-boundary.md`](docs/v2.5-boundary.md), each with the entry point, a
104
+ reproduction through the public API, the verdict before and after, and the
105
+ direction authority moved.
106
+
107
+ ### Twelve crashes that were not decisions
108
+
109
+ `FAIL_CLOSED` has said since v2.2 that "the authorization path never raises in
110
+ place of deciding". All eight probes behind it were malformed *input* against
111
+ a healthy firewall, so the invariant held green while twelve paths through
112
+ `FirewallSDK.authorize()` still raised — nine of them on a read of the
113
+ firewall's own state, which no amount of hostile input reaches.
114
+
115
+ - **An expired capability returned `authorized`.** A `CapabilityVerifier`
116
+ built without a `clock` is a legitimate configuration: verify signatures,
117
+ leave expiry to the firewall's time gate. `_gate_time` responded to an
118
+ unreadable clock by not checking the window at all. Now
119
+ `clock_unavailable:{cause}`, and the verifier always carries a clock.
120
+ - **Five state reads propagated whatever the store raised** — refusal state,
121
+ risk state, issuer trust, revocation and delegation lineage. Each is now
122
+ `..._unavailable:{Type}`. The bundled `SQLiteRevocationStore` behind a
123
+ closed connection reaches one of them for real.
124
+ - **An unwritable audit sink destroyed the denial it was recording.** The
125
+ verdict now survives and the loss travels in `trace["evidence_error"]`; the
126
+ same failure on the allow path withholds the allow as
127
+ `evidence_unavailable:{Type}`.
128
+ - **Malformed arguments and an unreadable envelope projection** answer with
129
+ `invalid_request`, `invalid_capability`, `capability_time_invalid`, and the
130
+ bottom envelope rather than an exception.
131
+
132
+ The shape is the same in all twelve: a caller's `except Exception` was
133
+ deciding what happened to an unauthorized request, and now the boundary
134
+ decides.
135
+
136
+ ### One question asked, another one executed
137
+
138
+ Five defects sat between a caller and the boundary, and none of them bypassed
139
+ it or made it answer wrongly — the boundary was asked a different question
140
+ from the one the glue then acted on. Three adapters authorized
141
+ `{"amount": 10}` and executed `amount=5000`, by three mechanisms: a
142
+ non-idempotent `normalize`, a caller mapping that answered differently on the
143
+ second read, and a hostile `Mapping` re-materialized for the handler. The fix
144
+ is structural rather than defensive — normalize or settle once, then hand the
145
+ *same object* to the boundary and to the handler. A fourth defect was created
146
+ by that fix (a `request_builder` mutating the mapping the handler would then
147
+ unpack) and closed before shipping; a fifth let an unreadable replay store
148
+ escape `HTTPFirewall.authorize` after the boundary had allowed.
149
+
150
+ ### A monitoring surface that reported withdrawn authority
151
+
152
+ `revalidate()` served a cached allow across an Aegis suspension, across a
153
+ narrowing, and across a latched refusal, while `authorize()` denied all three.
154
+ No enforcement path consumes that answer as permission, so the boundary held
155
+ — but the surface whose only job is to notice a withdrawal did not notice.
156
+ `SecurityContextSnapshot` now carries `aegis_restrictions` and
157
+ `refusal_state`, so the change routes revalidation through `authorize()`. Both
158
+ are *state* probes: they report what state exists and never decide whether it
159
+ excludes the request, which is deliberately coarser than the gates and costs
160
+ exactly one redundant authorization when a digest moves for a reason the
161
+ boundary tolerates.
162
+
163
+ ### A sixteenth invariant, and three of the fifteen strengthened
164
+
165
+ `REVALIDATION_CONSISTENCY` is new: continuous revalidation never reports an
166
+ authority the boundary denies, sampled over six security-state changes, each
167
+ with its own negative control. `AUTHORIZATION_UNIQUENESS` is now a census of
168
+ all 50 verdict-construction sites in the package against a closed allow-list
169
+ keyed by `(module, function)` — a planted second authorization path inside
170
+ `sdk.py` previously passed it. `FAIL_CLOSED` gained nine dependency-failure
171
+ probes. And `ENVELOPE_SOUNDNESS` stopped absorbing the one case it was most
172
+ exposed to: the reads that produce a bottom envelope were the same reads that
173
+ raised, and it reported `HOLDS` on them anyway. Nothing was added to raise the
174
+ count — where an invariant already covered a property, it was strengthened
175
+ instead.
176
+
177
+ ### What it costs, and what was refused
178
+
179
+ The two new snapshot probes cost about 4.5 µs of a ~70 µs snapshot, roughly
180
+ 0.4% of the authorization they accompany, so neither fix has a performance
181
+ argument against it. Four optimizations were deliberately not made, and the
182
+ two that would have reclaimed the ~1.1 ms a changed revalidation costs are
183
+ the ones worth stating: both amount to concluding that a refusal does not
184
+ apply, which is an allow reached outside `authorize()`. One of the two is
185
+ enforced by a failing test rather than by prose. See
186
+ [`docs/v2.5-performance.md`](docs/v2.5-performance.md).
187
+
188
+ ---
189
+
190
+ ## What v2.4 adds
191
+
192
+ v2.2 made the platform adaptive *above* the boundary: when watched state
193
+ changed, a decision was re-run. v2.4 makes **authority itself** adaptive. A
194
+ grant that is already in use can be narrowed, suspended, revalidated or
195
+ revoked, and the change is enforced on the next authorization — and, for
196
+ suspension, inside the commit transaction of one already in flight.
197
+
198
+ Aegis is off by default. `FirewallSDK(aegis_enabled=True)` opts in; with no
199
+ controller attached the adaptive gate abstains and v2.3 behaviour is exact.
200
+
201
+ ### One deny-only seam
202
+
203
+ Nine modules, 5,382 lines, none of which imports `firewall.sdk`. Everything
204
+ Aegis does reaches the outside world through two points: `_gate_aegis`, the
205
+ ninth of eleven gates, which can only deny or abstain; and
206
+ `observe_authorization`, which the SDK calls *after* a decision exists.
207
+ Because the callback runs after, no Aegis state can be a precondition of the
208
+ allow it observes. Authority flows from the boundary into Aegis and never the
209
+ other way.
210
+
211
+ ```text
212
+ change -> classify -> KEEP | REVALIDATE | NARROW | SUSPEND | REVOKE
213
+ |
214
+ v
215
+ restriction written
216
+ |
217
+ v
218
+ FirewallSDK.authorize() -> _gate_aegis -> DENY
219
+ ```
220
+
221
+ There is no arrow from Aegis to ALLOW. That absence is the design.
222
+
223
+ ### The authority envelope
224
+
225
+ An `AuthorityEnvelope` is a bound on what a capability may still do, folded
226
+ across its delegation chain by a per-dimension greatest-lower-bound. Twelve
227
+ fields — patterns, tool, time window, constraint bounds, depth, its ceiling,
228
+ issuers, issuer trust, revocation, budget, chain membership, and a bottom
229
+ marker — and every dimension that bounds a request has a named enforcement
230
+ site at the boundary. A dimension with no enforcement site would be
231
+ decoration.
232
+
233
+ The theorem is one-directional and stated that way: if the envelope
234
+ **excludes** a request, the boundary denies it. The converse does not hold,
235
+ and the API is named so that misuse reads wrong — `excludes()` returns a
236
+ reason, `may_admit()` means "this envelope does not itself refuse", and
237
+ `__bool__` **raises** on an envelope, a grant, a preflight, a blast radius
238
+ and a classification, so `if preflight(...)` is an error rather than an
239
+ accidental allow.
240
+
241
+ ### Seven states ordered by residual authority
242
+
243
+ `ISSUED`, `ACTIVE`, `REVALIDATING`, `NARROWED`, `SUSPENDED`, `REVOKED`,
244
+ `EXPIRED`. A transition is legal only if it does not increase residual
245
+ authority. `REVALIDATING -> ACTIVE` is the only edge that restores authority,
246
+ and it requires an `AuthorizationResult` that is allowed, reasoned
247
+ `authorized`, and traced to that capability's fingerprint. `REVOKED` and
248
+ `EXPIRED` are terminal and checked before the ordering rule, so no evidence
249
+ or clock change produces an edge out of either.
250
+
251
+ The state machine is a record and a legality check. It is deliberately **not**
252
+ an enforcement channel: the gate reads restrictions, not states, because
253
+ wiring the state model into the gate would make the authorization path depend
254
+ on a structure whose own updates require an authorization result.
255
+
256
+ ### Unknown never becomes safe
257
+
258
+ An unrecognised trigger is `REVALIDATE`, not `KEEP` (which would make an
259
+ unknown event benign) and not `REVOKE` (which would make any unknown string a
260
+ denial-of-service lever). Nothing maps to `KEEP` at all — it is reachable
261
+ only by establishing five positive conditions, so "nothing changed" must be
262
+ shown rather than assumed. An unreadable budget is exhausted, not unlimited;
263
+ an unreadable restriction matches; unestablished issuer trust is `None`, not
264
+ `True`; an unresolvable chain yields the bottom envelope; a traversal that
265
+ exceeds its bounds is `UNANALYZABLE` rather than a partial answer presented
266
+ as complete. `UNKNOWN_NON_AUTHORIZATION` checks these exhaustively.
267
+
268
+ ### What it does not claim
269
+
270
+ Envelope soundness runs in one direction. `canonical_allow_for` is a
271
+ structural check, not a cryptographic one — it bounds mistakes, not an
272
+ adversary already inside the process. The commit-time re-read covers
273
+ suspension only. The restriction cap trades availability for integrity:
274
+ sixteen narrowings drive a grant to `SUSPEND`, which is fail-closed and still
275
+ a lever. §16 of [`docs/v2.4-aegis.md`](docs/v2.4-aegis.md) is the full list,
276
+ and §17 maps each guarantee to the test file that establishes it.
277
+
278
+ ---
279
+
95
280
  ## What v2.3 changes
96
281
 
97
282
  v2.3 adds no subsystem. Three requests that v2.2 allowed are now denied,
@@ -137,9 +322,9 @@ section, so deleting one fails rather than quietly shrinking the suite. See
137
322
  ### A strict invariant gate that can pass
138
323
 
139
324
  `python -m firewall.invariants --strict` exited 2 on every invocation,
140
- because five of the eleven invariants are claims about live state that a
325
+ because seven of the sixteen invariants are claims about live state that a
141
326
  source-only run never reaches. A gate that always fails is a gate that gets
142
- removed, so those five were effectively ungated in CI.
327
+ removed, so those seven were effectively ungated in CI.
143
328
  `firewall/invariants/exercise.py` builds the canonical estate through the
144
329
  SDK's public API only, and CI now runs the source-only and exercised gates
145
330
  as separate steps. What a green exercised run establishes is bounded to that
@@ -427,10 +612,10 @@ The architecture is designed around explicit security invariants.
427
612
  - **Tool output is data, not authority.**
428
613
  - **LLM output cannot directly authorize or approve a protected operation.**
429
614
  - **High-impact response actions remain policy and approval gated.**
430
- - **A check that could not run is not a check that passed.**
615
+ - **A check that could not run is not a check that passed.** A dependency the boundary cannot read is a denial that names it, not a check skipped — true of the boundary's own state reads from v2.5, and of malformed input before that.
431
616
  - **Security failures default toward refusal rather than implicit trust.**
432
617
 
433
- 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) for the invariants themselves and [`docs/v2.3-invariant-gate.md`](docs/v2.3-invariant-gate.md) for what a green gate run does and does not establish.
618
+ These are implementation properties of the system, not a claim that any deployment is universally secure. Sixteen 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) for the invariants themselves, [`docs/v2.3-invariant-gate.md`](docs/v2.3-invariant-gate.md) for what a green gate run does and does not establish, [`docs/v2.4-aegis.md`](docs/v2.4-aegis.md) for the four the authority control plane adds, and [`docs/v2.5-boundary.md`](docs/v2.5-boundary.md) for the sixteenth and for what each of them does **not** establish.
434
619
 
435
620
  Where a property does **not** hold, it is stated rather than left to be inferred. A posture change is detected but does not by itself flip a verdict; `retire_key` is not containment for a stolen key, since a retired key's signatures keep verifying so that rotation does not invalidate capabilities in flight; an `amount_max` ceiling is per request, so two siblings each holding one can spend it twice unless a lineage budget is configured; and possession of a trusted signing key is authority, which no cryptography can undo. [`docs/v2.3-self-attack.md`](docs/v2.3-self-attack.md) records each of these against the test that pins it.
436
621
 
@@ -516,9 +701,15 @@ The authorization path evaluates the security conditions required by the capabil
516
701
 
517
702
  ## Command surface
518
703
 
704
+ v2.4 adds no new CLI subcommands. One existing command changes what it
705
+ prints: `firewall delegate-authorize` now labels an allow it reached without
706
+ an attached `sdk_provider` as `ALLOWED (relationship only)` and says not to
707
+ enforce on it. The exit status stays 0 — the question asked was answered
708
+ affirmatively — but the answer no longer overstates itself.
709
+
519
710
  v2.3 adds no new CLI subcommands. It adds one flag to the invariant
520
711
  checker: `python -m firewall.invariants --exercise --strict` builds the
521
- canonical estate so that all eleven invariants can be reached, which makes
712
+ canonical estate so that all sixteen invariants can be reached, which makes
522
713
  `--strict` a gate that can pass and is therefore worth failing.
523
714
 
524
715
  v2.2 adds no new CLI subcommands. Its one new entry point is the invariant
@@ -571,6 +762,62 @@ python -m firewall.benchmarks
571
762
 
572
763
  The repository contains unit, integration, adversarial, hardening, evidence, UI/API, benchmark, and research tests.
573
764
 
765
+ The v2.5 test surface adds 190 tests — 4,277 in the suite as a whole, on
766
+ Python 3.10, 3.11 and 3.12 — of which 189 are in six files, one per campaign.
767
+ Among the properties covered:
768
+
769
+ - every one of the boundary's own dependency reads answering with a denial
770
+ that names it, including against the bundled stores behind a closed
771
+ connection rather than only against injected hostility
772
+ - a denial surviving the loss of its own audit record, and an allow that
773
+ cannot be recorded being withheld
774
+ - an expired capability denied when the clock cannot be read, on every cause:
775
+ no clock at all, a clock that raises, and a clock returning `nan`
776
+ - one validity window measured in one time base, under an injected clock in
777
+ both directions
778
+ - a planted second authorization path being named by the invariant that
779
+ forbids one, with the census verified against all 50 construction sites
780
+ - the payload the boundary authorized being the object the handler executes,
781
+ parametrized over all three adapters, including against a mutating
782
+ `request_builder`
783
+ - revalidation refusing to report an authority the boundary denies, across an
784
+ Aegis suspension, a narrowing, a lift, and a latched refusal, each with a
785
+ negative control that blinds the snapshot field and shows the invariant
786
+ violating
787
+ - an unreadable replay store becoming a `503` rather than escaping a method
788
+ typed to return a decision
789
+ - the three surviving MCP/HTTP divergences reproduced rather than asserted, so
790
+ a future unification fails a test that says why it stays
791
+
792
+ The v2.4 test surface adds 384 tests across eleven files — 4,087 in the suite
793
+ as a whole, on Python 3.10, 3.11 and 3.12 — including stateful security-state
794
+ fuzzing, eight named concurrency races, and an integration-boundary sweep.
795
+ Among the properties covered:
796
+
797
+ - no path from adaptive analysis to an allow, and no Aegis module able to
798
+ construct an `AuthorizationResult`
799
+ - every forbidden transition refused individually: out of `REVOKED`, out of
800
+ `EXPIRED`, `NARROWED` to wider, `SUSPENDED` to `ACTIVE` without a canonical
801
+ allow, and a child exceeding its parent
802
+ - an envelope that excludes a request always accompanied by a boundary that
803
+ denies it
804
+ - no field of the envelope widening under delegation or attenuation
805
+ - a `nan` bound bounding nothing being denied, while an `inf` bound still
806
+ means unbounded
807
+ - a 400-digit integer producing a decision rather than an exception out of
808
+ `authorize()`
809
+ - every authorization-reachable Aegis method total, including against an
810
+ injected hostile controller
811
+ - a restriction written mid-flight being observed, and a suspension being
812
+ caught inside the commit transaction
813
+ - `__bool__` raising on every analysis object, so a truthiness test cannot
814
+ become an allow
815
+ - every integration surface reaching the canonical boundary, with no local
816
+ allow anywhere
817
+ - no dataclass field in the package carrying a default that Python 3.11
818
+ rejects, so a defect that hides on the development interpreter cannot wait
819
+ for CI to find it
820
+
574
821
  The v2.3 test surface adds the thirteen-question self-attack suite, which
575
822
  covers, among other properties:
576
823
 
@@ -697,6 +944,12 @@ See [`SECURITY.md`](SECURITY.md) for the project's security reporting policy.
697
944
 
698
945
  Detailed specifications are maintained in the repository:
699
946
 
947
+ - `docs/v2.5-boundary.md`
948
+ - `docs/v2.5-performance.md`
949
+ - `docs/v2.4-aegis.md`
950
+ - `docs/v2.4-aegis-design.md`
951
+ - `docs/v2.4-performance.md`
952
+ - `docs/v2.4-migration.md`
700
953
  - `docs/v2.3-security-corrections.md`
701
954
  - `docs/v2.3-self-attack.md`
702
955
  - `docs/v2.3-invariant-gate.md`
@@ -4,6 +4,10 @@
4
4
 
5
5
  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.
6
6
 
7
+ > **v2.5** is an attack release. It adds no subsystem and no authorization path: twenty-two attacks were run against v2.4's shipped boundary, and the twelve that found a place where `authorize()` raised instead of deciding are now denials that name what could not be read. An expired capability that returned `authorized` because the verifier had no clock is the one that mattered most.
8
+ >
9
+ > **v2.4** adds **Aegis**, an adaptive authority control plane: a live grant can be narrowed, suspended, revalidated or revoked while a task is running. It adds no second authorization path — Aegis reaches `FirewallSDK.authorize()` through one gate that can only deny or abstain, and learns what happened through one callback the SDK invokes *after* the decision exists.
10
+ >
7
11
  > **v2.3** is a correctness release. It adds no subsystem and no authorization path: the work was to attack v2.2's shipped behaviour, fix the three fail-open paths that broke, stop analytical output from reading as verified when it was not, and make the strict invariant gate something CI can actually fail on.
8
12
  >
9
13
  > **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.
@@ -68,6 +72,187 @@ When required evidence is unavailable, verification fails, identity is unknown,
68
72
 
69
73
  ---
70
74
 
75
+ ## What v2.5 changes
76
+
77
+ v2.5 adds no subsystem. The work was to attack v2.4's shipped boundary until
78
+ a guarantee broke; twenty-two attacks are recorded in
79
+ [`docs/v2.5-boundary.md`](docs/v2.5-boundary.md), each with the entry point, a
80
+ reproduction through the public API, the verdict before and after, and the
81
+ direction authority moved.
82
+
83
+ ### Twelve crashes that were not decisions
84
+
85
+ `FAIL_CLOSED` has said since v2.2 that "the authorization path never raises in
86
+ place of deciding". All eight probes behind it were malformed *input* against
87
+ a healthy firewall, so the invariant held green while twelve paths through
88
+ `FirewallSDK.authorize()` still raised — nine of them on a read of the
89
+ firewall's own state, which no amount of hostile input reaches.
90
+
91
+ - **An expired capability returned `authorized`.** A `CapabilityVerifier`
92
+ built without a `clock` is a legitimate configuration: verify signatures,
93
+ leave expiry to the firewall's time gate. `_gate_time` responded to an
94
+ unreadable clock by not checking the window at all. Now
95
+ `clock_unavailable:{cause}`, and the verifier always carries a clock.
96
+ - **Five state reads propagated whatever the store raised** — refusal state,
97
+ risk state, issuer trust, revocation and delegation lineage. Each is now
98
+ `..._unavailable:{Type}`. The bundled `SQLiteRevocationStore` behind a
99
+ closed connection reaches one of them for real.
100
+ - **An unwritable audit sink destroyed the denial it was recording.** The
101
+ verdict now survives and the loss travels in `trace["evidence_error"]`; the
102
+ same failure on the allow path withholds the allow as
103
+ `evidence_unavailable:{Type}`.
104
+ - **Malformed arguments and an unreadable envelope projection** answer with
105
+ `invalid_request`, `invalid_capability`, `capability_time_invalid`, and the
106
+ bottom envelope rather than an exception.
107
+
108
+ The shape is the same in all twelve: a caller's `except Exception` was
109
+ deciding what happened to an unauthorized request, and now the boundary
110
+ decides.
111
+
112
+ ### One question asked, another one executed
113
+
114
+ Five defects sat between a caller and the boundary, and none of them bypassed
115
+ it or made it answer wrongly — the boundary was asked a different question
116
+ from the one the glue then acted on. Three adapters authorized
117
+ `{"amount": 10}` and executed `amount=5000`, by three mechanisms: a
118
+ non-idempotent `normalize`, a caller mapping that answered differently on the
119
+ second read, and a hostile `Mapping` re-materialized for the handler. The fix
120
+ is structural rather than defensive — normalize or settle once, then hand the
121
+ *same object* to the boundary and to the handler. A fourth defect was created
122
+ by that fix (a `request_builder` mutating the mapping the handler would then
123
+ unpack) and closed before shipping; a fifth let an unreadable replay store
124
+ escape `HTTPFirewall.authorize` after the boundary had allowed.
125
+
126
+ ### A monitoring surface that reported withdrawn authority
127
+
128
+ `revalidate()` served a cached allow across an Aegis suspension, across a
129
+ narrowing, and across a latched refusal, while `authorize()` denied all three.
130
+ No enforcement path consumes that answer as permission, so the boundary held
131
+ — but the surface whose only job is to notice a withdrawal did not notice.
132
+ `SecurityContextSnapshot` now carries `aegis_restrictions` and
133
+ `refusal_state`, so the change routes revalidation through `authorize()`. Both
134
+ are *state* probes: they report what state exists and never decide whether it
135
+ excludes the request, which is deliberately coarser than the gates and costs
136
+ exactly one redundant authorization when a digest moves for a reason the
137
+ boundary tolerates.
138
+
139
+ ### A sixteenth invariant, and three of the fifteen strengthened
140
+
141
+ `REVALIDATION_CONSISTENCY` is new: continuous revalidation never reports an
142
+ authority the boundary denies, sampled over six security-state changes, each
143
+ with its own negative control. `AUTHORIZATION_UNIQUENESS` is now a census of
144
+ all 50 verdict-construction sites in the package against a closed allow-list
145
+ keyed by `(module, function)` — a planted second authorization path inside
146
+ `sdk.py` previously passed it. `FAIL_CLOSED` gained nine dependency-failure
147
+ probes. And `ENVELOPE_SOUNDNESS` stopped absorbing the one case it was most
148
+ exposed to: the reads that produce a bottom envelope were the same reads that
149
+ raised, and it reported `HOLDS` on them anyway. Nothing was added to raise the
150
+ count — where an invariant already covered a property, it was strengthened
151
+ instead.
152
+
153
+ ### What it costs, and what was refused
154
+
155
+ The two new snapshot probes cost about 4.5 µs of a ~70 µs snapshot, roughly
156
+ 0.4% of the authorization they accompany, so neither fix has a performance
157
+ argument against it. Four optimizations were deliberately not made, and the
158
+ two that would have reclaimed the ~1.1 ms a changed revalidation costs are
159
+ the ones worth stating: both amount to concluding that a refusal does not
160
+ apply, which is an allow reached outside `authorize()`. One of the two is
161
+ enforced by a failing test rather than by prose. See
162
+ [`docs/v2.5-performance.md`](docs/v2.5-performance.md).
163
+
164
+ ---
165
+
166
+ ## What v2.4 adds
167
+
168
+ v2.2 made the platform adaptive *above* the boundary: when watched state
169
+ changed, a decision was re-run. v2.4 makes **authority itself** adaptive. A
170
+ grant that is already in use can be narrowed, suspended, revalidated or
171
+ revoked, and the change is enforced on the next authorization — and, for
172
+ suspension, inside the commit transaction of one already in flight.
173
+
174
+ Aegis is off by default. `FirewallSDK(aegis_enabled=True)` opts in; with no
175
+ controller attached the adaptive gate abstains and v2.3 behaviour is exact.
176
+
177
+ ### One deny-only seam
178
+
179
+ Nine modules, 5,382 lines, none of which imports `firewall.sdk`. Everything
180
+ Aegis does reaches the outside world through two points: `_gate_aegis`, the
181
+ ninth of eleven gates, which can only deny or abstain; and
182
+ `observe_authorization`, which the SDK calls *after* a decision exists.
183
+ Because the callback runs after, no Aegis state can be a precondition of the
184
+ allow it observes. Authority flows from the boundary into Aegis and never the
185
+ other way.
186
+
187
+ ```text
188
+ change -> classify -> KEEP | REVALIDATE | NARROW | SUSPEND | REVOKE
189
+ |
190
+ v
191
+ restriction written
192
+ |
193
+ v
194
+ FirewallSDK.authorize() -> _gate_aegis -> DENY
195
+ ```
196
+
197
+ There is no arrow from Aegis to ALLOW. That absence is the design.
198
+
199
+ ### The authority envelope
200
+
201
+ An `AuthorityEnvelope` is a bound on what a capability may still do, folded
202
+ across its delegation chain by a per-dimension greatest-lower-bound. Twelve
203
+ fields — patterns, tool, time window, constraint bounds, depth, its ceiling,
204
+ issuers, issuer trust, revocation, budget, chain membership, and a bottom
205
+ marker — and every dimension that bounds a request has a named enforcement
206
+ site at the boundary. A dimension with no enforcement site would be
207
+ decoration.
208
+
209
+ The theorem is one-directional and stated that way: if the envelope
210
+ **excludes** a request, the boundary denies it. The converse does not hold,
211
+ and the API is named so that misuse reads wrong — `excludes()` returns a
212
+ reason, `may_admit()` means "this envelope does not itself refuse", and
213
+ `__bool__` **raises** on an envelope, a grant, a preflight, a blast radius
214
+ and a classification, so `if preflight(...)` is an error rather than an
215
+ accidental allow.
216
+
217
+ ### Seven states ordered by residual authority
218
+
219
+ `ISSUED`, `ACTIVE`, `REVALIDATING`, `NARROWED`, `SUSPENDED`, `REVOKED`,
220
+ `EXPIRED`. A transition is legal only if it does not increase residual
221
+ authority. `REVALIDATING -> ACTIVE` is the only edge that restores authority,
222
+ and it requires an `AuthorizationResult` that is allowed, reasoned
223
+ `authorized`, and traced to that capability's fingerprint. `REVOKED` and
224
+ `EXPIRED` are terminal and checked before the ordering rule, so no evidence
225
+ or clock change produces an edge out of either.
226
+
227
+ The state machine is a record and a legality check. It is deliberately **not**
228
+ an enforcement channel: the gate reads restrictions, not states, because
229
+ wiring the state model into the gate would make the authorization path depend
230
+ on a structure whose own updates require an authorization result.
231
+
232
+ ### Unknown never becomes safe
233
+
234
+ An unrecognised trigger is `REVALIDATE`, not `KEEP` (which would make an
235
+ unknown event benign) and not `REVOKE` (which would make any unknown string a
236
+ denial-of-service lever). Nothing maps to `KEEP` at all — it is reachable
237
+ only by establishing five positive conditions, so "nothing changed" must be
238
+ shown rather than assumed. An unreadable budget is exhausted, not unlimited;
239
+ an unreadable restriction matches; unestablished issuer trust is `None`, not
240
+ `True`; an unresolvable chain yields the bottom envelope; a traversal that
241
+ exceeds its bounds is `UNANALYZABLE` rather than a partial answer presented
242
+ as complete. `UNKNOWN_NON_AUTHORIZATION` checks these exhaustively.
243
+
244
+ ### What it does not claim
245
+
246
+ Envelope soundness runs in one direction. `canonical_allow_for` is a
247
+ structural check, not a cryptographic one — it bounds mistakes, not an
248
+ adversary already inside the process. The commit-time re-read covers
249
+ suspension only. The restriction cap trades availability for integrity:
250
+ sixteen narrowings drive a grant to `SUSPEND`, which is fail-closed and still
251
+ a lever. §16 of [`docs/v2.4-aegis.md`](docs/v2.4-aegis.md) is the full list,
252
+ and §17 maps each guarantee to the test file that establishes it.
253
+
254
+ ---
255
+
71
256
  ## What v2.3 changes
72
257
 
73
258
  v2.3 adds no subsystem. Three requests that v2.2 allowed are now denied,
@@ -113,9 +298,9 @@ section, so deleting one fails rather than quietly shrinking the suite. See
113
298
  ### A strict invariant gate that can pass
114
299
 
115
300
  `python -m firewall.invariants --strict` exited 2 on every invocation,
116
- because five of the eleven invariants are claims about live state that a
301
+ because seven of the sixteen invariants are claims about live state that a
117
302
  source-only run never reaches. A gate that always fails is a gate that gets
118
- removed, so those five were effectively ungated in CI.
303
+ removed, so those seven were effectively ungated in CI.
119
304
  `firewall/invariants/exercise.py` builds the canonical estate through the
120
305
  SDK's public API only, and CI now runs the source-only and exercised gates
121
306
  as separate steps. What a green exercised run establishes is bounded to that
@@ -403,10 +588,10 @@ The architecture is designed around explicit security invariants.
403
588
  - **Tool output is data, not authority.**
404
589
  - **LLM output cannot directly authorize or approve a protected operation.**
405
590
  - **High-impact response actions remain policy and approval gated.**
406
- - **A check that could not run is not a check that passed.**
591
+ - **A check that could not run is not a check that passed.** A dependency the boundary cannot read is a denial that names it, not a check skipped — true of the boundary's own state reads from v2.5, and of malformed input before that.
407
592
  - **Security failures default toward refusal rather than implicit trust.**
408
593
 
409
- 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) for the invariants themselves and [`docs/v2.3-invariant-gate.md`](docs/v2.3-invariant-gate.md) for what a green gate run does and does not establish.
594
+ These are implementation properties of the system, not a claim that any deployment is universally secure. Sixteen 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) for the invariants themselves, [`docs/v2.3-invariant-gate.md`](docs/v2.3-invariant-gate.md) for what a green gate run does and does not establish, [`docs/v2.4-aegis.md`](docs/v2.4-aegis.md) for the four the authority control plane adds, and [`docs/v2.5-boundary.md`](docs/v2.5-boundary.md) for the sixteenth and for what each of them does **not** establish.
410
595
 
411
596
  Where a property does **not** hold, it is stated rather than left to be inferred. A posture change is detected but does not by itself flip a verdict; `retire_key` is not containment for a stolen key, since a retired key's signatures keep verifying so that rotation does not invalidate capabilities in flight; an `amount_max` ceiling is per request, so two siblings each holding one can spend it twice unless a lineage budget is configured; and possession of a trusted signing key is authority, which no cryptography can undo. [`docs/v2.3-self-attack.md`](docs/v2.3-self-attack.md) records each of these against the test that pins it.
412
597
 
@@ -492,9 +677,15 @@ The authorization path evaluates the security conditions required by the capabil
492
677
 
493
678
  ## Command surface
494
679
 
680
+ v2.4 adds no new CLI subcommands. One existing command changes what it
681
+ prints: `firewall delegate-authorize` now labels an allow it reached without
682
+ an attached `sdk_provider` as `ALLOWED (relationship only)` and says not to
683
+ enforce on it. The exit status stays 0 — the question asked was answered
684
+ affirmatively — but the answer no longer overstates itself.
685
+
495
686
  v2.3 adds no new CLI subcommands. It adds one flag to the invariant
496
687
  checker: `python -m firewall.invariants --exercise --strict` builds the
497
- canonical estate so that all eleven invariants can be reached, which makes
688
+ canonical estate so that all sixteen invariants can be reached, which makes
498
689
  `--strict` a gate that can pass and is therefore worth failing.
499
690
 
500
691
  v2.2 adds no new CLI subcommands. Its one new entry point is the invariant
@@ -547,6 +738,62 @@ python -m firewall.benchmarks
547
738
 
548
739
  The repository contains unit, integration, adversarial, hardening, evidence, UI/API, benchmark, and research tests.
549
740
 
741
+ The v2.5 test surface adds 190 tests — 4,277 in the suite as a whole, on
742
+ Python 3.10, 3.11 and 3.12 — of which 189 are in six files, one per campaign.
743
+ Among the properties covered:
744
+
745
+ - every one of the boundary's own dependency reads answering with a denial
746
+ that names it, including against the bundled stores behind a closed
747
+ connection rather than only against injected hostility
748
+ - a denial surviving the loss of its own audit record, and an allow that
749
+ cannot be recorded being withheld
750
+ - an expired capability denied when the clock cannot be read, on every cause:
751
+ no clock at all, a clock that raises, and a clock returning `nan`
752
+ - one validity window measured in one time base, under an injected clock in
753
+ both directions
754
+ - a planted second authorization path being named by the invariant that
755
+ forbids one, with the census verified against all 50 construction sites
756
+ - the payload the boundary authorized being the object the handler executes,
757
+ parametrized over all three adapters, including against a mutating
758
+ `request_builder`
759
+ - revalidation refusing to report an authority the boundary denies, across an
760
+ Aegis suspension, a narrowing, a lift, and a latched refusal, each with a
761
+ negative control that blinds the snapshot field and shows the invariant
762
+ violating
763
+ - an unreadable replay store becoming a `503` rather than escaping a method
764
+ typed to return a decision
765
+ - the three surviving MCP/HTTP divergences reproduced rather than asserted, so
766
+ a future unification fails a test that says why it stays
767
+
768
+ The v2.4 test surface adds 384 tests across eleven files — 4,087 in the suite
769
+ as a whole, on Python 3.10, 3.11 and 3.12 — including stateful security-state
770
+ fuzzing, eight named concurrency races, and an integration-boundary sweep.
771
+ Among the properties covered:
772
+
773
+ - no path from adaptive analysis to an allow, and no Aegis module able to
774
+ construct an `AuthorizationResult`
775
+ - every forbidden transition refused individually: out of `REVOKED`, out of
776
+ `EXPIRED`, `NARROWED` to wider, `SUSPENDED` to `ACTIVE` without a canonical
777
+ allow, and a child exceeding its parent
778
+ - an envelope that excludes a request always accompanied by a boundary that
779
+ denies it
780
+ - no field of the envelope widening under delegation or attenuation
781
+ - a `nan` bound bounding nothing being denied, while an `inf` bound still
782
+ means unbounded
783
+ - a 400-digit integer producing a decision rather than an exception out of
784
+ `authorize()`
785
+ - every authorization-reachable Aegis method total, including against an
786
+ injected hostile controller
787
+ - a restriction written mid-flight being observed, and a suspension being
788
+ caught inside the commit transaction
789
+ - `__bool__` raising on every analysis object, so a truthiness test cannot
790
+ become an allow
791
+ - every integration surface reaching the canonical boundary, with no local
792
+ allow anywhere
793
+ - no dataclass field in the package carrying a default that Python 3.11
794
+ rejects, so a defect that hides on the development interpreter cannot wait
795
+ for CI to find it
796
+
550
797
  The v2.3 test surface adds the thirteen-question self-attack suite, which
551
798
  covers, among other properties:
552
799
 
@@ -673,6 +920,12 @@ See [`SECURITY.md`](SECURITY.md) for the project's security reporting policy.
673
920
 
674
921
  Detailed specifications are maintained in the repository:
675
922
 
923
+ - `docs/v2.5-boundary.md`
924
+ - `docs/v2.5-performance.md`
925
+ - `docs/v2.4-aegis.md`
926
+ - `docs/v2.4-aegis-design.md`
927
+ - `docs/v2.4-performance.md`
928
+ - `docs/v2.4-migration.md`
676
929
  - `docs/v2.3-security-corrections.md`
677
930
  - `docs/v2.3-self-attack.md`
678
931
  - `docs/v2.3-invariant-gate.md`