granttrace 2.7.0__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 (256) hide show
  1. granttrace-2.8.0/CHANGELOG.md +1295 -0
  2. {granttrace-2.7.0 → granttrace-2.8.0}/CONTRIBUTING.md +12 -0
  3. {granttrace-2.7.0 → granttrace-2.8.0}/MANIFEST.in +4 -0
  4. {granttrace-2.7.0 → granttrace-2.8.0}/PKG-INFO +55 -17
  5. {granttrace-2.7.0 → granttrace-2.8.0}/README.md +54 -16
  6. {granttrace-2.7.0 → granttrace-2.8.0}/README.zh-CN.md +33 -10
  7. {granttrace-2.7.0 → granttrace-2.8.0}/SECURITY.md +34 -5
  8. {granttrace-2.7.0 → granttrace-2.8.0}/VERIFICATION.md +223 -0
  9. {granttrace-2.7.0 → granttrace-2.8.0}/api_sentinel.py +201 -17
  10. {granttrace-2.7.0 → granttrace-2.8.0}/config.schema.json +28 -0
  11. {granttrace-2.7.0 → granttrace-2.8.0}/core/__init__.py +1 -1
  12. {granttrace-2.7.0 → granttrace-2.8.0}/core/auditor.py +848 -105
  13. {granttrace-2.7.0 → granttrace-2.8.0}/core/authorization.py +113 -2
  14. {granttrace-2.7.0 → granttrace-2.8.0}/core/bopla.py +49 -1
  15. {granttrace-2.7.0 → granttrace-2.8.0}/core/config_scaffold.py +99 -3
  16. {granttrace-2.7.0 → granttrace-2.8.0}/core/config_validation/base.py +2 -0
  17. {granttrace-2.7.0 → granttrace-2.8.0}/core/config_validation/bola.py +33 -1
  18. {granttrace-2.7.0 → granttrace-2.8.0}/core/config_validation/identities.py +108 -77
  19. {granttrace-2.7.0 → granttrace-2.8.0}/core/config_validation/spec_checks.py +208 -10
  20. {granttrace-2.7.0 → granttrace-2.8.0}/core/config_validator.py +42 -7
  21. {granttrace-2.7.0 → granttrace-2.8.0}/core/demo.py +16 -0
  22. {granttrace-2.7.0 → granttrace-2.8.0}/core/diff.py +38 -2
  23. {granttrace-2.7.0 → granttrace-2.8.0}/core/evidence.py +153 -11
  24. {granttrace-2.7.0 → granttrace-2.8.0}/core/generator.py +44 -2
  25. granttrace-2.8.0/core/identity_auth.py +675 -0
  26. {granttrace-2.7.0 → granttrace-2.8.0}/core/models.py +11 -0
  27. {granttrace-2.7.0 → granttrace-2.8.0}/core/onboarding.py +43 -1
  28. granttrace-2.8.0/core/report_diff.py +1749 -0
  29. granttrace-2.8.0/core/report_gate.py +427 -0
  30. {granttrace-2.7.0 → granttrace-2.8.0}/core/reporter.py +69 -6
  31. {granttrace-2.7.0 → granttrace-2.8.0}/core/request_builder.py +367 -108
  32. {granttrace-2.7.0 → granttrace-2.8.0}/core/results.py +123 -4
  33. {granttrace-2.7.0 → granttrace-2.8.0}/core/sarif.py +6 -8
  34. granttrace-2.8.0/core/scan_safety.py +2433 -0
  35. granttrace-2.8.0/core/transport.py +557 -0
  36. {granttrace-2.7.0 → granttrace-2.8.0}/docs/advanced.md +108 -1
  37. granttrace-2.8.0/docs/assets/report-preview.png +0 -0
  38. granttrace-2.8.0/docs/audits/pr96-report-diff-review.md +149 -0
  39. {granttrace-2.7.0 → granttrace-2.8.0}/docs/case-studies/crapi.md +10 -5
  40. {granttrace-2.7.0 → granttrace-2.8.0}/docs/case-studies/vampi.md +21 -7
  41. granttrace-2.8.0/docs/ci-gate-design.md +141 -0
  42. granttrace-2.8.0/docs/ci-gate.md +225 -0
  43. granttrace-2.8.0/docs/ci-gate.zh-CN.md +179 -0
  44. {granttrace-2.7.0 → granttrace-2.8.0}/docs/comparison.md +1 -1
  45. {granttrace-2.7.0 → granttrace-2.8.0}/docs/configuration.md +179 -5
  46. {granttrace-2.7.0 → granttrace-2.8.0}/docs/parameter-serialization.md +1 -1
  47. granttrace-2.8.0/docs/read-only-request-policy.md +623 -0
  48. {granttrace-2.7.0 → granttrace-2.8.0}/docs/release-checklist.md +1 -0
  49. {granttrace-2.7.0 → granttrace-2.8.0}/docs/windows-portable.md +10 -7
  50. {granttrace-2.7.0 → granttrace-2.8.0}/examples/README.md +22 -2
  51. granttrace-2.8.0/examples/github-actions/granttrace-security-gate.yml +125 -0
  52. {granttrace-2.7.0 → granttrace-2.8.0}/examples/sample_report.html +24 -24
  53. {granttrace-2.7.0 → granttrace-2.8.0}/examples/sample_result.json +19 -19
  54. granttrace-2.8.0/examples/shared-gateway-key/config.json +29 -0
  55. granttrace-2.8.0/examples/shared-gateway-key/openapi.json +24 -0
  56. {granttrace-2.7.0 → granttrace-2.8.0}/examples/vampi/prepare_config.py +3 -0
  57. {granttrace-2.7.0 → granttrace-2.8.0}/granttrace.egg-info/PKG-INFO +55 -17
  58. {granttrace-2.7.0 → granttrace-2.8.0}/granttrace.egg-info/SOURCES.txt +73 -1
  59. {granttrace-2.7.0 → granttrace-2.8.0}/pyproject.toml +1 -1
  60. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/benchmark_read_safety.py +29 -6
  61. granttrace-2.8.0/scripts/benchmark_request_policy.py +196 -0
  62. granttrace-2.8.0/scripts/update_real_spec_snapshot.py +183 -0
  63. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/verify_authorization_coverage.py +4 -2
  64. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/verify_business_scenarios.py +1 -0
  65. granttrace-2.8.0/scripts/verify_ci_gate.py +232 -0
  66. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/verify_pr43_integration.py +6 -2
  67. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/verify_windows_portable.py +145 -0
  68. granttrace-2.8.0/tests/data/real_specs/README.md +107 -0
  69. granttrace-2.8.0/tests/data/real_specs/azure_compute.json +596 -0
  70. granttrace-2.8.0/tests/data/real_specs/azure_storage.json +428 -0
  71. granttrace-2.8.0/tests/data/real_specs/crapi.json +126 -0
  72. granttrace-2.8.0/tests/data/real_specs/expected.json +1497 -0
  73. granttrace-2.8.0/tests/data/real_specs/github.json +4683 -0
  74. granttrace-2.8.0/tests/data/real_specs/netbox.json +2163 -0
  75. granttrace-2.8.0/tests/data/real_specs/petstore.json +70 -0
  76. granttrace-2.8.0/tests/data/real_specs/stripe.json +1925 -0
  77. granttrace-2.8.0/tests/data/real_specs/vampi.json +70 -0
  78. granttrace-2.8.0/tests/data/report-2.7.1.json +667 -0
  79. granttrace-2.8.0/tests/github_runner.py +112 -0
  80. granttrace-2.8.0/tests/readonly_round4_support.py +149 -0
  81. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_auth_cookie_references.py +1 -1
  82. granttrace-2.8.0/tests/test_auth_header_isolation.py +397 -0
  83. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_auth_header_references.py +1 -1
  84. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_authorization_evidence_hardening.py +29 -14
  85. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_authorization_maintenance.py +4 -2
  86. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_bola_rejection_evidence.py +18 -1
  87. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_bopla_collection_grouping.py +2 -0
  88. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_bopla_integration.py +4 -1
  89. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_bopla_pending_exports.py +4 -2
  90. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_bopla_policy.py +12 -1
  91. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_bopla_policy_counterexamples.py +1 -1
  92. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_bopla_transport_safety.py +3 -2
  93. granttrace-2.8.0/tests/test_cli_identity_guard.py +280 -0
  94. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_cli_security_hardening.py +1 -1
  95. granttrace-2.8.0/tests/test_comparison_context_secrets.py +1194 -0
  96. granttrace-2.8.0/tests/test_comparison_review_hardening.py +566 -0
  97. granttrace-2.8.0/tests/test_comparison_scope_boundaries.py +400 -0
  98. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_config_readback_preflight.py +4 -1
  99. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_config_scaffold.py +5 -1
  100. granttrace-2.8.0/tests/test_credential_acceptance.py +787 -0
  101. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_credential_echo_redaction.py +1 -1
  102. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_demo.py +3 -1
  103. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_expanded_detection.py +1 -0
  104. granttrace-2.8.0/tests/test_get_vocabulary_residuals.py +169 -0
  105. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_header_cookie_array_object.py +7 -7
  106. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_header_cookie_boundaries.py +1 -1
  107. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_header_cookie_parameters.py +1 -1
  108. granttrace-2.8.0/tests/test_identity_isolation_hardening.py +612 -0
  109. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_late_private_value_redaction.py +1 -1
  110. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_mass_assignment_flow.py +1 -1
  111. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_merge_patch_recovery.py +1 -1
  112. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_module_boundaries.py +1 -1
  113. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_onboarding_cli.py +19 -6
  114. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_parameter_compatibility.py +17 -2
  115. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_parameter_serialization.py +19 -3
  116. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_parser_replacement_auth.py +1 -1
  117. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_patch_readback_strictness.py +1 -1
  118. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_pr42_adversarial.py +1 -0
  119. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_pr42_state_authority.py +2 -1
  120. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_pr43_authorization_evidence.py +16 -6
  121. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_pr43_evidence_paths.py +2 -0
  122. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_pr43_put_safety.py +1 -1
  123. granttrace-2.8.0/tests/test_python_api_request_guard.py +357 -0
  124. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_query_auth_parameters.py +1 -0
  125. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_rate_limit_retry.py +22 -2
  126. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_read_only_safety.py +18 -5
  127. granttrace-2.8.0/tests/test_readonly_homograph_actions.py +382 -0
  128. granttrace-2.8.0/tests/test_readonly_method_and_guard_boundary.py +504 -0
  129. granttrace-2.8.0/tests/test_readonly_operation_id_namespaces.py +105 -0
  130. granttrace-2.8.0/tests/test_readonly_plan_write_target.py +368 -0
  131. granttrace-2.8.0/tests/test_readonly_policy_consistency.py +616 -0
  132. granttrace-2.8.0/tests/test_readonly_post_rule_parity.py +232 -0
  133. granttrace-2.8.0/tests/test_readonly_post_semantics.py +746 -0
  134. granttrace-2.8.0/tests/test_readonly_pr108_review_regressions.py +471 -0
  135. granttrace-2.8.0/tests/test_readonly_real_spec_classification.py +390 -0
  136. granttrace-2.8.0/tests/test_readonly_refusal_batches.py +566 -0
  137. granttrace-2.8.0/tests/test_readonly_remediation_edges.py +120 -0
  138. granttrace-2.8.0/tests/test_readonly_round3_edges.py +99 -0
  139. granttrace-2.8.0/tests/test_readonly_round4_authorization_source.py +145 -0
  140. granttrace-2.8.0/tests/test_readonly_round4_documentation.py +74 -0
  141. granttrace-2.8.0/tests/test_readonly_round4_edges.py +101 -0
  142. granttrace-2.8.0/tests/test_readonly_round4_python_compat.py +35 -0
  143. granttrace-2.8.0/tests/test_readonly_round4_read_policy.py +373 -0
  144. granttrace-2.8.0/tests/test_readonly_round4_remediation.py +314 -0
  145. granttrace-2.8.0/tests/test_readonly_round4_target_path.py +164 -0
  146. granttrace-2.8.0/tests/test_readonly_session_object_actions.py +74 -0
  147. granttrace-2.8.0/tests/test_readonly_short_verbs_and_prose.py +104 -0
  148. granttrace-2.8.0/tests/test_readonly_side_effect_guard.py +389 -0
  149. granttrace-2.8.0/tests/test_readonly_side_effect_vocabulary.py +526 -0
  150. granttrace-2.8.0/tests/test_readonly_target_unicode_post_gate.py +309 -0
  151. granttrace-2.8.0/tests/test_readonly_template_shadowing.py +799 -0
  152. granttrace-2.8.0/tests/test_readonly_unified_vocabulary.py +359 -0
  153. granttrace-2.8.0/tests/test_real_spec_snapshot.py +107 -0
  154. granttrace-2.8.0/tests/test_report_diff.py +2397 -0
  155. granttrace-2.8.0/tests/test_report_gate.py +1005 -0
  156. granttrace-2.8.0/tests/test_request_policy_benchmark.py +32 -0
  157. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_scan_accounting.py +5 -1
  158. granttrace-2.8.0/tests/test_session_cookie_auth.py +795 -0
  159. granttrace-2.8.0/tests/test_shared_gateway_anonymous_denial.py +378 -0
  160. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_small_review_items.py +4 -3
  161. granttrace-2.8.0/tests/test_summary_veto_documentation.py +93 -0
  162. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_transaction_transport_hardening.py +24 -8
  163. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_transport.py +4 -2
  164. granttrace-2.8.0/tests/test_transport_write_authorization.py +626 -0
  165. granttrace-2.8.0/tests/test_unknown_read_guidance.py +134 -0
  166. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_v27_features.py +31 -26
  167. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_v27_hardening.py +12 -7
  168. granttrace-2.8.0/tests/test_workflow_command_injection.py +326 -0
  169. granttrace-2.7.0/CHANGELOG.md +0 -643
  170. granttrace-2.7.0/core/scan_safety.py +0 -214
  171. granttrace-2.7.0/core/transport.py +0 -158
  172. granttrace-2.7.0/docs/assets/report-preview.png +0 -0
  173. {granttrace-2.7.0 → granttrace-2.8.0}/CODE_OF_CONDUCT.md +0 -0
  174. {granttrace-2.7.0 → granttrace-2.8.0}/LICENSE +0 -0
  175. {granttrace-2.7.0 → granttrace-2.8.0}/config.example.json +0 -0
  176. {granttrace-2.7.0 → granttrace-2.8.0}/core/config_validation/__init__.py +0 -0
  177. {granttrace-2.7.0 → granttrace-2.8.0}/core/config_validation/readbacks.py +0 -0
  178. {granttrace-2.7.0 → granttrace-2.8.0}/core/demo_assets/__init__.py +0 -0
  179. {granttrace-2.7.0 → granttrace-2.8.0}/core/demo_assets/demo-config.json +0 -0
  180. {granttrace-2.7.0 → granttrace-2.8.0}/core/demo_assets/mock-data.json +0 -0
  181. {granttrace-2.7.0 → granttrace-2.8.0}/core/demo_assets/openapi.json +0 -0
  182. {granttrace-2.7.0 → granttrace-2.8.0}/core/parameters.py +0 -0
  183. {granttrace-2.7.0 → granttrace-2.8.0}/core/parser.py +0 -0
  184. {granttrace-2.7.0 → granttrace-2.8.0}/core/remote_refs.py +0 -0
  185. {granttrace-2.7.0 → granttrace-2.8.0}/core/reproduction.py +0 -0
  186. {granttrace-2.7.0 → granttrace-2.8.0}/core/transactions.py +0 -0
  187. {granttrace-2.7.0 → granttrace-2.8.0}/core/yaml_safety.py +0 -0
  188. {granttrace-2.7.0 → granttrace-2.8.0}/docs/assets/report-finding.png +0 -0
  189. {granttrace-2.7.0 → granttrace-2.8.0}/docs/authorization-audit-hardening.md +0 -0
  190. {granttrace-2.7.0 → granttrace-2.8.0}/docs/authorization-coverage-audit.md +0 -0
  191. {granttrace-2.7.0 → granttrace-2.8.0}/docs/bopla-readonly.md +0 -0
  192. {granttrace-2.7.0 → granttrace-2.8.0}/docs/business-scenarios.md +0 -0
  193. {granttrace-2.7.0 → granttrace-2.8.0}/docs/history/release-checklist-history.md +0 -0
  194. {granttrace-2.7.0 → granttrace-2.8.0}/docs/history/release-verification-history.md +0 -0
  195. {granttrace-2.7.0 → granttrace-2.8.0}/docs/pr42-independent-review.md +0 -0
  196. {granttrace-2.7.0 → granttrace-2.8.0}/docs/pr42-state-authority-review.md +0 -0
  197. {granttrace-2.7.0 → granttrace-2.8.0}/docs/pr43-integration-plan.md +0 -0
  198. {granttrace-2.7.0 → granttrace-2.8.0}/docs/pr43-integration-review.md +0 -0
  199. {granttrace-2.7.0 → granttrace-2.8.0}/docs/remote-references.md +0 -0
  200. {granttrace-2.7.0 → granttrace-2.8.0}/examples/crapi/no-chatbot.compose.yml +0 -0
  201. {granttrace-2.7.0 → granttrace-2.8.0}/examples/crapi/prepare_config.py +0 -0
  202. {granttrace-2.7.0 → granttrace-2.8.0}/examples/vampi/run_vampi.py +0 -0
  203. {granttrace-2.7.0 → granttrace-2.8.0}/granttrace.egg-info/dependency_links.txt +0 -0
  204. {granttrace-2.7.0 → granttrace-2.8.0}/granttrace.egg-info/entry_points.txt +0 -0
  205. {granttrace-2.7.0 → granttrace-2.8.0}/granttrace.egg-info/requires.txt +0 -0
  206. {granttrace-2.7.0 → granttrace-2.8.0}/granttrace.egg-info/top_level.txt +0 -0
  207. {granttrace-2.7.0 → granttrace-2.8.0}/mock_server/__init__.py +0 -0
  208. {granttrace-2.7.0 → granttrace-2.8.0}/mock_server/server.py +0 -0
  209. {granttrace-2.7.0 → granttrace-2.8.0}/openapi.json +0 -0
  210. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/build_windows_portable.py +0 -0
  211. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/source_version.py +0 -0
  212. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/verify_examples.py +0 -0
  213. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/verify_install.py +0 -0
  214. {granttrace-2.7.0 → granttrace-2.8.0}/scripts/verify_pr42_adversarial.py +0 -0
  215. {granttrace-2.7.0 → granttrace-2.8.0}/setup.cfg +0 -0
  216. {granttrace-2.7.0 → granttrace-2.8.0}/test_suite.py +0 -0
  217. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_auditor_integration.py +0 -0
  218. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_authorization_policy_preflight.py +0 -0
  219. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_bopla_reports.py +0 -0
  220. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_business_authorization.py +0 -0
  221. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_cli_config_preflight.py +0 -0
  222. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_cli_report_boundaries.py +0 -0
  223. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_code_review_regressions.py +0 -0
  224. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_committed_examples.py +0 -0
  225. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_config_validation.py +0 -0
  226. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_curl_report.py +0 -0
  227. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_diff.py +0 -0
  228. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_diff_hardening.py +0 -0
  229. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_english_reasons.py +0 -0
  230. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_evidence.py +0 -0
  231. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_expanded_report_boundaries.py +0 -0
  232. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_first_run_guidance.py +0 -0
  233. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_header_cookie_transport.py +0 -0
  234. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_not_found_denial.py +0 -0
  235. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_onboarding.py +0 -0
  236. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_output_snapshot.py +0 -0
  237. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_parser_generator_hardening.py +0 -0
  238. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_parser_remote_refs.py +0 -0
  239. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_problem_details_denials.py +0 -0
  240. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_read_only_path_guards.py +0 -0
  241. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_read_safety_cache.py +0 -0
  242. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_release_version.py +0 -0
  243. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_remote_ref_host_validation.py +0 -0
  244. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_remote_refs.py +0 -0
  245. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_remote_refs_hardening.py +0 -0
  246. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_remote_refs_premerge_audit.py +0 -0
  247. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_remote_refs_review_hardening.py +0 -0
  248. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_report_usability.py +0 -0
  249. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_reproduction.py +0 -0
  250. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_sarif.py +0 -0
  251. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_sarif_cli.py +0 -0
  252. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_schema_regressions.py +0 -0
  253. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_spec_config_cross_checks.py +0 -0
  254. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_unconfigured_query_parameters.py +0 -0
  255. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_version_identity.py +0 -0
  256. {granttrace-2.7.0 → granttrace-2.8.0}/tests/test_yaml_alias_expansion.py +0 -0
