sourcecode 4.16.0__tar.gz → 4.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.
- {sourcecode-4.16.0 → sourcecode-4.17.0}/CHANGELOG.md +69 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/PKG-INFO +3 -3
- {sourcecode-4.16.0 → sourcecode-4.17.0}/README.md +2 -2
- {sourcecode-4.16.0 → sourcecode-4.17.0}/pyproject.toml +1 -1
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/__init__.py +1 -1
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/audit_report.py +48 -6
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/cli.py +155 -22
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/data_exposure.py +5 -1
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/data_labels.py +10 -3
- sourcecode-4.17.0/src/sourcecode/declarations.py +81 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/orchestrator.py +3 -1
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/non_coverage.py +86 -0
- sourcecode-4.17.0/src/sourcecode/partial_contract.py +81 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/phased_run.py +14 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/posture.py +11 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/ris.py +4 -1
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/risk.py +135 -28
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/rule_pass.py +11 -1
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/security_config.py +6 -5
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/security_posture.py +43 -3
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/spring_findings.py +22 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/spring_model.py +22 -1
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/spring_security_audit.py +118 -10
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/spring_tx_analyzer.py +5 -1
- {sourcecode-4.16.0 → sourcecode-4.17.0}/.github/workflows/build-windows.yml +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/.github/workflows/perf-gate.yml +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/.gitignore +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/.ruff.toml +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/CLAUDE.md +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/CONTRIBUTING.md +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/LICENSE +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/SECURITY.md +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/raw +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/scripts/compare_integration_engines.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/scripts/customer_smoke_test.sh +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/scripts/generate_jdk_exports.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/scripts/perf_gate.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/scripts/perf_harness.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/adaptive_scanner.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/archetype.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/architectural_baseline.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/architectural_delta.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/architecture_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/architecture_summary.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/ast_extractor.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/baseline_autocapture.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/cache.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/cache_model.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/call_surface.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/caller_metrics.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/caller_reach.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/canonical_ir.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/chain_rules.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/change_plan.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/cir_graphs.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/classifier.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/client_calls.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/code_notes_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/compare.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/confidence_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/constraint_diff.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/container_wiring.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/context_cache.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/context_graph.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/context_scorer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/context_summarizer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/contract_diff.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/contract_init.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/contract_model.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/contract_pipeline.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/coverage_parser.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/defect_identity.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/degradation.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/dependency_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/deployment_prefix.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detach.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/__init__.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/base.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/csproj_parser.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/dart.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/dotnet.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/elixir.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/go.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/heuristic.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/hybrid.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/java.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/jvm_ext.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/nodejs.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/parsers.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/php.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/project.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/python.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/ruby.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/rust.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/systems.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/terraform.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/detectors/tooling.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/doc_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/dynamic_argument_surface.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/endpoint_literals.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/endpoint_metrics.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/entrypoint_classifier.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/env_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/envelope.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/environment_resolution.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/error_schema.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/evidence_provider.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/execution_plan.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/explain.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/facts/__init__.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/facts/registry.json +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/file_chunker.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/file_classifier.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/filter_surface.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/format_contract.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/fqn_utils.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/git_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/git_checkout.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/graph_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/graph_evidence.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/hibernate_strat.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/identity_fallback.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/integration_coordinates.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/jdk_exports.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/license.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/__init__.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/dependency_import.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/onboarding/__init__.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/onboarding/applier.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/onboarding/backup.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/onboarding/detector.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/onboarding/planner.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/registry.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/runner.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp/server.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/mcp_nudge.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/metrics_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/migrate_check.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/migration_blast.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/openapi_surface.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/openrewrite_recipe.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/output_budget.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/output_encoding.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/parallel.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/parse_cache.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/path_admission.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/path_filters.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/perf.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/pipe_contract.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/pr_comment_renderer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/pr_impact.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/prepare_context.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/progress.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/provenance.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/ranking_engine.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/readiness_timeline.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/readonly.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/reconciliation.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/redactor.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/reference_facts.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/release_info.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/relevance_scorer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/remedies.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/rename_refactor.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/repo_classifier.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/repository_ir.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/__init__.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/context.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/errors.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/executor.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/planner.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/query.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/request.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/resolution.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/result.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/retriever.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/runtime.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/steps.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/steps_endpoint.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/steps_graph.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/steps_impact.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/steps_intf.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/steps_struct.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/retrieval/steps_txsec.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/rule_catalog.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/runs.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/runtime_classifier.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/sarif.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/scanner.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/schema.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/schemas/envelope-v1.schema.json +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/security_config_scan.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/semantic_analyzer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/semantic_impact_engine.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/semantic_integration_engine.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/semantic_services.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/serializer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/servlet_surface.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/source_text.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/spring_event_topology.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/spring_impact.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/spring_profiles.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/spring_properties.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/spring_semantic.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/summarizer.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/target_admission.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/telemetry/__init__.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/telemetry/config.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/telemetry/consent.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/telemetry/events.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/telemetry/filters.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/telemetry/transport.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/test_gap_ranking.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/test_sources.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/text_input.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/token_estimate.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/tree_utils.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/type_usage_surface.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/validation_inference.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/validation_surface.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/verify_edit.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/verify_repo.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/verify_rules.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/version_check.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/src/sourcecode/workspace.py +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/supabase/functions/README.md +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/supabase/functions/get-license/index.ts +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/supabase/functions/lemonsqueezy-webhook/index.ts +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/supabase/functions/telemetry/index.ts +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/supabase/sql/license_event_ordering.sql +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/supabase/sql/licensing_schema.sql +0 -0
- {sourcecode-4.16.0 → sourcecode-4.17.0}/supabase/sql/telemetry_events.sql +0 -0
|
@@ -2,6 +2,75 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [4.17.0] — 2026-08-10
|
|
6
|
+
|
|
7
|
+
**The Part 1 queues of field evaluations #20 and #21, and the first three
|
|
8
|
+
capabilities behind them.** Eval #20 is the first audit of a repository this
|
|
9
|
+
product does not model — Keycloak, 8 204 Java files, Quarkus + JAX-RS,
|
|
10
|
+
`spring_detected: false` in all six audited modules, 47 invocations under
|
|
11
|
+
`ASK_READONLY=1` — and it split the product cleanly in two: every structural axis
|
|
12
|
+
worked alone, and the axes that guess produced 86 `high` findings with zero true
|
|
13
|
+
positives. Eval #21 is the seventh measurement of `saint-server`, and its
|
|
14
|
+
contribution is a partition rather than a defect.
|
|
15
|
+
|
|
16
|
+
**Fixed in this release:**
|
|
17
|
+
|
|
18
|
+
- **`audit-report` had no deadline at all (C3-89).** It composes the whole of
|
|
19
|
+
`risk` and did so with no `PhasedRun`, no `stop_when` and no checkpoint: the
|
|
20
|
+
field measured 2 265 s under `ASK_MAX_ANALYSIS_SECONDS=300`, killed by hand
|
|
21
|
+
with nothing to show. Bound to the same authority `risk` is bound to, and a cut
|
|
22
|
+
bundle declares it **before the signature covers it** — including when the cut
|
|
23
|
+
arrived through `--from-risk`.
|
|
24
|
+
- **`risk` was still not bounded, and now the walks ask (C3-88).** C3-85's naming
|
|
25
|
+
answered which one held the time on the first run: `reading HTTP-input query
|
|
26
|
+
sinks`, still on screen at 1,4 min under a 5 s budget. Every walk of the
|
|
27
|
+
composition now asks the deadline, a skipped walk degrades its axis to
|
|
28
|
+
`unknown` rather than shrinking a count, and the walk itself runs only when it
|
|
29
|
+
can change an answer. Measured: jobrunr 15,7 → **4,1 s** with an identical
|
|
30
|
+
payload; `keycloak/services` over ten minutes → **10,2 s under a 5 s budget**,
|
|
31
|
+
PARTIAL published.
|
|
32
|
+
- **A gate is one the repository declares (C3-90).** `@NoCache` and
|
|
33
|
+
`@APIResponses` were being read as Keycloak's authorization gates by coverage
|
|
34
|
+
and specificity alone. `spring-audit keycloak/services`: **86 findings, all
|
|
35
|
+
`high`, all false → 0**, with the hedged posture verdict untouched.
|
|
36
|
+
- **And a route is protected by one too (C3-93).** The same wide list decided the
|
|
37
|
+
per-endpoint verdict, which is the reassurance side and the worse one: **366 of
|
|
38
|
+
593 endpoints `protected_custom`** on a caching hint. Now **0**.
|
|
39
|
+
- **A bypass claim needs something to bypass (C3-91).** Self-invocation and
|
|
40
|
+
private/final non-interception are properties of a proxy; where nothing
|
|
41
|
+
proxies, the two rules are silent, and where something does, the finding names
|
|
42
|
+
the enforcement model it assumed instead of asserting a framework.
|
|
43
|
+
- **A family says which of its walks the count belongs to (C3-92).** The name was
|
|
44
|
+
computed, used for `_partial`, and dropped on the way to the screen.
|
|
45
|
+
- **The answer says whether its axes model this repository (CL-19).** Six axes
|
|
46
|
+
returned the shape of an answer and none added them up; `stack_fit` does, from
|
|
47
|
+
the flag the payload already carries.
|
|
48
|
+
- **`ask schema <unknown>` lists everything the argument accepts (C4-22).**
|
|
49
|
+
|
|
50
|
+
**New in this release:**
|
|
51
|
+
|
|
52
|
+
- **`--config <path>` / `ASK_CONFIG` (F-AX).** The repository's declaration may
|
|
53
|
+
live outside the repository, so an auditor under `--no-write` can declare data
|
|
54
|
+
labels and custom security annotations without touching somebody else's tree —
|
|
55
|
+
the case eval #20 executed, and the one where four commands were unreachable by
|
|
56
|
+
construction.
|
|
57
|
+
- **The fit statement reaches `posture` and `risk` (F-AY)**, over one
|
|
58
|
+
`spring_detected` authority that replaced two independent computations.
|
|
59
|
+
- **A truncated answer breaks the consumer that did not ask (F-AV).** On a cut
|
|
60
|
+
run `total_defects` becomes `total_defects_floor`, and `--ci` exits **75** —
|
|
61
|
+
neither the pass, nor "found something", nor "refused". Asked for in three
|
|
62
|
+
consecutive rounds and deliberately kept out of three correction queues,
|
|
63
|
+
because it changes a published contract.
|
|
64
|
+
|
|
65
|
+
**Measured and not fixed:** eval #21 reports ten performance regressions on
|
|
66
|
+
4.16.0. The 4.15.0 → 4.16.0 diff is 282 lines and contains **no analysis change**
|
|
67
|
+
— emission, budget binding and payload keys — and an A/B on BroadleafCommerce is
|
|
68
|
+
flat on the four worst-reported commands (`validation` 8,52 → 8,28 s, `endpoints`
|
|
69
|
+
2,09 → 2,24 s, `migrate-check` 7,79 → 7,51 s, `posture --diff` 4,00 → 4,08 s).
|
|
70
|
+
Third consecutive in-house A/B to come back flat; the row (C3-76e) stays open on
|
|
71
|
+
the Windows runner, which is now the highest-value item on the capability list.
|
|
72
|
+
|
|
73
|
+
|
|
5
74
|
## [4.16.0] — 2026-08-10
|
|
6
75
|
|
|
7
76
|
**The Part 1 queue of field evaluation #19 — three rows, one commit each — and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcecode
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.17.0
|
|
4
4
|
Summary: Persistent structural context and ultra-fast repeated analysis for AI coding agents
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Keywords: agents,ai,codebase,context,developer-tools,llm
|
|
@@ -42,7 +42,7 @@ Description-Content-Type: text/markdown
|
|
|
42
42
|
|
|
43
43
|
**Context · Impact · Migration · Architecture · Review — everything from one structural model.**
|
|
44
44
|
|
|
45
|
-

