granttrace 2.7.1__tar.gz → 2.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. {granttrace-2.7.1 → granttrace-2.8.0}/CHANGELOG.md +616 -0
  2. {granttrace-2.7.1 → granttrace-2.8.0}/CONTRIBUTING.md +12 -0
  3. {granttrace-2.7.1 → granttrace-2.8.0}/MANIFEST.in +4 -0
  4. {granttrace-2.7.1 → granttrace-2.8.0}/PKG-INFO +39 -7
  5. {granttrace-2.7.1 → granttrace-2.8.0}/README.md +38 -6
  6. {granttrace-2.7.1 → granttrace-2.8.0}/README.zh-CN.md +24 -5
  7. {granttrace-2.7.1 → granttrace-2.8.0}/SECURITY.md +29 -5
  8. {granttrace-2.7.1 → granttrace-2.8.0}/VERIFICATION.md +172 -0
  9. {granttrace-2.7.1 → granttrace-2.8.0}/api_sentinel.py +164 -9
  10. {granttrace-2.7.1 → granttrace-2.8.0}/config.schema.json +28 -0
  11. {granttrace-2.7.1 → granttrace-2.8.0}/core/__init__.py +1 -1
  12. {granttrace-2.7.1 → granttrace-2.8.0}/core/auditor.py +848 -105
  13. {granttrace-2.7.1 → granttrace-2.8.0}/core/authorization.py +113 -2
  14. {granttrace-2.7.1 → granttrace-2.8.0}/core/bopla.py +49 -1
  15. {granttrace-2.7.1 → granttrace-2.8.0}/core/config_scaffold.py +99 -3
  16. {granttrace-2.7.1 → granttrace-2.8.0}/core/config_validation/base.py +2 -0
  17. {granttrace-2.7.1 → granttrace-2.8.0}/core/config_validation/bola.py +33 -1
  18. {granttrace-2.7.1 → granttrace-2.8.0}/core/config_validation/identities.py +108 -77
  19. {granttrace-2.7.1 → granttrace-2.8.0}/core/config_validation/spec_checks.py +208 -10
  20. {granttrace-2.7.1 → granttrace-2.8.0}/core/config_validator.py +42 -7
  21. {granttrace-2.7.1 → granttrace-2.8.0}/core/demo.py +16 -0
  22. {granttrace-2.7.1 → granttrace-2.8.0}/core/diff.py +38 -2
  23. {granttrace-2.7.1 → granttrace-2.8.0}/core/evidence.py +153 -11
  24. {granttrace-2.7.1 → granttrace-2.8.0}/core/generator.py +44 -2
  25. granttrace-2.8.0/core/identity_auth.py +675 -0
  26. {granttrace-2.7.1 → granttrace-2.8.0}/core/models.py +11 -0
  27. granttrace-2.8.0/core/report_diff.py +1749 -0
  28. granttrace-2.8.0/core/report_gate.py +427 -0
  29. {granttrace-2.7.1 → granttrace-2.8.0}/core/reporter.py +69 -6
  30. {granttrace-2.7.1 → granttrace-2.8.0}/core/request_builder.py +367 -108
  31. {granttrace-2.7.1 → granttrace-2.8.0}/core/results.py +123 -4
  32. {granttrace-2.7.1 → granttrace-2.8.0}/core/sarif.py +6 -8
  33. granttrace-2.8.0/core/scan_safety.py +2433 -0
  34. granttrace-2.8.0/core/transport.py +557 -0
  35. {granttrace-2.7.1 → granttrace-2.8.0}/docs/advanced.md +107 -1
  36. granttrace-2.8.0/docs/audits/pr96-report-diff-review.md +149 -0
  37. {granttrace-2.7.1 → granttrace-2.8.0}/docs/case-studies/crapi.md +10 -5
  38. {granttrace-2.7.1 → granttrace-2.8.0}/docs/case-studies/vampi.md +21 -7
  39. granttrace-2.8.0/docs/ci-gate-design.md +141 -0
  40. granttrace-2.8.0/docs/ci-gate.md +225 -0
  41. granttrace-2.8.0/docs/ci-gate.zh-CN.md +179 -0
  42. {granttrace-2.7.1 → granttrace-2.8.0}/docs/comparison.md +1 -1
  43. {granttrace-2.7.1 → granttrace-2.8.0}/docs/configuration.md +179 -5
  44. {granttrace-2.7.1 → granttrace-2.8.0}/docs/parameter-serialization.md +1 -1
  45. granttrace-2.8.0/docs/read-only-request-policy.md +623 -0
  46. {granttrace-2.7.1 → granttrace-2.8.0}/docs/release-checklist.md +1 -0
  47. {granttrace-2.7.1 → granttrace-2.8.0}/docs/windows-portable.md +10 -8
  48. {granttrace-2.7.1 → granttrace-2.8.0}/examples/README.md +22 -2
  49. granttrace-2.8.0/examples/github-actions/granttrace-security-gate.yml +125 -0
  50. {granttrace-2.7.1 → granttrace-2.8.0}/examples/sample_report.html +100 -100
  51. granttrace-2.8.0/examples/sample_result.json +667 -0
  52. granttrace-2.8.0/examples/shared-gateway-key/config.json +29 -0
  53. granttrace-2.8.0/examples/shared-gateway-key/openapi.json +24 -0
  54. {granttrace-2.7.1 → granttrace-2.8.0}/examples/vampi/prepare_config.py +3 -0
  55. {granttrace-2.7.1 → granttrace-2.8.0}/granttrace.egg-info/PKG-INFO +39 -7
  56. {granttrace-2.7.1 → granttrace-2.8.0}/granttrace.egg-info/SOURCES.txt +72 -1
  57. {granttrace-2.7.1 → granttrace-2.8.0}/pyproject.toml +1 -1
  58. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/benchmark_read_safety.py +29 -6
  59. granttrace-2.8.0/scripts/benchmark_request_policy.py +196 -0
  60. granttrace-2.8.0/scripts/update_real_spec_snapshot.py +183 -0
  61. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/verify_authorization_coverage.py +4 -2
  62. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/verify_business_scenarios.py +1 -0
  63. granttrace-2.8.0/scripts/verify_ci_gate.py +232 -0
  64. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/verify_pr43_integration.py +6 -2
  65. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/verify_windows_portable.py +145 -0
  66. granttrace-2.8.0/tests/data/real_specs/README.md +107 -0
  67. granttrace-2.8.0/tests/data/real_specs/azure_compute.json +596 -0
  68. granttrace-2.8.0/tests/data/real_specs/azure_storage.json +428 -0
  69. granttrace-2.8.0/tests/data/real_specs/crapi.json +126 -0
  70. granttrace-2.8.0/tests/data/real_specs/expected.json +1497 -0
  71. granttrace-2.8.0/tests/data/real_specs/github.json +4683 -0
  72. granttrace-2.8.0/tests/data/real_specs/netbox.json +2163 -0
  73. granttrace-2.8.0/tests/data/real_specs/petstore.json +70 -0
  74. granttrace-2.8.0/tests/data/real_specs/stripe.json +1925 -0
  75. granttrace-2.8.0/tests/data/real_specs/vampi.json +70 -0
  76. granttrace-2.8.0/tests/github_runner.py +112 -0
  77. granttrace-2.8.0/tests/readonly_round4_support.py +149 -0
  78. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_auth_cookie_references.py +1 -1
  79. granttrace-2.8.0/tests/test_auth_header_isolation.py +397 -0
  80. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_auth_header_references.py +1 -1
  81. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_authorization_evidence_hardening.py +29 -14
  82. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_authorization_maintenance.py +4 -2
  83. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_bola_rejection_evidence.py +18 -1
  84. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_bopla_collection_grouping.py +2 -0
  85. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_bopla_integration.py +4 -1
  86. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_bopla_pending_exports.py +4 -2
  87. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_bopla_policy.py +12 -1
  88. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_bopla_policy_counterexamples.py +1 -1
  89. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_bopla_transport_safety.py +3 -2
  90. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_cli_security_hardening.py +1 -1
  91. granttrace-2.8.0/tests/test_comparison_context_secrets.py +1194 -0
  92. granttrace-2.8.0/tests/test_comparison_review_hardening.py +566 -0
  93. granttrace-2.8.0/tests/test_comparison_scope_boundaries.py +400 -0
  94. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_config_readback_preflight.py +4 -1
  95. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_config_scaffold.py +5 -1
  96. granttrace-2.8.0/tests/test_credential_acceptance.py +787 -0
  97. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_credential_echo_redaction.py +1 -1
  98. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_demo.py +3 -1
  99. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_expanded_detection.py +1 -0
  100. granttrace-2.8.0/tests/test_get_vocabulary_residuals.py +169 -0
  101. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_header_cookie_array_object.py +7 -7
  102. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_header_cookie_boundaries.py +1 -1
  103. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_header_cookie_parameters.py +1 -1
  104. granttrace-2.8.0/tests/test_identity_isolation_hardening.py +612 -0
  105. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_late_private_value_redaction.py +1 -1
  106. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_mass_assignment_flow.py +1 -1
  107. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_merge_patch_recovery.py +1 -1
  108. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_module_boundaries.py +1 -1
  109. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_onboarding_cli.py +5 -3
  110. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_parameter_compatibility.py +17 -2
  111. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_parameter_serialization.py +19 -3
  112. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_parser_replacement_auth.py +1 -1
  113. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_patch_readback_strictness.py +1 -1
  114. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_pr42_adversarial.py +1 -0
  115. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_pr42_state_authority.py +2 -1
  116. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_pr43_authorization_evidence.py +16 -6
  117. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_pr43_evidence_paths.py +2 -0
  118. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_pr43_put_safety.py +1 -1
  119. granttrace-2.8.0/tests/test_python_api_request_guard.py +357 -0
  120. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_query_auth_parameters.py +1 -0
  121. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_rate_limit_retry.py +22 -2
  122. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_read_only_safety.py +18 -5
  123. granttrace-2.8.0/tests/test_readonly_homograph_actions.py +382 -0
  124. granttrace-2.8.0/tests/test_readonly_method_and_guard_boundary.py +504 -0
  125. granttrace-2.8.0/tests/test_readonly_operation_id_namespaces.py +105 -0
  126. granttrace-2.8.0/tests/test_readonly_plan_write_target.py +368 -0
  127. granttrace-2.8.0/tests/test_readonly_policy_consistency.py +616 -0
  128. granttrace-2.8.0/tests/test_readonly_post_rule_parity.py +232 -0
  129. granttrace-2.8.0/tests/test_readonly_post_semantics.py +746 -0
  130. granttrace-2.8.0/tests/test_readonly_pr108_review_regressions.py +471 -0
  131. granttrace-2.8.0/tests/test_readonly_real_spec_classification.py +390 -0
  132. granttrace-2.8.0/tests/test_readonly_refusal_batches.py +566 -0
  133. granttrace-2.8.0/tests/test_readonly_remediation_edges.py +120 -0
  134. granttrace-2.8.0/tests/test_readonly_round3_edges.py +99 -0
  135. granttrace-2.8.0/tests/test_readonly_round4_authorization_source.py +145 -0
  136. granttrace-2.8.0/tests/test_readonly_round4_documentation.py +74 -0
  137. granttrace-2.8.0/tests/test_readonly_round4_edges.py +101 -0
  138. granttrace-2.8.0/tests/test_readonly_round4_python_compat.py +35 -0
  139. granttrace-2.8.0/tests/test_readonly_round4_read_policy.py +373 -0
  140. granttrace-2.8.0/tests/test_readonly_round4_remediation.py +314 -0
  141. granttrace-2.8.0/tests/test_readonly_round4_target_path.py +164 -0
  142. granttrace-2.8.0/tests/test_readonly_session_object_actions.py +74 -0
  143. granttrace-2.8.0/tests/test_readonly_short_verbs_and_prose.py +104 -0
  144. granttrace-2.8.0/tests/test_readonly_side_effect_guard.py +389 -0
  145. granttrace-2.8.0/tests/test_readonly_side_effect_vocabulary.py +526 -0
  146. granttrace-2.8.0/tests/test_readonly_target_unicode_post_gate.py +309 -0
  147. granttrace-2.8.0/tests/test_readonly_template_shadowing.py +799 -0
  148. granttrace-2.8.0/tests/test_readonly_unified_vocabulary.py +359 -0
  149. granttrace-2.8.0/tests/test_real_spec_snapshot.py +107 -0
  150. granttrace-2.8.0/tests/test_report_diff.py +2397 -0
  151. granttrace-2.8.0/tests/test_report_gate.py +1005 -0
  152. granttrace-2.8.0/tests/test_request_policy_benchmark.py +32 -0
  153. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_scan_accounting.py +5 -1
  154. granttrace-2.8.0/tests/test_session_cookie_auth.py +795 -0
  155. granttrace-2.8.0/tests/test_shared_gateway_anonymous_denial.py +378 -0
  156. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_small_review_items.py +4 -3
  157. granttrace-2.8.0/tests/test_summary_veto_documentation.py +93 -0
  158. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_transaction_transport_hardening.py +24 -8
  159. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_transport.py +4 -2
  160. granttrace-2.8.0/tests/test_transport_write_authorization.py +626 -0
  161. granttrace-2.8.0/tests/test_unknown_read_guidance.py +134 -0
  162. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_v27_features.py +31 -26
  163. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_v27_hardening.py +12 -7
  164. granttrace-2.8.0/tests/test_workflow_command_injection.py +326 -0
  165. granttrace-2.7.1/core/scan_safety.py +0 -249
  166. granttrace-2.7.1/core/transport.py +0 -158
  167. {granttrace-2.7.1 → granttrace-2.8.0}/CODE_OF_CONDUCT.md +0 -0
  168. {granttrace-2.7.1 → granttrace-2.8.0}/LICENSE +0 -0
  169. {granttrace-2.7.1 → granttrace-2.8.0}/config.example.json +0 -0
  170. {granttrace-2.7.1 → granttrace-2.8.0}/core/config_validation/__init__.py +0 -0
  171. {granttrace-2.7.1 → granttrace-2.8.0}/core/config_validation/readbacks.py +0 -0
  172. {granttrace-2.7.1 → granttrace-2.8.0}/core/demo_assets/__init__.py +0 -0
  173. {granttrace-2.7.1 → granttrace-2.8.0}/core/demo_assets/demo-config.json +0 -0
  174. {granttrace-2.7.1 → granttrace-2.8.0}/core/demo_assets/mock-data.json +0 -0
  175. {granttrace-2.7.1 → granttrace-2.8.0}/core/demo_assets/openapi.json +0 -0
  176. {granttrace-2.7.1 → granttrace-2.8.0}/core/onboarding.py +0 -0
  177. {granttrace-2.7.1 → granttrace-2.8.0}/core/parameters.py +0 -0
  178. {granttrace-2.7.1 → granttrace-2.8.0}/core/parser.py +0 -0
  179. {granttrace-2.7.1 → granttrace-2.8.0}/core/remote_refs.py +0 -0
  180. {granttrace-2.7.1 → granttrace-2.8.0}/core/reproduction.py +0 -0
  181. {granttrace-2.7.1 → granttrace-2.8.0}/core/transactions.py +0 -0
  182. {granttrace-2.7.1 → granttrace-2.8.0}/core/yaml_safety.py +0 -0
  183. {granttrace-2.7.1 → granttrace-2.8.0}/docs/assets/report-finding.png +0 -0
  184. {granttrace-2.7.1 → granttrace-2.8.0}/docs/assets/report-preview.png +0 -0
  185. {granttrace-2.7.1 → granttrace-2.8.0}/docs/authorization-audit-hardening.md +0 -0
  186. {granttrace-2.7.1 → granttrace-2.8.0}/docs/authorization-coverage-audit.md +0 -0
  187. {granttrace-2.7.1 → granttrace-2.8.0}/docs/bopla-readonly.md +0 -0
  188. {granttrace-2.7.1 → granttrace-2.8.0}/docs/business-scenarios.md +0 -0
  189. {granttrace-2.7.1 → granttrace-2.8.0}/docs/history/release-checklist-history.md +0 -0
  190. {granttrace-2.7.1 → granttrace-2.8.0}/docs/history/release-verification-history.md +0 -0
  191. {granttrace-2.7.1 → granttrace-2.8.0}/docs/pr42-independent-review.md +0 -0
  192. {granttrace-2.7.1 → granttrace-2.8.0}/docs/pr42-state-authority-review.md +0 -0
  193. {granttrace-2.7.1 → granttrace-2.8.0}/docs/pr43-integration-plan.md +0 -0
  194. {granttrace-2.7.1 → granttrace-2.8.0}/docs/pr43-integration-review.md +0 -0
  195. {granttrace-2.7.1 → granttrace-2.8.0}/docs/remote-references.md +0 -0
  196. {granttrace-2.7.1 → granttrace-2.8.0}/examples/crapi/no-chatbot.compose.yml +0 -0
  197. {granttrace-2.7.1 → granttrace-2.8.0}/examples/crapi/prepare_config.py +0 -0
  198. {granttrace-2.7.1 → granttrace-2.8.0}/examples/vampi/run_vampi.py +0 -0
  199. {granttrace-2.7.1 → granttrace-2.8.0}/granttrace.egg-info/dependency_links.txt +0 -0
  200. {granttrace-2.7.1 → granttrace-2.8.0}/granttrace.egg-info/entry_points.txt +0 -0
  201. {granttrace-2.7.1 → granttrace-2.8.0}/granttrace.egg-info/requires.txt +0 -0
  202. {granttrace-2.7.1 → granttrace-2.8.0}/granttrace.egg-info/top_level.txt +0 -0
  203. {granttrace-2.7.1 → granttrace-2.8.0}/mock_server/__init__.py +0 -0
  204. {granttrace-2.7.1 → granttrace-2.8.0}/mock_server/server.py +0 -0
  205. {granttrace-2.7.1 → granttrace-2.8.0}/openapi.json +0 -0
  206. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/build_windows_portable.py +0 -0
  207. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/source_version.py +0 -0
  208. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/verify_examples.py +0 -0
  209. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/verify_install.py +0 -0
  210. {granttrace-2.7.1 → granttrace-2.8.0}/scripts/verify_pr42_adversarial.py +0 -0
  211. {granttrace-2.7.1 → granttrace-2.8.0}/setup.cfg +0 -0
  212. {granttrace-2.7.1 → granttrace-2.8.0}/test_suite.py +0 -0
  213. /granttrace-2.7.1/examples/sample_result.json → /granttrace-2.8.0/tests/data/report-2.7.1.json +0 -0
  214. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_auditor_integration.py +0 -0
  215. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_authorization_policy_preflight.py +0 -0
  216. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_bopla_reports.py +0 -0
  217. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_business_authorization.py +0 -0
  218. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_cli_config_preflight.py +0 -0
  219. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_cli_identity_guard.py +0 -0
  220. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_cli_report_boundaries.py +0 -0
  221. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_code_review_regressions.py +0 -0
  222. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_committed_examples.py +0 -0
  223. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_config_validation.py +0 -0
  224. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_curl_report.py +0 -0
  225. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_diff.py +0 -0
  226. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_diff_hardening.py +0 -0
  227. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_english_reasons.py +0 -0
  228. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_evidence.py +0 -0
  229. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_expanded_report_boundaries.py +0 -0
  230. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_first_run_guidance.py +0 -0
  231. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_header_cookie_transport.py +0 -0
  232. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_not_found_denial.py +0 -0
  233. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_onboarding.py +0 -0
  234. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_output_snapshot.py +0 -0
  235. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_parser_generator_hardening.py +0 -0
  236. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_parser_remote_refs.py +0 -0
  237. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_problem_details_denials.py +0 -0
  238. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_read_only_path_guards.py +0 -0
  239. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_read_safety_cache.py +0 -0
  240. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_release_version.py +0 -0
  241. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_remote_ref_host_validation.py +0 -0
  242. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_remote_refs.py +0 -0
  243. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_remote_refs_hardening.py +0 -0
  244. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_remote_refs_premerge_audit.py +0 -0
  245. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_remote_refs_review_hardening.py +0 -0
  246. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_report_usability.py +0 -0
  247. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_reproduction.py +0 -0
  248. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_sarif.py +0 -0
  249. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_sarif_cli.py +0 -0
  250. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_schema_regressions.py +0 -0
  251. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_spec_config_cross_checks.py +0 -0
  252. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_unconfigured_query_parameters.py +0 -0
  253. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_version_identity.py +0 -0
  254. {granttrace-2.7.1 → granttrace-2.8.0}/tests/test_yaml_alias_expansion.py +0 -0
