websec-validator 0.19.2__tar.gz → 0.21.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.
- {websec_validator-0.19.2/src/websec_validator.egg-info → websec_validator-0.21.0}/PKG-INFO +33 -9
- {websec_validator-0.19.2 → websec_validator-0.21.0}/README.md +32 -8
- {websec_validator-0.19.2 → websec_validator-0.21.0}/pyproject.toml +1 -1
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/briefing.py +9 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/calibration.json +1 -1
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/calibration.py +26 -7
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/cli.py +31 -4
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/coverage.py +9 -4
- websec_validator-0.21.0/src/websec_validator/extractors/assigned_flow.py +251 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/authz.py +56 -10
- websec_validator-0.21.0/src/websec_validator/extractors/connexion_routes.py +242 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/crypto_usage.py +236 -6
- websec_validator-0.21.0/src/websec_validator/extractors/django_responses.py +139 -0
- websec_validator-0.21.0/src/websec_validator/extractors/framework_auth.py +157 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/llm_security.py +59 -2
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/pii_exposure.py +40 -5
- websec_validator-0.21.0/src/websec_validator/extractors/python_uploads.py +258 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/routes.py +25 -12
- websec_validator-0.21.0/src/websec_validator/extractors/schemas.py +286 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/sql_flow.py +27 -9
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/surface.py +72 -3
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/syntax.py +25 -1
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/transport_security.py +25 -0
- websec_validator-0.21.0/src/websec_validator/extractors/trpc_routes.py +219 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/upload_security.py +124 -27
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/install.py +8 -0
- websec_validator-0.21.0/src/websec_validator/literal_yaml.py +198 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/mcp_server.py +62 -4
- websec_validator-0.21.0/src/websec_validator/templates/probes/race-conditions.py +93 -0
- websec_validator-0.21.0/src/websec_validator/updates.py +185 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0/src/websec_validator.egg-info}/PKG-INFO +33 -9
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator.egg-info/SOURCES.txt +22 -0
- websec_validator-0.21.0/tests/test_brief_artifacts.py +93 -0
- websec_validator-0.21.0/tests/test_compare_reports.py +205 -0
- websec_validator-0.21.0/tests/test_connexion_yaml.py +151 -0
- websec_validator-0.21.0/tests/test_container_contracts.py +83 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_crypto_comparisons.py +33 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_detector_fp_followups.py +7 -3
- websec_validator-0.21.0/tests/test_django_responses.py +120 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_explained_brief.py +26 -7
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_formats.py +2 -1
- websec_validator-0.21.0/tests/test_language_fixtures.py +54 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_mcp_security.py +43 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_pii_projection_fp.py +6 -1
- websec_validator-0.21.0/tests/test_precommit_lifecycle.py +106 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_probe_transport_boundaries.py +68 -6
- websec_validator-0.21.0/tests/test_python_uploads.py +146 -0
- websec_validator-0.21.0/tests/test_retained_calibration.py +98 -0
- websec_validator-0.21.0/tests/test_retained_flows.py +123 -0
- websec_validator-0.21.0/tests/test_retained_frameworks.py +379 -0
- websec_validator-0.21.0/tests/test_retained_precision.py +276 -0
- websec_validator-0.21.0/tests/test_trpc_routes.py +139 -0
- websec_validator-0.21.0/tests/test_updates.py +330 -0
- websec_validator-0.19.2/src/websec_validator/extractors/schemas.py +0 -153
- websec_validator-0.19.2/src/websec_validator/templates/probes/race-conditions.py +0 -99
- {websec_validator-0.19.2 → websec_validator-0.21.0}/LICENSE +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/setup.cfg +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/__init__.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/agenthook.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/attest.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/attribution.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/baseline.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/clusters.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/constitution.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/corpus.json +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/dast_ingest.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/dast_predict.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/demo.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/diffscope.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/dynamic.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/enrichment.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/explain.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/__init__.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/agent_config.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/auth.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/authz_dataflow.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/base.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/client_exposure.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/client_integrity.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/dependencies.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/django_urls.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/graphql.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/iac_ci.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/integrations.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/policy_consistency.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/profiles.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/stack.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/tenant.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/extractors/webext.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/feedback.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/findings.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/fixprompt.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/formats.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/fpfilter.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/gate.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/git_read.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/graph_enrich.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/hooks.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/init_scope.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/intel.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/inventory.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/openapi.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/output.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/pairs.json +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/probes.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/proof.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/provenance.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/recon.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/registry.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/repairs.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/report.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/research/control-scope-cases.json +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/research/example.json +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/research/profile-cases.json +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/research.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/rules/error-stack-disclosure.yml +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/rules/insecure-default-secret.yml +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/sarif_ingest.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/scanners.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/schemas/coverage.schema.json +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/schemas/facts.schema.json +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/schemas/ledger.schema.json +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/synthetic.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/demo/app.py.txt +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/demo/requirements.txt.txt +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/_lib.bash +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/_lib.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/appsync-cswsh.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/appsync-introspection.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/appsync-subscription-bola.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/bola-cross-tenant.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/bola-write-verbs.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/client-integrity-checklist.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/compare-roles.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/dlp-bypass-offline.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/entitlement-abuse.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/error-disclosure-probe.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/forged-token.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/hs256-brute-force.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/jwt-attacks.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/mass-assignment.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/password-reuse.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/pii-output-diff.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/rate-limit-burst.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/s3-assess.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/ssrf-probes.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/unauth-baseline.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/upload-matrix.sh +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/probes/webhook-forgery.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/reports/FINDINGS-SUMMARY.md.template +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/reports/access-control-matrix.md.template +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/reports/findings-triage.md.template +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/reports/pentest-handover-brief.md.template +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/templates/reports/per-tool-FINDINGS.md.template +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator/testplan.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator.egg-info/dependency_links.txt +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator.egg-info/entry_points.txt +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/src/websec_validator.egg-info/top_level.txt +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_action_contracts.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_adoption_contracts.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_agent_hook.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_agent_hosts.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_agent_launch_specs.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_analysis_scope.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_assurance_regressions.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_attest.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_attribution.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_auth_control_scope.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_calibration_claimspec.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_calibration_review.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_calibration_scoring.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_constitution.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_control_scope_research.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_coverage.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_dast_ingest.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_dast_predict.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_demo.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_detector_precision.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_diffscope.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_django_routes.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_dynamic_login_shape.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_enrichment.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_entitlement_webext.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_evidence_verdicts.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_explain.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_extension_controls.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_feedback.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_feedback_calibration_loop.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_field_report_2026_09.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_fixprompt_fpfilter.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_fp_sources.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_gate_and_bypass_record.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_gate_command.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_gate_policy_and_scope.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_gitleaks_worktree.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_graph_enrich.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_hardening.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_hooks.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_hooks_contracts.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_ignore_claimspec.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_install.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_install_contracts.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_intel.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_inventory.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_issue_147_sarif_locations.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_lifecycle.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_mcp.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_openapi.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_output_boundaries.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_pentest_regressions.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_profiles.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_proof_revisions.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_provenance.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_public_precision.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_read_boundary.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_read_performance.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_recon.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_registry_existence.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_remaining_control_scope.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_research.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_research_cli.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_sarif_ingest.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_sarif_workbench.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_scanner_contracts.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_security_fix_boundaries.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_source_budget.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_sql_flow.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_stack_metadata.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_synthetic_pairs.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_testplan.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_transport_pii_scope.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_transport_stack_scope.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_triage.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_unanalyzed_cli.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.0}/tests/test_unanalyzed_coverage.py +0 -0
- {websec_validator-0.19.2 → websec_validator-0.21.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.
|
|
3
|
+
Version: 0.21.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
|
|
@@ -41,19 +41,21 @@ A senior pentester's "here's what to test and how" handoff — auto-generated fr
|
|
|
41
41
|
<!-- docguard:quality negation-load off — "no LLM / no server / no running app / not a SaaS / never touches prod" is this tool's core positioning; defining it by contrast with the scanners-and-SaaS it deliberately is NOT is intentional, not a phrasing defect. -->
|
|
42
42
|
|
|
43
43
|
> Local-first security recon that **briefs your AI coding agent**. It does the deterministic
|
|
44
|
-
> half — read
|
|
44
|
+
> half — read supported source, map the visible attack surface, and stage a probe library tailored to what it
|
|
45
45
|
> found — then hands your agent (Claude Code, Codex, Gemini, Cursor) a marching-orders briefing.
|
|
46
46
|
> `websec run` needs nothing but the code; add `--scan` to also run and de-duplicate whichever
|
|
47
|
-
> static scanners you have installed. **Code in, artifacts out. No LLM in the tool
|
|
48
|
-
> running app required.**
|
|
47
|
+
> static scanners you have installed. **Code in, artifacts out. No LLM in the tool; no server or
|
|
48
|
+
> running app required for the core pass.**
|
|
49
49
|
|
|
50
50
|
[](assets/demo.gif)
|
|
51
51
|
|
|
52
52
|
**New here?** Read the eight-page technical brief — what it reads, how a finding earns its severity,
|
|
53
53
|
what it refuses to say, and the field evidence:
|
|
54
54
|
**[raccioly.github.io/websec-validator](https://raccioly.github.io/websec-validator/websec-explained.html)**
|
|
55
|
-
· [PDF](https://raccioly.github.io/websec-validator/websec-explained.pdf).
|
|
56
|
-
|
|
55
|
+
· [PDF](https://raccioly.github.io/websec-validator/websec-explained.pdf). The reviewed v0.21.0 snapshot
|
|
56
|
+
has selected fact assertions in `tests/test_explained_brief.py` and an HTML/PDF/renderer hash binding
|
|
57
|
+
in `tests/test_brief_artifacts.py`. Prose accuracy and rendered layout still require review;
|
|
58
|
+
see [rebuilding the brief](CONTRIBUTING.md#publishing-the-technical-brief).
|
|
57
59
|
|
|
58
60
|
It is *not* an autonomous scanner and *not* a SaaS. It's the missing front-half: the thing that
|
|
59
61
|
turns a repo into a precise, fact-grounded security brief an AI agent (with a human in the loop)
|
|
@@ -123,8 +125,8 @@ Requires **Python 3.11+** (on stock macOS, `python3` is often 3.9 — use `pipx`
|
|
|
123
125
|
interpreter, or install via Homebrew/pyenv). Zero Python runtime dependencies: it shells out to
|
|
124
126
|
scanners (Trivy, OSV-Scanner, Gitleaks, Semgrep/OpenGrep, Checkov, Prowler) and Noir **when present**,
|
|
125
127
|
plus **per-language SAST auto-selected by stack** — Bandit (Python), gosec (Go), Brakeman (Rails) —
|
|
126
|
-
each fired only when its language is detected.
|
|
127
|
-
is
|
|
128
|
+
each fired only when its language is detected. Unselected missing tools are reported as limitations;
|
|
129
|
+
a missing explicitly requested scanner is an execution gap and cannot pass completeness gating.
|
|
128
130
|
|
|
129
131
|
### Or run via Docker (scanners bundled, zero install)
|
|
130
132
|
|
|
@@ -144,6 +146,11 @@ Noir is the route engine and runs on every `run`, but the four static scanners e
|
|
|
144
146
|
`--scan` — a plain `run` lists them and prints `(add --scan to execute them)`, exactly as it does
|
|
145
147
|
outside Docker. Mount your repo at `/scan`; artifacts land in `/scan/websec-out`.
|
|
146
148
|
|
|
149
|
+
For a scanner-free image, use `docker build --target core -t websec-core .`. Both image targets
|
|
150
|
+
run non-root and explicitly disable recurring health checks for the one-shot CLI. Native amd64 and
|
|
151
|
+
arm64 contract jobs execute source-only fixtures and bundled executable version checks. Base/archive
|
|
152
|
+
digest checks do not make apt/transitive builds fully reproducible or certify every scanner adapter.
|
|
153
|
+
|
|
147
154
|
## Usage
|
|
148
155
|
|
|
149
156
|
```bash
|
|
@@ -541,7 +548,8 @@ not immutable snapshots of every pushed Git object. A missing runtime or concurr
|
|
|
541
548
|
blocks pre-push; post-commit remains advisory.
|
|
542
549
|
|
|
543
550
|
**MCP server (any agent, not just Claude Code).** `websec mcp` speaks the Model Context Protocol over
|
|
544
|
-
stdio, exposing typed tools — `websec_recon`, `websec_findings`, `websec_sarif`, `websec_briefing
|
|
551
|
+
stdio, exposing typed tools — `websec_recon`, `websec_findings`, `websec_sarif`, `websec_briefing`,
|
|
552
|
+
and advisory `websec_check_updates` — so
|
|
545
553
|
Cursor / Cline / Windsurf / Zed can call recon directly instead of shelling out and parsing stdout.
|
|
546
554
|
Register it in your MCP client:
|
|
547
555
|
|
|
@@ -562,6 +570,14 @@ workers, and an absolute receive deadline constrain the HTTP boundary. `GET /hea
|
|
|
562
570
|
minimal liveness endpoint. Non-loopback binding is refused. Stdio uses the launching process's trust
|
|
563
571
|
and filesystem permissions.
|
|
564
572
|
|
|
573
|
+
**Update checks are optional, upgrades are separate.** At the start of a security review, the AI
|
|
574
|
+
asks whether you want to check for a newer WebSec release. `websec update-check` reads only dated
|
|
575
|
+
cached metadata; after approval, `websec update-check --online` checks PyPI without downloading or
|
|
576
|
+
installing packages. MCP uses `websec_check_updates` with `online: true` only after that approval.
|
|
577
|
+
A newer-release notice offers an upgrade for separate approval. Declining or an unavailable check
|
|
578
|
+
does not block the review or change its findings/gate result. The tiny per-user cache contains only
|
|
579
|
+
version/check-time metadata; `WEBSEC_UPDATE_HOME` optionally selects its absolute directory.
|
|
580
|
+
|
|
565
581
|
**Blast-radius from a knowledge graph (opt-in, zero-dep).** If your repo has a
|
|
566
582
|
[`graphify`](https://github.com/Graphify-Labs/graphify) graph at `graphify-out/graph.json` (or you
|
|
567
583
|
pass `--graph <file>`), websec tags each finding with how much of the app **transitively depends on**
|
|
@@ -752,6 +768,14 @@ The [remaining-work specification](specs/001-continuous-security-improvement/spe
|
|
|
752
768
|
unresolved gaps and acceptance tests so overlapping old-base PRs do not become competing roadmaps.
|
|
753
769
|
Existing runtime probes are opt-in; their earlier isolated results are not current deployment proofs.
|
|
754
770
|
|
|
771
|
+
0.21.0 adds bounded Connexion JSON/literal-YAML registration, FastAPI dependency and mounted tRPC
|
|
772
|
+
middleware observations, returned-template Django CSP, actual Flask model columns, and local assigned
|
|
773
|
+
SQL/command/upload provenance. These source observations are not whole-program or deployment proof.
|
|
774
|
+
It also hardens MCP overload handling, separates reviewed calibration labels and validates real
|
|
775
|
+
disposable hook/native container contracts. The [0.21.0 migration notes](docs/MIGRATING-0.21.0.md)
|
|
776
|
+
explain changed findings and unchanged consent/exit contracts. Offline competitor-report imports are
|
|
777
|
+
documented in [BENCHMARKS.md](BENCHMARKS.md); no head-to-head or agent-benefit measurement is claimed.
|
|
778
|
+
|
|
755
779
|
## Using it as a Claude Code skill / plugin
|
|
756
780
|
|
|
757
781
|
This repo **is** a Claude Code plugin. Install it once —
|
|
@@ -12,19 +12,21 @@ A senior pentester's "here's what to test and how" handoff — auto-generated fr
|
|
|
12
12
|
<!-- docguard:quality negation-load off — "no LLM / no server / no running app / not a SaaS / never touches prod" is this tool's core positioning; defining it by contrast with the scanners-and-SaaS it deliberately is NOT is intentional, not a phrasing defect. -->
|
|
13
13
|
|
|
14
14
|
> Local-first security recon that **briefs your AI coding agent**. It does the deterministic
|
|
15
|
-
> half — read
|
|
15
|
+
> half — read supported source, map the visible attack surface, and stage a probe library tailored to what it
|
|
16
16
|
> found — then hands your agent (Claude Code, Codex, Gemini, Cursor) a marching-orders briefing.
|
|
17
17
|
> `websec run` needs nothing but the code; add `--scan` to also run and de-duplicate whichever
|
|
18
|
-
> static scanners you have installed. **Code in, artifacts out. No LLM in the tool
|
|
19
|
-
> running app required.**
|
|
18
|
+
> static scanners you have installed. **Code in, artifacts out. No LLM in the tool; no server or
|
|
19
|
+
> running app required for the core pass.**
|
|
20
20
|
|
|
21
21
|
[](assets/demo.gif)
|
|
22
22
|
|
|
23
23
|
**New here?** Read the eight-page technical brief — what it reads, how a finding earns its severity,
|
|
24
24
|
what it refuses to say, and the field evidence:
|
|
25
25
|
**[raccioly.github.io/websec-validator](https://raccioly.github.io/websec-validator/websec-explained.html)**
|
|
26
|
-
· [PDF](https://raccioly.github.io/websec-validator/websec-explained.pdf).
|
|
27
|
-
|
|
26
|
+
· [PDF](https://raccioly.github.io/websec-validator/websec-explained.pdf). The reviewed v0.21.0 snapshot
|
|
27
|
+
has selected fact assertions in `tests/test_explained_brief.py` and an HTML/PDF/renderer hash binding
|
|
28
|
+
in `tests/test_brief_artifacts.py`. Prose accuracy and rendered layout still require review;
|
|
29
|
+
see [rebuilding the brief](CONTRIBUTING.md#publishing-the-technical-brief).
|
|
28
30
|
|
|
29
31
|
It is *not* an autonomous scanner and *not* a SaaS. It's the missing front-half: the thing that
|
|
30
32
|
turns a repo into a precise, fact-grounded security brief an AI agent (with a human in the loop)
|
|
@@ -94,8 +96,8 @@ Requires **Python 3.11+** (on stock macOS, `python3` is often 3.9 — use `pipx`
|
|
|
94
96
|
interpreter, or install via Homebrew/pyenv). Zero Python runtime dependencies: it shells out to
|
|
95
97
|
scanners (Trivy, OSV-Scanner, Gitleaks, Semgrep/OpenGrep, Checkov, Prowler) and Noir **when present**,
|
|
96
98
|
plus **per-language SAST auto-selected by stack** — Bandit (Python), gosec (Go), Brakeman (Rails) —
|
|
97
|
-
each fired only when its language is detected.
|
|
98
|
-
is
|
|
99
|
+
each fired only when its language is detected. Unselected missing tools are reported as limitations;
|
|
100
|
+
a missing explicitly requested scanner is an execution gap and cannot pass completeness gating.
|
|
99
101
|
|
|
100
102
|
### Or run via Docker (scanners bundled, zero install)
|
|
101
103
|
|
|
@@ -115,6 +117,11 @@ Noir is the route engine and runs on every `run`, but the four static scanners e
|
|
|
115
117
|
`--scan` — a plain `run` lists them and prints `(add --scan to execute them)`, exactly as it does
|
|
116
118
|
outside Docker. Mount your repo at `/scan`; artifacts land in `/scan/websec-out`.
|
|
117
119
|
|
|
120
|
+
For a scanner-free image, use `docker build --target core -t websec-core .`. Both image targets
|
|
121
|
+
run non-root and explicitly disable recurring health checks for the one-shot CLI. Native amd64 and
|
|
122
|
+
arm64 contract jobs execute source-only fixtures and bundled executable version checks. Base/archive
|
|
123
|
+
digest checks do not make apt/transitive builds fully reproducible or certify every scanner adapter.
|
|
124
|
+
|
|
118
125
|
## Usage
|
|
119
126
|
|
|
120
127
|
```bash
|
|
@@ -512,7 +519,8 @@ not immutable snapshots of every pushed Git object. A missing runtime or concurr
|
|
|
512
519
|
blocks pre-push; post-commit remains advisory.
|
|
513
520
|
|
|
514
521
|
**MCP server (any agent, not just Claude Code).** `websec mcp` speaks the Model Context Protocol over
|
|
515
|
-
stdio, exposing typed tools — `websec_recon`, `websec_findings`, `websec_sarif`, `websec_briefing
|
|
522
|
+
stdio, exposing typed tools — `websec_recon`, `websec_findings`, `websec_sarif`, `websec_briefing`,
|
|
523
|
+
and advisory `websec_check_updates` — so
|
|
516
524
|
Cursor / Cline / Windsurf / Zed can call recon directly instead of shelling out and parsing stdout.
|
|
517
525
|
Register it in your MCP client:
|
|
518
526
|
|
|
@@ -533,6 +541,14 @@ workers, and an absolute receive deadline constrain the HTTP boundary. `GET /hea
|
|
|
533
541
|
minimal liveness endpoint. Non-loopback binding is refused. Stdio uses the launching process's trust
|
|
534
542
|
and filesystem permissions.
|
|
535
543
|
|
|
544
|
+
**Update checks are optional, upgrades are separate.** At the start of a security review, the AI
|
|
545
|
+
asks whether you want to check for a newer WebSec release. `websec update-check` reads only dated
|
|
546
|
+
cached metadata; after approval, `websec update-check --online` checks PyPI without downloading or
|
|
547
|
+
installing packages. MCP uses `websec_check_updates` with `online: true` only after that approval.
|
|
548
|
+
A newer-release notice offers an upgrade for separate approval. Declining or an unavailable check
|
|
549
|
+
does not block the review or change its findings/gate result. The tiny per-user cache contains only
|
|
550
|
+
version/check-time metadata; `WEBSEC_UPDATE_HOME` optionally selects its absolute directory.
|
|
551
|
+
|
|
536
552
|
**Blast-radius from a knowledge graph (opt-in, zero-dep).** If your repo has a
|
|
537
553
|
[`graphify`](https://github.com/Graphify-Labs/graphify) graph at `graphify-out/graph.json` (or you
|
|
538
554
|
pass `--graph <file>`), websec tags each finding with how much of the app **transitively depends on**
|
|
@@ -723,6 +739,14 @@ The [remaining-work specification](specs/001-continuous-security-improvement/spe
|
|
|
723
739
|
unresolved gaps and acceptance tests so overlapping old-base PRs do not become competing roadmaps.
|
|
724
740
|
Existing runtime probes are opt-in; their earlier isolated results are not current deployment proofs.
|
|
725
741
|
|
|
742
|
+
0.21.0 adds bounded Connexion JSON/literal-YAML registration, FastAPI dependency and mounted tRPC
|
|
743
|
+
middleware observations, returned-template Django CSP, actual Flask model columns, and local assigned
|
|
744
|
+
SQL/command/upload provenance. These source observations are not whole-program or deployment proof.
|
|
745
|
+
It also hardens MCP overload handling, separates reviewed calibration labels and validates real
|
|
746
|
+
disposable hook/native container contracts. The [0.21.0 migration notes](docs/MIGRATING-0.21.0.md)
|
|
747
|
+
explain changed findings and unchanged consent/exit contracts. Offline competitor-report imports are
|
|
748
|
+
documented in [BENCHMARKS.md](BENCHMARKS.md); no head-to-head or agent-benefit measurement is claimed.
|
|
749
|
+
|
|
726
750
|
## Using it as a Claude Code skill / plugin
|
|
727
751
|
|
|
728
752
|
This repo **is** a Claude Code plugin. Install it once —
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "websec-validator"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.21.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"
|
|
@@ -8,6 +8,12 @@ probe into a precise one.
|
|
|
8
8
|
from __future__ import annotations
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
def _update_advisory(facts):
|
|
12
|
+
from . import updates
|
|
13
|
+
text = updates.advisory(updates.check(installed_version=facts.get("version", "")))
|
|
14
|
+
return "\n".join("> " + line for line in text.splitlines())
|
|
15
|
+
|
|
16
|
+
|
|
11
17
|
def _data(value):
|
|
12
18
|
"""Single-line quoted evidence; Markdown syntax stays inside a code span."""
|
|
13
19
|
from .fixprompt import _quoted
|
|
@@ -275,6 +281,9 @@ def render(facts: dict, scanners: dict, scan_results: list, probe_manifest: list
|
|
|
275
281
|
> **You are an AI coding agent.** The tool did the reliable half (mapping the surface + staging
|
|
276
282
|
> the probes). You + the human do the reasoning, the running, and the fixing.
|
|
277
283
|
|
|
284
|
+
> **Tool maintenance (advisory, separate from scan findings).**
|
|
285
|
+
{_update_advisory(facts)}
|
|
286
|
+
|
|
278
287
|
| Lane | Owns |
|
|
279
288
|
|---|---|
|
|
280
289
|
| 🔧 tool (done) | recon → {routes.get('count',0)} endpoints, scanner findings, staged probes |
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"caveat": "indicative \u2014 calibrated on a deliberately-vulnerable app corpus; skews optimistic on clean production code",
|
|
25
25
|
"evidence_status": "reviewed",
|
|
26
26
|
"reviewed_on": "2026-09-22",
|
|
27
|
-
"limitation": "21 of 56 corpus findings carry a reviewed label; the other 35 are UNKNOWN and
|
|
27
|
+
"limitation": "Dated 2026-09-22 detector snapshot: 21 of 56 corpus findings carry a reviewed label; the other 35 are UNKNOWN and excluded rather than treated as false. All per-class cells except missing-auth|MEDIUM (n=7) are below min_n=5, so every other class falls back to the per-label tier. These measurements were not rebuilt for subsequent detector changes and do not measure the current build."
|
|
28
28
|
},
|
|
29
29
|
"by_class_label": {
|
|
30
30
|
"command-injection|LOW": {
|
|
@@ -126,7 +126,7 @@ REVIEWED_STATUS = "reviewed"
|
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
def reviewed_classes(corpus: list) -> set:
|
|
129
|
-
"""Attack classes
|
|
129
|
+
"""Attack classes whose EVERY truth entry is reviewed — the only ones eligible for a
|
|
130
130
|
class-specific published cell.
|
|
131
131
|
|
|
132
132
|
A truth entry qualifies when `review_status` is "reviewed" AND `is_real` is an explicit
|
|
@@ -137,13 +137,15 @@ def reviewed_classes(corpus: list) -> set:
|
|
|
137
137
|
honest. Relabelling requires cloning the pinned revision and reviewing each finding by hand;
|
|
138
138
|
there is deliberately no code path that promotes an unreviewed entry.
|
|
139
139
|
"""
|
|
140
|
-
out = set()
|
|
140
|
+
out, unresolved = set(), set()
|
|
141
141
|
for entry in corpus or []:
|
|
142
142
|
for truth in entry.get("truth") or []:
|
|
143
143
|
if truth.get("review_status") == REVIEWED_STATUS and isinstance(truth.get("is_real"), bool):
|
|
144
144
|
if truth.get("class"):
|
|
145
145
|
out.add(truth["class"])
|
|
146
|
-
|
|
146
|
+
elif truth.get("class"):
|
|
147
|
+
unresolved.add(truth["class"])
|
|
148
|
+
return out - unresolved
|
|
147
149
|
|
|
148
150
|
|
|
149
151
|
def fit(labeled: list, corpus_names: list, researched_classes: set | None = None) -> dict:
|
|
@@ -170,7 +172,7 @@ def fit(labeled: list, corpus_names: list, researched_classes: set | None = None
|
|
|
170
172
|
if researched_classes is not None:
|
|
171
173
|
rc = set(researched_classes)
|
|
172
174
|
cells = {k: c for k, c in cells.items() if k.split("|", 1)[0] in rc}
|
|
173
|
-
|
|
175
|
+
table = {
|
|
174
176
|
"meta": {"corpus": corpus_names, "n_total": len(labeled) - unknown, "n_unknown": unknown,
|
|
175
177
|
"method": "binomial proportion + Wilson 95% CI", "min_n": MIN_N,
|
|
176
178
|
"unmatched_rule": "unmatched finding = unknown (excluded from calibration)",
|
|
@@ -180,6 +182,8 @@ def fit(labeled: list, corpus_names: list, researched_classes: set | None = None
|
|
|
180
182
|
"by_label": {k: _cell(v[0], v[1]) for k, v in sorted(by_l.items())},
|
|
181
183
|
"prior": PRIOR,
|
|
182
184
|
}
|
|
185
|
+
table['meta']['score'] = brier(labeled, table)
|
|
186
|
+
return table
|
|
183
187
|
|
|
184
188
|
|
|
185
189
|
def load_shipped() -> dict | None:
|
|
@@ -218,6 +222,10 @@ def _merge(shipped: dict | None, local: dict | None) -> dict | None:
|
|
|
218
222
|
base.setdefault("meta", {})
|
|
219
223
|
if local:
|
|
220
224
|
local = _upgrade_local(local)
|
|
225
|
+
shipped_score = base['meta'].pop('score', None)
|
|
226
|
+
base['meta']['source_scores'] = {
|
|
227
|
+
'shipped_snapshot': shipped_score, 'local_evidence': local.get('meta', {}).get('score'),
|
|
228
|
+
'note': 'Separate source-table scores; no score of merged predictions is available.'}
|
|
221
229
|
for grp in ("by_class_label", "by_label"):
|
|
222
230
|
merged = dict(base.get(grp, {}))
|
|
223
231
|
for key, lc in (local.get(grp, {}) or {}).items():
|
|
@@ -288,6 +296,8 @@ def record_samples(labeled: list, runs: int = 1) -> dict | None:
|
|
|
288
296
|
added += 1
|
|
289
297
|
local["meta"]["samples"] = local["meta"].get("samples", 0) + added
|
|
290
298
|
local["meta"]["runs"] = local["meta"].get("runs", 0) + (runs if added else 0)
|
|
299
|
+
# Score the local evidence table separately, not the shipped corpus or authored pairs.
|
|
300
|
+
local['meta']['score'] = brier(list(local.get('observations', {}).values()), _merge(None, local))
|
|
291
301
|
_write_local(local)
|
|
292
302
|
return local
|
|
293
303
|
except Exception:
|
|
@@ -411,8 +421,13 @@ def review_candidate(candidate_id: str, *, accept: bool, reason: str = "",
|
|
|
411
421
|
"detector_revision": row.get("detector_revision", ""),
|
|
412
422
|
"analyzed_input_digest": row.get("analyzed_input_digest", ""),
|
|
413
423
|
"fingerprint": row.get("fingerprint", "")}}
|
|
414
|
-
record_samples([sample])
|
|
415
|
-
|
|
424
|
+
stored = record_samples([sample])
|
|
425
|
+
if stored is None:
|
|
426
|
+
pending[candidate_id] = row
|
|
427
|
+
_write_local(local)
|
|
428
|
+
return {'ok': False, 'error': 'reviewed sample could not be persisted; candidate remains pending', 'candidate': row}
|
|
429
|
+
return {"ok": True, "error": "", "candidate": dict(row, state="accepted"),
|
|
430
|
+
'score': stored.get('meta', {}).get('score')}
|
|
416
431
|
|
|
417
432
|
|
|
418
433
|
def _write_local(local: dict) -> None:
|
|
@@ -458,13 +473,17 @@ def fit_synthetic(pairs: list) -> dict:
|
|
|
458
473
|
cell = group.setdefault(key, [0, 0])
|
|
459
474
|
cell[1] += 1
|
|
460
475
|
cell[0] += int(row["is_real"])
|
|
461
|
-
|
|
476
|
+
known = sum(isinstance(row.get('is_real'), bool) for row in pairs or [])
|
|
477
|
+
table = {"meta": {"basis": "synthetic-paired", "n_total": known,
|
|
478
|
+
"n_unknown": len(pairs or []) - known,
|
|
462
479
|
"method": "binomial proportion + Wilson 95% CI", "min_n": MIN_N,
|
|
463
480
|
"caveat": SYNTHETIC_CAVEAT,
|
|
464
481
|
"never_merged": "apply() does not read this table; it is reported beside the "
|
|
465
482
|
"measured one, never summed into it"},
|
|
466
483
|
"by_class_label": {k: _cell(v[0], v[1]) for k, v in sorted(by_cl.items())},
|
|
467
484
|
"by_label": {k: _cell(v[0], v[1]) for k, v in sorted(by_l.items())}}
|
|
485
|
+
table['meta']['score'] = brier(pairs, table)
|
|
486
|
+
return table
|
|
468
487
|
|
|
469
488
|
|
|
470
489
|
def write_synthetic(table: dict) -> Path:
|
|
@@ -182,6 +182,13 @@ def _publish_run(run: Path) -> None:
|
|
|
182
182
|
temporary.unlink(missing_ok=True)
|
|
183
183
|
|
|
184
184
|
|
|
185
|
+
def cmd_update_check(args) -> int:
|
|
186
|
+
from . import updates
|
|
187
|
+
result = updates.check(online=args.online)
|
|
188
|
+
print(json.dumps(result, indent=2) if args.format == "json" else updates.advisory(result))
|
|
189
|
+
return 0 # Release advice never acts as a security or execution gate.
|
|
190
|
+
|
|
191
|
+
|
|
185
192
|
def cmd_doctor(args) -> int:
|
|
186
193
|
target = _resolve_target(args.target) if args.target else None
|
|
187
194
|
langs = recon.detect_stack(target)["languages"] if target else None
|
|
@@ -194,6 +201,8 @@ def cmd_doctor(args) -> int:
|
|
|
194
201
|
print()
|
|
195
202
|
for line in _prov.lines():
|
|
196
203
|
print(line)
|
|
204
|
+
from . import updates
|
|
205
|
+
print("\n" + updates.advisory())
|
|
197
206
|
print("\n available:")
|
|
198
207
|
for s in det["available"]:
|
|
199
208
|
# Presence is not compatibility. `doctor` printed a green ✓ for an osv-scanner whose CLI
|
|
@@ -1380,13 +1389,16 @@ def cmd_calibrate(args) -> int:
|
|
|
1380
1389
|
return 2
|
|
1381
1390
|
row = result["candidate"]
|
|
1382
1391
|
if getattr(args, "format", None) == "json":
|
|
1383
|
-
_emit_json_result({"candidate": row})
|
|
1392
|
+
_emit_json_result({"candidate": row, 'score': result.get('score')})
|
|
1384
1393
|
return 0
|
|
1385
1394
|
if row["state"] == "accepted":
|
|
1386
1395
|
print(f"accepted {row['candidate_id']}: recorded one is_real=False sample for "
|
|
1387
1396
|
f"{row['attack_class']}|{row['confidence']} in {calibration.LOCAL_PATH}.")
|
|
1388
1397
|
est = calibration.apply(row["attack_class"], row["confidence"], calibration.load())
|
|
1389
1398
|
print(f" bucket now p={est['p']} ci={est['ci']} n={est['n']} basis={est['basis']}")
|
|
1399
|
+
score = result.get('score')
|
|
1400
|
+
if score:
|
|
1401
|
+
print(f" Local-evidence Brier {score['brier']} on {score['n']} label(s); reported, not optimized.")
|
|
1390
1402
|
else:
|
|
1391
1403
|
print(f"rejected {row['candidate_id']}: discarded, no probability changed.")
|
|
1392
1404
|
return 0
|
|
@@ -1415,6 +1427,9 @@ def cmd_calibrate(args) -> int:
|
|
|
1415
1427
|
print(f" {key + ' (aggregate)':28} {cell['k']}/{cell['n']} · p={cell['p']} · 95% CI {cell['ci']}")
|
|
1416
1428
|
for err in res["errors"]:
|
|
1417
1429
|
print(f" ! {err.get('pair')}: {err.get('error')}")
|
|
1430
|
+
score = table['meta'].get('score')
|
|
1431
|
+
if score:
|
|
1432
|
+
print(f" Authored-pair Brier {score['brier']} on {score['n']} label(s); reported, not optimized.")
|
|
1418
1433
|
print(f"\n {calibration.SYNTHETIC_CAVEAT}")
|
|
1419
1434
|
print(" This table is NOT merged into P(real); `websec explain <class>` reports it separately.")
|
|
1420
1435
|
return 0
|
|
@@ -1473,6 +1488,9 @@ def cmd_calibrate(args) -> int:
|
|
|
1473
1488
|
f"silence proves nothing); {res['skipped_blind']} blind-spot finding(s) unscored. "
|
|
1474
1489
|
f"Folded {len(res['labels'])} sample(s) into {calibration.LOCAL_PATH} → "
|
|
1475
1490
|
f"{rec['meta']['samples']} total; P(real) now personalizes to your app.")
|
|
1491
|
+
score = rec['meta'].get('score')
|
|
1492
|
+
if score:
|
|
1493
|
+
print(f" Local-evidence Brier {score['brier']} on {score['n']} label(s); reported, not optimized.")
|
|
1476
1494
|
return 0
|
|
1477
1495
|
|
|
1478
1496
|
# --ingest: fold a hand-labeled findings file into your LOCAL overlay (the manual real-repo path)
|
|
@@ -1496,6 +1514,9 @@ def cmd_calibrate(args) -> int:
|
|
|
1496
1514
|
nr = sum(1 for s in verified if s["is_real"] is True)
|
|
1497
1515
|
print(f"websec calibrate --ingest: processed {len(verified)} evidence-backed sample(s) "
|
|
1498
1516
|
f"({nr} real / {len(verified) - nr} FP) into {calibration.LOCAL_PATH} → {rec['meta']['samples']} total.")
|
|
1517
|
+
score = rec['meta'].get('score')
|
|
1518
|
+
if score:
|
|
1519
|
+
print(f" Local-evidence Brier {score['brier']} on {score['n']} label(s); reported, not optimized.")
|
|
1499
1520
|
return 0
|
|
1500
1521
|
|
|
1501
1522
|
corpus_path = (Path(args.corpus).expanduser().resolve() if args.corpus
|
|
@@ -1538,7 +1559,7 @@ def cmd_calibrate(args) -> int:
|
|
|
1538
1559
|
print("\n no labeled findings produced — is the corpus cloned? (needs network on first run)")
|
|
1539
1560
|
return 1
|
|
1540
1561
|
|
|
1541
|
-
# A class is RESEARCHED only when
|
|
1562
|
+
# A class is RESEARCHED only when EVERY truth entry has an explicit reviewed label. Appearing in
|
|
1542
1563
|
# corpus.json is not research: the historical entries are class-level wildcards
|
|
1543
1564
|
# (location_contains "*") with is_real null, which cannot separate a real vulnerability from a
|
|
1544
1565
|
# false positive within the same class. Publishing a class-specific cell on that basis would
|
|
@@ -1608,7 +1629,13 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
1608
1629
|
# metavar lists only the user-facing commands; recon/proof/calibrate still work but are
|
|
1609
1630
|
# omitted (they get no `help=`, so argparse leaves them out of the listing entirely).
|
|
1610
1631
|
sub = p.add_subparsers(dest="cmd", required=True,
|
|
1611
|
-
metavar="{run,init,doctor,dynamic,mcp,capabilities,demo,explain,feedback,intel,research,repair-verify,install,hooks}")
|
|
1632
|
+
metavar="{run,init,doctor,update-check,dynamic,mcp,capabilities,demo,explain,feedback,intel,research,repair-verify,install,hooks}")
|
|
1633
|
+
|
|
1634
|
+
uc = sub.add_parser("update-check", help="advisory release metadata; offline unless --online")
|
|
1635
|
+
uc.add_argument("--online", action="store_true",
|
|
1636
|
+
help="explicitly check PyPI metadata (no installation); ask the human first")
|
|
1637
|
+
uc.add_argument("--format", choices=["text", "json"], default="text")
|
|
1638
|
+
uc.set_defaults(func=cmd_update_check)
|
|
1612
1639
|
|
|
1613
1640
|
r = sub.add_parser("run", help="full pipeline → briefing + tailored probes")
|
|
1614
1641
|
r.add_argument("target")
|
|
@@ -1897,7 +1924,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
1897
1924
|
return p
|
|
1898
1925
|
|
|
1899
1926
|
|
|
1900
|
-
_COMMANDS = {"run", "recon", "init", "doctor", "emit-context", "proof", "dynamic", "calibrate", "mcp", "install", "hooks", "repair-verify", "capabilities", "intel", "research", "feedback", "gate", "attest", "explain", "demo"}
|
|
1927
|
+
_COMMANDS = {"run", "recon", "init", "doctor", "emit-context", "proof", "dynamic", "calibrate", "mcp", "install", "hooks", "repair-verify", "capabilities", "intel", "research", "feedback", "gate", "attest", "explain", "demo", "update-check"}
|
|
1901
1928
|
|
|
1902
1929
|
|
|
1903
1930
|
def main(argv=None) -> int:
|
|
@@ -162,7 +162,12 @@ def thin_languages(cov: dict) -> set:
|
|
|
162
162
|
|
|
163
163
|
def add_routes(facts: dict) -> None:
|
|
164
164
|
"""Preserve route-parser scope uncertainty separately from execution loss."""
|
|
165
|
-
|
|
165
|
+
for engine in ('django', 'connexion', 'trpc'):
|
|
166
|
+
_add_route_analysis(facts, engine)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def _add_route_analysis(facts: dict, engine: str) -> None:
|
|
170
|
+
analysis = (facts.get("routes") or {}).get(engine) or {}
|
|
166
171
|
if not analysis:
|
|
167
172
|
return
|
|
168
173
|
if (not isinstance(analysis, dict)
|
|
@@ -171,17 +176,17 @@ def add_routes(facts: dict) -> None:
|
|
|
171
176
|
for key in ("routes", "candidates", "gaps", "errors"))):
|
|
172
177
|
add_gap(facts, "route_error", "Route discovery returned malformed diagnostics")
|
|
173
178
|
return
|
|
174
|
-
facts["coverage"]
|
|
179
|
+
facts["coverage"].setdefault("route_discovery", {})[engine] = {
|
|
175
180
|
"routes": len(analysis.get("routes", [])), "candidates": len(analysis.get("candidates", [])),
|
|
176
181
|
"gaps": analysis.get("gaps", []), "errors": analysis.get("errors", []),
|
|
177
|
-
"limits": analysis.get("limits", {}), "diagnostics_truncated": analysis.get("diagnostics_truncated", 0)}
|
|
182
|
+
"limits": analysis.get("limits", {}), "diagnostics_truncated": analysis.get("diagnostics_truncated", 0)}
|
|
178
183
|
for row in analysis.get("gaps", []):
|
|
179
184
|
add_gap(facts, "route_scope", f"{row.get('file', '?')}: {row.get('kind', '?')}: {row.get('detail', '')}",
|
|
180
185
|
execution=False)
|
|
181
186
|
for row in analysis.get("errors", []):
|
|
182
187
|
add_gap(facts, "route_error", f"{row.get('file', '?')}: {row.get('kind', '?')}: {row.get('detail', '')}")
|
|
183
188
|
if analysis.get("diagnostics_truncated"):
|
|
184
|
-
add_gap(facts, "route_diagnostics_truncated", "
|
|
189
|
+
add_gap(facts, "route_diagnostics_truncated", f"{engine} diagnostics exceeded the reporting budget")
|
|
185
190
|
|
|
186
191
|
|
|
187
192
|
def add_scanners(facts: dict, detected: dict, results: list, unified: dict | None, *,
|