|
|
46
46
|

|
|
47
47
|
|
|
48
48
|
> **ASK Engine** is the product. The CLI command is **`ask`**. The legacy **`sourcecode`**
|
|
@@ -126,7 +126,7 @@ brew tap haroundominique/sourcecode && brew install sourcecode
|
|
|
126
126
|
# pip / pipx
|
|
127
127
|
pipx install sourcecode # or: pip install sourcecode
|
|
128
128
|
|
|
129
|
-
ask version # ask 4.
|
|
129
|
+
ask version # ask 4.17.0 — and, on a build that has aged,
|
|
130
130
|
# how many releases have probably shipped since
|
|
131
131
|
```
|
|
132
132
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Context · Impact · Migration · Architecture · Review — everything from one structural model.**
|
|
6
6
|
|
|
7
|
-

|
|
8
8
|

|
|
9
9
|
|
|
10
10
|
> **ASK Engine** is the product. The CLI command is **`ask`**. The legacy **`sourcecode`**
|
|
@@ -88,7 +88,7 @@ brew tap haroundominique/sourcecode && brew install sourcecode
|
|
|
88
88
|
# pip / pipx
|
|
89
89
|
pipx install sourcecode # or: pip install sourcecode
|
|
90
90
|
|
|
91
|
-
ask version # ask 4.
|
|
91
|
+
ask version # ask 4.17.0 — and, on a build that has aged,
|
|
92
92
|
# how many releases have probably shipped since
|
|
93
93
|
```
|
|
94
94
|
|
|
@@ -12,9 +12,10 @@ import hmac
|
|
|
12
12
|
import json
|
|
13
13
|
from datetime import datetime, timezone
|
|
14
14
|
from pathlib import Path
|
|
15
|
-
from typing import Any, Optional
|
|
15
|
+
from typing import Any, Callable, Optional
|
|
16
16
|
|
|
17
17
|
from sourcecode import __version__
|
|
18
|
+
from sourcecode.partial_contract import floor_counts, read_count
|
|
18
19
|
|
|
19
20
|
AUDIT_REPORT_SCHEMA = "audit-report-v1"
|
|
20
21
|
|
|
@@ -40,14 +41,30 @@ def build_audit_report(
|
|
|
40
41
|
sign_key: Optional[bytes] = None,
|
|
41
42
|
risk_limit: int = 10,
|
|
42
43
|
risk_payload: Optional[dict[str, Any]] = None,
|
|
44
|
+
progress: "Optional[Callable[..., Any]]" = None,
|
|
45
|
+
checkpoint: "Optional[Callable[[str, dict], None]]" = None,
|
|
46
|
+
partial_status: "Optional[Callable[..., dict]]" = None,
|
|
43
47
|
) -> dict[str, Any]:
|
|
44
|
-
"""Build the buyer-readable audit bundle from existing command payloads.
|
|
48
|
+
"""Build the buyer-readable audit bundle from existing command payloads.
|
|
49
|
+
|
|
50
|
+
C3-89. This command composes the whole of `risk`, and for four releases it did
|
|
51
|
+
so with none of the three arguments above — no observer carrying the deadline,
|
|
52
|
+
no checkpoint, no `partial_status` — while `cli` built no `PhasedRun` for it
|
|
53
|
+
either. The operator's budget therefore did not exist here at all: the field
|
|
54
|
+
measured **2 265 s under `ASK_MAX_ANALYSIS_SECONDS=300`** (7,55×), CPU-bound in
|
|
55
|
+
one worker, with no `partial` and no answer. C3-87 bound the second consumer of
|
|
56
|
+
that fact and moved the composition of the `_partial` keys into
|
|
57
|
+
`PhasedRun.status` so the third would get it by construction; this is the third.
|
|
58
|
+
"""
|
|
45
59
|
from sourcecode.posture import build_posture
|
|
46
60
|
|
|
47
61
|
root = Path(root).resolve()
|
|
48
62
|
if risk_payload is None:
|
|
49
63
|
from sourcecode.risk import build_risk
|
|
50
|
-
risk = build_risk(
|
|
64
|
+
risk = build_risk(
|
|
65
|
+
root, limit=risk_limit, min_band="low", profiles=profiles,
|
|
66
|
+
progress=progress, checkpoint=checkpoint, partial_status=partial_status,
|
|
67
|
+
)
|
|
51
68
|
risk_source = "computed"
|
|
52
69
|
else:
|
|
53
70
|
risk = risk_payload
|
|
@@ -65,8 +82,10 @@ def build_audit_report(
|
|
|
65
82
|
"summary": {
|
|
66
83
|
"risk_model": risk.get("model"),
|
|
67
84
|
"risk_source": risk_source,
|
|
68
|
-
|
|
69
|
-
|
|
85
|
+
# F-AV: read under either spelling, and republished under the one
|
|
86
|
+
# the bundle's own `summary.partial` already qualifies.
|
|
87
|
+
"total_defects": read_count(risk, "total_defects"),
|
|
88
|
+
"total_findings": read_count(risk, "total_findings"),
|
|
70
89
|
"risk_bands": risk.get("by_band", {}),
|
|
71
90
|
"top_risks_shown": len(top_risks),
|
|
72
91
|
"endpoint_access": access.get("summary", {}),
|
|
@@ -85,6 +104,28 @@ def build_audit_report(
|
|
|
85
104
|
"non_coverage": (risk.get("non_coverage") or {}).get("items", []),
|
|
86
105
|
},
|
|
87
106
|
}
|
|
107
|
+
# C3-89. A bundle whose evidence was cut says so **before** it is signed, and
|
|
108
|
+
# says it where a reader of the summary sees it — a signature over a truncated
|
|
109
|
+
# payload that does not declare the truncation is the worst artifact this
|
|
110
|
+
# product can produce. The keys come from `risk` itself, whichever way it
|
|
111
|
+
# arrived: a `--from-risk` file that was cut carries its own `_partial`, and
|
|
112
|
+
# packaging it silently would launder a floor into a verdict (C2-31's rule).
|
|
113
|
+
if risk.get("partial"):
|
|
114
|
+
unsigned["summary"]["partial"] = True
|
|
115
|
+
floor_counts(unsigned["summary"], True) # F-AV, on the bundle too
|
|
116
|
+
unsigned["summary"]["counts_are_floor"] = True
|
|
117
|
+
unsigned["summary"]["counts_basis"] = (
|
|
118
|
+
"The risk evidence in this bundle was stopped by the analysis budget. "
|
|
119
|
+
"`total_defects` and `risk_bands` count what the families that ran "
|
|
120
|
+
"measured, and are a floor over the repository."
|
|
121
|
+
)
|
|
122
|
+
_risk_partial = risk.get("_partial")
|
|
123
|
+
if isinstance(_risk_partial, dict):
|
|
124
|
+
unsigned["_partial"] = dict(_risk_partial)
|
|
125
|
+
unsigned["_partial"]["command"] = "audit-report"
|
|
126
|
+
unsigned["_partial"]["cut_in"] = "risk"
|
|
127
|
+
if risk_source == "from-risk":
|
|
128
|
+
unsigned["_partial"]["cut_in"] = "the `--from-risk` payload"
|
|
88
129
|
from sourcecode.provenance import build_evidence_manifest
|
|
89
130
|
unsigned["evidence_manifest"] = build_evidence_manifest(
|
|
90
131
|
unsigned,
|
|
@@ -117,7 +158,8 @@ def render_markdown(report: dict[str, Any]) -> str:
|
|
|
117
158
|
f"- Repository: `{repo}`",
|
|
118
159
|
f"- ASK version: `{(report.get('tool') or {}).get('version', '')}`",
|
|
119
160
|
f"- Profile set: `{profile}`",
|
|
120
|
-
f"- Total defects: `{summary
|
|
161
|
+
f"- Total defects: `{read_count(summary, 'total_defects')}`"
|
|
162
|
+
+ (" **(floor — this run was cut short)**" if summary.get("partial") else ""),
|
|
121
163
|
f"- Risk bands: `{summary.get('risk_bands')}`",
|
|
122
164
|
f"- Endpoint access: `{summary.get('endpoint_access')}`",
|
|
123
165
|
"",
|
|
@@ -24,6 +24,8 @@ from sourcecode.output_encoding import json_ensure_ascii as _json_ensure_ascii
|
|
|
24
24
|
from sourcecode.output_encoding import set_ascii_fallback
|
|
25
25
|
from sourcecode.phased_run import WHY_BUDGET as _WHY_BUDGET
|
|
26
26
|
from sourcecode.phased_run import PhasedRun
|
|
27
|
+
from sourcecode.partial_contract import PARTIAL_EXIT_CODE as _PARTIAL_EXIT
|
|
28
|
+
from sourcecode.partial_contract import read_count as _read_count
|
|
27
29
|
from sourcecode import perf
|
|
28
30
|
from sourcecode.caller_metrics import (
|
|
29
31
|
CALLER_METRIC_RECONCILIATION,
|
|
@@ -238,6 +240,16 @@ def _writes_help_block() -> str:
|
|
|
238
240
|
lines.append(f" {name.ljust(width)} {what}")
|
|
239
241
|
lines.append("")
|
|
240
242
|
lines.append(" --no-write (ASK_READONLY=1) refuses all of it and says so on stderr.")
|
|
243
|
+
# F-AX: the other half of an audit that may not write — where the repository's
|
|
244
|
+
# own declaration is allowed to live.
|
|
245
|
+
lines.append(
|
|
246
|
+
" --config <path> (ASK_CONFIG) reads the repository's declaration from "
|
|
247
|
+
"outside it,"
|
|
248
|
+
)
|
|
249
|
+
lines.append(
|
|
250
|
+
" so labels and custom security annotations can be "
|
|
251
|
+
"declared without writing."
|
|
252
|
+
)
|
|
241
253
|
return "\n".join(lines)
|
|
242
254
|
|
|
243
255
|
|
|
@@ -746,7 +758,7 @@ def _preprocess_args(args: list[str]) -> list[str]:
|
|
|
746
758
|
|
|
747
759
|
def _preprocess_argv() -> None:
|
|
748
760
|
"""Apply _preprocess_args to sys.argv in-place (used by main_entry)."""
|
|
749
|
-
modified = _preprocess_args(_apply_no_write(sys.argv[1:]))
|
|
761
|
+
modified = _preprocess_args(_apply_external_config(_apply_no_write(sys.argv[1:])))
|
|
750
762
|
sys.argv = sys.argv[:1] + modified
|
|
751
763
|
|
|
752
764
|
|
|
@@ -2045,6 +2057,57 @@ NO_WRITE_OPTION_HELP = (
|
|
|
2045
2057
|
NO_WRITE_FLAG = "--no-write"
|
|
2046
2058
|
|
|
2047
2059
|
|
|
2060
|
+
#: The one help string for `--config` (F-AX).
|
|
2061
|
+
CONFIG_OPTION_HELP = (
|
|
2062
|
+
"Read this repository's declaration (data labels, custom security "
|
|
2063
|
+
"annotations) from <path> instead of <repo>/sourcecode.config.json — so an "
|
|
2064
|
+
"auditor can declare without writing into somebody else's tree. Env: "
|
|
2065
|
+
"ASK_CONFIG."
|
|
2066
|
+
)
|
|
2067
|
+
|
|
2068
|
+
#: Handled before the parser, for `--no-write`'s reason: a declaration honoured
|
|
2069
|
+
#: by some commands and not others is worse than none, because the reader cannot
|
|
2070
|
+
#: tell which answer used it.
|
|
2071
|
+
CONFIG_FLAG = "--config"
|
|
2072
|
+
|
|
2073
|
+
|
|
2074
|
+
def _apply_external_config(argv: "list[str]") -> "list[str]":
|
|
2075
|
+
"""Consume `--config <path>`, putting the declaration in force. Never raises.
|
|
2076
|
+
|
|
2077
|
+
F-AX. Under `ASK_READONLY=1` the only way to declare anything used to be a
|
|
2078
|
+
file inside the analysed tree, which left `data-exposure`, the `Verified`
|
|
2079
|
+
upgrade for a custom gate, and everything downstream of them unreachable by
|
|
2080
|
+
construction for the exact user this mode exists for — the auditor of
|
|
2081
|
+
somebody else's repository.
|
|
2082
|
+
"""
|
|
2083
|
+
if CONFIG_FLAG not in argv:
|
|
2084
|
+
return argv
|
|
2085
|
+
out: "list[str]" = []
|
|
2086
|
+
index = 0
|
|
2087
|
+
while index < len(argv):
|
|
2088
|
+
token = argv[index]
|
|
2089
|
+
if token != CONFIG_FLAG:
|
|
2090
|
+
out.append(token)
|
|
2091
|
+
index += 1
|
|
2092
|
+
continue
|
|
2093
|
+
value = argv[index + 1] if index + 1 < len(argv) else ""
|
|
2094
|
+
if not value or value.startswith("-"):
|
|
2095
|
+
print(
|
|
2096
|
+
f"error: {CONFIG_FLAG} needs a path to a declaration file.\n"
|
|
2097
|
+
f" use: ask {CONFIG_FLAG} ./declarations.json <command> …",
|
|
2098
|
+
file=sys.stderr,
|
|
2099
|
+
)
|
|
2100
|
+
raise SystemExit(2)
|
|
2101
|
+
try:
|
|
2102
|
+
from sourcecode import declarations
|
|
2103
|
+
|
|
2104
|
+
declarations.set_config_path(value)
|
|
2105
|
+
except Exception:
|
|
2106
|
+
pass
|
|
2107
|
+
index += 2
|
|
2108
|
+
return out
|
|
2109
|
+
|
|
2110
|
+
|
|
2048
2111
|
def _apply_no_write(argv: "list[str]") -> "list[str]":
|
|
2049
2112
|
"""Consume `--no-write` from *argv*, putting the mode in force. Never raises."""
|
|
2050
2113
|
if NO_WRITE_FLAG not in argv:
|
|
@@ -8395,8 +8458,23 @@ def spring_audit_cmd(
|
|
|
8395
8458
|
else:
|
|
8396
8459
|
output = _serialize_dict(data, format)
|
|
8397
8460
|
|
|
8398
|
-
|
|
8461
|
+
# F-AV: our own readers ask for the count under either spelling — the break
|
|
8462
|
+
# is meant for a consumer that never asked whether the run finished.
|
|
8463
|
+
_total = _read_count(combined.summary, "total_findings") or 0
|
|
8399
8464
|
_partial_msg = " — PARTIAL, budget exhausted" if _stopped_early else ""
|
|
8465
|
+
# CL-19: the payload carries `stack_fit`, and the person who most needs it is
|
|
8466
|
+
# the one who will read the counts and stop. Said once, on stderr, so piped
|
|
8467
|
+
# output stays byte-identical.
|
|
8468
|
+
if not combined.spring_detected:
|
|
8469
|
+
_notice(
|
|
8470
|
+
"[ask] stack fit: no Spring detected in this scope. The access, "
|
|
8471
|
+
"transaction and "
|
|
8472
|
+
"Boot-readiness axes model Spring semantics and are NOT measuring "
|
|
8473
|
+
"this repository — read their answers as `unknown`, never as `none`. "
|
|
8474
|
+
"The structural axes (call graph, endpoint census, coupling, JDK "
|
|
8475
|
+
"inventory) answer here as they do anywhere. See `stack_fit` in the "
|
|
8476
|
+
"payload."
|
|
8477
|
+
)
|
|
8400
8478
|
_emit_command_output(
|
|
8401
8479
|
output, output_path, copy,
|
|
8402
8480
|
success_msg=(
|
|
@@ -8411,8 +8489,10 @@ def spring_audit_cmd(
|
|
|
8411
8489
|
|
|
8412
8490
|
if ci and _stopped_early:
|
|
8413
8491
|
# A gate on incomplete evidence must not read as a pass — the same rule
|
|
8414
|
-
# `pr-impact` holds for UNKNOWN.
|
|
8415
|
-
|
|
8492
|
+
# `pr-impact` holds for UNKNOWN. F-AV: and it must not read as a *failure*
|
|
8493
|
+
# either, because "the gate found something" and "the gate did not finish"
|
|
8494
|
+
# call for different pipeline decisions. 75 is neither 0, 1 nor 2.
|
|
8495
|
+
raise typer.Exit(code=_PARTIAL_EXIT)
|
|
8416
8496
|
if ci and combined.findings:
|
|
8417
8497
|
raise typer.Exit(code=1)
|
|
8418
8498
|
|
|
@@ -8962,7 +9042,7 @@ def risk_cmd(
|
|
|
8962
9042
|
copy,
|
|
8963
9043
|
success_msg=(
|
|
8964
9044
|
f"risk written to {output_path} ({data['shown']} of "
|
|
8965
|
-
f"{data
|
|
9045
|
+
f"{_read_count(data, 'total_defects')} defects composed)"
|
|
8966
9046
|
# C3-87: the terminal says it too. A reader who never opens the payload
|
|
8967
9047
|
# must not take a truncated ranking for the repository's risk.
|
|
8968
9048
|
+ (" — PARTIAL, budget exhausted" if data.get("partial") else "")
|
|
@@ -9256,26 +9336,58 @@ def audit_report_cmd(
|
|
|
9256
9336
|
)
|
|
9257
9337
|
raise typer.Exit(code=1)
|
|
9258
9338
|
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9339
|
+
# C3-89: this command composes the whole of `risk`, and it did so with no
|
|
9340
|
+
# deadline of any kind — no `PhasedRun`, no `stop_when` on the observers, no
|
|
9341
|
+
# checkpoint. The field measured 2 265 s under a 300 s budget, CPU-bound in one
|
|
9342
|
+
# worker, killed by hand with nothing to show. `risk` was bound in 4.16.0
|
|
9343
|
+
# (C3-87) and the composition of the `_partial` keys moved into
|
|
9344
|
+
# `PhasedRun.status` precisely so the next consumer would inherit it; this is
|
|
9345
|
+
# that consumer. The phases are `risk`'s own (it is the analysis being run)
|
|
9346
|
+
# plus this command's packaging step.
|
|
9347
|
+
_phase = "packaging audit evidence"
|
|
9348
|
+
_budget = _analysis_budget("audit-report")
|
|
9349
|
+
_run = PhasedRun(
|
|
9350
|
+
command="audit-report",
|
|
9351
|
+
root=path,
|
|
9352
|
+
phases=["audit", "compose", "bundle"],
|
|
9353
|
+
output_path=output_path,
|
|
9354
|
+
budget_seconds=_budget.get("configured_max_seconds"),
|
|
9355
|
+
budget_source=_budget.get("configured_source"),
|
|
9356
|
+
writer=_safe_write_file,
|
|
9357
|
+
)
|
|
9358
|
+
with _expensive_analysis_scope("audit-report", path, _phase):
|
|
9359
|
+
_prog = Progress()
|
|
9360
|
+
_prog.start(_phase)
|
|
9361
|
+
try:
|
|
9362
|
+
data = build_audit_report(
|
|
9363
|
+
path, profiles=_profile_set(profile), sign_key=key_bytes,
|
|
9364
|
+
risk_payload=risk_payload,
|
|
9365
|
+
progress=lambda stage, unit="rule families": _rule_pass_progress(
|
|
9366
|
+
_prog, stage, unit, stop_when=_run.exhausted
|
|
9367
|
+
),
|
|
9368
|
+
checkpoint=_run.checkpoint,
|
|
9369
|
+
partial_status=lambda **cut: _run.status(_WHY_BUDGET, **cut),
|
|
9370
|
+
)
|
|
9371
|
+
finally:
|
|
9372
|
+
_prog.stop()
|
|
9268
9373
|
output = render_markdown(data) if fmt == "markdown" else _serialize_dict(data, fmt)
|
|
9374
|
+
_summary = data.get("summary") if isinstance(data.get("summary"), dict) else {}
|
|
9269
9375
|
_emit_command_output(
|
|
9270
9376
|
output,
|
|
9271
9377
|
output_path,
|
|
9272
9378
|
copy,
|
|
9273
|
-
success_msg=f"audit report written to {output_path}"
|
|
9379
|
+
success_msg=f"audit report written to {output_path}"
|
|
9380
|
+
# The terminal says it too, for the same reason `risk` does: a signed
|
|
9381
|
+
# bundle that was cut must not be read as the repository's audit.
|
|
9382
|
+
+ (" — PARTIAL, budget exhausted" if _summary.get("partial") else ""),
|
|
9274
9383
|
# A signed artifact cannot be mutated after signing. The report carries
|
|
9275
9384
|
# tool/version metadata itself, and `signature.payload_sha256` is over
|
|
9276
9385
|
# the exact JSON payload the user receives.
|
|
9277
9386
|
stamp_envelope=False,
|
|
9278
9387
|
)
|
|
9388
|
+
# The complete bundle is written; the checkpoint that stood in for it must not
|
|
9389
|
+
# outlive it (C3-77's invariant, as `risk` applies it).
|
|
9390
|
+
_run.discard_checkpoint()
|
|
9279
9391
|
|
|
9280
9392
|
|
|
9281
9393
|
@app.command("migrate-recipe")
|
|
@@ -11782,7 +11894,15 @@ def schema_cmd(
|
|
|
11782
11894
|
# through the command that already answers "what shape does this release
|
|
11783
11895
|
# produce?" rather than a command of its own.
|
|
11784
11896
|
names = available_schemas()
|
|
11785
|
-
|
|
11897
|
+
# C4-22: one authority for *what this argument accepts*. The registry names
|
|
11898
|
+
# itself (`registry_version`), so the listing, the dispatch below and the
|
|
11899
|
+
# rejection all read the same value — the field's audit was told
|
|
11900
|
+
# `available: ["envelope-v1"]` by a rejection that knew only half of what the
|
|
11901
|
+
# very next line accepts, and concluded that was the whole published surface.
|
|
11902
|
+
registries = [str(load_registry().get("registry_version") or "")]
|
|
11903
|
+
registries = [r for r in registries if r]
|
|
11904
|
+
accepted = list(names) + registries
|
|
11905
|
+
if name in registries:
|
|
11786
11906
|
_emit_command_output(
|
|
11787
11907
|
json.dumps(load_registry(), indent=2, ensure_ascii=False),
|
|
11788
11908
|
output_path,
|
|
@@ -11797,7 +11917,7 @@ def schema_cmd(
|
|
|
11797
11917
|
# answers have a single authority. Both are contracts this release
|
|
11798
11918
|
# carries, listed apart because they are not the same kind of thing.
|
|
11799
11919
|
json.dumps(
|
|
11800
|
-
{"schemas": names, "registries":
|
|
11920
|
+
{"schemas": names, "registries": registries},
|
|
11801
11921
|
indent=2, ensure_ascii=False,
|
|
11802
11922
|
),
|
|
11803
11923
|
output_path,
|
|
@@ -11810,10 +11930,14 @@ def schema_cmd(
|
|
|
11810
11930
|
except FileNotFoundError:
|
|
11811
11931
|
_emit_error_json(
|
|
11812
11932
|
INVALID_INPUT_CODE,
|
|
11813
|
-
f"
|
|
11814
|
-
available=
|
|
11815
|
-
hint=
|
|
11816
|
-
|
|
11933
|
+
f"'{name}' is not a published schema or registry.",
|
|
11934
|
+
available=accepted,
|
|
11935
|
+
hint=(
|
|
11936
|
+
"Run `ask schema` to list them: "
|
|
11937
|
+
+ ", ".join(accepted)
|
|
11938
|
+
+ "."
|
|
11939
|
+
),
|
|
11940
|
+
expected="One of: " + " | ".join(accepted),
|
|
11817
11941
|
)
|
|
11818
11942
|
raise typer.Exit(code=1)
|
|
11819
11943
|
# A schema document describes the envelope; stamping one into it would put
|
|
@@ -11871,8 +11995,17 @@ def config_cmd(
|
|
|
11871
11995
|
_answer.say(f"Telemetry: {'enabled' if is_enabled() else 'disabled'} (off by default; opt-in)")
|
|
11872
11996
|
_answer.say("")
|
|
11873
11997
|
|
|
11874
|
-
|
|
11998
|
+
# F-AX: the declaration may sit outside the analysed tree, and *which* file
|
|
11999
|
+
# answered is the first thing this command exists to say.
|
|
12000
|
+
from sourcecode.declarations import config_path as _config_path, is_external
|
|
12001
|
+
|
|
12002
|
+
_declaration_path = _config_path(_repo) or (_repo / CONFIG_FILENAME)
|
|
11875
12003
|
_answer.say(f"Repository: {_repo}")
|
|
12004
|
+
if is_external():
|
|
12005
|
+
_answer.say(
|
|
12006
|
+
"Declared with --config / ASK_CONFIG — read from outside the "
|
|
12007
|
+
"repository, which is unchanged by this run."
|
|
12008
|
+
)
|
|
11876
12009
|
if not _declaration_path.is_file():
|
|
11877
12010
|
_answer.say(f"Declaration: none at {_declaration_path}")
|
|
11878
12011
|
_answer.say(
|
|
@@ -40,6 +40,7 @@ from pathlib import Path
|
|
|
40
40
|
from typing import TYPE_CHECKING, Any, Optional
|
|
41
41
|
|
|
42
42
|
from sourcecode.data_labels import DataLabel, LabelDeclaration, load_labels
|
|
43
|
+
from sourcecode.declarations import source_note as _declaration_source
|
|
43
44
|
|
|
44
45
|
if TYPE_CHECKING: # pragma: no cover - typing only
|
|
45
46
|
from sourcecode.canonical_ir import CanonicalRepositoryIR
|
|
@@ -139,7 +140,10 @@ def build_data_exposure(
|
|
|
139
140
|
|
|
140
141
|
payload: dict = {
|
|
141
142
|
"schema_version": SCHEMA_VERSION,
|
|
142
|
-
|
|
143
|
+
# F-AX: which file answered. A declaration read from outside the analysed
|
|
144
|
+
# tree is the auditor's case, and a payload that does not say so leaves
|
|
145
|
+
# the reader unable to reproduce the answer.
|
|
146
|
+
"declaration": {**decl.to_dict(), "source": _declaration_source()},
|
|
143
147
|
"profiles": sorted(profiles) if profiles else None,
|
|
144
148
|
}
|
|
145
149
|
|
|
@@ -39,7 +39,9 @@ from pathlib import Path
|
|
|
39
39
|
from typing import Optional
|
|
40
40
|
|
|
41
41
|
#: The same file the custom security annotations are declared in.
|
|
42
|
-
|
|
42
|
+
#: F-AX: the name lives in `declarations`, which also decides *where* it is
|
|
43
|
+
#: looked for. Re-exported so existing importers keep working.
|
|
44
|
+
from sourcecode.declarations import CONFIG_FILENAME # noqa: E402,F401
|
|
43
45
|
|
|
44
46
|
#: The key under which labels are declared.
|
|
45
47
|
CONFIG_KEY = "dataLabels"
|
|
@@ -108,9 +110,14 @@ def load_labels(root: Optional[Path]) -> LabelDeclaration:
|
|
|
108
110
|
Never raises. An absent file is not a problem — it is a repository that has
|
|
109
111
|
declared nothing, and the caller says so in the words of the question.
|
|
110
112
|
"""
|
|
111
|
-
|
|
113
|
+
# F-AX: the path is resolved by one authority, so `--config <external>` is
|
|
114
|
+
# honoured identically here and in `security_config` — a declaration that
|
|
115
|
+
# applied to one loader and not the other would be worse than none.
|
|
116
|
+
from sourcecode.declarations import config_path
|
|
117
|
+
|
|
118
|
+
cfg_path = config_path(root)
|
|
119
|
+
if cfg_path is None:
|
|
112
120
|
return LabelDeclaration()
|
|
113
|
-
cfg_path = Path(root) / CONFIG_FILENAME
|
|
114
121
|
try:
|
|
115
122
|
if not cfg_path.is_file():
|
|
116
123
|
return LabelDeclaration(config_file=None)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""declarations.py — where this repository's declaration lives. One authority.
|
|
2
|
+
|
|
3
|
+
`sourcecode.config.json` is what a repository declares **about itself**: the data
|
|
4
|
+
labels `data-exposure` refuses to invent, and the custom security annotations
|
|
5
|
+
`spring-audit` and `posture` will not guess. Two loaders read it, and until this
|
|
6
|
+
module each of them resolved the path itself, from its own copy of the filename.
|
|
7
|
+
|
|
8
|
+
**F-AX.** The path also has to be allowed to sit *outside* the analysed tree. The
|
|
9
|
+
use case is not hypothetical — it is the one field evaluation #20 executed: an
|
|
10
|
+
auditor running over somebody else's repository under `ASK_READONLY=1`, who found
|
|
11
|
+
four commands unreachable **by construction**, because the only way to declare
|
|
12
|
+
anything was to write a file into a tree they had been told not to touch:
|
|
13
|
+
|
|
14
|
+
"bajo restricción read-only, cuatro comandos son inalcanzables por
|
|
15
|
+
construcción. Falta un modo --config-from <ruta externa>."
|
|
16
|
+
|
|
17
|
+
So the resolution order is: an explicit `--config <path>` (or `ASK_CONFIG`),
|
|
18
|
+
then `<root>/sourcecode.config.json`. The override is a whole-process decision
|
|
19
|
+
like `--no-write` — a declaration that applied to some commands and not others
|
|
20
|
+
would be worse than none, because the reader could not tell which answer used it.
|
|
21
|
+
|
|
22
|
+
Nothing here reads or parses the file. It answers one question: *which path*.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from __future__ import annotations
|
|
26
|
+
|
|
27
|
+
import os
|
|
28
|
+
from pathlib import Path
|
|
29
|
+
from typing import Optional
|
|
30
|
+
|
|
31
|
+
#: The name a repository's own declaration has when it lives in the repository.
|
|
32
|
+
CONFIG_FILENAME = "sourcecode.config.json"
|
|
33
|
+
|
|
34
|
+
#: The environment channel, equal in force to the flag (the `ASK_READONLY`
|
|
35
|
+
#: precedent): a CI job declares once, in the environment, for every command.
|
|
36
|
+
ENV_CONFIG = "ASK_CONFIG"
|
|
37
|
+
|
|
38
|
+
_OVERRIDE: "Optional[Path]" = None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def set_config_path(path: "Optional[Path | str]") -> None:
|
|
42
|
+
"""Point every loader at *path* for the rest of this process. Never raises."""
|
|
43
|
+
global _OVERRIDE
|
|
44
|
+
_OVERRIDE = Path(str(path)).expanduser() if path else None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def override() -> "Optional[Path]":
|
|
48
|
+
"""The declared external path, from the flag or the environment, or None."""
|
|
49
|
+
if _OVERRIDE is not None:
|
|
50
|
+
return _OVERRIDE
|
|
51
|
+
raw = os.environ.get(ENV_CONFIG, "").strip()
|
|
52
|
+
return Path(raw).expanduser() if raw else None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def config_path(root: "Optional[Path]") -> "Optional[Path]":
|
|
56
|
+
"""Where this run's declaration is, whether or not it exists.
|
|
57
|
+
|
|
58
|
+
Returns None only when there is no candidate at all — no override and no
|
|
59
|
+
root — so a caller can distinguish *"nothing was declared"* from *"the file
|
|
60
|
+
it would have been in is absent"*, which is the distinction `ask config`
|
|
61
|
+
prints and `data-exposure` refuses on.
|
|
62
|
+
"""
|
|
63
|
+
external = override()
|
|
64
|
+
if external is not None:
|
|
65
|
+
return external
|
|
66
|
+
if root is None:
|
|
67
|
+
return None
|
|
68
|
+
return Path(root) / CONFIG_FILENAME
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def is_external() -> bool:
|
|
72
|
+
"""True when the declaration in force comes from outside the analysed tree."""
|
|
73
|
+
return override() is not None
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def source_note() -> str:
|
|
77
|
+
"""One clause naming where the declaration came from, for a payload or a line."""
|
|
78
|
+
external = override()
|
|
79
|
+
if external is None:
|
|
80
|
+
return f"<repo>/{CONFIG_FILENAME}"
|
|
81
|
+
return f"{external} (declared with --config / {ENV_CONFIG})"
|
|
@@ -794,7 +794,9 @@ def run_migrate_flow_impl(repo_path: str, min_severity: str = "low") -> dict[str
|
|
|
794
794
|
headline[key] = report[key]
|
|
795
795
|
_summary = report.get("summary", {})
|
|
796
796
|
if isinstance(_summary, dict):
|
|
797
|
-
|
|
797
|
+
from sourcecode.partial_contract import read_count as _read_count
|
|
798
|
+
|
|
799
|
+
headline["total_findings"] = _read_count(_summary, "total_findings")
|
|
798
800
|
headline["affected_files"] = _summary.get("affected_files")
|
|
799
801
|
headline["by_severity"] = _summary.get("by_severity")
|
|
800
802
|
headline["by_target"] = _summary.get("by_target") or _summary.get("by_rule")
|