websec-validator 0.15.3__tar.gz → 0.17.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. {websec_validator-0.15.3/src/websec_validator.egg-info → websec_validator-0.17.0}/PKG-INFO +72 -10
  2. {websec_validator-0.15.3 → websec_validator-0.17.0}/README.md +71 -9
  3. {websec_validator-0.15.3 → websec_validator-0.17.0}/pyproject.toml +1 -1
  4. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/calibration.py +92 -0
  5. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/cli.py +195 -39
  6. websec_validator-0.17.0/src/websec_validator/clusters.py +136 -0
  7. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/coverage.py +20 -0
  8. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/auth.py +68 -9
  9. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/base.py +91 -0
  10. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/client_exposure.py +61 -2
  11. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/findings.py +45 -3
  12. websec_validator-0.17.0/src/websec_validator/init_scope.py +172 -0
  13. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/install.py +16 -4
  14. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/report.py +51 -4
  15. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/scanners.py +494 -41
  16. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/schemas/coverage.schema.json +15 -0
  17. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/schemas/ledger.schema.json +175 -1
  18. {websec_validator-0.15.3 → websec_validator-0.17.0/src/websec_validator.egg-info}/PKG-INFO +72 -10
  19. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator.egg-info/SOURCES.txt +4 -0
  20. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_action_contracts.py +1 -1
  21. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_adoption_contracts.py +1 -1
  22. websec_validator-0.17.0/tests/test_calibration_claimspec.py +202 -0
  23. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_coverage.py +6 -6
  24. websec_validator-0.17.0/tests/test_field_report_2026_09.py +519 -0
  25. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_gate_command.py +1 -1
  26. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_hardening.py +6 -3
  27. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_hooks_contracts.py +1 -1
  28. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_install_contracts.py +2 -2
  29. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_output_boundaries.py +1 -1
  30. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_sarif_workbench.py +4 -4
  31. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_scanner_contracts.py +1 -1
  32. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_source_budget.py +1 -1
  33. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_sql_flow.py +1 -1
  34. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_stack_metadata.py +1 -1
  35. {websec_validator-0.15.3 → websec_validator-0.17.0}/LICENSE +0 -0
  36. {websec_validator-0.15.3 → websec_validator-0.17.0}/setup.cfg +0 -0
  37. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/__init__.py +0 -0
  38. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/agenthook.py +0 -0
  39. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/attest.py +0 -0
  40. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/attribution.py +0 -0
  41. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/baseline.py +0 -0
  42. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/briefing.py +0 -0
  43. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/calibration.json +0 -0
  44. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/constitution.py +0 -0
  45. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/corpus.json +0 -0
  46. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/dast_ingest.py +0 -0
  47. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/dast_predict.py +0 -0
  48. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/demo.py +0 -0
  49. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/diffscope.py +0 -0
  50. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/dynamic.py +0 -0
  51. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/enrichment.py +0 -0
  52. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/explain.py +0 -0
  53. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/__init__.py +0 -0
  54. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/agent_config.py +0 -0
  55. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/authz.py +0 -0
  56. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/authz_dataflow.py +0 -0
  57. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/client_integrity.py +0 -0
  58. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/crypto_usage.py +0 -0
  59. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/dependencies.py +0 -0
  60. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/django_urls.py +0 -0
  61. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/graphql.py +0 -0
  62. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/iac_ci.py +0 -0
  63. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/integrations.py +0 -0
  64. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/llm_security.py +0 -0
  65. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/pii_exposure.py +0 -0
  66. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/policy_consistency.py +0 -0
  67. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/profiles.py +0 -0
  68. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/routes.py +0 -0
  69. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/schemas.py +0 -0
  70. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/sql_flow.py +0 -0
  71. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/stack.py +0 -0
  72. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/surface.py +0 -0
  73. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/syntax.py +0 -0
  74. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/tenant.py +0 -0
  75. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/transport_security.py +0 -0
  76. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/upload_security.py +0 -0
  77. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/extractors/webext.py +0 -0
  78. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/feedback.py +0 -0
  79. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/fixprompt.py +0 -0
  80. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/formats.py +0 -0
  81. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/fpfilter.py +0 -0
  82. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/gate.py +0 -0
  83. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/graph_enrich.py +0 -0
  84. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/hooks.py +0 -0
  85. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/intel.py +0 -0
  86. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/inventory.py +0 -0
  87. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/mcp_server.py +0 -0
  88. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/openapi.py +0 -0
  89. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/probes.py +0 -0
  90. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/proof.py +0 -0
  91. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/provenance.py +0 -0
  92. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/recon.py +0 -0
  93. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/registry.py +0 -0
  94. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/repairs.py +0 -0
  95. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/research/control-scope-cases.json +0 -0
  96. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/research/example.json +0 -0
  97. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/research/profile-cases.json +0 -0
  98. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/research.py +0 -0
  99. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/rules/error-stack-disclosure.yml +0 -0
  100. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/rules/insecure-default-secret.yml +0 -0
  101. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/sarif_ingest.py +0 -0
  102. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/schemas/facts.schema.json +0 -0
  103. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/demo/app.py.txt +0 -0
  104. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/demo/requirements.txt.txt +0 -0
  105. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/_lib.py +0 -0
  106. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/appsync-cswsh.sh +0 -0
  107. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/appsync-introspection.sh +0 -0
  108. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/appsync-subscription-bola.sh +0 -0
  109. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/bola-cross-tenant.sh +0 -0
  110. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/bola-write-verbs.py +0 -0
  111. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/client-integrity-checklist.sh +0 -0
  112. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/compare-roles.sh +0 -0
  113. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/dlp-bypass-offline.py +0 -0
  114. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/entitlement-abuse.sh +0 -0
  115. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/error-disclosure-probe.sh +0 -0
  116. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/forged-token.sh +0 -0
  117. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/hs256-brute-force.py +0 -0
  118. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/jwt-attacks.sh +0 -0
  119. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/mass-assignment.py +0 -0
  120. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/password-reuse.sh +0 -0
  121. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/pii-output-diff.sh +0 -0
  122. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/race-conditions.py +0 -0
  123. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/rate-limit-burst.sh +0 -0
  124. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/s3-assess.sh +0 -0
  125. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/ssrf-probes.sh +0 -0
  126. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/unauth-baseline.sh +0 -0
  127. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/upload-matrix.sh +0 -0
  128. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/probes/webhook-forgery.py +0 -0
  129. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/reports/FINDINGS-SUMMARY.md.template +0 -0
  130. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/reports/access-control-matrix.md.template +0 -0
  131. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/reports/findings-triage.md.template +0 -0
  132. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/reports/pentest-handover-brief.md.template +0 -0
  133. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/templates/reports/per-tool-FINDINGS.md.template +0 -0
  134. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator/testplan.py +0 -0
  135. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator.egg-info/dependency_links.txt +0 -0
  136. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator.egg-info/entry_points.txt +0 -0
  137. {websec_validator-0.15.3 → websec_validator-0.17.0}/src/websec_validator.egg-info/top_level.txt +0 -0
  138. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_agent_hook.py +0 -0
  139. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_agent_hosts.py +0 -0
  140. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_agent_launch_specs.py +0 -0
  141. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_analysis_scope.py +0 -0
  142. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_assurance_regressions.py +0 -0
  143. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_attest.py +0 -0
  144. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_attribution.py +0 -0
  145. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_auth_control_scope.py +0 -0
  146. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_constitution.py +0 -0
  147. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_control_scope_research.py +0 -0
  148. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_crypto_comparisons.py +0 -0
  149. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_dast_ingest.py +0 -0
  150. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_dast_predict.py +0 -0
  151. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_demo.py +0 -0
  152. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_detector_precision.py +0 -0
  153. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_diffscope.py +0 -0
  154. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_django_routes.py +0 -0
  155. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_enrichment.py +0 -0
  156. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_entitlement_webext.py +0 -0
  157. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_evidence_verdicts.py +0 -0
  158. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_explain.py +0 -0
  159. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_extension_controls.py +0 -0
  160. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_feedback.py +0 -0
  161. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_fixprompt_fpfilter.py +0 -0
  162. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_formats.py +0 -0
  163. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_gate_and_bypass_record.py +0 -0
  164. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_gitleaks_worktree.py +0 -0
  165. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_graph_enrich.py +0 -0
  166. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_hooks.py +0 -0
  167. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_install.py +0 -0
  168. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_intel.py +0 -0
  169. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_inventory.py +0 -0
  170. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_lifecycle.py +0 -0
  171. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_mcp.py +0 -0
  172. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_mcp_security.py +0 -0
  173. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_openapi.py +0 -0
  174. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_pentest_regressions.py +0 -0
  175. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_profiles.py +0 -0
  176. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_proof_revisions.py +0 -0
  177. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_provenance.py +0 -0
  178. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_public_precision.py +0 -0
  179. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_read_boundary.py +0 -0
  180. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_read_performance.py +0 -0
  181. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_recon.py +0 -0
  182. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_registry_existence.py +0 -0
  183. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_remaining_control_scope.py +0 -0
  184. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_research.py +0 -0
  185. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_research_cli.py +0 -0
  186. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_sarif_ingest.py +0 -0
  187. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_testplan.py +0 -0
  188. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_transport_pii_scope.py +0 -0
  189. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_transport_stack_scope.py +0 -0
  190. {websec_validator-0.15.3 → websec_validator-0.17.0}/tests/test_workbench_cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: websec-validator