@@ -0,0 +1,1295 @@
1
+ # Changelog
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
+
619
+ ## 2.7.1 - 2026-11-11
620
+
621
+ A maintenance release. Detectors, evidence standards and report formats are
622
+ unchanged from 2.7.0.
623
+
624
+ ### Changed
625
+
626
+ - A real scan of a target other than a loopback address (`localhost`,
627
+ `127.0.0.0/8`, `::1`) now needs identities from `--config`. Without them the
628
+ CLI exits with code 2 before sending any request and lists the
629
+ `--init-config`, `--validate-config` and `--dry-run` steps. It used to fall
630
+ back to the built-in mock identities, placeholder credentials and resource
631
+ IDs meant only for the bundled mock server, and scan the target with them.
632
+ Look-alike hosts such as `localhost.example.com`, `127.0.0.1.nip.io` or
633
+ integer IPv4 spellings count as remote. A loopback scan without identities
634
+ still runs, with a warning that the mock identities are in use; a dry run
635
+ without identities stays offline and points to `--init-config` instead of a
636
+ scan command. `granttrace demo`, `--init-config`, `--validate-config` and
637
+ scans with configured identities are unchanged (#92).
638
+ - The console shows the scan target before a scan (`Scan target: ...`),
639
+ sanitized like the report's target (#92).
640
+ - `--help` describes GrantTrace as read-only authorization auditing, states
641
+ the default target, and says that active PATCH/PUT checks run only in the
642
+ built-in demo and stop before any write against `--target` (#92).
643
+
644
+ ### Documentation
645
+
646
+ - The README no longer says GrantTrace "never writes to your API": it sends
647
+ GET requests and query-style POSTs you declare read-only, never PATCH, PUT
648
+ or DELETE, and a declared read-only POST is not proven free of side effects.
649
+ The demo's findings are described as planted test flaws, and the sample
650
+ report link explains that GitHub shows HTML source. The report screenshot is
651
+ retaken from the 2.7.0 demo (#92).
652
+ - `SECURITY.md` and the command-line reference describe the new requirement
653
+ for a non-loopback target (#92).
654
+
655
+ ## 2.7.0 - 2026-11-11
656
+
657
+ ### Added
658
+
659
+ - BOLA on query-style POST operations. A POST is sent only when its `bola`
660
+ policy declares `read_only: true` and gives the request body; its path,
661
+ operationId or summary must name a read action (search, query, lookup...)
662
+ and none of its metadata or concrete path may name a mutation. `body` is
663
+ sent unchanged by every identity; `identity_bodies` gives the Owner body
664
+ (repeated by the Visitor's cross request and Anonymous) and an optional
665
+ `visitor_self` body. Anything else is skipped or inconclusive with zero
666
+ requests, and a rate-limited POST is never retried.
667
+ - Sensitive-field leads (`detect_sensitive_exposure`, OWASP API3): unmasked
668
+ sensitive-named Owner values that reach the Visitor at the same JSON path.
669
+ `CONFIRMED` only with an explicit `deny` policy, a confirmed object-level
670
+ decision on the same observations and a value that differs from the
671
+ Visitor's own record; otherwise `SUSPICIOUS`. Values are never reported,
672
+ and the analysis is bounded on untrusted responses.
673
+ - Role matrix (`identities.roles`): for operations with a `required_role`,
674
+ one request per configured role, decided with the BFLA evidence standard
675
+ (valid privileged baseline, clean Anonymous denial, configured protected
676
+ data in the role's valid response). Shown in the HTML report and the JSON
677
+ `rbac_matrix`; confirmed violations are exported to SARIF as `GT-BFLA-001`,
678
+ confirmed sensitive-field findings as `GT-BOPLA-001`.
679
+
680
+ ### Changed
681
+
682
+ - The Windows portable build, its verifier, its workflow and the packaged
683
+ README and launcher read the version from `pyproject.toml` and
684
+ `core/__init__.py` (checked to agree) instead of repeating it. A test fails
685
+ on any drift.
686
+
687
+ ## 2.6.0 - 2026-11-09
688
+
689
+ ### Added
690
+
691
+ - Read-only Broken Authentication (CWE-306, SARIF `GT-AUTH-001`) and Broken
692
+ Function Level Authorization (CWE-285, `GT-BFLA-001`) checks, and private-data
693
+ checks for collection endpoints (CWE-639). Confirmation requires explicitly
694
+ configured `private_data_paths` and role policy; names and keywords alone stay
695
+ leads (#43).
696
+ - PUT mass-assignment checks that use complete replacement snapshots and verified
697
+ rollback. Like PATCH, they run only with independent authoritative resource
698
+ state, which only internal test fixtures provide (the bundled demo tests
699
+ PATCH); external CLI targets stay blocked before any write (#43).
700
+ - Evidence-bound read-only property authorization (BOPLA, CWE-200) driven by
701
+ explicit per-operation `bopla` field rules and resource bindings (#44).
702
+ - GET header and cookie parameters, including header arrays and objects, sent
703
+ from `parameter_values`; authentication headers and cookies stay
704
+ identity-scoped and cookie arrays/objects are rejected under RFC 6265
705
+ (#45, #46). Swagger 2 header values are validated before transport (#47).
706
+ - Opt-in remote `$ref` resolution over HTTPS (`--allow-remote-refs` with
707
+ `--remote-ref-host`): exact host allowlist, SSRF and DNS-rebinding defences,
708
+ no redirects, size/count/depth/time limits, and no fetching in offline modes.
709
+ See [docs/remote-references.md](docs/remote-references.md) (#48).
710
+ - `--init-config` drafts the remaining inputs a scan needs, as placeholders
711
+ that still block validation until replaced. Required GET business headers and
712
+ cookies get one value per requesting identity (owner, visitor and anonymous)
713
+ in `parameter_values`; required authentication headers go to owner's and
714
+ visitor's `identities.*.headers`, and required authentication cookies to their
715
+ `identities.*.parameters` (#74 stopped drafting optional authentication
716
+ headers). PUT operations get parameter values and a readback
717
+ draft like PATCH, with the extra PUT rules in the checklist. Optional
718
+ parameters, ignored headers such as `Accept` and unsupported cookie forms
719
+ are not drafted, and the checklist says why for each. A draft completed with
720
+ real values now plans every drafted GET check, where previously its required
721
+ headers and cookies were missing. The checklist no longer marks parameters of
722
+ operations GrantTrace does not test, such as DELETE, as included in the
723
+ draft (#73).
724
+ - A case study of a scan of VAmPI, a deliberately vulnerable API, in its
725
+ vulnerable and secure modes: which of its vulnerabilities GrantTrace confirms,
726
+ which it misses and why, and the request log of the read-only scan. Helper
727
+ scripts in `examples/vampi/` reproduce it. See
728
+ [docs/case-studies/vampi.md](docs/case-studies/vampi.md) (#81).
729
+ - `bola.<operation>.not_found_is_denial` reads a 404 as a denial, for APIs
730
+ that hide other users' objects with "not found" instead of 403. A Visitor or
731
+ Anonymous 404 counts only when the Owner received a valid response to the
732
+ same request, the body is empty or only says the object was not found (a
733
+ full-message grammar with at most one word naming the resource type, in a
734
+ known error envelope or Problem Details), and none of the Owner's values
735
+ appears in it; any other 404 keeps its default meaning, `INCONCLUSIVE`.
736
+ BOLA, Broken Authentication, BFLA and collection checks of the operation
737
+ apply it; BOPLA field rules do not. A 404 denial gives `SECURE` with
738
+ confidence 0.95, below an explicit 401 or 403, and the evidence records the
739
+ setting. Secure-mode VAmPI's book lookup now reports `SECURE` instead of
740
+ `INCONCLUSIVE` (#82).
741
+ - The VAmPI case study confirms the debug endpoint's password exposure with a
742
+ BOPLA field rule: the Owner's password in `/users/v1/_debug` may be read by
743
+ the Owner only, although the specification leaves the endpoint open, so both
744
+ the Visitor and Anonymous results are `CONFIRMED` (`GT-BOPLA-001`) in both
745
+ modes. `examples/vampi/prepare_config.py --debug-field-rule` writes the rule;
746
+ it runs as a separate scan because BOPLA's privacy boundary omits response
747
+ details from the whole report. The configuration guide now points to field
748
+ rules for private fields on operations without an authentication
749
+ requirement (#83).
750
+ - A case study of a read-only scan of OWASP crAPI 1.1.6: GrantTrace confirms
751
+ another user's mechanic report (challenge 2), the order lookup without
752
+ authentication (challenge 14), an administrator user list any user can read,
753
+ and, with BOPLA field rules, post authors' email addresses and vehicle IDs
754
+ (challenge 4). Challenge 1 stays `SUSPICIOUS` because crAPI's identity service
755
+ answers requests without a token with a Java `toString()` instead of JSON.
756
+ `examples/crapi/` holds the setup script and a Compose override that runs
757
+ crAPI without its chatbot. See
758
+ [docs/case-studies/crapi.md](docs/case-studies/crapi.md) (#85).
759
+ - A comparison of GrantTrace's approach with Autorize, AuthMatrix, ZAP's Access
760
+ Control Testing add-on and Akto, from their documentation: where requests come
761
+ from, what is expected, how a result is decided, and when another tool fits
762
+ better. It compares approaches, not detection rates. See
763
+ [docs/comparison.md](docs/comparison.md) (#86).
764
+
765
+ ### Changed
766
+
767
+ - Synchronize package, runtime, Windows distribution and release-workflow
768
+ versions to `2.6.0`, a minor release for the checks and options added since
769
+ 2.5.3. The remote `$ref` fetcher's User-Agent now follows the runtime version
770
+ instead of a hard-coded `2.5.3`. Refresh release documentation and the example
771
+ reports.
772
+ - Rewrite the README as an English project page, with a Chinese translation in
773
+ `README.zh-CN.md`: what GrantTrace does and a quick start first, a table of the
774
+ checks with what each needs, and a plain list of what is not supported. Mass
775
+ assignment is described as demo-only, as it is for external APIs. The report
776
+ screenshot is retaken from the 2.6.0 demo, a confirmed-finding screenshot is
777
+ added, and the README no longer states a release status that each release had
778
+ to update. Chinese documentation links back to the Chinese README (#79).
779
+ - Report BOLA reasons in English, like every other check. The JSON `reason`,
780
+ finding `details` and per-response `reason` evidence of BOLA checks were the
781
+ only Chinese reasons; the HTML report shows the same text. Verdicts,
782
+ `reason_category` and evidence fields are unchanged, and Chinese denial
783
+ messages returned by a target API are still recognized. Consumers that
784
+ matched the Chinese text should match the verdict or `reason_category`.
785
+ Offline validation messages no longer append a Chinese note. The HTML
786
+ report's interface text stays Chinese (#57).
787
+ - Store every text file with LF line endings (`.gitattributes` now normalizes
788
+ them; the Windows portable build still writes CRLF for its batch launcher),
789
+ and name 13 test modules after the behavior they cover instead of the PR or
790
+ release that added them. No runtime change (#58).
791
+ - Regenerate the example reports in `examples/` from the built-in demo. They
792
+ were still the 2.5.3 output, with Chinese BOLA reasons and without the newer
793
+ statistics, and showed PATCH results that a CLI scan of an external target no
794
+ longer produces, because such scans stop PATCH checks before any write.
795
+ `scripts/verify_examples.py --update-examples` now copies a fresh
796
+ `granttrace demo` run after verifying the CLI scans, and a new test fails when
797
+ the committed examples no longer match a fresh demo run. No runtime change (#70).
798
+
799
+ ### Performance
800
+
801
+ - Parse each response once and reuse comparison data in BOLA evaluation, cache
802
+ key normalization, precompile evidence scrubbing patterns and skip redundant
803
+ path resolution while resolving schemas. Outputs are unchanged; on 150 KB
804
+ responses and 300-operation specifications these paths run about twice as
805
+ fast (#50).
806
+ - Reuse response assessments across BOPLA field rules: ten rules on a 496 KB
807
+ response took 271 ms and now take 14 ms, with identical decisions (#55).
808
+
809
+ ### Fixed
810
+
811
+ - Recognize RFC 9457 (RFC 7807) Problem Details bodies as clean 401/403 denials.
812
+ connexion sends them as `application/problem+json`, for example `{"type":
813
+ "about:blank", "title": "Unauthorized", "status": 401, "detail": "No
814
+ authorization token provided"}`, and ASP.NET Core and Spring can be configured
815
+ to. GrantTrace treated these members as possible business data, so a scan of
816
+ VAmPI, a deliberately vulnerable API, reported its book BOLA as `SUSPICIOUS`
817
+ instead of `CONFIRMED`, and Broken Authentication on its protected reads as
818
+ `INCONCLUSIVE` instead of `SECURE`: the anonymous denial could not serve as a
819
+ clean baseline. A problem body now counts as a denial only when every member
820
+ is `type`, `title`, `status`, `detail` or a tracing ID, `status` is 401 or
821
+ 403, `type` is `about:blank` or an HTTP RFC status link, and `title` and
822
+ `detail` are denial messages. Any other member or text keeps it suspicious,
823
+ including `instance`: the check does not know the request path, so it cannot
824
+ tell whether the URI names the requested resource or another user's. Ordinary
825
+ JSON envelopes also accept a numeric `status` of 401 or 403 and messages such
826
+ as "No authorization token provided" (#80).
827
+ - Refuse checks of operations that send a credential in the query string, before
828
+ any request. Each URL is built from the resource owner's parameter values and
829
+ sent by every identity, so an `apiKey` scheme `in: query` (or the RFC 6750
830
+ `access_token` parameter) made the visitor and anonymous requests carry the
831
+ owner's key: against a correctly secured API they appeared to read the owner's
832
+ resource, giving false `SUSPICIOUS` or `CONFIRMED` results. Such checks are now
833
+ `INCONCLUSIVE` (`invalid_input`) with a reason saying query-string credentials
834
+ are not supported, and `--init-config` no longer drafts them as resource
835
+ parameters. Ordinary query parameters, including names such as `page_token`,
836
+ are unaffected (#75).
837
+ - Stop refusing GET checks over an optional authentication header that neither
838
+ owner nor visitor configures. A header parameter classified as authentication
839
+ (for example `X-Session-Id`, or an API-key scheme's header) blocked the check
840
+ as `INCONCLUSIVE` unless both identities sent it, even when the specification
841
+ marks it optional, and the reason wrongly said a value was "supplied via
842
+ parameter values". It is now omitted, like an optional authentication cookie.
843
+ A value from `parameter_values` and a header configured for only one of owner
844
+ and visitor are still refused, and a missing required one is refused with a
845
+ reason that says to configure it under `identities.*.headers` (#74).
846
+ - Stop sending invented values for optional query parameters that nobody
847
+ configured. Every declared query parameter got a generated value, so a scan
848
+ could request `?as_user=sample_text&status=active&include_deleted=false`:
849
+ such values can filter out the tested resource, make the target reject the
850
+ request or change its behavior, so the comparison no longer measured
851
+ authorization. An unconfigured optional query parameter is now omitted, or
852
+ sent with its declared `default`, as header and cookie parameters already
853
+ were. Required parameters and resource identifiers such as `owner_id` keep
854
+ their previous values (#76).
855
+ - Use an identity's `id` for its resource parameter exactly or not at all.
856
+ Lenient integer parsing turned `"007"`, `"1_001"` or `" 1002 "` into 7, 1001
857
+ or 1002, and an id outside the schema (such as `"abc"`, or `"0"` below a
858
+ minimum) was silently replaced by the specification's example value, so the
859
+ check tested a resource the Owner does not own. Such ids now follow the
860
+ canonical rules of `parameter_values`, and a check that cannot use them is
861
+ `INCONCLUSIVE` (`invalid_input`) before any request (#55).
862
+ - Ignore non-string media types instead of crashing with `AttributeError`, for
863
+ example a Swagger 2 `consumes: [123, "application/json"]` (#55).
864
+ - Reject header parameter values with leading or trailing whitespace, which
865
+ servers strip inconsistently, so the tested value always matches the
866
+ configured one; whitespace inside a value is still allowed (#55).
867
+ - Publish secret values discovered while building request headers by atomic
868
+ replacement. The in-place update raced with evidence sanitization in other
869
+ workers and could drop a value from later redaction (#50).
870
+ - Report the specific "without precision loss" diagnostic for number parameter
871
+ strings instead of the generic message that replaced it (#50).
872
+ - Require TLS 1.2 or later for remote schema fetches (#50).
873
+ - Retry rate-limited reads instead of recording them as inconclusive. GET
874
+ requests answered with HTTP 429 (or 503 with `Retry-After`) are retried up
875
+ to twice, honoring `Retry-After` in seconds or as an HTTP date (otherwise
876
+ waiting 1 s, then 2 s), and every worker pauses meanwhile. A requested wait
877
+ beyond 30 s fails closed with the original response. PATCH/PUT are never
878
+ retried. The new `rate_limit_retries` statistic counts retries; a scan of
879
+ the bundled mock target that rate-limits each path's first request now
880
+ reaches the same verdicts as an unlimited one (#53).
881
+ - Enforce the remote `$ref` fetch timeout as an absolute deadline. Socket
882
+ timeouts applied per receive, so a server dripping header or body bytes held
883
+ a 0.3 s fetch for 3 s or longer; a close-delimited body cut off at the
884
+ deadline is no longer accepted as complete (#52).
885
+ - Reject remote documents that end before their declared Content-Length, and
886
+ turn malformed HTTP responses and over-nested JSON into per-reference
887
+ resolution failures instead of errors that aborted the whole scan (#52).
888
+ - Check the IPv4 destination embedded in 6to4, Teredo and NAT64 addresses and
889
+ block IPv4-compatible, local-use NAT64 and site-local IPv6 ranges. CPython
890
+ releases before its 2024 `ipaddress` update (e.g. 3.9.19, 3.12.3) treated
891
+ 6to4 addresses embedding 169.254.169.254 or 127.0.0.1 as global (#52).
892
+ - Report a path item whose remote `$ref` fails as `INCONCLUSIVE`
893
+ (`unresolved_reference`), as documented, instead of a skipped "UNKNOWN"
894
+ method that `--fail-on-error` did not count (#52).
895
+ - Reject `--remote-ref-host` values that can never match a `$ref` URL host:
896
+ a scheme, port, path, credentials, wildcard, whitespace, non-ASCII
897
+ characters (use the IDNA form) or an empty value. Such values were accepted
898
+ and then authorized nothing, so every remote reference failed later as
899
+ "not in the authorized allowlist". The CLI exits 2 and names the value. IPv6
900
+ literals are compared in canonical form, with or without brackets.
901
+ - Bound YAML anchor/alias expansion in local specifications, referenced YAML
902
+ files and remote `$ref` documents. A ~1 KB alias "bomb" previously stalled
903
+ parsing for 13 s or more (merge keys inside `yaml.safe_load` itself); aliases
904
+ may now add at most max(250,000, 10 x the document's own nodes) nodes, and
905
+ recursive aliases are rejected before any object is built or request is sent (#51).
906
+ - Fail closed before external CLI PATCH tests when authoritative resource state
907
+ cannot be independently observed; write flags, mappings and a declared strong
908
+ readback cannot supply that proof. Existing CLI/config syntax remains accepted.
909
+ - Check initial, post-write and restored HTTP documents against actual backing
910
+ state in the owned disposable Demo. Retain global write halt on unavailable
911
+ or contradictory restoration evidence, including queued concurrent callers.
912
+ - Preserve and retest both original unmarked-cache counterexamples; distinguish
913
+ generic HTTP blocking from state-backed fixture detection statistics.
914
+
915
+ - PR #42 follow-up review: reject explicitly aged/stale state evidence, require
916
+ previously observed business structure before confirming persistence, and
917
+ serialize direct write-audit calls so waiting callers observe recovery failures.
918
+ - Add independent adversarial regressions and disclose two unresolved unmarked
919
+ stale-response probes; distinguish statement, branch and combined code coverage.
920
+ - Require complete HTTP 200 JSON state readbacks without Content-Range before
921
+ using them as PATCH snapshots, persistence evidence or restoration evidence.
922
+ Preserve generic write acknowledgement handling, recovery and fail-closed write halting.
923
+ - Retain strong Owner-object matches in 4xx/5xx response bodies as suspicious
924
+ leads only, without changing confirmation or SARIF export requirements.
925
+ - Include explicitly readOnly fields with ordinary names in mutation candidates;
926
+ configured field mappings, write opt-in, allowlists and reversible snapshots still gate execution.
927
+ - Prefer a declared JSON consumes format for Swagger 2 bodies and explain more
928
+ existing preflight exclusions in offline plans.
929
+ - Add fixed-truth loopback acceptance scenarios, regression tests and a source-linked
930
+ capability audit with before/after measurements. No new vulnerability class is implemented.
931
+
932
+ ### Maintenance
933
+
934
+ - Restructure the largest modules and functions without changing behavior
935
+ (#59 to #69). Snapshot tests of the JSON, HTML and console output of mock-target
936
+ scans came first and passed unchanged through the series; a deliberate output
937
+ change regenerates them with `GRANTTRACE_UPDATE_SNAPSHOTS=1` (#59).
938
+ `core/auditor.py` shrank from 2283 to 1499 lines: HTTP transport moved to
939
+ `core/transport.py`, request construction to `core/request_builder.py`, and
940
+ result recording and coverage to `core/results.py` (#61, #62, #63).
941
+ `core/config_validator.py` shrank from 1735 to 250 lines: its checks moved to
942
+ the `core/config_validation/` package, one module per configuration section,
943
+ and `ConfigValidator` and its result types are still imported from
944
+ `core.config_validator` (#65). The mass-assignment check, request header
945
+ construction, readback validation, schema value validation, the CLI `main`,
946
+ BOLA evaluation and the HTML report were split into smaller steps (#62, #63,
947
+ #64, #66, #67, #68, #69). Moved code is unchanged apart from names. Most
948
+ splits were compared with the previous code over large random inputs, and the
949
+ CLI over 34 command lines, with identical results; new tests cover the
950
+ per-field branches of the mass-assignment check. The seven hash-pinned write
951
+ methods are untouched, and a new test fails if production code uses another
952
+ module's private member (#60).
953
+ - Split `ConfigValidator.validate` (220 lines) into named steps with one
954
+ section runner instead of five copies of the same error handling. A
955
+ differential run over 40,000 mutated configurations gave identical results
956
+ (#77).
957
+ - Code that imports `core` directly needs these changes; the CLI and
958
+ `granttrace demo` are unaffected:
959
+ - Helpers used across modules lost their leading underscore, and the old
960
+ names were removed: `ResponseDiffEngine.assess_response`,
961
+ `assessment_evidence`, `normalise_key`, `is_request_metadata_key` and
962
+ `denial_body_is_clean`; `AuthorizationEvidence.assess`, `valid`,
963
+ `private_values` and `clean_denial`; `SmartDataGenerator.parameter_schema`
964
+ and `is_resource_identifier`; `APISentinelAuditor.identity_headers`. The new
965
+ `APISentinelAuditor.secret_values()` returns an immutable snapshot of the
966
+ published secrets (#60).
967
+ - `RETRYABLE_METHODS`, `RATE_LIMIT_RETRIES`, `RATE_LIMIT_BACKOFF` and
968
+ `MAX_RETRY_WAIT` moved from `APISentinelAuditor` to
969
+ `core.transport.HttpTransport`. The redirect handler is
970
+ `core.transport.NoRedirectHandler` (was `core.auditor._NoRedirectHandler`),
971
+ and the auditor's opener is `_transport.opener` (was `_opener`) (#61).
972
+ - `request_delay`, `request_timeout` and `max_response_bytes` are read-only
973
+ properties of `APISentinelAuditor`. Pass them to the constructor: assigning
974
+ them afterwards raises `AttributeError` (#61).
975
+ - `_http_request` and `_authoritative_patch_state` are documented extension
976
+ points and keep their names and signatures (#60).
977
+ - Documentation: the v2.5.3 post-release acceptance records (#36 to #41), user
978
+ documentation synced with merged behavior (#54), the contributing guide's
979
+ output checks (#72) and the first release-preparation record (#78). Before
980
+ release, SECURITY.md, the command-line reference and the configuration guide
981
+ now state that write checks against an external target stop before any write;
982
+ the package description no longer lists mass assignment, which only the
983
+ built-in demo performs; the command-line reference documents `--workers` and
984
+ `--timeout`; a Code of Conduct (Contributor Covenant 2.1) is added; and the
985
+ Windows guide describes the released state (#87).
986
+
987
+ ## 2.5.3 - 2026-10-15
988
+
989
+ ### Fixed
990
+
991
+ - [PR #33](https://github.com/ysc070528/granttrace/pull/33): recognize complete
992
+ authentication and permission denial messages, including JWT denials, without
993
+ treating rejected responses containing business data as clean denials. Explain
994
+ Owner, Visitor self-resource and Anonymous evidence and missing prerequisites;
995
+ retain conservative BOLA / IDOR confirmation requirements.
996
+ - Validate selected BOLA policies before HTTP requests and accept the existing
997
+ `items[].id` trusted-evidence selector syntax in configuration validation.
998
+ - Count actual transport attempts and distinct method/path operations for
999
+ attempted and conclusive coverage. Exclude zero-request preflight outcomes
1000
+ and recovery rows from endpoint coverage; explain skip and evidence categories
1001
+ in reports. `SUSPICIOUS` and `INCONCLUSIVE` remain non-conclusive.
1002
+ - Apply read-only side-effect checks using operation identifiers, paths,
1003
+ summaries and descriptions during BOLA preflight, dry-run planning and final
1004
+ HTTP execution. Reject unsafe independent readbacks before any PATCH.
1005
+ - [PR #34](https://github.com/ysc070528/granttrace/pull/34): validate each concrete
1006
+ GET / HEAD path, including the target base path, before route-cache lookup and
1007
+ transport. Reject ambiguous encodings, invalid UTF-8, dot/matrix-dot segments,
1008
+ repeated slashes, boundary encoded slashes, backslashes and control characters.
1009
+ Apply the same guard to BOLA, offline plans and PATCH readbacks without rewriting
1010
+ URLs; ordinary supported encoded identifiers remain supported.
1011
+
1012
+ ### Changed
1013
+
1014
+ - Reuse cached immutable read-safety metadata and route patterns from PR #33
1015
+ while continuing to validate every concrete URL before requests.
1016
+ - Synchronize package, runtime, Windows distribution and release-workflow
1017
+ versions to `2.5.3`; refresh release documentation and generated loopback
1018
+ examples. This release preparation introduces no new detector or API behavior.
1019
+
1020
+ Static read-safety checks do not prove that every GET is harmless. Verification
1021
+ scope and remaining post-release acceptance are recorded in [VERIFICATION.md](VERIFICATION.md).
1022
+
1023
+ ## 2.5.2 - 2026-10-05
1024
+
1025
+ ### Maintenance
1026
+
1027
+ - Documentation / distribution metadata maintenance release: package the current
1028
+ README for the PyPI project page, retaining the corrected Windows download,
1029
+ unsigned-program notice, macOS / Linux installation and workflow explanation.
1030
+ - Align package/runtime versions and Windows portable filenames, launcher,
1031
+ bundled instructions and release workflow metadata at `2.5.2`.
1032
+ - No changes to BOLA / IDOR / Mass Assignment detection, the security model,
1033
+ default read-only behavior, CLI semantics or core implementation.
1034
+
1035
+ ## 2.5.1 - 2026-10-05
1036
+
1037
+ ### Fixed
1038
+
1039
+ - Reject unsafe Merge Patch probes before writes when the original state cannot be restored exactly.
1040
+ - Preserve array record associations during BOLA comparison to avoid overstating confirmed authorization bypasses.
1041
+ - Harden report target/metadata redaction for known credentials and prevent report outputs from overwriting specification, configuration, or loaded local `$ref` inputs.
1042
+ - Improve local and conditional schema resolution plus configuration-to-spec operation validation.
1043
+ - Preserve legacy v2.5.0 scalar parameter configurations while applying strict schema-aware normalization and validation for canonical integer, number, and boolean values.
1044
+ - Preserve Swagger 2.0 `uniqueItems` parameter constraints during schema extraction so duplicate configured arrays fail validation before requests.
1045
+
1046
+ ## 2.5.0 - 2026-10-04
1047
+
1048
+ ### Added
1049
+
1050
+ - Export SARIF 2.1.0 with `--export-sarif`, alongside HTML and JSON reports.
1051
+ Only existing CONFIRMED findings produce results: BOLA / IDOR maps to
1052
+ `GT-BOLA-001` / `CWE-639`, and Mass Assignment to `GT-MASS-001` / `CWE-915`.
1053
+ A safely represented OpenAPI file inside the workspace supplies the artifact
1054
+ location for GitHub Code Scanning; no source lines or endpoint files are invented.
1055
+ - Add safe cURL reproduction templates and copy buttons to confirmed HTML finding
1056
+ cards. Use the actual tested URL and confirmed injected payload where safe,
1057
+ Visitor credential placeholders, POSIX shell quoting and `curl --globoff`.
1058
+ Clipboard fallback supports offline reports; manual selection works without
1059
+ JavaScript. Real credentials never enter the templates, including when sensitive
1060
+ report evidence is enabled.
1061
+ - Guide configuration onboarding from draft generation and manual review through
1062
+ validation, a local dry-run and a read-only first real scan. Distinguish
1063
+ config-only from spec-aware validation, summarize dry-run counts, and format
1064
+ next-step commands safely for POSIX shells or PowerShell.
1065
+
1066
+ ### Changed
1067
+
1068
+ - Align README, configuration and advanced guidance with the first API onboarding
1069
+ flow and the SARIF / cURL outputs, without changing configuration formats.
1070
+ - Explain validation scope, warnings and dry-run write eligibility more clearly.
1071
+ An active PATCH configuration is separate from enabling active execution;
1072
+ the recommended first real scan remains read-only.
1073
+ - Promote the release source to `2.5.0` across package metadata, runtime version
1074
+ and generated examples; prepare the release checklist and OIDC workflow for
1075
+ the new tag without publishing it during release preparation.
1076
+
1077
+ ### Security / Safety
1078
+
1079
+ - Preserve BOLA / IDOR verdicts and Mass Assignment detection criteria, default
1080
+ read-only auditing, and the existing TLS / HTTP / redirect / proxy boundaries.
1081
+ - Active PATCH still requires explicit `--allow-write-tests`, an explicit write
1082
+ allowlist, independent GET readback, original-state snapshots, rollback and
1083
+ rollback verification. Failed recovery still halts further writes.
1084
+ - SARIF, cURL templates and onboarding output do not expose real credentials;
1085
+ onboarding also omits configured resource values. Workspace-external specs
1086
+ never expose absolute local paths in SARIF.
1087
+ - Validation and dry-run remain offline; dry-run sends zero requests. No active
1088
+ POST / PUT testing or automated OAuth / login is added.
1089
+
1090
+ ### Quality
1091
+
1092
+ - Retain the 486-test baseline, Python 3.9 / 3.12 / 3.14 CI, blocking mypy and Ruff,
1093
+ Runtime dependency audit, CodeQL and the branch-aware coverage gate of 80%.
1094
+ - Fresh release-prep acceptance passes all 486 tests with **82.78%** branch-aware
1095
+ local coverage, mypy reporting no issues in 18 source files, Ruff and the runtime
1096
+ dependency audit. All six bundled business scenarios match their expected
1097
+ outcomes; JSON / YAML scans restore the full mock database. A fresh wheel
1098
+ installed outside the checkout passes both demo modes and verifies version
1099
+ `2.5.0`, read-only 0 PATCH, active rollback and local server shutdown. See
1100
+ [VERIFICATION.md](VERIFICATION.md) for the exact scope and remote check results.
1101
+
1102
+ ## 2.4.1 - 2026-10-03
1103
+
1104
+ ### Added
1105
+
1106
+ - Add `granttrace demo` with packaged OpenAPI, configuration and fictional mock
1107
+ data, so an installed wheel can demonstrate identity comparison, BOLA / IDOR,
1108
+ Mass Assignment, independent readback and rollback verification outside a Git
1109
+ checkout without user credentials or external API access.
1110
+ - Start the disposable mock on a dynamic loopback port, close it on completion
1111
+ or failure, and retain HTML / JSON reports in a unique output directory.
1112
+ - Add `--output-dir` and optional `--read-only` controls for the built-in demo.
1113
+
1114
+ ### Changed
1115
+
1116
+ - Put the single-command installed-package demo before the source-checkout
1117
+ walkthrough and retain configuration onboarding and safety boundaries. During
1118
+ release preparation, distinguish the upcoming package from the published stable
1119
+ version and do not claim an unpublished PyPI release is available.
1120
+ - Give missing spec/config files and offline configuration failures a concise
1121
+ next step; an empty write allowlist still sends no PATCH requests.
1122
+ - Promote the 2.4.1.dev0 development package to 2.4.1 consistently across runtime,
1123
+ package metadata and generated reports; update the release acceptance checklist.
1124
+
1125
+ ### Quality
1126
+
1127
+ - Resolve the existing 20 mypy errors in six files using accurate annotations and
1128
+ type narrowing, without new suppression directives or weaker mypy settings.
1129
+ - Make mypy a blocking CI check and add a minimum 80% branch-aware coverage gate.
1130
+ - Add weekly Dependabot checks for pip dependencies and GitHub Actions, without
1131
+ automatic merging; exclude the release workflow from dependency updates.
1132
+ - Verify installed demo resources, source-independent startup, both demo modes,
1133
+ complete database restoration and local server shutdown.
1134
+
1135
+ ### Security / Safety
1136
+
1137
+ - The demo accepts no external target or user credentials. Its active PATCH checks
1138
+ run only against bundled, disposable data on a dynamic `127.0.0.1` server.
1139
+ - Keep auditing users' own APIs read-only by default; `granttrace demo --read-only`
1140
+ sends no PATCH requests.
1141
+ - Preserve the BOLA / IDOR and Mass Assignment detection criteria, explicit write
1142
+ allowlists, independent GET readback, original-state snapshots and rollback
1143
+ verification. Failed recovery still blocks subsequent writes.
1144
+ - Keep the existing `granttrace --spec ...` CLI, TLS / HTTP / redirect / proxy
1145
+ safety boundaries and evidence minimisation unchanged.
1146
+
1147
+ ## 2.4.0 - 2026-10-03
1148
+
1149
+ ### Added
1150
+
1151
+ - Generate offline OpenAPI configuration drafts and missing-input checklists;
1152
+ reject unresolved drafts and refuse to overwrite existing files.
1153
+ - Add offline HTML report search/status filters and compact severity labels.
1154
+ - Support strict OpenAPI style/explode and Swagger collectionFormat parameter
1155
+ serialization in scans/readbacks, including arrays and lowercase booleans;
1156
+ decline unsupported or ambiguous formats before sending requests.
1157
+ - Add explicit per-pair expected_visitor_access for legitimate sharing/admin
1158
+ reads, recorded as AUTHORIZED, and six local authorization truth fixtures with
1159
+ false-positive/false-negative accounting.
1160
+ - Add mandatory Ruff checks, real unittest branch coverage with text/XML/JSON
1161
+ evidence, runtime dependency auditing with pip-audit, and a Python CodeQL
1162
+ workflow. Keep mypy advisory while recording existing type debt.
1163
+ - Add simple issue templates and contribution guidance with private vulnerability
1164
+ reporting and reminders to exclude credentials and sensitive target data.
1165
+
1166
+ ### Changed
1167
+
1168
+ - Promote the previously identified 2.4.0.dev0 development build to 2.4.0 across
1169
+ runtime, package metadata and reports; retain api_sentinel.py and
1170
+ APISentinelAuditor compatibility.
1171
+ - Use granttrace_report.html when no output path is supplied and align package
1172
+ description, version status and GrantTrace branding.
1173
+ - Keep a concise five-minute README walkthrough, add identity/readback/restoration
1174
+ highlights, and preserve the visible report preview and detailed guide links.
1175
+ - Explain identity/resource access, changed fields, restoration and next steps
1176
+ before raw evidence. JSON report schema is version 2.
1177
+ - Remove tests' dependence on untracked config.json; automate JSON/YAML mock
1178
+ restoration and clean wheel installation outside the checkout in CI.
1179
+ - Maintain reproducible release verification and local-output ignore rules;
1180
+ remove an unused demo image while preserving the report preview.
1181
+ - Include example configuration, guides and verification scripts in the source
1182
+ distribution so its documented local checks can be reproduced.
1183
+
1184
+ ### Security / Safety
1185
+
1186
+ - Preserve default read-only auditing and explicit allowlisted JSON PATCH checks;
1187
+ active POST/PUT checks and automated authentication are not added.
1188
+ - Preserve independent GET readback, original-state snapshots, finally-protected
1189
+ restoration and rollback verification. Failed recovery halts subsequent writes.
1190
+ - Preserve TLS verification by default, explicit non-loopback HTTP opt-in and
1191
+ minimized/redacted evidence by default.
1192
+ - Retain denial, anonymous-leak and invalid-baseline boundaries without changing
1193
+ the BOLA / IDOR or Mass Assignment detection criteria during release preparation.
1194
+
1195
+ Historical release tags and assets, including v2.3.1, remain unchanged.
1196
+
1197
+ ## 2.3.1 - Verified authorization, snapshot and credential fixes
1198
+
1199
+ - Require trustworthy, clean anonymous rejection before a visitor-denial branch
1200
+ can produce endpoint-level SECURE; leaked business data remains suspicious.
1201
+ - Reject non-standard JSON constants and overflowing floats in response parsing.
1202
+ Validate the original snapshot and finite request payloads before any PATCH;
1203
+ preserve recovery when a post-write readback is invalid.
1204
+ - Redact component values from request Cookie headers, including names such as
1205
+ path/domain/secure/version, quoted/encoded echoes and known numeric credentials.
1206
+ - Align readback parameter arrays, elements and override mappings between the
1207
+ editor schema, semantic validator and runtime.
1208
+ - Load the same JSON/YAML specification authentication context in configuration
1209
+ validation and scanning; reject explicit invalid specifications cleanly.
1210
+ - Validate the effective CLI write allowlist against its own readback mappings.
1211
+ - Add 45 regression tests across four release modules; all 223 tests pass with
1212
+ real PyYAML installed. Repeat complete CLI mock audits for JSON and YAML and
1213
+ confirm full database restoration.
1214
+ - Build/install the 2.3.1 wheel and smoke-test its installed console entry point;
1215
+ refresh sample reports and record current verification separately from history.
1216
+
1217
+ ## 2.3.0 (v2.3.0-final) - Configuration validation, authoritative identity rules, and release hardening
1218
+
1219
+ - **Authoritative Configuration Validator (`core/config_validator.py`)**:
1220
+ - Implemented offline semantic validation engine for `config.json` without external network requests.
1221
+ - Added `--validate-config` CLI flag for pre-flight validation (exit code 0 for valid, 2 for invalid), without target-network requests or state-changing target actions.
1222
+ - Normal CLI scanning automatically runs the authoritative preflight check, rejecting invalid configurations before creating the auditor or sending any HTTP requests.
1223
+ - Enforced single canonical format for operation keys (`<METHOD> /<path>` with strictly single space), consistent case handling, and spelling error suggestions (Levenshtein distance).
1224
+ - Implemented symmetric two-way path collision detection (`paths_collide`) between `ignore_readback_paths` and written/readback paths across both validator and transaction rollback.
1225
+ - Unified authentication header recognition rules between Validator and Auditor, standardizing `session`, `credential`, custom `auth_header_names`, and OpenAPI-declared security schemes.
1226
+
1227
+ - **Schema and Exemplary Assets**:
1228
+ - Added standard `config.schema.json` (JSON Schema Draft-07) for editor autocomplete, hover documentation, and structural validation.
1229
+ - Added comprehensive `config.example.json` with `$schema` linkage, sample identities, readbacks, and BOLA policies.
1230
+
1231
+ - **Security and Robustness Hardening**:
1232
+ - Bound recursion depth (`MAX_RECURSION_DEPTH = 15`) and explicitly reject non-standard JSON numeric values (`NaN`, `Infinity`).
1233
+ - Strict credential sanitization across all diagnostic outputs (`Actual`, `Expected`, errors) and stripped CR/LF/control characters to mitigate known log-injection paths.
1234
+
1235
+ - **Core Detection Behavior Compatibility**:
1236
+ - No intentional behavior changes were made to BOLA decisions, snapshot recovery, diff, generator, or parser logic in this release; all existing regression tests continue to pass.
1237
+
1238
+ - **Test Suite Expansion**:
1239
+ - Total automated tests expanded from 118 to 178 (all 178 passing, 0 failures, 0 errors).
1240
+ - Added 22 offline configuration validation tests (`tests/test_config_validation.py`).
1241
+ - Added 20 security and sanitization tests (`tests/test_rc2_security_hardening.py`).
1242
+ - Added 18 strict regression counterexample tests (`tests/test_rc3_hardening.py`).
1243
+
1244
+ - **Packaging Hygiene and Metadata**:
1245
+ - Standardized Python package version in `pyproject.toml` to PEP 440 compliant `2.3.0`, with GitHub / ZIP delivery tag designated as `v2.3.0-final`.
1246
+ - Purged all build artifacts, temporary test reports (`API_Security_Report.html`, `result.json`), and caches (`__pycache__`, `*.pyc`, `.pytest_cache`, `.git`) from the distribution archive.
1247
+
1248
+ ## 2.2.0 - Regression-driven safety fixes
1249
+
1250
+ - Snapshot/recover complete written fields, objects and arrays using original
1251
+ business values; compare the full readback state, including derived changes.
1252
+ - Recover after mutation/readback exceptions, guard recovery's own exceptions,
1253
+ and stop later writes on failed verification or asynchronous acceptance.
1254
+ - Require configured strong readback consistency for unchanged-write SECURE.
1255
+ - Do not mistake 403-with-data, historical denial text, anonymous private
1256
+ increments, or undeclared public access for access-control enforcement.
1257
+ - Compare effective authentication headers; exclude request/trace echoes from
1258
+ identity evidence and support explicit trusted response resource_id_paths.
1259
+ - Probe readOnly privilege fields while excluding them from ordinary baselines.
1260
+ - Recursively validate samples, intersect allOf constraints and reject invalid
1261
+ baselines. Resolve 3.1 ref siblings in their original contexts; reject ambiguous
1262
+ 3.0/Swagger structural siblings and missing pointers instead of losing fields.
1263
+ - Propagate supported media types, rejecting unsupported JSON Patch arrays.
1264
+ - Bound/redact bodies, URLs, known credentials, error text and result metadata.
1265
+ - Add zero-check CI failure, coverage/suspicious gates, no-network dry-run and
1266
+ case-sensitive CLI allowlist replacement.
1267
+
1268
+ Migration: PUBLIC needs explicit policy; unchanged active checks need strong
1269
+ readback consistency. Rewrite 3.0 structural ref siblings as allOf. Full-state
1270
+ verification may require explicitly identifying harmless volatile fields. These
1271
+ checks do not establish a universal rollback or privacy guarantee.
1272
+
1273
+ ## 2.1.0 - Safety hardening
1274
+
1275
+ - Made read-only auditing the default and limited active mutations to explicitly
1276
+ allowlisted JSON `PATCH` operations.
1277
+ - Added independent read-before/write/read-after/rollback verification, retrying
1278
+ readback and treating asynchronous or ambiguous outcomes as errors.
1279
+ - Reworked BOLA decisions around owner, cross-visitor, anonymous, and distinct
1280
+ visitor-self baselines. Matching JSON structure alone is never confirmation.
1281
+ - Added explicit `CONFIRMED`, `SECURE`, `PUBLIC`, `SUSPICIOUS`, `INCONCLUSIVE`,
1282
+ `SKIPPED`, and `ERROR` results with honest attempted/conclusive coverage.
1283
+ - Enabled TLS verification by default, blocked redirects, capped response sizes,
1284
+ added global throttling, and restricted non-loopback clear-text HTTP.
1285
+ - Added default evidence minimisation, secret/PII redaction, hashes, and HTML
1286
+ escaping.
1287
+ - Expanded OpenAPI parsing to JSON/YAML, safe local external references,
1288
+ recursive schemas/compositions, and parameter override semantics.
1289
+ - Added constraint-aware parameters, valid request baselines, and one-field
1290
+ nested mass-assignment mutations.
1291
+ - Added packaging metadata, CI, an Apache-2.0 license, security guidance, and a
1292
+ standard-library regression suite.
1293
+
1294
+ The bundled mock remains intentionally vulnerable in one BOLA route and one
1295
+ mass-assignment route so the end-to-end flow can be verified safely on loopback.