@@ -1,5 +1,621 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.8.0 - 2026-11-30
4
+
5
+ Scans send only what they can show to be a read, identities must stay
6
+ distinguishable to the server, and two scan reports can be compared offline,
7
+ with an optional security regression gate for CI. Before any request, a scan
8
+ now refuses read operations without read evidence, configurations whose
9
+ identities share a credential header, and targets whose path names an action:
10
+ read the upgrade and compatibility notes before upgrading from 2.7.1.
11
+
12
+ ### Upgrade notes
13
+
14
+ - A configuration whose identities send the same value in a header that can
15
+ identify the caller now fails validation and construction (exit code 2,
16
+ nothing sent). Give each identity its own value, or, for a genuine
17
+ application-level gateway key, declare it in the specification together
18
+ with a per-identity credential on every operation and list it in
19
+ `identity_isolation.shared_gateway_headers`. Do not drop the header from
20
+ the visitor instead: a request the gateway rejects for a missing key can read
21
+ as an authorization denial.
22
+
23
+ ### Compatibility
24
+
25
+ - A scan of a specification whose read operations have no operationId, or one
26
+ that does not lead with a read verb, now skips those operations
27
+ (`SKIPPED`, `reason_category: safety_policy`, `safety_signal:
28
+ unverified_read`) until they are authorized; review the dry-run plan's
29
+ `read_authorization` record or the `--init-config` checklist.
30
+ - This includes specifications generated by drf-spectacular (Django REST
31
+ framework), which name reads `<resource>_list` and `<resource>_retrieve`
32
+ with the verb at the end: every such GET is `UNKNOWN` (NetBox 4.7.6: 0 of
33
+ 307 GET operations are read by default). Authorize them with
34
+ `read_authorizations` or `--authorize-unverified-reads`.
35
+ - A target with an action in an earlier path segment, which was a warning
36
+ (`target_path_prefix`), is now refused; authorize the exact path with
37
+ `--allow-action-target-path <target path>`.
38
+ - Some results that were SECURE are now INCONCLUSIVE, because the denial they
39
+ rested on does not show an authorization decision (see Security): collection
40
+ BOLA, BFLA, the RBAC role probes and the Visitor's BOPLA field rules when the
41
+ Visitor's or the role's request was answered with 401, or with the denial
42
+ Anonymous received (apart from per-request tracing members such as
43
+ `request_id` or `timestamp`), and no Visitor own-resource baseline in the same batch shows
44
+ that its credential was accepted; object BOLA, BFLA on an object operation
45
+ and the Visitor's field rules there when the Visitor's cross-resource request
46
+ was answered with 401, whatever its own-resource baseline shows; and BROKEN_AUTH and the Anonymous BOPLA
47
+ field rules where the Owner sends an authorized shared gateway header that
48
+ Anonymous does not. Compared with an earlier report, these checks are no
49
+ longer conclusive.
50
+ - New JSON fields, all additive: the top-level `read_authorization` of the
51
+ dry-run plan and of the scan's `--export-json` report (always present there)
52
+ and `target_path_authorization` (only when a target path was authorized), and
53
+ each plan operation's `risk_class` and, when allowed, `authorization_source`.
54
+ A BROKEN_AUTH or BOPLA record whose Anonymous request lacked an authorized
55
+ shared gateway header carries
56
+ `decision_evidence.anonymous_without_shared_gateway_header: true`, and a
57
+ record whose Visitor or role credential was not shown accepted carries
58
+ `subject_denied_with_401` or `subject_denial_same_as_anonymous`.
59
+ The `granttrace demo` report is unchanged. `report_schema_version` is
60
+ unchanged; consumers that ignore unknown keys need no change.
61
+ - Without `GRANTTRACE_COMPARISON_KEY`, the demo produces the same console,
62
+ HTML, JSON and SARIF output and exit codes as 2.7.1. Scans differ only as
63
+ described above and under Security: refused reads, results that are now
64
+ INCONCLUSIVE, the `read_authorization` record and the new console lines. `--help` gains lines for `granttrace diff`,
65
+ `--authorize-unverified-reads` and `--allow-action-target-path`.
66
+ - With the key set, JSON reports gain the top-level `comparison_context`;
67
+ `report_schema_version` stays 2, so a consumer that rejects unknown keys
68
+ must accept it. A key shorter than 32 characters or with fewer than 8
69
+ distinct characters stops a scan or the demo with exit code 2 before any
70
+ request, without echoing the key; `--dry-run` does not read it.
71
+ - `granttrace diff` is new: exit code 0 when the comparison is done and 2 for
72
+ invalid input; with a `--fail-on-*` option 0, 1, 2 or 3. Exit code 3 is new
73
+ and only the gate returns it. The comparison JSON has
74
+ `comparison_schema_version` 1.
75
+ - Reports from 2.7.1 and earlier have no fingerprints. They can be compared,
76
+ but their findings are not comparable unless the missing parts are stated
77
+ with `--assume-*` options, and the gate does not pass on them without
78
+ `--gate-allow-assumptions`.
79
+
80
+ ### Added
81
+
82
+ - `granttrace diff BASELINE.json CURRENT.json [--export-json PATH]
83
+ [--assume-same-target] [--assume-same-identities]
84
+ [--assume-same-configuration]` compares two JSON scan reports offline.
85
+ Confirmed findings are matched by a stable finding ID (check, operation
86
+ template and, for BOPLA, RBAC and mass assignment, the field or role) and
87
+ classified as new, persisting, resolved or not comparable (#96).
88
+ - A finding is resolved only when the same check on the same subject is now
89
+ SECURE, PUBLIC or AUTHORIZED; SKIPPED, INCONCLUSIVE, ERROR, SUSPICIOUS or
90
+ missing results are never treated as fixed. A finding is new only when the
91
+ baseline verified the same check as not vulnerable; a first detection is
92
+ not comparable and counted separately. A verdict only counts when its
93
+ record shows a request (`requests_attempted` of at least 1, the rule the
94
+ scanner applies to conclusive coverage); reports from 2.5.2 and earlier,
95
+ which do not record request counts, are exempt.
96
+ - No conclusion is drawn unless both reports are shown to cover the same
97
+ target (the port included), the same test identities and, for the
98
+ operation, the same specification, policy and resources.
99
+ `--assume-same-target`, `--assume-same-identities` and
100
+ `--assume-same-configuration` each state one missing part explicitly,
101
+ never override a detected change, and are recorded on the comparison and
102
+ on every finding that relies on them.
103
+ - The output holds identifiers, verdicts and reason codes only, as ASCII:
104
+ no evidence, response data or free text from the reports.
105
+ - With `GRANTTRACE_COMPARISON_KEY` set (at least 32 random characters), scan
106
+ and demo JSON reports include `comparison_context`: keyed fingerprints
107
+ (HMAC-SHA256 under a PBKDF2-derived key) of the target, the test identities,
108
+ all credentials together, and each operation's specification, policy and
109
+ resource values, so that `diff` can verify that two scans used the same
110
+ configuration (#96).
111
+ - An optional security gate for CI on `granttrace diff`: `--fail-on-new`,
112
+ `--fail-on-coverage-decrease` and `--fail-on-not-comparable` exit 1 for a
113
+ regression shown by comparable reports and 3 when the gate cannot verify an
114
+ enabled condition (#97).
115
+ - The gate fails closed. It never passes on a blocked comparison, on a
116
+ current report without any conclusive result, or on conclusions that rely
117
+ on `--assume-*` statements unless `--gate-allow-assumptions` admits them;
118
+ such a result is labelled as relying on assumptions. `--fail-on-new` also
119
+ stays unverified for a confirmed finding not shown to be in the baseline,
120
+ for a check verified safe in the baseline that is no longer conclusive,
121
+ and for access newly accepted as PUBLIC or AUTHORIZED after the
122
+ operation's specification, policy or resources changed.
123
+ - `--github-actions` writes annotations and a Markdown step summary.
124
+ - The comparison JSON gains a `gate` object when a `--fail-on-*` option is
125
+ used. See `docs/ci-gate.md` (`docs/ci-gate.zh-CN.md`) and the example
126
+ workflow in `examples/github-actions/`.
127
+
128
+ ### Changed
129
+
130
+ - When UNKNOWN reads are refused, the console now says how to send them:
131
+ `read_authorizations`, or `--authorize-unverified-reads` for GET and HEAD,
132
+ neither of which releases a write signal. When no documented GET or HEAD
133
+ operation is allowed, the console warns that the scan tests none of them.
134
+ In that case the `--init-config` checklist adds
135
+ `read_authorization_review.no_read_evidence`. Both name the usual causes:
136
+ no operationId, or one generated from the HTTP method, such as
137
+ drf-spectacular's `<resource>_list` and `<resource>_retrieve`. Read
138
+ classification is unchanged.
139
+ - `docs/read-only-request-policy.md` documents operationIds generated from
140
+ the HTTP method (Django REST framework, NetBox), and lists one known limit:
141
+ a generated read-verb prefix (drf-spectacular's
142
+ `OPERATION_ID_METHOD_POSITION = "PRE"`) still counts as read evidence.
143
+
144
+ ### Fixed
145
+
146
+ - A verb that ends, pauses, extends or takes over a session, followed by
147
+ `session` or `sessions`, is now read as an action, not as a noun compound.
148
+ Examples: `logout`, "log out", `kill`, `expire`, `refresh`, `renew`, `lock`.
149
+ Previously `GET /auth/logout-session` documented as `getLogoutSession` was
150
+ READ and sent by default, and an operationId such as `log-out-session` or
151
+ `logOutSession` was UNKNOWN, so `--authorize-unverified-reads` released it.
152
+ Both are WRITE now. `checkout-sessions` and `login-sessions` are still
153
+ read. The classification of the real-specification snapshot is unchanged.
154
+ - Session cookie authentication works from the specification to the wire. An
155
+ `apiKey` `in: cookie` scheme that a security requirement uses is drafted by
156
+ `--init-config` for owner and visitor under `identities.*.parameters`;
157
+ configuration validation and the Python API accept such a session cookie as
158
+ the identity's authentication; and it is sent with every request of that
159
+ identity, roles included, whether or not the operation declares the cookie.
160
+ Previously the drafted cookie-only configuration failed validation ("no
161
+ effective authentication material"), and an RBAC role probe on an operation
162
+ that declares an authentication cookie failed with `KeyError`.
163
+ - Two operationId namespaces are now read before the method part.
164
+ - FastAPI's recommended `{tag}-{route name}` operationIds for client
165
+ generation (`items-read_items`, `users-read_user_me`). Every GET named this
166
+ way was UNKNOWN, so a scan of such an API (full-stack-fastapi-template, for
167
+ example) sent none of its reads by default.
168
+ - Lowercase `__` namespaces (`users__get_user`).
169
+
170
+ Write signals still refuse, and kebab-case names (`get-user`) are read whole.
171
+ The real-specification snapshot is unchanged.
172
+
173
+ ### Security
174
+
175
+ - Every documented GET and HEAD operation, and every POST declared
176
+ `read_only: true`, is classified WRITE, READ or UNKNOWN. READ needs
177
+ positive read evidence without a write veto: the operationId's method part
178
+ (read after `/`, `\`, `::`, `.`, `#`, or a leading uppercase-containing
179
+ `Controller_` / `Resource_` prefix such as `repos/get`, `Svc.getX`,
180
+ `Ctrl_GetX`, `VirtualMachines_Get` and `UsersController_findOne`, while keeping
181
+ snake_case methods with uppercase suffixes such as `get_order_byID` and
182
+ `fetch_Order` intact, and stripping FastAPI-style lowercase HTTP method
183
+ suffixes on all-lowercase snake_case identifiers such as `...__get` so an
184
+ HTTP method suffix never supplies read evidence) leads with a read verb, or
185
+ pairs an action homograph with an object it reads (`resolveHostname`), and any
186
+ summary does not match an existing write or side-effect rule (noun phrases
187
+ such as `"User details"` or summaries starting with `"Returns ..."` /
188
+ `"Download ..."` do not contradict a read operationId). A summary alone is
189
+ never evidence, including for homograph metadata clearances. An UNKNOWN
190
+ operation (no operationId, or one such as `completeCart`, `payrent` or
191
+ `nudge_user_users__user_id__get`) is
192
+ refused by default (`safety_signal: unverified_read`). A GET or HEAD is sent
193
+ only when it routes to a documented operation the policy allows (a HEAD may
194
+ route to a documented GET, and when both GET and HEAD are documented on the
195
+ same path either refusal blocks both methods); a read that routes to no
196
+ documented operation is
197
+ refused (`undocumented_read`), except a configured write readback, which gets
198
+ its own decision. The read decision is also a gate a subclass cannot
199
+ override, given to the transport as `read_guard`.
200
+ - The operator can authorize reads: `read_authorizations` lists exact
201
+ operation keys, and `--authorize-unverified-reads` (Python API:
202
+ `authorize_unverified_reads=True`) authorizes every UNKNOWN GET and HEAD.
203
+ An authorization releases an UNKNOWN operation or one refused only by its
204
+ specification metadata; it never releases a path vocabulary action, a filled
205
+ value, a query or body write switch, a method override or a write method.
206
+ `--validate-config` honours `read_authorizations` before warning about
207
+ metadata-only or homograph refusals, and `--init-config` lists the operations
208
+ to review in `read_authorization_review`.
209
+ - The plan and the JSON report give every read operation its `risk_class` and
210
+ `authorization_source` (`policy:read_evidence`,
211
+ `specification_metadata_clearance`, `operator_authorization`,
212
+ `operator_blanket`) in a new top-level `read_authorization` record, which
213
+ itemizes every operation sent without the policy's own read evidence with the
214
+ requests attempted for it (including HEAD requests sent through a GET-only
215
+ route); the console and the HTML report list them too.
216
+ Specification metadata is described as untrusted evidence.
217
+ - A documented path template no longer certifies the values filled into it.
218
+ `GET /reports/{kind}` with `kind` filled from an enum, example, default,
219
+ `parameter_values` or identity configuration as `delete` was sent, while the
220
+ literal path `/reports/delete` was refused. Every concrete GET, HEAD and
221
+ read-only POST path is now checked with the literal-path rules, and the
222
+ template's metadata check applies on top; either refusal wins. Some
223
+ legitimate values that read as actions (`transfers`, `imports`, `updates`)
224
+ are now refused as their literal paths already were; use `parameter_values`
225
+ to select another value.
226
+ - An HTTP method must be exactly one RFC 9110 token. `"GET "`, `" GET"`, an
227
+ empty or non-ASCII method is refused before any connection, and a valid
228
+ method is checked and sent in one upper-case spelling (a direct Python API
229
+ call with `"get"` now sends `GET`).
230
+ - `HttpTransport` always applies its base request policy below its fixed
231
+ `base_url`; a `request_guard` can only add refusals, and a malformed guard
232
+ decision or an exception refuses. A guard decision whose own lookups raise
233
+ refuses instead of raising from `read_policy_refusal()`.
234
+ - Every transport rule now reads the request urllib sends: the unwrapped URL,
235
+ the headers it keeps and the JSON body decoded from its bytes. A tuple in a
236
+ read-only POST body is checked as the array it is sent as; a body JSON
237
+ cannot carry is refused.
238
+ - A path piece in another letter case or in a form a case-insensitive router
239
+ treats as equal (`wItHdRaW`, `wıthdraw`, `WİTHDRAW`, full width) is refused
240
+ like the action it routes to. A word written in one case (`deleteall`,
241
+ `DELETEALL`, `createreport`, `getorcreate`) gets the decision of its
242
+ camelCase spelling when it starts with an action verb of five or more
243
+ letters; inflections and derivations (`deleted`, `publishers`,
244
+ `cancellations`) stay single words, and a lower-to-upper case change the
245
+ writer made (`ReSettlement`, `deletedItems`) is respected. This applies to
246
+ path pieces and filled values, operationIds and body or query action values.
247
+ - A `name=value` pair in a path (matrix `;action=delete`, an exploded object)
248
+ gets the same write-switch rules as the query string.
249
+ - A `_method` or `X-HTTP-Method-Override` value in a query string or body is
250
+ refused for every state-changing method in the IANA registry and PURGE, not
251
+ only PUT, PATCH and DELETE.
252
+ - A summary such as "Permanently deletes the job" (an adverb, the verb and its
253
+ own object) is recognised as naming a write. A bare plural object
254
+ ("Permanently deletes jobs older than 30 days") or the passive voice is not.
255
+ - A policy refusal is structured: `HTTPResult.refusal` names the reason, the
256
+ signal and the policy layer (`auditor`, `transport_request`,
257
+ `transport_base`, `transport_guard`). Every report record decided on a
258
+ refused request carries `safety_refusals`, `policy_layer`, `safety_signal`
259
+ and, for the built-in detectors, `refused_observations`, and never
260
+ concludes SECURE, PUBLIC or AUTHORIZED. This holds for each record that
261
+ shares one batch of Owner, Visitor and Anonymous observations (BOLA,
262
+ BROKEN_AUTH, BFLA, BOPLA, BOPLA_EXPOSURE and the RBAC records), not only the
263
+ first; a record of that batch whose decision does not use the refused
264
+ observation keeps its verdict and is marked `shared_observation_refused`.
265
+ A 401 for an expired or rejected credential is a response, not a refusal;
266
+ the entry on rejected credentials below describes how it is decided.
267
+ - GET and HEAD read the base form of every word of the declared read-only
268
+ POST vocabulary as an action, so the two methods share one vocabulary and
269
+ differ only where POST is stricter (it also refuses the plural, third-person
270
+ and -ing forms in identifiers). This covers payments and their reversals
271
+ (`charge`, `payout`, `refund`, `redeem`, `renew`), clearing data (`purge`, `clear`, `drop`, `destroy`,
272
+ `truncate`, `flush`, `wipe`), sessions and subscriptions (`logout`, `log-in`,
273
+ `sign-up`, `subscribe`, `unsubscribe`, `follow`), confirmation links
274
+ (`confirm`, `verify`, `resend`, `retry`), the rest of the POST vocabulary
275
+ (`add`, `register`, `sync`, `refresh`, `toggle`, `increment`, `grant`,
276
+ `invite`, `checkout`, `merge`, `upsert` and others) and lifecycle actions
277
+ (`archive`, `block`, `endsession`, `pause`, `suspend`, `deploy`, `rollback`,
278
+ `roll-back`, `tear-down`, `opt-out`, `capture`, `void`, `dismiss`,
279
+ `acknowledge`, `vote`, `join`, `release`, `lock`, `claim`, `settle`,
280
+ `replay`, `reindex`, `regenerate`, `evict`, `erase`, `expire`, `freeze`,
281
+ `migrate`, `escalate`, `drain`, `exec`, `broadcast`, `upvote`, `copy`, `fork`,
282
+ `mark-as-read` and others). A documented `GET /payments/{id}/refund`,
283
+ `GET /cache/purge` or `GET /docs/{id}/archive`, or a safe template filled with
284
+ such a value, is no longer sent. Plurals and -ing forms are collections and
285
+ states (`/refunds`, `/runs`, `/jobs/running`, `/archives`). The vocabulary is
286
+ still heuristic: see the known limits for what it does not recognise.
287
+ - For GET and HEAD a following noun can make a noun compound, depending on the
288
+ word: a metadata noun (`refund-status`, `sync-status`, `merge_requests`,
289
+ `logout-url`, `/v1/checkout/sessions`, "Retry policy") after any word but a
290
+ clearing verb; a record noun (`run-history`, `login-history`, `ban-list`,
291
+ `change-log`) only after a word that is also a common noun and does not take
292
+ records as its object. After `clear`, `purge`, `flush`, `wipe`, `truncate`,
293
+ `destroy`, `drop` and `rotate` no noun does: "Clear state", "Clear history",
294
+ `purge-logs` and `rotate-logs` are refused.
295
+ - An action after a noun in a two- or three-word piece (`session-logout`,
296
+ `cache-purge`, `jobs_run`) and the method part of a namespaced operationId
297
+ (`AuthController_logOut`, `Payments_Refund`, `BillingService.refundPayment`)
298
+ are refused; `dry-run`, `last-update`, `getLogoutUrl` stay reads. A read
299
+ action does not make a compound with any vocabulary word read-only
300
+ (`getOrRedeemVoucher`, `findAndArchive`).
301
+ - In query strings and request bodies, a namespaced run (`jobs:run`,
302
+ `force_run`) and a two-word action (`user.log_out`, `node.shut_down`) name a
303
+ write; dry-run spellings (`dry-run`, `test_run`) do not. A query string that
304
+ overrides the method to POST (`?_method=POST`) is refused like the
305
+ `X-HTTP-Method-Override` header. A GraphQL `operationName` is read as a label
306
+ only when the request's document has no mutation and has a query or
307
+ subscription operation of that name (`GetRefund` in
308
+ `query GetRefund { ... }`); without a document (a persisted query) it is
309
+ still read as an action.
310
+ - Single-case words: `deleteship` and `updateage` are a verb and its object;
311
+ `clearinghouse` and `importantnotes` get their camelCase reading. Look-alike
312
+ letters of other scripts are folded for GET and HEAD (`r\u0435fund` with a
313
+ Cyrillic e is refused).
314
+ - Third-person forms of verbs that end in a consonant and "y" ("Modifies the
315
+ record", "Verifies the token") are recognised; they were spelt "modifys".
316
+ - A declared read-only POST keeps every identifier rule of 2.7.1: every form
317
+ of the POST vocabulary is refused in an operationId (`refundsAndSearch`) and
318
+ in a path piece (`/confirms/search`). The one relaxation is a whole path
319
+ piece that names a collection: `refunds`, `bans`, `unlocks`, `kills`,
320
+ `declines` and `drops` (`POST /refunds/search`). `retries`, which 2.7.1 did
321
+ not recognise as a form of `retry`, is read as a collection as before.
322
+ - A declared read-only POST is sent only when the path as sent and the path
323
+ once decoded are each owned only by declared, safe operations (the matching
324
+ templates with the fewest parameters); an encoded slash or backslash in a
325
+ POST path is refused by the transport (`path_ambiguity`).
326
+ - A GET or HEAD request never carries a body. `HttpTransport` refuses a GET
327
+ or HEAD body (`{"_method": "DELETE"}`, a GraphQL mutation, any JSON value)
328
+ or a `Transfer-Encoding` or non-zero `Content-Length` header before any
329
+ connection (`policy_layer: transport_request`, `safety_signal:
330
+ request_body`); the auditor refuses it first (`policy_layer: auditor`).
331
+ - `HttpTransport` sends GET, HEAD and POST under the read-only rules and
332
+ refuses every other method (PATCH, PUT, DELETE, OPTIONS, TRACE, WebDAV and
333
+ extension methods) unless `send()` receives a `WriteAuthorization` for
334
+ exactly that method and URL (`safety_signal: write_authorization`). An
335
+ authorization is used by the first request it lets through, cannot name GET,
336
+ HEAD or POST, cannot be copied or pickled, and relaxes no other rule; a write
337
+ whose query or body overrides its method (`?_method=DELETE`) is refused
338
+ (`safety_signal: method_override`).
339
+ - The Python API keeps the CLI's boundary. `APISentinelAuditor._http_request`
340
+ sends a PATCH or PUT only with write tests enabled, to a URL below the target
341
+ that routes only to allowlisted operations of that method, with independent
342
+ state authority, and then with a fresh `WriteAuthorization`; any other
343
+ method is refused. It sends a POST only to an operation declared
344
+ `read_only: true` whose metadata passes the read-only checks
345
+ (`safety_signal: post_read_only_declaration`).
346
+ - `build_plan()` and `--dry-run` refuse what the scan refuses: a declared
347
+ read-only POST whose body asks for a write is `safety_blocked`, and a HEAD
348
+ operation (never sent) shows the policy decision. `--validate-config` warns
349
+ about every configured read operation, and every filled value, that the
350
+ read-only policy refuses.
351
+ - A target whose path names an action in any segment
352
+ (`http://host/admin/impersonate`, `http://host/x/delete-all/api/v1`) is
353
+ refused before any request, and the transport refuses such a `base_url`.
354
+ `--allow-action-target-path <target path>` (Python API:
355
+ `allow_action_target_path="<target path>"`) authorizes exactly that path; the
356
+ flag without a value authorizes the configured target. The plan and the JSON
357
+ report record the authorization as `target_path_authorization`, and every
358
+ request below the target is still checked. A segment ending in a service
359
+ word (`/upload-gateway/api`) is a service name, and a bare action homograph
360
+ segment (a `test` stage) is reported as a warning.
361
+ - Words outside the vocabulary that are also common read nouns (`close`,
362
+ `open`, `resume`, `resolve`, `complete`, `reverse`, `end`, `leave`, `test`, `fire`,
363
+ `scale`, `star`, `post`) are read by what they act on. With an object they
364
+ act on they are an action in any path piece, identifier or prose clause
365
+ (`close-ticket`, `chat.postMessage`, `closeTicket`, `closeaccount`, "Resolve
366
+ an incident", "Permanently closes the account"). Alone in a path's last
367
+ segment or the one before it they are an action (`GET /accounts/{id}/close`,
368
+ `/subscriptions/{id}/resume`, `/tickets/close/{id}`), unless the operation's
369
+ operationId or summary leads with a read and names the word
370
+ (`readAppsV1NamespacedDeploymentScale`, "Check if a gist is starred",
371
+ `getCandidateResume`) or names an object the word reads (`resolveHostname`).
372
+ Such reads without that metadata are now SKIPPED (`safety_policy`), for
373
+ example `GET /gists/{id}/star`, `GET /dns/resolve` and Slack `auth.test`;
374
+ plurals and noun compounds (`/posts/{id}`, `closePrice`, `test-results`,
375
+ `leave-requests`) stay reads.
376
+ - A singular noun-homograph resource name followed by an identifier
377
+ (`/refund/{id}`, `/run/{id}`, `/checkout/{id}`) is read when the operationId
378
+ or summary leads with a read and names it (`getRefund`), and refused
379
+ otherwise. Metadata never clears a vocabulary action
380
+ (`/payments/{id}/refund` stays refused whatever its summary says), a
381
+ synthesized operationId is no evidence, and a declared read-only POST is
382
+ never cleared.
383
+ - A concrete path gets the documented template's decision and nothing more:
384
+ it keeps a cleared literal only when it routes to that template with the
385
+ same literal in the same segment (`concrete_path_risk(...,
386
+ read_clearances=...)`, `HttpTransport(read_clearances=...)`). A value filled
387
+ into a template is never cleared, and a transport built without the
388
+ specification refuses every such path.
389
+ - A single-case word that is a short vocabulary verb followed by an object
390
+ from a closed list is refused (`payinvoice`, `runjob`, `dropall`,
391
+ `stopall`, `initdb`); `payload`, `runtime`, `address`, `stopwatch`,
392
+ `runbook` and `lockfile` stay reads. In a piece of three or more words an
393
+ action after `bulk`, `mass`, `batch`, `do` or `force`, or before such an
394
+ object, is refused (`bulk-delete-users`, `do-refund-now`), unless a read,
395
+ test, timing or version word comes first or a metadata noun ends the piece
396
+ (`get-user-logout-url`, `user-delete-requests`).
397
+ - Write prose that was not recognised is refused: a manner adverb before a
398
+ verb with a bare object ("Permanently deletes jobs older than 30 days"), a
399
+ clearing verb in the third person ("Purges cached entries"), a modifier
400
+ before an action ("Force logout of all users"), a destructive noun before
401
+ "of" ("Deletion of stale sessions"), a one-word imperative summary
402
+ ("Logout", "Shutdown") and a short noun-then-action summary ("Session
403
+ logout"). "Deletion status of a job", "Bulk delete status", "Job run" and
404
+ one-word noun titles ("Run", "Refund", "Ban") stay reads.
405
+ - A path that NFKC normalization or a separator look-alike would route
406
+ differently is refused as `path_ambiguity` (fullwidth dots and slashes, the
407
+ two-dot leader, the division and fraction slashes), and so is a query string
408
+ whose NFKC form asks for a write (`upsert=true`).
409
+ - A target's earlier path segment that names an action, and a segment that is
410
+ a bare action homograph (a stage named `test`), are reported as warnings by
411
+ `--validate-config`, `--dry-run` (the plan's `target_warnings`) and the scan;
412
+ they are not refused.
413
+ - A POST is sent only to an operation declared `read_only: true` even when a
414
+ subclass overrides `_request_risk`, `_transport_request_risk` or
415
+ `_post_declaration_risk`: the auditor checks the declaration in its own
416
+ request path and gives the transport a fixed `post_guard`, which also
417
+ refuses a subclass that calls `_send_http_request` directly. A custom
418
+ auditor that relied on such an override to send an undeclared POST is
419
+ refused now.
420
+ - Known limits of the read-only policy are listed in
421
+ `docs/read-only-request-policy.md`.
422
+ - A read action no longer clears an operation whose name writes when the
423
+ resource is missing. Compounds such as getOrCreateCart, findOrCreateUser,
424
+ fetchOrGenerateKey, getOrInitializeSession, findOrInsertRow, getAndSet,
425
+ getOrPut, getOrRefreshToken, getOrRotateKey, searchAndArchive,
426
+ getNextAndDequeue, fetchMessagesAndAck, getOrAutoCreate, compareAndSet,
427
+ computeIfAbsent and createTableIfNotExists are refused before any
428
+ request, in camelCase, snake_case, kebab-case and dotted operationIds, in
429
+ path segments and in concrete path values, for GET and HEAD as well as for
430
+ declared read-only POSTs. A summary or description such as "Get or create a
431
+ cart", "Returns the cart, or creates one if none exists" or "If the cart does
432
+ not exist, a new one is created" is refused too. Previously these were sent
433
+ because only a leading verb or a verb after "and", "then" or "also" was
434
+ recognized. Names such as getOrDefault, findOrFail, searchByNameOrEmail and
435
+ searchOrders, and "View or export a report", are unaffected.
436
+ - A declared read-only POST whose own body asks for a write (a GraphQL
437
+ mutation, also written with commas or comments, an `action`, `op`, `mode` or
438
+ `operationName` naming a write, also namespaced as in `cart.create`, a
439
+ `_method` or `X-HTTP-Method-Override` of PUT, PATCH or DELETE, a true
440
+ `upsert`, `createIfMissing`, `auto_create` or `save_search`-style flag, or a
441
+ dry-run switch turned off, also inside JSON sent as a string) now fails
442
+ configuration validation; nothing is sent. Data fields named after a verb
443
+ (`create_by`, `update_time`, `delete_flag`) are not write flags. The message
444
+ names the kind of request, never a body key or value.
445
+ - The query string of every request is checked before it is sent: the same
446
+ write switches (`?upsert=true`, `?create=1`, `?_method=DELETE`,
447
+ `?dry_run=false`), whether they come from a specification default, a
448
+ generated required value or `parameter_values`, refuse the request with
449
+ signal `query`, for GET as well as for read-only POST. Ordinary query data
450
+ such as `?page=2`, `?include_deleted=true` and `?store=1` is unaffected.
451
+ - Configuration validation refuses an identity or role header that overrides
452
+ the HTTP method (`X-HTTP-Method-Override`, `X-HTTP-Method`,
453
+ `X-Method-Override`) to anything but GET or HEAD: these headers are sent with
454
+ every request, so they would turn reads into writes. Role bodies, which
455
+ replace the Owner body on read-only POST role probes, get the same body check
456
+ as `body` and `identity_bodies`.
457
+ - These rules no longer depend on the CLI. An `APISentinelAuditor` built
458
+ directly from Python refuses such identity headers and role bodies when it
459
+ is constructed (`ValueError`), and the HTTP transport refuses, before any
460
+ connection, every request with such a header, every GET, HEAD or POST whose
461
+ query string asks for a write and every POST with a body that asks for a
462
+ write, so identities changed after construction are covered too.
463
+ A refused request is recorded as `ERROR` with "no request was sent" and is
464
+ not counted as attempted. Previously a program that skipped configuration
465
+ validation sent `X-HTTP-Method-Override: DELETE` on every GET and a role's
466
+ GraphQL mutation on the read-only POST role probe.
467
+ - Identifiers are normalized (NFKC), stripped of invisible format characters
468
+ and combining marks (a zero-width space inside "Create" no longer hides the
469
+ word) and split after acronyms (getORCreate) before the check. A declared
470
+ read-only POST whose operationId or path mixes
471
+ ASCII and non-ASCII letters in one word is refused (`identifier_script`),
472
+ because a look-alike letter would hide the action word.
473
+ - Declared read-only POSTs also refuse operationIds and path segments that
474
+ start with ensure, provision, spawn, init, initialize, instantiate, allocate
475
+ or persist, or with the abbreviations del, rm, upd, mk and crt, and summaries
476
+ or descriptions that start with one of the full verbs (for example
477
+ "Initializes the session"). A POST path segment named `init` is therefore
478
+ refused as well. Abbreviations are not applied to concrete path values, so an
479
+ id such as `rm-101` is still sent.
480
+ - Owner and visitor, or two roles, that send the same value for an
481
+ authentication cookie, Authorization or an `auth_header_names` header are
482
+ refused, also when a second cookie or a different bearer token makes the
483
+ rest of their credentials differ. Previously `SESSIONID=<same>; theme=dark`
484
+ and `SESSIONID=<same>; theme=light` passed validation and every visitor
485
+ request authenticated as the owner, so BOLA was confirmed falsely.
486
+ - Roles are held to the identity rules: each role needs its own credentials,
487
+ different from every other role's. A credential that every alternative of
488
+ every security requirement includes (Authorization, an `apiKey` header or
489
+ session cookie) is sent by every authenticated identity or by none, and so
490
+ is a header listed in `auth_header_names`; where the specification offers
491
+ alternatives (`[{bearerAuth: []}, {sessionAuth: []}]`), identities may
492
+ authenticate differently. Previously a role without credentials, or without
493
+ the credential the API requires, was probed unauthenticated and its 401
494
+ recorded as a SECURE denial, and a role reusing the privileged role's
495
+ credentials was confirmed as an RBAC violation.
496
+ - A cookie that is no credential (a theme, a language) no longer
497
+ authenticates an identity: only the session cookies the specification
498
+ declares count, or, without one, cookies named like a credential. An owner,
499
+ visitor or role with only such cookies was accepted and sent unauthenticated
500
+ requests, and a visitor or role refused that way was recorded as a SECURE
501
+ BFLA or RBAC denial. Anonymous may not have a Cookie header of its own.
502
+ - Anonymous may not carry a session cookie or a declared credential in
503
+ `identities.anonymous.parameters` or `parameter_values.*.anonymous`, and a
504
+ session cookie may not be a `common` or operation-wide value.
505
+ - These identity rules are applied by configuration validation, by
506
+ `APISentinelAuditor` construction and again before each request, so an
507
+ identity changed after construction sends nothing (`INCONCLUSIVE` or
508
+ `ERROR`, "no request was sent"). Messages name identities, headers and
509
+ cookies, never values.
510
+ - Two identities may no longer share the value of any header that can identify
511
+ the caller: Authorization, a declared `apiKey` header, an `auth_header_names`
512
+ header, or a header named like a key, token, secret, session, sid, user,
513
+ credential or signature (`X-API-Key`, `X-Gateway-Token`,
514
+ `Ocp-Apim-Subscription-Key`, `X-SessionKey`, `X-User-Id`), nor a
515
+ session-like cookie (`JSESSIONID`, `PHPSESSID`), also when the specification
516
+ declares other cookies. Previously a shared `X-API-Key` behind different
517
+ Bearer tokens passed validation, and a server that identifies callers by the
518
+ key treated the visitor as the owner.
519
+ - An application-level gateway header that every test account really shares
520
+ can be authorized explicitly in `identity_isolation.shared_gateway_headers`.
521
+ It is accepted only where the specification, resolved operation by
522
+ operation as the scanner resolves it (path-item `$ref` included), requires a
523
+ per-identity credential next to it wherever it applies; an operation where
524
+ shared credentials alone authenticate (`[{ApiKeyAuth: []}]`, also
525
+ `[{ApiKeyAuth: []}, {}]`), a scheme GrantTrace cannot send in the same
526
+ alternative, or any security declaration or operation that does not
527
+ resolve refuses it. Authorization, Cookie and session-like headers can never
528
+ be listed. The specification proves only what it declares, so the console,
529
+ the JSON report, the dry-run plan and the HTML report mark such a scan with
530
+ `"backend_identity_binding": "unverified"` under `identity_isolation`.
531
+ - With an authorized shared gateway header, an Anonymous request that does not
532
+ send it, or sends another value, can be rejected by the gateway for the
533
+ missing header before the application checks authentication. On an operation
534
+ where the Owner sends the header, BROKEN_AUTH and the Anonymous BOPLA field
535
+ rules are therefore INCONCLUSIVE instead of SECURE
536
+ (`decision_evidence.anonymous_without_shared_gateway_header`), and the report
537
+ notices say so instead of stating that SECURE cannot occur. A backend that
538
+ identifies every holder of the key as the Owner was reported with SECURE
539
+ authentication; 2.7.1, which accepted such a shared key without any opt-in,
540
+ reports it the same way.
541
+ - A denial of the Visitor's or a role's request concludes SECURE only when it
542
+ shows an authorization decision. Without a valid Visitor own-resource
543
+ baseline in the same batch (collection BOLA, BFLA, the RBAC role probes and
544
+ the Visitor's BOPLA field rules), a request answered with 401 Unauthorized,
545
+ whose credential the server did not accept, or with the denial Anonymous
546
+ received, is INCONCLUSIVE (`reason_category: missing_baseline`;
547
+ `decision_evidence.subject_denied_with_401` or
548
+ `subject_denial_same_as_anonymous`). Previously, and in 2.7.1, an expired,
549
+ revoked or ignored Visitor or role credential made these checks SECURE. A
550
+ denial is the one Anonymous received when it has the same status and body,
551
+ or, for a clean JSON denial or RFC 9457 problem body, when the bodies differ
552
+ only in the per-request tracing members a clean denial may carry
553
+ (`timestamp`, `request_id`, `trace_id` and their spellings), which
554
+ frameworks and gateways add to every response. An
555
+ API that gives Anonymous and a forbidden identity the same denial now gets
556
+ INCONCLUSIVE there. A valid Visitor own-resource baseline (object BOLA, BFLA
557
+ on an object operation and the Visitor's field rules there) still excuses the
558
+ denial Anonymous received, but a Visitor request answered with 401 is
559
+ INCONCLUSIVE whatever its own-resource baseline shows: the auditor sends the
560
+ cross-resource request before that baseline, and the baseline does not show
561
+ that the credential was accepted for it (an own-resource endpoint that checks
562
+ no credential, a token not yet valid when the cross-resource request was
563
+ sent). 2.7.1 reported these checks SECURE, also for an API that answers
564
+ another user's object with 401 instead of 403 or 404.
565
+ - `charge` and `payout` are payment actions like `refund`: the base form in a
566
+ GET or HEAD path piece or identifier (`GET /payments/{id}/charge`,
567
+ `chargeCard`, `payoutAccount`) and an imperative or third-person summary
568
+ ("Charge the payment method", "Charges the card on file") are refused, also
569
+ under `--authorize-unverified-reads`; plurals and noun compounds
570
+ (`/v1/charges`, `/v1/payouts/{payout}`, `charge-status`) stay reads, and a
571
+ declared read-only POST such as `POST /charges/search` stays allowed. `open` is an action homograph like `close`, acting on a single
572
+ object (`openTicket`, "Open the ticket", `/tickets/{id}/open`); with a plural
573
+ it is the adjective (`openTrades`, `openOrders`) and with an object it reads
574
+ it is a read (`open-price`, `opening-hours`, `/openapi.json`). Previously
575
+ these GET operations were sent; 2.7.1 sends them too. A path that ends in
576
+ `open` without read evidence naming it (`GET /reports/open`) is now SKIPPED.
577
+ The value of a query or read-only POST body action switch (`action`, `op`,
578
+ `command`, `mode`...) that pairs an action homograph with an object it acts
579
+ on (`?action=openTicket`, `?action=closeTicket`, `{"action":
580
+ "openAccount"}`) is refused as a write, as `?action=charge` is; a state
581
+ filter such as `?mode=open` or `?status=closed` is still sent. 2.7.1 sent
582
+ these requests.
583
+ - Terminal output of `granttrace diff` escapes the markers a CI runner reads
584
+ as workflow commands in every mode: the bracket of `##[` is printed as
585
+ `\u005b` and the first colon of a leading `::` as `\u003a`. A role or
586
+ field name in a report therefore cannot set a step output, add an
587
+ annotation, mask log text or stop command processing in GitHub Actions.
588
+ Only text containing these markers looks different; the JSON keeps the
589
+ values exactly. Found and fixed before release (#97); no released version
590
+ contains `diff`.
591
+ - `--github-actions` additionally prints report text between
592
+ `::stop-commands::` and a random token, escapes annotation data and
593
+ entity-encodes report text in the step summary.
594
+ - Comparison keys are stretched with PBKDF2 (200,000 iterations) before
595
+ HMAC-SHA256. Credentials are never written to a report or fingerprinted one
596
+ by one: identity fingerprints mask them, and all credentials together enter
597
+ one combined fingerprint.
598
+
599
+ ### Known limitations
600
+
601
+ - Reports are not signed. Anyone who can edit a report can change verdicts or
602
+ copy another report's `comparison_context`; a forged baseline that lists a
603
+ vulnerability as confirmed makes it persisting, and `--fail-on-new` lets
604
+ persisting findings through. Use a baseline the change under test cannot
605
+ influence.
606
+ - Changes to test data on the server between the scans are not visible:
607
+ resolved means no longer reproduced with this configuration.
608
+ - A comparison key someone can guess can be found offline; use a random key.
609
+ Scan options such as read-only mode, timeouts or the response-size limit
610
+ are not fingerprinted.
611
+ - Without the key, every conclusion rests on `--assume-*` statements that the
612
+ reports cannot check.
613
+ - A passing gate does not show that the API is secure. In CI, code from a
614
+ pull request runs on the same runner as the gate; `docs/ci-gate.md`
615
+ describes the setup the gate relies on.
616
+ - The terminal escaping covers the GitHub Actions command syntax; other CI
617
+ systems' log commands, such as Azure Pipelines `##vso[`, are not escaped.
618
+
3
619
  ## 2.7.1 - 2026-11-11
4
620
 
5
621
  A maintenance release. Detectors, evidence standards and report formats are
@@ -85,6 +85,18 @@ change to what a scan reports fails them on purpose:
85
85
  python scripts/verify_examples.py --update-examples
86
86
  ```
87
87
 
88
+ - `tests/test_real_spec_snapshot.py` pins the read-only policy's class
89
+ (`READ`, `UNKNOWN`, `WRITE`) for every GET and HEAD operation of eight public
90
+ specifications in `tests/data/real_specs/` (crAPI, VAmPI, Petstore, GitHub,
91
+ Stripe, NetBox, Azure Compute, Azure Storage). A change to the classification rules that moves any of them
92
+ fails it, and a `WRITE` that becomes `READ` or `UNKNOWN` is listed first.
93
+ When the move is intended, rewrite the snapshot and review every moved
94
+ operation in its diff:
95
+
96
+ ```bash
97
+ python scripts/update_real_spec_snapshot.py
98
+ ```
99
+
88
100
  - `scripts/verify_pr43_integration.py` pins the source of seven write-safety
89
101
  methods in `core/auditor.py`, listed in its `PR42_METHOD_SHA256`; changing
90
102
  any of them fails CI. `tests/test_module_boundaries.py` fails when production
@@ -6,6 +6,10 @@ recursive-include docs *.md
6
6
  include docs/assets/report-preview.png docs/assets/report-finding.png
7
7
  include README.zh-CN.md
8
8
  include examples/README.md examples/sample_report.html examples/sample_result.json
9
+ include examples/github-actions/granttrace-security-gate.yml
10
+ include examples/shared-gateway-key/*.json
11
+ recursive-include tests/data *.json
12
+ include tests/data/real_specs/README.md
9
13
  recursive-include examples/vampi *.py
10
14
  recursive-include examples/crapi *.py *.yml
11
15
  global-exclude __pycache__ *.py[cod] *.local.json