3
- Version: 0.15.3
3
+ Version: 0.17.0
4
4
  Summary: Defensive, local-first security recon that briefs your AI coding agent on your own codebase — read-only by default (code in, artifacts out): facts + tailored probe scripts, no LLM, no server, no running app.
5
5
  Author: Ricardo Accioly
6
6
  License: MIT
@@ -293,11 +293,59 @@ non-Claude agents. All stdlib, no new dependency.
293
293
  finding lands **inline on the PR diff** and in the **Security tab**, ranked by a security-severity band,
294
294
  with its CWE/ASVS/OWASP citation and remediation.
295
295
 
296
- **Gate the build.** `--fail-on {critical,high,medium,low}` exits 1 for matching findings and 2 when
297
- requested execution is incomplete. `--require-complete` gates execution without a severity threshold.
298
- Extractor failures, source read loss/caps, invalid scanner reports, timeouts, and explicitly selected
299
- missing scanners remain visible in `coverage.json`; partial artifacts are preserved. Optional missing
300
- unselected scanners are reported as unavailable. `--scanners` requires `--scan`.
296
+ **Gate the build.** `--fail-on {critical,high,medium,low}` fails CI on matching findings;
297
+ `--require-complete` gates execution without a severity threshold. Extractor failures, source read
298
+ loss/caps, invalid scanner reports, timeouts, and explicitly selected missing scanners remain visible
299
+ in `coverage.json`; partial artifacts are preserved. Optional missing unselected scanners are reported
300
+ as unavailable. `--scanners` requires `--scan`.
301
+
302
+ **Exit codes tell you WHICH kind of failure.** "You have a vulnerability" and "my toolchain is
303
+ broken" need opposite responses — one blocks the merge, the other pages whoever owns the runner
304
+ image — so they never share a code:
305
+
306
+ | Code | Meaning | What to do |
307
+ |------|---------|------------|
308
+ | `0` | the gate ran and nothing met the threshold | ship (it does not prove protection) |
309
+ | `1` | findings at or above `--fail-on` | a fact about the code — fix the findings |
310
+ | `2` | usage/configuration error, or `websec doctor` found an incompatible scanner | nothing was scanned; fix the invocation or the toolchain |
311
+ | `3` | requested checks did not complete | the gate result is **not** a pass; read `coverage.gaps` for which check did not run |
312
+
313
+ A run that is **both** gate-failing and incomplete exits `1` — the definite fact wins — and says so
314
+ on stderr, because the finding count in that case is a floor, not a total. `gate.failure_kind` in the
315
+ ledger records the exact combination (`findings` · `incomplete` · `findings+incomplete`), so nothing
316
+ is lost by the collapse.
317
+
318
+ > **Upgrading:** exit `2` previously meant *incomplete execution*. It now means *usage/configuration
319
+ > error*, and incomplete is `3`. A CI job that tested for `2` to detect an incomplete run should test
320
+ > for `3` (or read `coverage.execution_complete`, which is unchanged).
321
+
322
+ **Naming a scanner requires it.** `--scanners` is not only a subset filter: a scanner you select but
323
+ have not installed is an incomplete run, not a clean one. `websec run . --scan --scanners trivy,osv-scanner
324
+ --require-complete` exits 3 with `trivy: unavailable` in `coverage.json`, so a CI job whose scanner
325
+ install failed fails instead of reporting zero findings from a scan that never ran.
326
+
327
+ **Presence is not compatibility — `websec doctor` version-checks.** A scanner can be installed,
328
+ detected, selected, run, and still produce nothing because its CLI does not match the invocation
329
+ websec builds; that silence is indistinguishable from a clean result. `doctor` now reports each
330
+ scanner's version, marks one that is too old for our invocation, and exits `2` when any selected
331
+ scanner is incompatible — so a CI preflight can gate on the toolchain before it trusts a scan.
332
+
333
+ **Scope the noise at setup, not after the first report.** `websec init` walks the repo, finds the
334
+ directories that are not your product (`backend/capacity-test/`, `seed/`, `fixtures/`, `vendor/` …),
335
+ and writes a `.websec-ignore` where every entry carries the file count that justifies it. It prints
336
+ every proposal before writing, supports `--dry-run`, and refuses to overwrite an existing policy file
337
+ without `--force` — that file may hold reviewed `fingerprint:` acknowledgements.
338
+
339
+ **One issue, N sites.** Thirteen findings from one `jwtSecret` pattern and twenty-two blobs from one
340
+ deleted-file incident are six issues, not thirty-five. The ledger carries a `clusters[]` view (and
341
+ REPORT.md a §1a section) that groups findings by rule, and history-only secrets by the commit that
342
+ removed them. It is a **view, not a filter**: `total`, `--fail-on` counts, per-site fingerprints,
343
+ SARIF results and baselines are all untouched, so every site still gates on its own.
344
+
345
+ **Secrets say where they live.** Every gitleaks finding carries `in_tree`; a finding whose file is
346
+ gone from the working tree is labelled `in-tree: false` with the commit it was last seen in. Deleting
347
+ a file does not un-leak it — the blob stays fetchable — so the remediation is *rotate*, and the report
348
+ says that instead of leaving you to run `git log`.
301
349
 
302
350
  Every attempt receives a unique directory under `websec-out/runs/`. The atomic `latest` pointer
303
351
  advances only after a completed execution has written its artifacts; a partial attempt retains its
@@ -591,6 +639,19 @@ unproven samples are quarantined. Unknown-only input reports no successful measu
591
639
  existing fitted calibration unchanged. A DAST hit may confirm a scoped lead; absence from a report
592
640
  cannot refute it. Manual labels should include reviewer/evidence provenance, not only a boolean.
593
641
 
642
+ **Shared format.** `websec calibrate --claimspec PATH` (or `-` for stdout) exports the table the
643
+ runtime actually uses — shipped corpus table plus your local overlay, merged — as a
644
+ [claimspec](https://github.com/raccioly/testguard/tree/main/spec) v1 `calibration` document, the
645
+ Guard-family interchange format. Nothing is lost in translation: the caveat, limitation, evidence
646
+ status, `minN` floor, the per-confidence backoff tier and the labelled uncalibrated prior all travel
647
+ with the numbers (`measures: finding-real`, `bucketBy: attackClass|confidence`). Each cell carries
648
+ raw `n` and `positives`, so a consumer can recompute `p` and the Wilson interval and merge two
649
+ tables by summing counts — the only merge the spec allows. `source.kind` says where the labels came
650
+ from: `human-label` for the shipped table, `tool-oracle` for an overlay-only table, `mixed` once
651
+ your samples are folded in. The writer refuses to export a cell whose stored numbers do not
652
+ reproduce from its counts rather than emit a document the spec validator would reject. The
653
+ internal `calibration.json` shape and the local overlay are unchanged.
654
+
594
655
  ## Dynamic phase (v2 — read-only so far)
595
656
 
596
657
  When you have a *running TEST instance*, `websec dynamic` mints role tokens and runs the probes the
@@ -626,7 +687,7 @@ add the matching dated changelog and migration guidance, and validate the combin
626
687
  In the 0.x series, feature additions or incompatible contracts increment the minor version.
627
688
 
628
689
  After reviewing current main and overlapping PRs, merge the approved release PR only after its
629
- required CI checks pass. The resulting main commit subject must be `release: v0.15.3` for this
690
+ required CI checks pass. The resulting main commit subject must be `release: v0.16.0` for this
630
691
  release. [release-tag.yml](.github/workflows/release-tag.yml) validates that subject against the
631
692
  package version, creates the matching tag/GitHub Release, and explicitly dispatches
632
693
  [publish.yml](.github/workflows/publish.yml) at that tag. A version edit alone does not publish.
@@ -642,18 +703,19 @@ omit an independent version field. Check both sources when diagnosing stale inst
642
703
 
643
704
  ## Status / roadmap
644
705
 
645
- Version 0.15.3 provides 22 recon extractors, eleven optional scanner entries, nine named profiles,
706
+ Version 0.16.0 provides 22 recon extractors, eleven optional scanner entries, nine named profiles,
646
707
  SARIF import/export, bounded source/query analysis, explicit coverage and lifecycle evidence,
647
708
  intelligence/research commands, and opt-in agent/hook/CI adoption. It adds an in-loop security gate
648
709
  (`websec gate` and a `PostToolUse` hook), analysis scoping with `--only`, an opt-in dependency
649
710
  existence check (`--network`), run attribution with graded assurance, recorded gate verdicts and
650
- hook bypasses, and an audit-evidence projection (`websec attest`). These are scoped review tools;
711
+ hook bypasses, an audit-evidence projection (`websec attest`), and a claimspec export of the
712
+ calibration table (`websec calibrate --claimspec`). These are scoped review tools;
651
713
  manual profiles, unknown routes, dynamic behavior and unsupported syntax remain limitations. The
652
714
  in-loop gate is developer ergonomics, not a control, and `attest` reports evidence without
653
715
  rendering a compliance verdict.
654
716
 
655
717
  The [0.14.0 migration guide](docs/MIGRATING-0.14.0.md) explains schema 2.0 and gate/artifact
656
- changes. 0.15.3 is a patch over 0.15.2 and needs no migration.
718
+ changes. 0.16.0 adds the claimspec calibration export over 0.15.3 and needs no migration.
657
719
  The [remaining-work specification](specs/001-continuous-security-improvement/spec.md) consolidates
658
720
  unresolved gaps and acceptance tests so overlapping old-base PRs do not become competing roadmaps.
659
721
  Existing runtime probes are opt-in; their earlier isolated results are not current deployment proofs.
@@ -264,11 +264,59 @@ non-Claude agents. All stdlib, no new dependency.
264
264
  finding lands **inline on the PR diff** and in the **Security tab**, ranked by a security-severity band,
265
265
  with its CWE/ASVS/OWASP citation and remediation.
266
266
 
267
- **Gate the build.** `--fail-on {critical,high,medium,low}` exits 1 for matching findings and 2 when
268
- requested execution is incomplete. `--require-complete` gates execution without a severity threshold.
269
- Extractor failures, source read loss/caps, invalid scanner reports, timeouts, and explicitly selected
270
- missing scanners remain visible in `coverage.json`; partial artifacts are preserved. Optional missing
271
- unselected scanners are reported as unavailable. `--scanners` requires `--scan`.
267
+ **Gate the build.** `--fail-on {critical,high,medium,low}` fails CI on matching findings;
268
+ `--require-complete` gates execution without a severity threshold. Extractor failures, source read
269
+ loss/caps, invalid scanner reports, timeouts, and explicitly selected missing scanners remain visible
270
+ in `coverage.json`; partial artifacts are preserved. Optional missing unselected scanners are reported
271
+ as unavailable. `--scanners` requires `--scan`.
272
+
273
+ **Exit codes tell you WHICH kind of failure.** "You have a vulnerability" and "my toolchain is
274
+ broken" need opposite responses — one blocks the merge, the other pages whoever owns the runner
275
+ image — so they never share a code:
276
+
277
+ | Code | Meaning | What to do |
278
+ |------|---------|------------|
279
+ | `0` | the gate ran and nothing met the threshold | ship (it does not prove protection) |
280
+ | `1` | findings at or above `--fail-on` | a fact about the code — fix the findings |
281
+ | `2` | usage/configuration error, or `websec doctor` found an incompatible scanner | nothing was scanned; fix the invocation or the toolchain |
282
+ | `3` | requested checks did not complete | the gate result is **not** a pass; read `coverage.gaps` for which check did not run |
283
+
284
+ A run that is **both** gate-failing and incomplete exits `1` — the definite fact wins — and says so
285
+ on stderr, because the finding count in that case is a floor, not a total. `gate.failure_kind` in the
286
+ ledger records the exact combination (`findings` · `incomplete` · `findings+incomplete`), so nothing
287
+ is lost by the collapse.
288
+
289
+ > **Upgrading:** exit `2` previously meant *incomplete execution*. It now means *usage/configuration
290
+ > error*, and incomplete is `3`. A CI job that tested for `2` to detect an incomplete run should test
291
+ > for `3` (or read `coverage.execution_complete`, which is unchanged).
292
+
293
+ **Naming a scanner requires it.** `--scanners` is not only a subset filter: a scanner you select but
294
+ have not installed is an incomplete run, not a clean one. `websec run . --scan --scanners trivy,osv-scanner
295
+ --require-complete` exits 3 with `trivy: unavailable` in `coverage.json`, so a CI job whose scanner
296
+ install failed fails instead of reporting zero findings from a scan that never ran.
297
+
298
+ **Presence is not compatibility — `websec doctor` version-checks.** A scanner can be installed,
299
+ detected, selected, run, and still produce nothing because its CLI does not match the invocation
300
+ websec builds; that silence is indistinguishable from a clean result. `doctor` now reports each
301
+ scanner's version, marks one that is too old for our invocation, and exits `2` when any selected
302
+ scanner is incompatible — so a CI preflight can gate on the toolchain before it trusts a scan.
303
+
304
+ **Scope the noise at setup, not after the first report.** `websec init` walks the repo, finds the
305
+ directories that are not your product (`backend/capacity-test/`, `seed/`, `fixtures/`, `vendor/` …),
306
+ and writes a `.websec-ignore` where every entry carries the file count that justifies it. It prints
307
+ every proposal before writing, supports `--dry-run`, and refuses to overwrite an existing policy file
308
+ without `--force` — that file may hold reviewed `fingerprint:` acknowledgements.
309
+
310
+ **One issue, N sites.** Thirteen findings from one `jwtSecret` pattern and twenty-two blobs from one
311
+ deleted-file incident are six issues, not thirty-five. The ledger carries a `clusters[]` view (and
312
+ REPORT.md a §1a section) that groups findings by rule, and history-only secrets by the commit that
313
+ removed them. It is a **view, not a filter**: `total`, `--fail-on` counts, per-site fingerprints,
314
+ SARIF results and baselines are all untouched, so every site still gates on its own.
315
+
316
+ **Secrets say where they live.** Every gitleaks finding carries `in_tree`; a finding whose file is
317
+ gone from the working tree is labelled `in-tree: false` with the commit it was last seen in. Deleting
318
+ a file does not un-leak it — the blob stays fetchable — so the remediation is *rotate*, and the report
319
+ says that instead of leaving you to run `git log`.
272
320
 
273
321
  Every attempt receives a unique directory under `websec-out/runs/`. The atomic `latest` pointer
274
322
  advances only after a completed execution has written its artifacts; a partial attempt retains its
@@ -562,6 +610,19 @@ unproven samples are quarantined. Unknown-only input reports no successful measu
562
610
  existing fitted calibration unchanged. A DAST hit may confirm a scoped lead; absence from a report
563
611
  cannot refute it. Manual labels should include reviewer/evidence provenance, not only a boolean.
564
612
 
613
+ **Shared format.** `websec calibrate --claimspec PATH` (or `-` for stdout) exports the table the
614
+ runtime actually uses — shipped corpus table plus your local overlay, merged — as a
615
+ [claimspec](https://github.com/raccioly/testguard/tree/main/spec) v1 `calibration` document, the
616
+ Guard-family interchange format. Nothing is lost in translation: the caveat, limitation, evidence
617
+ status, `minN` floor, the per-confidence backoff tier and the labelled uncalibrated prior all travel
618
+ with the numbers (`measures: finding-real`, `bucketBy: attackClass|confidence`). Each cell carries
619
+ raw `n` and `positives`, so a consumer can recompute `p` and the Wilson interval and merge two
620
+ tables by summing counts — the only merge the spec allows. `source.kind` says where the labels came
621
+ from: `human-label` for the shipped table, `tool-oracle` for an overlay-only table, `mixed` once
622
+ your samples are folded in. The writer refuses to export a cell whose stored numbers do not
623
+ reproduce from its counts rather than emit a document the spec validator would reject. The
624
+ internal `calibration.json` shape and the local overlay are unchanged.
625
+
565
626
  ## Dynamic phase (v2 — read-only so far)
566
627
 
567
628
  When you have a *running TEST instance*, `websec dynamic` mints role tokens and runs the probes the
@@ -597,7 +658,7 @@ add the matching dated changelog and migration guidance, and validate the combin
597
658
  In the 0.x series, feature additions or incompatible contracts increment the minor version.
598
659
 
599
660
  After reviewing current main and overlapping PRs, merge the approved release PR only after its
600
- required CI checks pass. The resulting main commit subject must be `release: v0.15.3` for this
661
+ required CI checks pass. The resulting main commit subject must be `release: v0.16.0` for this
601
662
  release. [release-tag.yml](.github/workflows/release-tag.yml) validates that subject against the
602
663
  package version, creates the matching tag/GitHub Release, and explicitly dispatches
603
664
  [publish.yml](.github/workflows/publish.yml) at that tag. A version edit alone does not publish.
@@ -613,18 +674,19 @@ omit an independent version field. Check both sources when diagnosing stale inst
613
674
 
614
675
  ## Status / roadmap
615
676
 
616
- Version 0.15.3 provides 22 recon extractors, eleven optional scanner entries, nine named profiles,
677
+ Version 0.16.0 provides 22 recon extractors, eleven optional scanner entries, nine named profiles,
617
678
  SARIF import/export, bounded source/query analysis, explicit coverage and lifecycle evidence,
618
679
  intelligence/research commands, and opt-in agent/hook/CI adoption. It adds an in-loop security gate
619
680
  (`websec gate` and a `PostToolUse` hook), analysis scoping with `--only`, an opt-in dependency
620
681
  existence check (`--network`), run attribution with graded assurance, recorded gate verdicts and
621
- hook bypasses, and an audit-evidence projection (`websec attest`). These are scoped review tools;
682
+ hook bypasses, an audit-evidence projection (`websec attest`), and a claimspec export of the
683
+ calibration table (`websec calibrate --claimspec`). These are scoped review tools;
622
684
  manual profiles, unknown routes, dynamic behavior and unsupported syntax remain limitations. The
623
685
  in-loop gate is developer ergonomics, not a control, and `attest` reports evidence without
624
686
  rendering a compliance verdict.
625
687
 
626
688
  The [0.14.0 migration guide](docs/MIGRATING-0.14.0.md) explains schema 2.0 and gate/artifact
627
- changes. 0.15.3 is a patch over 0.15.2 and needs no migration.
689
+ changes. 0.16.0 adds the claimspec calibration export over 0.15.3 and needs no migration.
628
690
  The [remaining-work specification](specs/001-continuous-security-improvement/spec.md) consolidates
629
691
  unresolved gaps and acceptance tests so overlapping old-base PRs do not become competing roadmaps.
630
692
  Existing runtime probes are opt-in; their earlier isolated results are not current deployment proofs.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "websec-validator"
7
- version = "0.15.3"
7
+ version = "0.17.0"
8
8
  description = "Defensive, local-first security recon that briefs your AI coding agent on your own codebase — read-only by default (code in, artifacts out): facts + tailored probe scripts, no LLM, no server, no running app."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -258,6 +258,98 @@ def samples_from_dynamic(dynamic: dict) -> list:
258
258
  return out
259
259
 
260
260
 
261
+ # ---- claimspec `calibration` writer (additive: the internal table shape above is unchanged) ----
262
+ # claimspec is the Guard-family shared spec (testguard `spec/`). Its `calibration` kind carries the
263
+ # same honesty fields this table does — corpus, caveat, limitation, evidence status, min-n floor,
264
+ # backoff tier and a labelled fallback — under different names. This writer is the translation.
265
+ CLAIMSPEC_SCHEMA_VERSION = 1
266
+ CLAIMSPEC_MEASURES = "finding-real" # P(a reported finding of this class is a real vulnerability)
267
+ CLAIMSPEC_BUCKET_BY = "attackClass|confidence" # `by_class_label` keys are `class|LABEL`
268
+ CLAIMSPEC_BACKOFF_BY = "confidence" # `by_label` keys are `LABEL`
269
+ CLAIMSPEC_CONFIDENCE = 0.95 # Z95 above is the exact quantile for this level
270
+ _EVIDENCE_STATUS = {"historical-unverified": "unverified", "historical-quarantined": "quarantined"}
271
+ # meta keys that are websec provenance with no claimspec field; they travel in `source.detail`.
272
+ _DETAIL_KEYS = ("n_total", "n_unknown", "unmatched_rule", "researched_classes", "personalized",
273
+ "local_samples", "legacy_uncertain_samples", "historical_uncertain_samples",
274
+ "shipped_table", "method")
275
+
276
+
277
+ def _claimspec_cell(key: str, cell: dict) -> dict:
278
+ """Translate one `{n, k, p, ci}` cell to `{n, positives, p, ci}`, refusing one that does not
279
+ reproduce from its own counts.
280
+
281
+ The stored `p`/`ci` are passed through, not recomputed: they are the numbers `apply()` actually
282
+ attaches to findings, and an exported document must not quote a different one. The validator
283
+ recomputes both from `positives`/`n` at the document's own precision, so a stale hand-edited
284
+ cell would make the whole document non-conforming — better to refuse here and name the cell.
285
+ Precision note: `_cell` uses Python `round()` (round-half-even on the binary value) where the
286
+ JS validator uses `toFixed` (round-half-away); an exact tie at 3 dp is effectively impossible
287
+ for a Wilson bound, so the two agree in practice.
288
+ """
289
+ n, k = int(cell.get("n", 0)), int(cell.get("k", 0))
290
+ if k > n or n < 0:
291
+ raise ValueError(f"calibration cell {key!r} has {k} positives in {n} trials")
292
+ expected = _cell(k, n)
293
+ got = {"p": cell.get("p"), "ci": list(cell.get("ci", []))}
294
+ if got["p"] != expected["p"] or got["ci"] != expected["ci"]:
295
+ raise ValueError(f"calibration cell {key!r} does not reproduce from its counts "
296
+ f"({k}/{n}): stored p={got['p']} ci={got['ci']}, "
297
+ f"expected p={expected['p']} ci={expected['ci']}")
298
+ return {"n": n, "positives": k, "p": got["p"], "ci": got["ci"]}
299
+
300
+
301
+ def to_claimspec(table: dict, computed_at: str | None = None) -> dict:
302
+ """Render an internal calibration table (shipped, local-only or merged, i.e. anything `load()`
303
+ returns) as a claimspec v1 `calibration` document.
304
+
305
+ Field mapping is fixed by the spec's own reference translation of the shipped table
306
+ (`spec/conformance/examples/calibration-websec.json` in testguard). `source.kind` says where
307
+ the labels came from: `human-label` for the shipped corpus table, `tool-oracle` when only the
308
+ operator's confirmed local samples exist, `mixed` once local samples are folded over shipped.
309
+ `source.caveat` is always written — a number quoted without it is a misquote.
310
+ """
311
+ from datetime import datetime, timezone
312
+ from . import __version__
313
+
314
+ meta = table.get("meta", {}) or {}
315
+ if meta.get("shipped_table") is False:
316
+ kind, ref = "tool-oracle", "calibration-local.json (operator overlay; no shipped table)"
317
+ elif meta.get("personalized"):
318
+ kind, ref = "mixed", "shipped calibration.json + operator overlay calibration-local.json"
319
+ else:
320
+ kind, ref = "human-label", "src/websec_validator/calibration.json, shipped in the package"
321
+ source: dict = {"kind": kind, "ref": ref}
322
+ if meta.get("corpus"):
323
+ source["corpus"] = list(meta["corpus"])
324
+ source["caveat"] = meta.get("caveat") or CAVEAT
325
+ if meta.get("limitation"):
326
+ source["limitation"] = meta["limitation"]
327
+ source["evidenceStatus"] = _EVIDENCE_STATUS.get(meta.get("evidence_status"), "verified")
328
+ detail = {key: meta[key] for key in _DETAIL_KEYS if meta.get(key) is not None}
329
+ if detail:
330
+ source["detail"] = detail
331
+
332
+ if computed_at is None:
333
+ computed_at = datetime.now(timezone.utc).isoformat(timespec="seconds").replace("+00:00", "Z")
334
+ return {
335
+ "schemaVersion": CLAIMSPEC_SCHEMA_VERSION,
336
+ "tool": {"name": "websec-validator", "version": __version__},
337
+ "computedAt": computed_at,
338
+ "method": "wilson",
339
+ "confidence": CLAIMSPEC_CONFIDENCE,
340
+ "measures": CLAIMSPEC_MEASURES,
341
+ "bucketBy": CLAIMSPEC_BUCKET_BY,
342
+ "minN": int(meta.get("min_n", MIN_N)),
343
+ "source": source,
344
+ "buckets": {key: _claimspec_cell(key, cell)
345
+ for key, cell in sorted((table.get("by_class_label") or {}).items())},
346
+ "backoff": [{"bucketBy": CLAIMSPEC_BACKOFF_BY,
347
+ "buckets": {key: _claimspec_cell(key, cell)
348
+ for key, cell in sorted((table.get("by_label") or {}).items())}}],
349
+ "fallback": {"basis": "uncalibrated-prior", "values": dict(table.get("prior") or PRIOR)},
350
+ }
351
+
352
+
261
353
  def apply(attack_class: str, confidence: str, table: dict | None) -> dict:
262
354
  """Attach a calibrated estimate for a finding's (attack_class, confidence) bucket.
263
355