@ngocsangairvds/vsaf 3.2.14 → 3.2.15
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.
- package/bin/vsaf.js +13 -0
- package/package.json +1 -1
- package/src/config.js +167 -0
- package/src/global.js +1 -48
- package/src/utils.js +44 -1
- package/tools/vds-scripts/Makefile +9 -31
- package/tools/vds-scripts/docker/docker-compose.cli.yml +1 -117
- package/tools/vds-scripts/docker/docker-compose.services.yml +1 -40
- package/tools/vds-scripts/docker/infrastructure/init-schemas.sql +0 -34
- package/tools/vds-scripts/docker/infrastructure/pgbouncer/pgbouncer.ini +2 -6
- package/tools/vds-scripts/pyproject.toml +1 -33
- package/tools/vds-scripts/uv.lock +80 -1651
- package/tools/vds-scripts/vds_cli/pyproject.toml +3 -0
- package/tools/vds-scripts/vds_cli/src/vds_cli/cli.py +1 -127
- package/tools/vds-scripts/vds_cli/src/vds_cli/commands/lint_cli.py +1 -20
- package/tools/vds-scripts/vds_cli/src/vds_cli/router.py +0 -100
- package/tools/vds-scripts/vds_cli/tests/conftest.py +0 -2
- package/tools/vds-scripts/vds_cli/tests/unit/test_cli.py +0 -25
- package/tools/vds-scripts/vds_cli/tests/unit/test_lint_cli.py +2 -2
- package/tools/vds-scripts/vds_cli/tests/unit/test_router.py +0 -2
- package/tools/vds-scripts/CLOSURE.md +0 -340
- package/tools/vds-scripts/ECOSYSTEM-CHANGELOG.md +0 -52
- package/tools/vds-scripts/ECOSYSTEM-DOCS.md +0 -602
- package/tools/vds-scripts/ECOSYSTEM_ALIGNMENT.md +0 -133
- package/tools/vds-scripts/ENV-HYGIENE-OPS-NOTE.md +0 -65
- package/tools/vds-scripts/INVESTIGATION-cloud-401.md +0 -103
- package/tools/vds-scripts/MEM0_2.0_API_REFERENCE.md +0 -238
- package/tools/vds-scripts/PACKAGE_P125B_IMPLEMENTATION_SUMMARY.md +0 -131
- package/tools/vds-scripts/PHASE-MERGE-SUMMARY.md +0 -121
- package/tools/vds-scripts/PHASES-3-ARCHIVE.md +0 -59
- package/tools/vds-scripts/PROJECT_COMPLETION_SUMMARY.md +0 -45
- package/tools/vds-scripts/SEARCH-CRASH-REPRO.md +0 -51
- package/tools/vds-scripts/analyze_hexagonal.py +0 -217
- package/tools/vds-scripts/analyze_profiles.py +0 -60
- package/tools/vds-scripts/audit-checklist.xlsx +0 -0
- package/tools/vds-scripts/audit_orchestrator/.audit_approvals/approvals_index.json +0 -1
- package/tools/vds-scripts/audit_orchestrator/.env.example +0 -85
- package/tools/vds-scripts/audit_orchestrator/.github/workflows/audit.yml +0 -47
- package/tools/vds-scripts/audit_orchestrator/Dockerfile +0 -92
- package/tools/vds-scripts/audit_orchestrator/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +0 -218
- package/tools/vds-scripts/audit_orchestrator/PHASE3_INTEGRATION_SUMMARY.md +0 -268
- package/tools/vds-scripts/audit_orchestrator/PHASE7-MERGE-SUMMARY.md +0 -174
- package/tools/vds-scripts/audit_orchestrator/README.md +0 -1573
- package/tools/vds-scripts/audit_orchestrator/TSK-168-IMPLEMENTATION-SUMMARY.md +0 -191
- package/tools/vds-scripts/audit_orchestrator/TSK-196-IMPLEMENTATION-SUMMARY.md +0 -201
- package/tools/vds-scripts/audit_orchestrator/alembic/env.py +0 -37
- package/tools/vds-scripts/audit_orchestrator/alembic/script.py.mako +0 -28
- package/tools/vds-scripts/audit_orchestrator/alembic/versions/0001_initial_audit_state_schema.py +0 -1260
- package/tools/vds-scripts/audit_orchestrator/alembic.ini +0 -68
- package/tools/vds-scripts/audit_orchestrator/config/category-mapping.json +0 -81
- package/tools/vds-scripts/audit_orchestrator/config/profile-timeouts.yaml +0 -17
- package/tools/vds-scripts/audit_orchestrator/create_sample.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/data/corpus_accuracy_report.json +0 -17
- package/tools/vds-scripts/audit_orchestrator/data/exemplar_quality_report.json +0 -1606
- package/tools/vds-scripts/audit_orchestrator/data/instruction_plan_fixtures.json +0 -163
- package/tools/vds-scripts/audit_orchestrator/data/requirement_exemplars.json +0 -3443
- package/tools/vds-scripts/audit_orchestrator/data/requirement_scope_fixtures.json +0 -172
- package/tools/vds-scripts/audit_orchestrator/debug_rg.py +0 -46
- package/tools/vds-scripts/audit_orchestrator/demo_code_pack.py +0 -127
- package/tools/vds-scripts/audit_orchestrator/docs/AGENT_SDK_SELECTION_SPEC.md +0 -720
- package/tools/vds-scripts/audit_orchestrator/docs/API.md +0 -804
- package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_ANALYSIS_APPROACH.md +0 -1041
- package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_SCORING_EVOLUTION_SPEC.md +0 -868
- package/tools/vds-scripts/audit_orchestrator/docs/DEPLOYMENT.md +0 -778
- package/tools/vds-scripts/audit_orchestrator/docs/LLM_AGENT_AUDIT_SPEC.md +0 -721
- package/tools/vds-scripts/audit_orchestrator/docs/LLM_CONTENT_ANALYSIS_SPEC.md +0 -1143
- package/tools/vds-scripts/audit_orchestrator/docs/LSP_SETUP_GUIDE.md +0 -221
- package/tools/vds-scripts/audit_orchestrator/docs/MULTI_REPO_AUDIT_SPEC.md +0 -951
- package/tools/vds-scripts/audit_orchestrator/docs/OLLAMA_EMBEDDINGS_SETUP.md +0 -119
- package/tools/vds-scripts/audit_orchestrator/docs/PHASE32_REAL_BENCHMARK_2026-02-08.md +0 -66
- package/tools/vds-scripts/audit_orchestrator/docs/PHASE_64_TO_92_HISTORICAL_SPEC.md +0 -1772
- package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-flow-trace.md +0 -201
- package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-verification.md +0 -124
- package/tools/vds-scripts/audit_orchestrator/docs/phase152-hierarchical-query-surface.md +0 -46
- package/tools/vds-scripts/audit_orchestrator/examples/bitbucket_metadata_example.json +0 -50
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/README.md +0 -68
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase117_phase118_shared_state.sql +0 -64
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase154_published_pages.sql +0 -28
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_dispatch_tables.sql +0 -94
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_events.sql +0 -91
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_scope_snapshots.sql +0 -24
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_status_view.sql +0 -22
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase169_dispatch_observability.sql +0 -55
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/state_repair_hardening.sql +0 -24
- package/tools/vds-scripts/audit_orchestrator/pyproject.toml +0 -211
- package/tools/vds-scripts/audit_orchestrator/pyrightconfig.json +0 -51
- package/tools/vds-scripts/audit_orchestrator/pytest.ini +0 -37
- package/tools/vds-scripts/audit_orchestrator/reproduce_scanner.py +0 -40
- package/tools/vds-scripts/audit_orchestrator/scripts/README.md +0 -116
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_crawl_modes.py +0 -455
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_dspy.py +0 -513
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_nlp_accuracy.py +0 -138
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_retrieval_modes.py +0 -176
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_upload_update_mode.py +0 -167
- package/tools/vds-scripts/audit_orchestrator/scripts/build_check.py +0 -76
- package/tools/vds-scripts/audit_orchestrator/scripts/check_live_progress.py +0 -61
- package/tools/vds-scripts/audit_orchestrator/scripts/cli_integration_test.py +0 -400
- package/tools/vds-scripts/audit_orchestrator/scripts/index_workspace.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/scripts/inspect_route_conformance.py +0 -196
- package/tools/vds-scripts/audit_orchestrator/scripts/monitor_postgres.py +0 -145
- package/tools/vds-scripts/audit_orchestrator/scripts/optimize_audit.py +0 -462
- package/tools/vds-scripts/audit_orchestrator/scripts/verify.py +0 -673
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase111_requirement_analysis.py +0 -375
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase117_cross_repo_evidence.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase121_short_circuit.py +0 -680
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase122_instruction_handling.py +0 -478
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase125_skill_integration.py +0 -832
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_36.py +0 -394
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_37.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/__init__.py +0 -17
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/__init__.py +0 -29
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/_langchain_warnings.py +0 -17
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/agentic_investigator.py +0 -4130
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/approval.py +0 -490
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_loop_hooks.py +0 -107
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_state.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/base.py +0 -4035
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_agent.py +0 -667
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_helpers.py +0 -236
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_prompts.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/docs_agent.py +0 -1234
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/langgraph_workflow.py +0 -2002
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/pydantic_base.py +0 -1227
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/requirement_analysis_agent.py +0 -593
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_agent.py +0 -1829
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_scanner.py +0 -686
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/skill_tools.py +0 -204
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/synthesis_agent.py +0 -1463
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_efficiency_guard.py +0 -609
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_registry.py +0 -3822
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/__init__.py +0 -52
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/evidence_corpus.py +0 -385
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/filesystem.py +0 -1134
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/lsp.py +0 -458
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/mcp_toolset.py +0 -491
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/skills_toolset.py +0 -997
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/vector_evidence.py +0 -842
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/usage_tracker.py +0 -682
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/visualization.py +0 -303
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/analyze_cmds.py +0 -892
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/__init__.py +0 -15
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/service.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/__init__.py +0 -20
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/base.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/__init__.py +0 -6
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/checks.py +0 -257
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/__init__.py +0 -10
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/checks.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/__init__.py +0 -6
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/file_checks.py +0 -133
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/__init__.py +0 -17
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/api_docs_check.py +0 -80
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/readme_check.py +0 -76
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/security_docs_check.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/registry.py +0 -402
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/__init__.py +0 -10
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/checks.py +0 -276
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli.py +0 -12
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_common.py +0 -128
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_impl.py +0 -9826
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/bitbucket_cli_client.py +0 -187
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/confluence_cli_client.py +0 -977
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/sonarqube_cli_client.py +0 -28
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/__init__.py +0 -21
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/base.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_downloader.py +0 -644
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_metadata.py +0 -133
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/checklist_parser.py +0 -180
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/__init__.py +0 -31
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/bitbucket_probe.py +0 -443
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/confluence_probe.py +0 -365
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/freshness_evaluator.py +0 -330
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/material_completeness_service.py +0 -1079
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/confluence_collector.py +0 -259
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/diagram_extractor.py +0 -280
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/enrichment_extractor.py +0 -200
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/evidence_cache.py +0 -35
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/git_collector.py +0 -148
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/graphify_collector.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/image_extractor.py +0 -359
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/linked_page_tracker.py +0 -120
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/markdown_converter.py +0 -344
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_cache.py +0 -1252
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_downloader.py +0 -1165
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/orchestrator.py +0 -168
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/registry_parser.py +0 -3063
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/requirements.py +0 -70
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/runner.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/sonarqube_collector.py +0 -113
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config.py +0 -1943
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/__init__.py +0 -23
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/discovery.py +0 -90
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/environment_resolver.py +0 -56
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/evidence.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/models.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/precedence.py +0 -10
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/redaction.py +0 -20
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/confluence_connectivity.py +0 -140
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/corpus_cmds.py +0 -278
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/__init__.py +0 -7
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/alembic_filters.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/__init__.py +0 -29
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/diataxis_validator.py +0 -687
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/doctor_cmds.py +0 -3295
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/__init__.py +0 -5
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/evaluation.py +0 -301
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/modules.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/runtime.py +0 -836
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/signatures.py +0 -406
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/__init__.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/ad_hoc_analyzer.py +0 -399
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/aggregator.py +0 -220
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/auditor.py +0 -504
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_evidence_cache.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_processor.py +0 -4776
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/calibration.py +0 -217
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_generator.py +0 -1201
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_projection.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_scoping.py +0 -221
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checkpoint.py +0 -159
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cl003_shared_lib_guard.py +0 -194
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/companion_context_service.py +0 -445
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/confluence_checklist_contract.py +0 -7425
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cross_check_rules.py +0 -213
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/deterministic_evaluator.py +0 -237
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/drift_detector.py +0 -157
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/dspy_requirement_classifier.py +0 -640
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_assembler.py +0 -407
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_collector.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_diversity.py +0 -101
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/gap_analyzer.py +0 -549
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/graduated.py +0 -185
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/grounding_validator.py +0 -287
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_analyzer.py +0 -882
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_compliance.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/llm_row_evaluator.py +0 -9270
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/loader.py +0 -1070
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/manual_check_config.py +0 -136
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/mapping.py +0 -269
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/multi_judge.py +0 -65
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/phase120_checklist_update.py +0 -416
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/profile_scorer.py +0 -427
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_evidence_context.py +0 -449
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_query_service.py +0 -155
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_store.py +0 -383
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_topology.py +0 -1920
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/provider_failure_classifier.py +0 -778
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_cli_helpers.py +0 -341
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_extractor.py +0 -303
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_synthesizer.py +0 -730
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/regression_guard.py +0 -138
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/repo_type_classifier.py +0 -297
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_analysis.py +0 -1433
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_classification.py +0 -1725
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/result_merger.py +0 -814
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/route_matrix.py +0 -267
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator.py +0 -9437
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_runtime.py +0 -1270
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_types.py +0 -2102
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/rubric.py +0 -592
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/scorer.py +0 -1239
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/section_packs.py +0 -645
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/skill_recommendation.py +0 -1183
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/stability_harness.py +0 -207
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/target_selector.py +0 -841
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/telemetry.py +0 -347
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/template_analyzer.py +0 -469
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/token_tracker.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/tool_first_planner.py +0 -7905
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/topology_query_service.py +0 -80
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/validator.py +0 -449
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/weight_policy.py +0 -464
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/errors.py +0 -430
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/extract_cmds.py +0 -4887
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/identity.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/__init__.py +0 -52
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/baseline.py +0 -378
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/change_analyzer.py +0 -407
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/delta_report.py +0 -189
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/diff_detector.py +0 -301
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/integrations/__init__.py +0 -3
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/__init__.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/audit_schemas.py +0 -459
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/codex_oauth.py +0 -340
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/cost_tracker.py +0 -288
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/engine.py +0 -751
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/evaluator.py +0 -245
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/__init__.py +0 -32
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/api_docs_evaluation.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/gap_analysis.py +0 -31
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/instruction_templates.py +0 -634
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/readme_evaluation.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/row_evaluation.py +0 -247
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/security_docs_evaluation.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/template_analysis.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/provider.py +0 -626
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/logging_config.py +0 -577
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/__init__.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/default_checklist_mapping.json +0 -18
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/vietnamese_checklist_mapping.json +0 -38
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/misc_cmds.py +0 -4689
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/__init__.py +0 -153
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/calibration.py +0 -98
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/checklist.py +0 -921
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/completeness.py +0 -309
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enrichment.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enums.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/evidence.py +0 -351
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/findings.py +0 -381
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/gaps.py +0 -299
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/graph.py +0 -42
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/multi_judge.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/readiness.py +0 -309
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/registry.py +0 -386
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/reporting.py +0 -32
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/task.py +0 -549
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/template.py +0 -477
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/__init__.py +0 -31
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/metrics.py +0 -404
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/parse_cmds.py +0 -608
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/pdf_cmds.py +0 -208
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/performance_gates.py +0 -224
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/phase151_projection.py +0 -84
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/__init__.py +0 -65
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/detection.py +0 -842
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/models.py +0 -474
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/__init__.py +0 -1
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_confluence_macros.py +0 -145
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_field_sanitizer.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_table_builder.py +0 -63
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_vietnamese_templates.py +0 -103
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/bitbucket_link_resolver.py +0 -34
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/checklist_renderer.py +0 -483
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/confluence_publisher.py +0 -3048
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/hierarchy_publisher.py +0 -213
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/live_data_injector.py +0 -152
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/macro_builder.py +0 -101
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/markdown_converter.py +0 -154
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/priority_renderer.py +0 -133
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/project_aggregate_renderer.py +0 -423
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/readiness_renderer.py +0 -186
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_hierarchy_renderer.py +0 -382
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_renderer.py +0 -683
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/report_cmds.py +0 -788
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/__init__.py +0 -13
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/aggregation_report.py +0 -86
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/checklist_generator.py +0 -425
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/excel_generator.py +0 -599
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/gap_report.py +0 -131
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/json_generator.py +0 -188
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/markdown_generator.py +0 -595
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/__init__.py +0 -154
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/collector.py +0 -61
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/department_builder.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/errors.py +0 -9
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/md_renderer.py +0 -386
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_models.py +0 -95
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_writer.py +0 -27
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/repo_project_builders.py +0 -274
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/readiness_report.py +0 -447
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/reporting.py +0 -94
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/sarif_generator.py +0 -519
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/runtime_profiles.py +0 -98
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/__init__.py +0 -29
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/seed_loader.py +0 -561
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/__init__.py +0 -5
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/skill_routing.py +0 -312
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/base.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/bitbucket.py +0 -129
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/git_url.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/github.py +0 -75
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/local.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/spec_sync_validator.py +0 -15
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/__init__.py +0 -6285
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/readiness_helpers.py +0 -74
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/skill_readiness.py +0 -487
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/store.py +0 -12927
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state_cmds.py +0 -1868
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/repo_sync.py +0 -409
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync_cmds.py +0 -1247
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/__init__.py +0 -3
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/debug_bundle.py +0 -214
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/validators/checklist_validator.py +0 -342
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflow_cmds.py +0 -19147
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/__init__.py +0 -9
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/_test_audit_daily_batch.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_daily_batch.py +0 -308
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_deep_monthly.py +0 -193
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_drift_scan.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_security_daily.py +0 -183
- package/tools/vds-scripts/audit_orchestrator/templates/sample_audit_template.xlsx +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/_helpers.py +0 -32
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_bitbucket_probe.py +0 -403
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_confluence_probe.py +0 -423
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_bitbucket_downloader.py +0 -289
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_image_extractor.py +0 -260
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_markdown_converter.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_cache.py +0 -197
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_downloader.py +0 -550
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser.py +0 -3514
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_department_entry.py +0 -214
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_flow.py +0 -200
- package/tools/vds-scripts/audit_orchestrator/tests/conftest.py +0 -988
- package/tools/vds-scripts/audit_orchestrator/tests/engine/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_calibration.py +0 -48
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_confluence_checklist_phase22_helpers.py +0 -6065
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_multi_judge.py +0 -62
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_stability_harness.py +0 -61
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_structured_metadata.py +0 -419
- package/tools/vds-scripts/audit_orchestrator/tests/factories/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/factories/models.py +0 -534
- package/tools/vds-scripts/audit_orchestrator/tests/factories/templates.py +0 -241
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/compressed.drawio +0 -2
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/mockup.bmpr +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/simple.drawio +0 -26
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_cli.json +0 -26
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_direct.json +0 -24
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_cli.json +0 -14
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_direct.json +0 -12
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_cli.json +0 -7
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_direct.json +0 -7
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_cli.json +0 -11
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_direct.json +0 -7
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_cli.json +0 -12
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_direct.json +0 -12
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/requirement_strategy_phase115.json +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/integration/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/conftest.py +0 -107
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/expected_outcomes.md +0 -50
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/auth.py +0 -27
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/config.py +0 -16
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/db.py +0 -24
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/main.py +0 -18
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/__init__.py +0 -1
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/utils.py +0 -22
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_checklist_template.json +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/code_evidence_pack.json +0 -40
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/manifest.json +0 -49
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/brd.md +0 -19
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/design.md +0 -32
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/security.md +0 -23
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/srs.md +0 -25
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/test.md +0 -30
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_checkpoint_merge.py +0 -1371
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_decoupling_route_p149.py +0 -176
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_gap_analyzer_batch_p149.py +0 -151
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_hybrid_search.py +0 -799
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_mcp_integration.py +0 -741
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_merge_ranking_p149.py +0 -98
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_modality_mismatch_p149.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase117_118_storage.py +0 -350
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase121_short_circuit.py +0 -732
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase18_workflow.py +0 -223
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase48_e2e_verification.py +0 -763
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase81_doc_anchor_regression.py +0 -252
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_provider_failure_finding_p149.py +0 -339
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_readiness_e2e.py +0 -430
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_refined_workflow.py +0 -1180
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/department_renderer.md +0 -24
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/project_renderer.md +0 -8
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/repo_renderer.md +0 -10
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_department_pdf.py +0 -112
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_e2e_pdf.py +0 -135
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_idempotency.py +0 -45
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_md_renderer.py +0 -46
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_cmds.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_snapshot.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_writer.py +0 -65
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_project_builder.py +0 -199
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_public_api.py +0 -135
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_repo_builder.py +0 -246
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_workflow_pdf_flags.py +0 -36
- package/tools/vds-scripts/audit_orchestrator/tests/property/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/property/test_properties.py +0 -807
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agent_error_compat.py +0 -38
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agentic_skill_policy_skip.py +0 -234
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_event_stream_logging.py +0 -785
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_timeout_policy.py +0 -277
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_trace_payload_sanitization.py +0 -92
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent.py +0 -2311
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent_re_exports.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_analysis_helpers.py +0 -94
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_create_audit_agent_reasoning_effort.py +0 -69
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_docs_agent.py +0 -2044
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_langgraph_workflow_efficiency_metrics.py +0 -71
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_output_validators.py +0 -317
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_phase41_toolsets.py +0 -6427
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_ai_models.py +0 -1219
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_base_url_resolution.py +0 -84
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_security_agent.py +0 -2069
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_skill_manager_focus.py +0 -439
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_synthesis_agent.py +0 -1195
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_tool_efficiency_guard_fr120.py +0 -683
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_toolsets.py +0 -716
- package/tools/vds-scripts/audit_orchestrator/tests/test_aggregator_p149.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/tests/test_alembic_migrations.py +0 -287
- package/tools/vds-scripts/audit_orchestrator/tests/test_anchor_allowlist_p149.py +0 -273
- package/tools/vds-scripts/audit_orchestrator/tests/test_audit_otel.py +0 -283
- package/tools/vds-scripts/audit_orchestrator/tests/test_checklist_models.py +0 -583
- package/tools/vds-scripts/audit_orchestrator/tests/test_checks/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_base_check.py +0 -211
- package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_llm_checks.py +0 -126
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_analyze_command.py +0 -400
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_archive_stale_page_cli.py +0 -217
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_bitbucket_metadata_cli.py +0 -354
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_cli_impl_profile_availability.py +0 -114
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_codex_profile.py +0 -174
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_compare_backends_cli.py +0 -449
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_confluence_parent_auto_resolve.py +0 -451
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_corpus_purge_cli.py +0 -290
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_credentials_preflight.py +0 -106
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_debug_bundle.py +0 -37
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_deprecation_phase157.py +0 -484
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_dispatch_concurrency_diagnostics.py +0 -758
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_check_confluence_cli.py +0 -320
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_codex.py +0 -187
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_corpus_status_cli.py +0 -236
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_correlation_cli.py +0 -128
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_crawl_status_cli.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_credentials_cli.py +0 -86
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_dispatch_status_cli.py +0 -421
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_heartbeat_phase169.py +0 -173
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_hierarchy_status_cli.py +0 -199
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_locks_cli.py +0 -134
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_logs_follow_cli.py +0 -305
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_migration.py +0 -333
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_profile_availability_cli.py +0 -151
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_skills_policy_cli.py +0 -153
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_evidence_quality_cli.py +0 -307
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_debug_bundle_phase36.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_git_manifest_cli.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_file_removal_phase157e.py +0 -770
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_grounding_classifier.py +0 -226
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_logging.py +0 -49
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_materials_cli.py +0 -9127
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_metadata_completeness_phase92.py +0 -364
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parent_dispatch_finalization_phase168f.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parse_cli.py +0 -590
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase117_118_feature_flags.py +0 -219
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase164_control_plane.py +0 -718
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase165_runner_scripts.py +0 -230
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_preparation_classifications.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_prepare_cli.py +0 -398
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publication_quality_gate.py +0 -126
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publish_system_doc_cli.py +0 -158
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_query_checklist_cli.py +0 -219
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli.py +0 -673
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli_integration.py +0 -689
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_removed_flags_phase92.py +0 -36
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_report_cmds.py +0 -1317
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_history_index.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_management.py +0 -1194
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_runtime_profiles_cli.py +0 -1658
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_smart_run_selection.py +0 -1562
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_cli.py +0 -2467
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_migration.py +0 -339
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_sync_repos_debug_artifacts.py +0 -1109
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_upload_results_cli.py +0 -809
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist_cli.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_spec_sync_cli.py +0 -519
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_default_parameters_baseline.py +0 -101
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_options.py +0 -7896
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_db_modes.py +0 -6516
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_project_scope.py +0 -831
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_target.py +0 -611
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_lifecycle.py +0 -2488
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_scaffolding.py +0 -96
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_row_key_guard.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_summary_artifacts.py +0 -1872
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli_paths_phase2.py +0 -45
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_bitbucket_cli_client.py +0 -124
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_cli_parity.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_confluence_cli_client.py +0 -1149
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_sonarqube_cli_client.py +0 -19
- package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/test_linked_page_tracker.py +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/test_companion_context_service.py +0 -230
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/conftest.py +0 -11
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_compile_artifact.py +0 -465
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique.py +0 -120
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique_e2e.py +0 -75
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_evaluation.py +0 -515
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_runtime_loader.py +0 -537
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_signatures_normalization.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_auditor_applicability.py +0 -68
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_generator.py +0 -1252
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_projection.py +0 -54
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_confluence_checklist_projection_consistency.py +0 -1696
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_critique_merger_matrix.py +0 -120
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_check_rules.py +0 -459
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_provider_critique.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_doc_loader.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_drift_detector.py +0 -34
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_evidence_collectors.py +0 -93
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_lease_timeout.py +0 -114
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader.py +0 -350
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader_parity.py +0 -179
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_low_confidence_reeval.py +0 -691
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase145a_completion.py +0 -209
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase31_row_consistency_retry_benchmark.py +0 -150
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_profile_detector.py +0 -286
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_regression_guard.py +0 -53
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_result_merger.py +0 -619
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_evaluator.py +0 -15783
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_failover.py +0 -215
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_scorer.py +0 -597
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_skill_breakdown_telemetry_fr137.py +0 -421
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_targeted_auto_merge.py +0 -229
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_failover.py +0 -488
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_telemetry.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_validator.py +0 -419
- package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/test_diff_detector.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/tests/test_infra_persistence.py +0 -291
- package/tools/vds-scripts/audit_orchestrator/tests/test_integration/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_integration/test_phase3_integration.py +0 -516
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cache.py +0 -670
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_model_builder.py +0 -281
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_oauth.py +0 -330
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_streaming.py +0 -433
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cost_tracker.py +0 -27
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_engine.py +0 -876
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_evaluator.py +0 -212
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_instruction_templates.py +0 -639
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompt_metadata.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompts.py +0 -660
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider.py +0 -330
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider_contract_sync.py +0 -18
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_reasoning_effort_validation.py +0 -565
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_schemas.py +0 -827
- package/tools/vds-scripts/audit_orchestrator/tests/test_logging_config.py +0 -297
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_enums.py +0 -185
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_findings.py +0 -1159
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_project_profile.py +0 -307
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_registry.py +0 -532
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_template.py +0 -708
- package/tools/vds-scripts/audit_orchestrator/tests/test_observability/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_observability/test_metrics.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/tests/test_paths_config_phase2.py +0 -21
- package/tools/vds-scripts/audit_orchestrator/tests/test_performance/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_performance/test_fr79_performance_guardrails.py +0 -199
- package/tools/vds-scripts/audit_orchestrator/tests/test_phase156_hardening.py +0 -498
- package/tools/vds-scripts/audit_orchestrator/tests/test_phase93_regression_guards.py +0 -123
- package/tools/vds-scripts/audit_orchestrator/tests/test_pipeline_integration.py +0 -517
- package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/test_detection.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_bitbucket_link_resolver.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer.py +0 -84
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer_projection.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_macros.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_publisher.py +0 -2171
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_evidence_links.py +0 -129
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_field_sanitizer.py +0 -108
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_hierarchy_publisher.py +0 -134
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_incremental_plan_parser.py +0 -62
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_live_data_injector.py +0 -48
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_macro_builder.py +0 -22
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_p161_confluence_optimization.py +0 -168
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_priority_renderer.py +0 -96
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_project_aggregate_renderer.py +0 -364
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_storage_validation.py +0 -273
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_summary_refactor.py +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_system_doc_hierarchy.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_table_builder.py +0 -23
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_vietnamese_templates.py +0 -37
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_wiring_integration.py +0 -290
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_aggregation_report.py +0 -181
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_checklist_generator.py +0 -258
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_gap_report.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_json_generator.py +0 -317
- package/tools/vds-scripts/audit_orchestrator/tests/test_result_merger_p149.py +0 -347
- package/tools/vds-scripts/audit_orchestrator/tests/test_route_mode_p149.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/tests/test_rubric_parser.py +0 -179
- package/tools/vds-scripts/audit_orchestrator/tests/test_scorer.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/test_state/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_state/test_sparse_coverage.py +0 -117
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_langgraph_workflow.py +0 -2072
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_p161_runtime_hardening.py +0 -341
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p149.py +0 -112
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p172.py +0 -126
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_guidance_p150.py +0 -95
- package/tools/vds-scripts/audit_orchestrator/tests/unit/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_agentic_investigator_phase115.py +0 -42
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_requirement_analysis_agent.py +0 -412
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_agent_updates.py +0 -131
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_scanner.py +0 -397
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_executor.py +0 -316
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_fallback.py +0 -299
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_policy.py +0 -520
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_telemetry.py +0 -306
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_synthesis_fixes.py +0 -761
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_argument_robustness.py +0 -272
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry.py +0 -2548
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_ast_grep.py +0 -87
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase123_scoping.py +0 -353
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase94_ff.py +0 -445
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_vector_search_phase115.py +0 -35
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_utils.py +0 -1007
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_vector_evidence_toolset.py +0 -622
- package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/test_workflow_cli.py +0 -123
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_cache_guard.py +0 -479
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_checklist_parser_phase120.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_diagram_extractor.py +0 -467
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_enrichment_extractor.py +0 -59
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_graphify_collector.py +0 -158
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_completeness.py +0 -563
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_freshness_evaluator.py +0 -493
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_cache_metrics.py +0 -365
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_completeness_service.py +0 -2736
- package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_discovery.py +0 -47
- package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_redaction.py +0 -15
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_ad_hoc_analyzer.py +0 -576
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_agent_loop.py +0 -1896
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_anchor_filter_cl003.py +0 -181
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_evidence_cache.py +0 -155
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_processor.py +0 -3608
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_contract.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_scoping.py +0 -371
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_companion_phase123.py +0 -142
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_evidence_phase123.py +0 -249
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_confluence_checklist_contract_export_parity.py +0 -813
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_cross_repo_config_phase122.py +0 -613
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_dspy_requirement_classifier.py +0 -517
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_diversity.py +0 -144
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_truncation.py +0 -108
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_grounding_validator.py +0 -127
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_guidance_injection_phase120.py +0 -105
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_analysis_phase122.py +0 -761
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_pre_filter_phase167.py +0 -334
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_llm_row_evaluator_retries.py +0 -3684
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_loader_phase123.py +0 -345
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_manual_check_gating_phase122.py +0 -474
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_parallel_eval.py +0 -263
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase122_verifier_phase122.py +0 -169
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase166_route_failover.py +0 -437
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_post_eval_cl003_shared_lib.py +0 -267
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_postproc_streaming.py +0 -194
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_pre_eval_gating_phase122.py +0 -362
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_prepare_topology_coverage.py +0 -247
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_private_dns_sanitization_phase104.py +0 -397
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_evidence_context.py +0 -450
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_knowledge_store.py +0 -487
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_topology.py +0 -1142
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_provider_failure_classifier.py +0 -195
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_extractor.py +0 -496
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_synthesizer.py +0 -653
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_repo_type_classifier.py +0 -303
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis.py +0 -508
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_execution_scope.py +0 -239
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase114.py +0 -919
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase115.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_shared_lib.py +0 -340
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_drift.py +0 -729
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_nlp.py +0 -670
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_scope_phase122.py +0 -615
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_matrix.py +0 -258
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_override.py +0 -141
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_routing_precision.py +0 -650
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_dual_evidence.py +0 -2987
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_instruction_runtime_phase122.py +0 -365
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_runtime.py +0 -830
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_runtime_hardening_phase122.py +0 -225
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoped_na_skip.py +0 -107
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoring_enhancements.py +0 -404
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_retrieval_phase123.py +0 -441
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_routing_phase123.py +0 -279
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_resource_indexing_phase122.py +0 -188
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_recommendation.py +0 -225
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_routing_cl003_shared_lib.py +0 -338
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skills_toolset.py +0 -319
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_stability_metric.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_target_selector.py +0 -958
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_tracker.py +0 -121
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_wiring.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_tool_first_planner.py +0 -7103
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_knowledge_persistence.py +0 -332
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_query_service.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_unverified_ref_retry.py +0 -909
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_evidence.py +0 -515
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_gaps.py +0 -422
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_readiness.py +0 -428
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_confluence_hierarchy.py +0 -227
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_project_title_generation.py +0 -335
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_helpers.py +0 -290
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_integration.py +0 -557
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_readiness_renderer.py +0 -381
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_repo_title_consistency.py +0 -266
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_upload_hierarchy_integration.py +0 -470
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_dspy.py +0 -177
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_nlp_accuracy.py +0 -72
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_retrieval_modes.py +0 -123
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_verify_phase111_requirement_analysis.py +0 -409
- package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_chain_cli.py +0 -277
- package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_loader.py +0 -502
- package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/test_skill_routing.py +0 -209
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_bitbucket_source.py +0 -66
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_non_retryable_markers.py +0 -88
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_repo_info.py +0 -212
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_completeness.py +0 -598
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_events_contract_phase169.py +0 -100
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_hardening_phase158.py +0 -392
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_persistence_phase157.py +0 -914
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_embedding_client.py +0 -64
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_get_latest_completed_run.py +0 -313
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_heartbeat_phase169.py +0 -109
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_hybrid_search.py +0 -398
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_normalize_url.py +0 -262
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase152_query_surface.py +0 -59
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase98_confluence_document_model.py +0 -202
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_published_pages.py +0 -754
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_readiness_helpers.py +0 -193
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_ledger.py +0 -522
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_management.py +0 -378
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_schema_contract_phase170.py +0 -755
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_cmds.py +0 -231
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_loaders.py +0 -2151
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_run_api.py +0 -2226
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store.py +0 -1435
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch.py +0 -646
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch_status_view.py +0 -181
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_scope.py +0 -213
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_utilization_persist_phase169.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vds_search.py +0 -263
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_api.py +0 -319
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_runtime.py +0 -175
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_store.py +0 -1756
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/test_repo_sync.py +0 -257
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_artifact_exclusion.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_auto_promote_phase158.py +0 -337
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_carry_forward_artifact_filtering.py +0 -317
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_checklist_precache_p160a.py +0 -416
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_cli_decomposition_fr219.py +0 -269
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_code_chunk_carry_forward.py +0 -203
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_coherence.py +0 -180
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_secret_policy.py +0 -522
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_project_id_migration.py +0 -318
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_status_diagnostics.py +0 -239
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_department_priority_ordering.py +0 -131
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_coordinator_phase158.py +0 -402
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_job_identity_p167a.py +0 -238
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_ramp_up_phase171.py +0 -434
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatcher.py +0 -911
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_doc_type_en_inference.py +0 -246
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_early_exit_unchunked_repos.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors.py +0 -237
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors_taxonomy.py +0 -83
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_chunking_config_phase98.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_cmds_state_helpers.py +0 -33
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_docs_code_chunking.py +0 -260
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_finalize_dispatch_run_phase168.py +0 -341
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_identity.py +0 -221
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_infrastructure_detection.py +0 -441
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_junction_table_phase95.py +0 -259
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_late_binding_assignment_p167c.py +0 -286
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_misc_cmds_fr224_225_hardening.py +0 -194
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_p172_integration.py +0 -306
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_parent_provider_preflight.py +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase92.py +0 -141
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase93.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase115_search_strategy.py +0 -106
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase154_title_consistency.py +0 -117
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase155_param_forwarding.py +0 -304
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase158_concurrency_defaults.py +0 -207
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_doctor_schema.py +0 -319
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_regression.py +0 -334
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase94_corpus_lifecycle.py +0 -307
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase96_repo_key_migration.py +0 -305
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_pipelined_scheduling.py +0 -130
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_availability_probe.py +0 -616
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_aware_row_timeout.py +0 -102
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_timeout_stagger_p160cd.py +0 -205
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_progress_summary_phase169.py +0 -96
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_registry_checklist_diagnostics.py +0 -124
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_resume_manifest_p167b.py +0 -268
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_risk_mitigations_p160e1.py +0 -348
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_single_row_shards_p160b.py +0 -357
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_state_repo_discovery.py +0 -504
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_sync_metadata_entries.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_task_models.py +0 -1796
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_utilization_telemetry_p167e.py +0 -259
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_vietnamese_fts_hardening.py +0 -160
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_phase98_enrichment.py +0 -92
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_project_merge_materialization.py +0 -322
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_row_key_migration_guard.py +0 -88
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_short_circuit_phase121.py +0 -564
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_single_target_row_context.py +0 -49
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_zero_result_messaging.py +0 -76
- package/tools/vds-scripts/bandit-report.json +0 -2974
- package/tools/vds-scripts/brd_orchestrator/README.md +0 -29
- package/tools/vds-scripts/brd_orchestrator/pyproject.toml +0 -63
- package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/__init__.py +0 -17
- package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/cli.py +0 -187
- package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/validator.py +0 -121
- package/tools/vds-scripts/brd_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/brd_orchestrator/tests/test_cli.py +0 -62
- package/tools/vds-scripts/brd_orchestrator/tests/test_validator.py +0 -33
- package/tools/vds-scripts/circular_dependency_orchestrator/README.md +0 -30
- package/tools/vds-scripts/circular_dependency_orchestrator/pyproject.toml +0 -43
- package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/__init__.py +0 -16
- package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/cli.py +0 -904
- package/tools/vds-scripts/circular_dependency_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/__init__.py +0 -0
- package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/test_cli.py +0 -354
- package/tools/vds-scripts/coverage.json +0 -1
- package/tools/vds-scripts/create_pr.py +0 -57
- package/tools/vds-scripts/diagram_generator/README.md +0 -663
- package/tools/vds-scripts/diagram_generator/ci_validate.sh +0 -16
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.png +0 -0
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.puml +0 -23
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.png +0 -0
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.puml +0 -21
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.png +0 -0
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.puml +0 -14
- package/tools/vds-scripts/diagram_generator/examples/github-actions-validate.yml +0 -39
- package/tools/vds-scripts/diagram_generator/generate_all_diagrams.py +0 -827
- package/tools/vds-scripts/diagram_generator/generate_insurance_c4_diagrams.py +0 -261
- package/tools/vds-scripts/diagram_generator/generate_insurance_c4_quick.py +0 -486
- package/tools/vds-scripts/diagram_generator/pyproject.toml +0 -28
- package/tools/vds-scripts/diagram_generator/render_png.py +0 -59
- package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/__init__.py +0 -3
- package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/cli.py +0 -50
- package/tools/vds-scripts/diagram_generator/test_c4_hierarchical.py +0 -142
- package/tools/vds-scripts/diagram_generator/test_c4_quick.py +0 -131
- package/tools/vds-scripts/diagram_generator/tests/__init__.py +0 -0
- package/tools/vds-scripts/diagram_generator/tests/test_analyzer_completeness.py +0 -260
- package/tools/vds-scripts/diagram_generator/tests/test_c4_syntax_correctness.py +0 -138
- package/tools/vds-scripts/diagram_generator/tests/test_component_coverage.py +0 -182
- package/tools/vds-scripts/diagram_generator/tests/test_mermaid_output.py +0 -80
- package/tools/vds-scripts/diagram_generator/tests/test_png_generation.py +0 -112
- package/tools/vds-scripts/diagram_generator/tests/test_scenario_templates.py +0 -15
- package/tools/vds-scripts/diagram_generator/tests/test_sequence_accuracy.py +0 -93
- package/tools/vds-scripts/diagram_generator/tests/test_structurizr_export.py +0 -177
- package/tools/vds-scripts/diagram_generator/tests/test_style_consistency.py +0 -174
- package/tools/vds-scripts/diagram_generator/tests/test_usecase_generator.py +0 -201
- package/tools/vds-scripts/diagram_generator/tests/test_usecase_integration.py +0 -124
- package/tools/vds-scripts/docker/compose.phase2-verification.yml +0 -31
- package/tools/vds-scripts/docker-compose.openapi-validator.yml +0 -14
- package/tools/vds-scripts/excel_orchestrator/README.md +0 -288
- package/tools/vds-scripts/excel_orchestrator/RESEARCH_BASED_UPDATES_REPORT.md +0 -261
- package/tools/vds-scripts/excel_orchestrator/add_essential_missing_effort.py +0 -255
- package/tools/vds-scripts/excel_orchestrator/adjust_effort_complexity.py +0 -184
- package/tools/vds-scripts/excel_orchestrator/brd_analysis_and_task_breakdown.py +0 -632
- package/tools/vds-scripts/excel_orchestrator/brd_analysis_comprehensive.py +0 -1029
- package/tools/vds-scripts/excel_orchestrator/check_overlaps_and_brd_coverage.py +0 -570
- package/tools/vds-scripts/excel_orchestrator/clean_remarks_column.py +0 -127
- package/tools/vds-scripts/excel_orchestrator/comprehensive_brd_check.py +0 -322
- package/tools/vds-scripts/excel_orchestrator/create_buffered_summary.py +0 -119
- package/tools/vds-scripts/excel_orchestrator/create_service_totals_sheet.py +0 -118
- package/tools/vds-scripts/excel_orchestrator/examples/basic_operations.py +0 -85
- package/tools/vds-scripts/excel_orchestrator/expand_all_tasks.py +0 -341
- package/tools/vds-scripts/excel_orchestrator/expand_tasks.py +0 -304
- package/tools/vds-scripts/excel_orchestrator/fill_brd_references.py +0 -347
- package/tools/vds-scripts/excel_orchestrator/fill_remarks_and_colors.py +0 -132
- package/tools/vds-scripts/excel_orchestrator/finalize_brd_and_cleanup.py +0 -295
- package/tools/vds-scripts/excel_orchestrator/finalize_brd_coverage.py +0 -327
- package/tools/vds-scripts/excel_orchestrator/fix_all_formulas.py +0 -99
- package/tools/vds-scripts/excel_orchestrator/fix_detail_presentation.py +0 -113
- package/tools/vds-scripts/excel_orchestrator/fix_presentation_and_effort.py +0 -116
- package/tools/vds-scripts/excel_orchestrator/fix_presentation_consistency.py +0 -231
- package/tools/vds-scripts/excel_orchestrator/fix_remarks_matching.py +0 -179
- package/tools/vds-scripts/excel_orchestrator/group_tasks_by_service_id.py +0 -210
- package/tools/vds-scripts/excel_orchestrator/increase_brd_coverage.py +0 -497
- package/tools/vds-scripts/excel_orchestrator/increase_effort_complexity.py +0 -155
- package/tools/vds-scripts/excel_orchestrator/organize_and_deduplicate.py +0 -273
- package/tools/vds-scripts/excel_orchestrator/pyproject.toml +0 -64
- package/tools/vds-scripts/excel_orchestrator/rebuild_all_formulas.py +0 -146
- package/tools/vds-scripts/excel_orchestrator/remove_base_multiplier_and_check_duplicates.py +0 -310
- package/tools/vds-scripts/excel_orchestrator/remove_duplicate_brd_tasks.py +0 -137
- package/tools/vds-scripts/excel_orchestrator/research_based_updates.py +0 -457
- package/tools/vds-scripts/excel_orchestrator/restore_e_values.py +0 -172
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/cli.py +0 -746
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/config.py +0 -74
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/converters.py +0 -226
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/errors.py +0 -88
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/excel_client.py +0 -443
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/formatters.py +0 -211
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/logging.py +0 -57
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/source_contract.py +0 -29
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/target_state_status.py +0 -837
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/ulnc_alignment.py +0 -1291
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/validators.py +0 -164
- package/tools/vds-scripts/excel_orchestrator/sync_detail_and_total_sheets.py +0 -211
- package/tools/vds-scripts/excel_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/excel_orchestrator/tests/conftest.py +0 -36
- package/tools/vds-scripts/excel_orchestrator/tests/test_cli.py +0 -383
- package/tools/vds-scripts/excel_orchestrator/tests/test_excel_client.py +0 -129
- package/tools/vds-scripts/excel_orchestrator/tests/test_ulnc_alignment.py +0 -373
- package/tools/vds-scripts/excel_orchestrator/tests/test_validators.py +0 -64
- package/tools/vds-scripts/excel_orchestrator/update_api_database_effort.py +0 -261
- package/tools/vds-scripts/excel_orchestrator/update_buffers_inline.py +0 -115
- package/tools/vds-scripts/excel_orchestrator/update_complex_services_and_add_new.py +0 -336
- package/tools/vds-scripts/excel_orchestrator/update_responsibility_and_fix_rows.py +0 -208
- package/tools/vds-scripts/excel_orchestrator/update_task_breakdown_vietnamese.py +0 -309
- package/tools/vds-scripts/excel_orchestrator/update_vietnamese_and_responsibility.py +0 -415
- package/tools/vds-scripts/excel_orchestrator/verify_brd_coverage_comprehensive.py +0 -401
- package/tools/vds-scripts/hexagonal_orchestrator/README.md +0 -530
- package/tools/vds-scripts/hexagonal_orchestrator/pyproject.toml +0 -48
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/__init__.py +0 -39
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/__init__.py +0 -19
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/base.py +0 -95
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/fallback.py +0 -614
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/java.py +0 -372
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/python.py +0 -437
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cache.py +0 -331
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/classifier.py +0 -263
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cli.py +0 -554
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/config.py +0 -577
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/models.py +0 -159
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/profiler.py +0 -451
- package/tools/vds-scripts/hexagonal_orchestrator/test-config.yaml +0 -38
- package/tools/vds-scripts/hexagonal_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driven/persistence/InMemoryUserRepository.java +0 -62
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driving/api/UserController.java +0 -101
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/EmailService.java +0 -33
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/UserRepository.java +0 -45
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/usecase/CreateUser.java +0 -58
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/Email.java +0 -80
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/User.java +0 -98
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-noncompliant/domain/User.java +0 -64
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Menu.java +0 -13
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Product.java +0 -16
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/email_service.py +0 -60
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/user_repository.py +0 -78
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/user.py +0 -56
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/email.py +0 -63
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/application/user_service.py +0 -1837
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/domain/user.py +0 -43
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cache.py +0 -458
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_integration.py +0 -942
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_unit.py +0 -557
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cross_repo_pollution.py +0 -275
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_foundation.py +0 -129
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_integration.py +0 -1524
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_java_analyzer.py +0 -642
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_timing_unit.py +0 -60
- package/tools/vds-scripts/intellij_orchestrator/README.md +0 -55
- package/tools/vds-scripts/intellij_orchestrator/pyproject.toml +0 -64
- package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/__init__.py +0 -17
- package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/cli.py +0 -210
- package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/core.py +0 -260
- package/tools/vds-scripts/intellij_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/intellij_orchestrator/tests/test_cli.py +0 -112
- package/tools/vds-scripts/intellij_orchestrator/tests/test_core.py +0 -83
- package/tools/vds-scripts/links_orchestrator/README.md +0 -63
- package/tools/vds-scripts/links_orchestrator/pyproject.toml +0 -64
- package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/__init__.py +0 -10
- package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/cli.py +0 -254
- package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/validator.py +0 -244
- package/tools/vds-scripts/links_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/links_orchestrator/tests/test_cli.py +0 -128
- package/tools/vds-scripts/links_orchestrator/tests/test_validator.py +0 -76
- package/tools/vds-scripts/lsp_orchestrator/.dockerignore +0 -69
- package/tools/vds-scripts/lsp_orchestrator/ARCHITECTURE.md +0 -383
- package/tools/vds-scripts/lsp_orchestrator/CODE_QUALITY_IMPROVEMENTS.md +0 -196
- package/tools/vds-scripts/lsp_orchestrator/COMMANDS.md +0 -870
- package/tools/vds-scripts/lsp_orchestrator/Dockerfile +0 -59
- package/tools/vds-scripts/lsp_orchestrator/IMPLEMENTATION_SUMMARY.md +0 -490
- package/tools/vds-scripts/lsp_orchestrator/LSP_ISSUES_AND_FINDINGS.md +0 -380
- package/tools/vds-scripts/lsp_orchestrator/README.md +0 -616
- package/tools/vds-scripts/lsp_orchestrator/SETUP.md +0 -143
- package/tools/vds-scripts/lsp_orchestrator/TEST_COVERAGE_SUMMARY.md +0 -255
- package/tools/vds-scripts/lsp_orchestrator/VERIFICATION_CHECKLIST.md +0 -814
- package/tools/vds-scripts/lsp_orchestrator/docker-compose.yml +0 -102
- package/tools/vds-scripts/lsp_orchestrator/docs/FOR_LLMS.md +0 -401
- package/tools/vds-scripts/lsp_orchestrator/docs/explanation/lsp-response-matching.md +0 -79
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/automate-with-json.md +0 -159
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/docker-mode.md +0 -256
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/navigate-code.md +0 -116
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/parallel-processing.md +0 -179
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/project-tool-detection.md +0 -320
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/type-check-code.md +0 -46
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/use-daemon-mode.md +0 -78
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/wsl2-optimization.md +0 -227
- package/tools/vds-scripts/lsp_orchestrator/docs/index.md +0 -88
- package/tools/vds-scripts/lsp_orchestrator/docs/operator-hover-definition.md +0 -143
- package/tools/vds-scripts/lsp_orchestrator/docs/reference/commands.md +0 -581
- package/tools/vds-scripts/lsp_orchestrator/docs/reference/configuration.md +0 -422
- package/tools/vds-scripts/lsp_orchestrator/docs/tutorials/00-quick-start.md +0 -169
- package/tools/vds-scripts/lsp_orchestrator/pyproject.toml +0 -63
- package/tools/vds-scripts/lsp_orchestrator/src/test_file.py +0 -5
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/__init__.py +0 -3
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/aggregator.py +0 -340
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/basedpyright_runner.py +0 -167
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/cli.py +0 -3370
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/code_actions.py +0 -79
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/core.py +0 -3295
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_client.py +0 -672
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_manager.py +0 -577
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_server.py +0 -1040
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/__init__.py +0 -9
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/project_detector.py +0 -537
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/formatters.py +0 -141
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ipc_protocol.py +0 -225
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_client.py +0 -957
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_router.py +0 -335
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mcp_server.py +0 -181
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/__init__.py +0 -201
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_detector.py +0 -646
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_tools.py +0 -114
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models.py +0 -399
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mypy_runner.py +0 -209
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/protocols.py +0 -52
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_lsp_client.py +0 -109
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_runner.py +0 -44
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/utils.py +0 -959
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/workspace_indexer.py +0 -1037
- package/tools/vds-scripts/lsp_orchestrator/test_workspace_lsp.py +0 -6
- package/tools/vds-scripts/lsp_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/lsp_orchestrator/tests/conftest.py +0 -6
- package/tools/vds-scripts/lsp_orchestrator/tests/test_aggregator.py +0 -59
- package/tools/vds-scripts/lsp_orchestrator/tests/test_cli.py +0 -111
- package/tools/vds-scripts/lsp_orchestrator/tests/test_detect_tools_command.py +0 -186
- package/tools/vds-scripts/lsp_orchestrator/tests/test_formatter_linter_detection.py +0 -519
- package/tools/vds-scripts/lsp_orchestrator/tests/test_integration_phase9_10_11.py +0 -367
- package/tools/vds-scripts/lsp_orchestrator/tests/test_mypy_runner.py +0 -482
- package/tools/vds-scripts/lsp_orchestrator/tests/test_package_manager_detection.py +0 -399
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase10.py +0 -389
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase11.py +0 -327
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase12_integration.py +0 -634
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase9.py +0 -196
- package/tools/vds-scripts/lsp_orchestrator/tests/test_project_detector.py +0 -377
- package/tools/vds-scripts/lsp_orchestrator/tests/test_test_runner_detection.py +0 -549
- package/tools/vds-scripts/lsp_orchestrator/tests/test_type_checker_routing.py +0 -362
- package/tools/vds-scripts/lsp_orchestrator/tests/test_workspace_indexer.py +0 -144
- package/tools/vds-scripts/markdown_orchestrator/README.md +0 -72
- package/tools/vds-scripts/markdown_orchestrator/pyproject.toml +0 -39
- package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/cli.py +0 -102
- package/tools/vds-scripts/multi_agent_orchestrator/Dockerfile +0 -65
- package/tools/vds-scripts/multi_agent_orchestrator/README.md +0 -306
- package/tools/vds-scripts/multi_agent_orchestrator/postman/README.md +0 -264
- package/tools/vds-scripts/multi_agent_orchestrator/postman/TEST_RESULTS_SUMMARY.md +0 -197
- package/tools/vds-scripts/multi_agent_orchestrator/postman/VDS-Multi-Agent-Orchestrator-API.postman_collection.json +0 -1010
- package/tools/vds-scripts/multi_agent_orchestrator/postman/environments/local-development.postman_environment.json +0 -55
- package/tools/vds-scripts/multi_agent_orchestrator/postman/test-results.json +0 -24146
- package/tools/vds-scripts/multi_agent_orchestrator/pyproject.toml +0 -63
- package/tools/vds-scripts/multi_agent_orchestrator/run_api.py +0 -9
- package/tools/vds-scripts/multi_agent_orchestrator/run_mock_api.py +0 -9
- package/tools/vds-scripts/multi_agent_orchestrator/simple_test.py +0 -53
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/__init__.py +0 -25
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/agent_pool.py +0 -433
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/__init__.py +0 -5
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/main.py +0 -722
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/mock_main.py +0 -812
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/change_log.py +0 -515
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/cli.py +0 -424
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/config.py +0 -220
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/conflict_resolver.py +0 -462
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/coordinator.py +0 -627
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/models.py +0 -389
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/progress_dashboard.py +0 -380
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/redis_client.py +0 -245
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/scheduler_subscriber.py +0 -272
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_manager.py +0 -536
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_tracking.py +0 -550
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/vds_ai_memory_client.py +0 -352
- package/tools/vds-scripts/multi_agent_orchestrator/test_complete_system.py +0 -149
- package/tools/vds-scripts/multi_agent_orchestrator/test_infrastructure_only.py +0 -194
- package/tools/vds-scripts/multi_agent_orchestrator/test_integration.py +0 -108
- package/tools/vds-scripts/multi_agent_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_agent_registration_credential_validator.py +0 -223
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_config.py +0 -210
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_models.py +0 -195
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_w9_agent_routes.py +0 -321
- package/tools/vds-scripts/openapi_orchestrator/README.md +0 -197
- package/tools/vds-scripts/openapi_orchestrator/pyproject.toml +0 -106
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/__init__.py +0 -29
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/cli.py +0 -345
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/full_validator.py +0 -183
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/spec_validator.py +0 -197
- package/tools/vds-scripts/openapi_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/openapi_orchestrator/tests/test_cli.py +0 -234
- package/tools/vds-scripts/openapi_orchestrator/tests/test_full_validator.py +0 -203
- package/tools/vds-scripts/openapi_orchestrator/tests/test_spec_validator.py +0 -295
- package/tools/vds-scripts/pdf_orchestrator/.dockerignore +0 -93
- package/tools/vds-scripts/pdf_orchestrator/.env.example +0 -40
- package/tools/vds-scripts/pdf_orchestrator/.ruff_rules.py +0 -350
- package/tools/vds-scripts/pdf_orchestrator/.yamllint.yml +0 -43
- package/tools/vds-scripts/pdf_orchestrator/DEVELOPMENT_PLAN.md +0 -80
- package/tools/vds-scripts/pdf_orchestrator/Dockerfile +0 -87
- package/tools/vds-scripts/pdf_orchestrator/README.md +0 -608
- package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.md +0 -6
- package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.pdf +0 -0
- package/tools/vds-scripts/pdf_orchestrator/config/alertmanager.yml +0 -83
- package/tools/vds-scripts/pdf_orchestrator/config/prometheus.prod.yml +0 -98
- package/tools/vds-scripts/pdf_orchestrator/config/prometheus.yml +0 -40
- package/tools/vds-scripts/pdf_orchestrator/config/redis.conf +0 -78
- package/tools/vds-scripts/pdf_orchestrator/docs/COMPETITIVE_ANALYSIS_REPORT.md +0 -309
- package/tools/vds-scripts/pdf_orchestrator/docs/FEATURES_GUIDE.md +0 -518
- package/tools/vds-scripts/pdf_orchestrator/docs/MULTI_USER_DEPLOYMENT_GUIDE.md +0 -615
- package/tools/vds-scripts/pdf_orchestrator/docs/USER_GUIDE.md +0 -829
- package/tools/vds-scripts/pdf_orchestrator/pyproject.toml +0 -87
- package/tools/vds-scripts/pdf_orchestrator/pytest.ini +0 -71
- package/tools/vds-scripts/pdf_orchestrator/ruff.toml +0 -6
- package/tools/vds-scripts/pdf_orchestrator/scripts/debug_security_report.py +0 -59
- package/tools/vds-scripts/pdf_orchestrator/scripts/demo_library_selector.py +0 -109
- package/tools/vds-scripts/pdf_orchestrator/scripts/generate_project_stats.py +0 -52
- package/tools/vds-scripts/pdf_orchestrator/scripts/generate_styled_pdf.py +0 -95
- package/tools/vds-scripts/pdf_orchestrator/scripts/migrate_render_pdfs.py +0 -285
- package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.bat +0 -283
- package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.sh +0 -324
- package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/cli.py +0 -542
- package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/config.py +0 -33
- package/tools/vds-scripts/pdf_orchestrator/tests/README.md +0 -650
- package/tools/vds-scripts/pdf_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/pdf_orchestrator/tests/conftest.py +0 -520
- package/tools/vds-scripts/pdf_orchestrator/tests/requirements.txt +0 -51
- package/tools/vds-scripts/pdf_orchestrator/tests/run_tests.py +0 -659
- package/tools/vds-scripts/pdf_orchestrator/tests/test_config.py +0 -36
- package/tools/vds-scripts/progress_report_orchestrator/Dockerfile +0 -77
- package/tools/vds-scripts/progress_report_orchestrator/README.md +0 -39
- package/tools/vds-scripts/progress_report_orchestrator/alembic/env.py +0 -42
- package/tools/vds-scripts/progress_report_orchestrator/alembic/script.py.mako +0 -28
- package/tools/vds-scripts/progress_report_orchestrator/alembic/versions/0001_initial_progress_schema.py +0 -180
- package/tools/vds-scripts/progress_report_orchestrator/alembic.ini +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/pyproject.toml +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/__init__.py +0 -3
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/endpoint_scanner.py +0 -238
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/git_activity.py +0 -159
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/hexagonal.py +0 -100
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/test_scanner.py +0 -136
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/cli.py +0 -743
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/config.py +0 -50
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/__init__.py +0 -12
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/alembic_filters.py +0 -64
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/memory.py +0 -82
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/analysis.py +0 -84
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/report.py +0 -117
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/topology.py +0 -101
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/kg_parser.py +0 -252
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/uc_reader.py +0 -159
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/concurrency.py +0 -39
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/llm_eval.py +0 -570
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/report.py +0 -1256
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/structural.py +0 -384
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/sync.py +0 -143
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/__init__.py +0 -5
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/engine.py +0 -105
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/templates.py +0 -236
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/scheduler_subscriber.py +0 -238
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/README.md +0 -56
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-architecture-reviewer/SKILL.md +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-endpoint-matcher/SKILL.md +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/schema.py +0 -625
- package/tools/vds-scripts/progress_report_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/.gitkeep +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/doc-dependencies.yaml +0 -79
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-docs.yaml +0 -478
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-services.yaml +0 -18
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/registry.yaml +0 -346
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/phase3_baseline_standard.md +0 -564
- package/tools/vds-scripts/progress_report_orchestrator/tests/integration/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/integration/test_checkpoint.py +0 -276
- package/tools/vds-scripts/progress_report_orchestrator/tests/test_alembic_migrations.py +0 -265
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_analyzers.py +0 -267
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_bounded_gather.py +0 -176
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_cli_phase_report.py +0 -119
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_delta.py +0 -169
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_error_handling.py +0 -150
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_gate_exit_codes.py +0 -230
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_git_activity.py +0 -215
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_kg_parser.py +0 -267
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_autodetect.py +0 -183
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_eval.py +0 -529
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_memory_integration.py +0 -151
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_migration_contract.py +0 -254
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_mode_rendering.py +0 -576
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_models.py +0 -251
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_progress_llm_config.py +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_recommendations.py +0 -480
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_report_enhancements.py +0 -415
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_resume_reload.py +0 -343
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_trend_regression.py +0 -294
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_uc_reader.py +0 -169
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_valence_gap.py +0 -293
- package/tools/vds-scripts/project-cycle-report.json +0 -14
- package/tools/vds-scripts/project-dependency-graph.json +0 -11361
- package/tools/vds-scripts/project-topology.json +0 -99
- package/tools/vds-scripts/public_interface_boundary_orchestrator/pyproject.toml +0 -18
- package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/__init__.py +0 -0
- package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/cli.py +0 -232
- package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/test_cli.py +0 -108
- package/tools/vds-scripts/research_orchestrator/README.md +0 -68
- package/tools/vds-scripts/research_orchestrator/py.typed +0 -0
- package/tools/vds-scripts/research_orchestrator/pyproject.toml +0 -95
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/__init__.py +0 -3
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/_env.py +0 -11
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/cli.py +0 -335
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/config.py +0 -43
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/models.py +0 -89
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/scoring.py +0 -102
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/exceptions.py +0 -78
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/http_client.py +0 -160
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/logging.py +0 -49
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/formatters.py +0 -93
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/py.typed +0 -1
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/build.py +0 -156
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/format.py +0 -147
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health.py +0 -66
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health_graph.py +0 -52
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/registry.py +0 -127
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/search.py +0 -230
- package/tools/vds-scripts/research_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/tests/conftest.py +0 -53
- package/tools/vds-scripts/research_orchestrator/tests/test_cli.py +0 -222
- package/tools/vds-scripts/research_orchestrator/tests/test_config.py +0 -23
- package/tools/vds-scripts/research_orchestrator/tests/test_exceptions.py +0 -62
- package/tools/vds-scripts/research_orchestrator/tests/test_formatters.py +0 -89
- package/tools/vds-scripts/research_orchestrator/tests/test_graph_integration.py +0 -149
- package/tools/vds-scripts/research_orchestrator/tests/test_http_client.py +0 -134
- package/tools/vds-scripts/research_orchestrator/tests/test_report_build.py +0 -128
- package/tools/vds-scripts/research_orchestrator/tests/test_report_format.py +0 -91
- package/tools/vds-scripts/research_orchestrator/tests/test_scoring.py +0 -95
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/__init__.py +0 -1
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_health.py +0 -139
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_registry.py +0 -135
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_search.py +0 -238
- package/tools/vds-scripts/run-history.json +0 -26
- package/tools/vds-scripts/schema_converter/README.md +0 -109
- package/tools/vds-scripts/schema_converter/pyproject.toml +0 -37
- package/tools/vds-scripts/schema_converter/src/vds_schema_converter/__init__.py +0 -3
- package/tools/vds-scripts/schema_converter/src/vds_schema_converter/cli.py +0 -50
- package/tools/vds-scripts/schema_converter/tests/__init__.py +0 -0
- package/tools/vds-scripts/schema_converter/tests/test_json_schema_generator.py +0 -115
- package/tools/vds-scripts/schema_converter/tests/test_mermaid_generator.py +0 -112
- package/tools/vds-scripts/schema_converter/tests/test_parser.py +0 -111
- package/tools/vds-scripts/schema_converter/tests/test_plantuml_generator.py +0 -112
- package/tools/vds-scripts/schema_converter/tests/test_plantuml_validator.py +0 -69
- package/tools/vds-scripts/schema_converter/tests/test_prisma_generator.py +0 -113
- package/tools/vds-scripts/schema_converter/tests/test_sql_generator.py +0 -138
- package/tools/vds-scripts/schema_converter/tests/test_typeorm_generator.py +0 -110
- package/tools/vds-scripts/schema_converter/tests/test_validators.py +0 -96
- package/tools/vds-scripts/spec_orchestrator/README.md +0 -13
- package/tools/vds-scripts/spec_orchestrator/pyproject.toml +0 -40
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/cli.py +0 -162
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/core.py +0 -575
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/sync.py +0 -306
- package/tools/vds-scripts/spec_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/spec_orchestrator/tests/test_frontmatter_drift.py +0 -243
- package/tools/vds-scripts/spec_orchestrator/tests/test_sync.py +0 -342
- package/tools/vds-scripts/structure_orchestrator/README.md +0 -60
- package/tools/vds-scripts/structure_orchestrator/pyproject.toml +0 -103
- package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/__init__.py +0 -13
- package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/cli.py +0 -308
- package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/validator.py +0 -257
- package/tools/vds-scripts/structure_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/structure_orchestrator/tests/test_cli.py +0 -161
- package/tools/vds-scripts/structure_orchestrator/tests/test_helpers.py +0 -115
- package/tools/vds-scripts/structure_orchestrator/tests/test_validator.py +0 -104
- package/tools/vds-scripts/task_orchestrator/README.md +0 -50
- package/tools/vds-scripts/task_orchestrator/__init__.py +0 -18
- package/tools/vds-scripts/task_orchestrator/pyproject.toml +0 -43
- package/tools/vds-scripts/task_orchestrator/scripts/run_excel_sync.py +0 -36
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/__init__.py +0 -13
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/audit.py +0 -134
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/cli.py +0 -127
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/debug.py +0 -133
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/normalize.py +0 -113
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/refine.py +0 -201
- package/tools/vds-scripts/task_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/task_orchestrator/tests/test_task_orchestrator.py +0 -84
- package/tools/vds-scripts/temp_query_projects.py +0 -2
- package/tools/vds-scripts/test_small.md +0 -1
- package/tools/vds-scripts/text_utils_orchestrator/pyproject.toml +0 -20
- package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/__init__.py +0 -7
- package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/i18n.py +0 -143
- package/tools/vds-scripts/text_utils_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/text_utils_orchestrator/tests/test_i18n.py +0 -53
- package/tools/vds-scripts/upgrade_major.py +0 -61
- package/tools/vds-scripts/upgrade_major_v2.py +0 -64
- package/tools/vds-scripts/verify_violations.py +0 -57
- package/tools/vds-scripts/workflow-summary.json +0 -325
- package/tools/vds-scripts/workflow-summary.md +0 -8
package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_agent.py
DELETED
|
@@ -1,1829 +0,0 @@
|
|
|
1
|
-
"""Security Analysis Agent (TSK-048).
|
|
2
|
-
|
|
3
|
-
Enhanced with LLM-powered security analysis across multiple dimensions:
|
|
4
|
-
- Authentication/authorization patterns
|
|
5
|
-
- Input validation practices
|
|
6
|
-
- Secrets management
|
|
7
|
-
- Dependency vulnerabilities
|
|
8
|
-
- Security headers and configurations
|
|
9
|
-
|
|
10
|
-
Migrated to PydanticAI patterns (Phase 8).
|
|
11
|
-
|
|
12
|
-
Phase 23 Refinement (FR-1, FR-5):
|
|
13
|
-
- Scoped security pattern scanning via SecurityPatternScanner
|
|
14
|
-
- All security findings are now scoped to the target repository only
|
|
15
|
-
- Uses ripgrep with Python fallback for pattern-based scanning
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
from __future__ import annotations
|
|
19
|
-
|
|
20
|
-
import asyncio
|
|
21
|
-
import json
|
|
22
|
-
import os
|
|
23
|
-
import re
|
|
24
|
-
import time
|
|
25
|
-
from pathlib import Path
|
|
26
|
-
from typing import Any
|
|
27
|
-
|
|
28
|
-
from vds_agent_core.skills.executor import SkillExecutor
|
|
29
|
-
|
|
30
|
-
from vds_audit_orchestrator.agents.base import AgentResult, BaseAgent
|
|
31
|
-
from vds_audit_orchestrator.agents.pydantic_base import (
|
|
32
|
-
AuditDeps,
|
|
33
|
-
SecurityFindings,
|
|
34
|
-
Vulnerability,
|
|
35
|
-
_build_toolsets,
|
|
36
|
-
)
|
|
37
|
-
from vds_audit_orchestrator.agents.security_scanner import (
|
|
38
|
-
SECURITY_PATTERNS,
|
|
39
|
-
SecurityPatternScanner,
|
|
40
|
-
)
|
|
41
|
-
from vds_audit_orchestrator.agents.toolsets.evidence_corpus import create_evidence_corpus_toolset
|
|
42
|
-
from vds_audit_orchestrator.agents.toolsets.filesystem import create_filesystem_toolset
|
|
43
|
-
from vds_audit_orchestrator.agents.toolsets.vector_evidence import (
|
|
44
|
-
create_vector_evidence_toolset,
|
|
45
|
-
is_vector_evidence_ready,
|
|
46
|
-
)
|
|
47
|
-
from vds_audit_orchestrator.config import get_config
|
|
48
|
-
from vds_audit_orchestrator.errors import AUDIT_ERROR_CODES, AuditError
|
|
49
|
-
from vds_audit_orchestrator.evidence.corpus import EvidenceCorpus, deserialize_evidence_corpus
|
|
50
|
-
from vds_audit_orchestrator.models.evidence import EvidenceBundle
|
|
51
|
-
from vds_audit_orchestrator.models.task import AuditTask
|
|
52
|
-
|
|
53
|
-
# =============================================================================
|
|
54
|
-
# System Prompts
|
|
55
|
-
# =============================================================================
|
|
56
|
-
|
|
57
|
-
SECURITY_ANALYSIS_SYSTEM_PROMPT = """You are a security analyst specialized in application security.
|
|
58
|
-
Analyze the provided evidence and identify security issues across these dimensions:
|
|
59
|
-
|
|
60
|
-
1. **Authentication/Authorization**: Missing or weak auth checks, insecure session handling
|
|
61
|
-
2. **Input Validation**: SQL injection, XSS, command injection risks
|
|
62
|
-
3. **Secrets Management**: Hardcoded credentials, exposed API keys, insecure env var usage
|
|
63
|
-
4. **Dependency Security**: Known vulnerable dependencies, outdated packages
|
|
64
|
-
5. **Security Configuration**: Missing security headers, insecure defaults, CORS issues
|
|
65
|
-
|
|
66
|
-
For each vulnerability found, provide:
|
|
67
|
-
- id: A unique identifier (e.g., SEC-001, CWE-89)
|
|
68
|
-
- severity: critical, high, medium, or low
|
|
69
|
-
- category: dependency, code, or configuration
|
|
70
|
-
- title: Brief title of the vulnerability
|
|
71
|
-
- description: Clear explanation of the issue
|
|
72
|
-
- affected_component: Where the issue was found
|
|
73
|
-
- remediation: How to fix it
|
|
74
|
-
|
|
75
|
-
Also provide:
|
|
76
|
-
- posture_score: Overall security posture score from 0.0 to 10.0 (10 being most secure)
|
|
77
|
-
- recommendations: List of prioritized security recommendations
|
|
78
|
-
- security_controls: List of security controls detected (e.g., "JWT authentication", "input validation")
|
|
79
|
-
|
|
80
|
-
Base your confidence score (0.0-1.0) on the completeness and clarity of evidence provided.
|
|
81
|
-
A confidence below 0.4 indicates insufficient evidence for reliable analysis.
|
|
82
|
-
|
|
83
|
-
Output format contract (strict):
|
|
84
|
-
- Return ONLY structured JSON output, no markdown and no prose outside the schema.
|
|
85
|
-
- Use exactly these top-level keys: vulnerabilities, posture_score, recommendations, confidence, sonarqube_issues, dependency_vulnerabilities, security_controls.
|
|
86
|
-
- For each vulnerability always include: id, severity, category, title, description, affected_component, remediation.
|
|
87
|
-
|
|
88
|
-
Tool usage guardrails (strict):
|
|
89
|
-
- Never call grep_search/rg_search/ast_grep_search with empty or broad wildcard-only patterns (e.g. ".", ".*", "*", "^.*$").
|
|
90
|
-
- Use targeted security patterns or concrete identifiers, then pivot to read_file/read_evidence_document for grounding.
|
|
91
|
-
- Avoid generic file reads (README, package manifests) unless directly tied to a security finding.
|
|
92
|
-
"""
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
# =============================================================================
|
|
96
|
-
# SecurityAgent Implementation
|
|
97
|
-
# =============================================================================
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
class SecurityAgent(BaseAgent):
|
|
101
|
-
"""Agent for comprehensive security analysis.
|
|
102
|
-
|
|
103
|
-
Uses PydanticAI-powered analysis to evaluate security posture across:
|
|
104
|
-
- Code patterns from git evidence
|
|
105
|
-
- SonarQube vulnerability metrics
|
|
106
|
-
- Scoped pattern scanning via SecurityPatternScanner
|
|
107
|
-
|
|
108
|
-
Phase 23 Refinement (FR-1, FR-5):
|
|
109
|
-
- All security findings are now scoped to the target repository only
|
|
110
|
-
- Uses ripgrep with Python fallback for pattern-based scanning
|
|
111
|
-
|
|
112
|
-
This agent has been migrated to use the PydanticAI foundation from
|
|
113
|
-
pydantic_base.py while maintaining backward compatibility with the
|
|
114
|
-
existing analyze() method signature.
|
|
115
|
-
"""
|
|
116
|
-
|
|
117
|
-
_DEFAULT_TOOL_ALLOWLIST: tuple[str, ...] = (
|
|
118
|
-
"list_evidence_documents",
|
|
119
|
-
"search_evidence",
|
|
120
|
-
"read_evidence_document",
|
|
121
|
-
"search_evidence_vector",
|
|
122
|
-
"search_code_vector",
|
|
123
|
-
"grep_search",
|
|
124
|
-
"rg_search",
|
|
125
|
-
"ast_grep_search",
|
|
126
|
-
"read_file",
|
|
127
|
-
)
|
|
128
|
-
|
|
129
|
-
@staticmethod
|
|
130
|
-
def _apply_tool_allowlist(toolsets: list[Any], allowlist: list[str]) -> list[Any]:
|
|
131
|
-
"""Filter FunctionToolset entries to allowed tool names only."""
|
|
132
|
-
allowed = {name for name in allowlist if isinstance(name, str) and name.strip()}
|
|
133
|
-
if not allowed:
|
|
134
|
-
return list(toolsets)
|
|
135
|
-
filtered: list[Any] = []
|
|
136
|
-
for toolset in toolsets:
|
|
137
|
-
tools_map = getattr(toolset, "tools", None)
|
|
138
|
-
if isinstance(tools_map, dict):
|
|
139
|
-
for name in list(tools_map):
|
|
140
|
-
if name not in allowed:
|
|
141
|
-
tools_map.pop(name, None)
|
|
142
|
-
if not tools_map:
|
|
143
|
-
continue
|
|
144
|
-
filtered.append(toolset)
|
|
145
|
-
return filtered
|
|
146
|
-
|
|
147
|
-
@staticmethod
|
|
148
|
-
def _parse_positive_int_env(name: str) -> int | None:
|
|
149
|
-
"""Read optional positive integer env override; ignore invalid values."""
|
|
150
|
-
raw = os.getenv(name)
|
|
151
|
-
if raw is None:
|
|
152
|
-
return None
|
|
153
|
-
value = raw.strip()
|
|
154
|
-
if not value:
|
|
155
|
-
return None
|
|
156
|
-
try:
|
|
157
|
-
parsed = int(value)
|
|
158
|
-
except ValueError:
|
|
159
|
-
return None
|
|
160
|
-
return parsed if parsed > 0 else None
|
|
161
|
-
|
|
162
|
-
@staticmethod
|
|
163
|
-
def _parse_env_bool(name: str) -> bool | None:
|
|
164
|
-
"""Parse boolean env flag using common truthy/falsy tokens."""
|
|
165
|
-
raw = os.getenv(name)
|
|
166
|
-
if raw is None:
|
|
167
|
-
return None
|
|
168
|
-
value = raw.strip().lower()
|
|
169
|
-
if value in {"1", "true", "yes", "on"}:
|
|
170
|
-
return True
|
|
171
|
-
if value in {"0", "false", "no", "off"}:
|
|
172
|
-
return False
|
|
173
|
-
return None
|
|
174
|
-
|
|
175
|
-
@classmethod
|
|
176
|
-
def _parse_positive_int_env_any(cls, *names: str) -> int | None:
|
|
177
|
-
"""Read first valid positive integer env across ordered key candidates."""
|
|
178
|
-
for name in names:
|
|
179
|
-
parsed = cls._parse_positive_int_env(name)
|
|
180
|
-
if parsed is not None:
|
|
181
|
-
return parsed
|
|
182
|
-
return None
|
|
183
|
-
|
|
184
|
-
@staticmethod
|
|
185
|
-
def _parse_csv_env(name: str) -> list[str]:
|
|
186
|
-
"""Read comma-separated env values as normalized non-empty strings."""
|
|
187
|
-
raw = os.getenv(name)
|
|
188
|
-
if raw is None:
|
|
189
|
-
return []
|
|
190
|
-
values: list[str] = []
|
|
191
|
-
for part in raw.split(","):
|
|
192
|
-
item = part.strip()
|
|
193
|
-
if item:
|
|
194
|
-
values.append(item)
|
|
195
|
-
return values
|
|
196
|
-
|
|
197
|
-
@classmethod
|
|
198
|
-
def _parse_csv_env_any(cls, *names: str) -> list[str]:
|
|
199
|
-
"""Read first non-empty CSV env across ordered key candidates."""
|
|
200
|
-
for name in names:
|
|
201
|
-
values = cls._parse_csv_env(name)
|
|
202
|
-
if values:
|
|
203
|
-
return values
|
|
204
|
-
return []
|
|
205
|
-
|
|
206
|
-
@classmethod
|
|
207
|
-
def _is_security_skills_toolset_enabled(cls, llm_config: Any) -> bool:
|
|
208
|
-
"""Resolve skills toolset enablement with env-first precedence."""
|
|
209
|
-
security_override = cls._parse_env_bool("VDS_AUDIT_AGENTIC_SECURITY_ENABLE_SKILLS_TOOLSET")
|
|
210
|
-
if security_override is not None:
|
|
211
|
-
return security_override
|
|
212
|
-
generic_override = cls._parse_env_bool("VDS_AUDIT_AGENTIC_ENABLE_SKILLS_TOOLSET")
|
|
213
|
-
if generic_override is not None:
|
|
214
|
-
return generic_override
|
|
215
|
-
return bool(getattr(llm_config, "skills_toolset_enabled", False))
|
|
216
|
-
|
|
217
|
-
async def analyze(
|
|
218
|
-
self,
|
|
219
|
-
evidence: EvidenceBundle | dict | AuditTask,
|
|
220
|
-
profile: dict[str, Any] | None = None,
|
|
221
|
-
evidence_corpus: EvidenceCorpus | dict[str, Any] | None = None,
|
|
222
|
-
) -> AgentResult:
|
|
223
|
-
"""Perform comprehensive security analysis on the evidence bundle.
|
|
224
|
-
|
|
225
|
-
Args:
|
|
226
|
-
evidence: Evidence bundle containing git files, SonarQube metrics, etc.
|
|
227
|
-
profile: Optional project profile for context.
|
|
228
|
-
|
|
229
|
-
Returns:
|
|
230
|
-
AgentResult with security findings and risk assessment.
|
|
231
|
-
"""
|
|
232
|
-
# Normalize evidence input and extract profile
|
|
233
|
-
evidence_data: Any = evidence
|
|
234
|
-
resolved_corpus = deserialize_evidence_corpus(evidence_corpus)
|
|
235
|
-
if isinstance(evidence, AuditTask):
|
|
236
|
-
payload = evidence.input_data
|
|
237
|
-
profile = profile or payload.get("profile", {})
|
|
238
|
-
evidence_data = payload.get("evidence_bundle") or payload.get("evidence")
|
|
239
|
-
if resolved_corpus is None:
|
|
240
|
-
resolved_corpus = deserialize_evidence_corpus(payload.get("evidence_corpus"))
|
|
241
|
-
elif isinstance(evidence, dict):
|
|
242
|
-
profile = profile or evidence.get("profile", {})
|
|
243
|
-
evidence_data = evidence.get("evidence_bundle") or evidence.get("evidence")
|
|
244
|
-
if resolved_corpus is None:
|
|
245
|
-
resolved_corpus = deserialize_evidence_corpus(evidence.get("evidence_corpus"))
|
|
246
|
-
|
|
247
|
-
if isinstance(evidence_data, dict):
|
|
248
|
-
try:
|
|
249
|
-
evidence_data = EvidenceBundle.model_validate(evidence_data)
|
|
250
|
-
except Exception as exc:
|
|
251
|
-
self.logger.debug("evidence_bundle_validation_failed", error=str(exc))
|
|
252
|
-
|
|
253
|
-
if not isinstance(evidence_data, EvidenceBundle):
|
|
254
|
-
return self._result(
|
|
255
|
-
agent_name="SecurityAgent",
|
|
256
|
-
success=False,
|
|
257
|
-
error=AuditError(
|
|
258
|
-
code=AUDIT_ERROR_CODES["AGENT_EVIDENCE_MISSING"],
|
|
259
|
-
message="Evidence bundle missing",
|
|
260
|
-
template_params={"agent_name": "SecurityAgent"},
|
|
261
|
-
),
|
|
262
|
-
)
|
|
263
|
-
|
|
264
|
-
evidence = evidence_data
|
|
265
|
-
|
|
266
|
-
# Store profile for use in LLM analysis
|
|
267
|
-
self._profile = profile
|
|
268
|
-
|
|
269
|
-
findings: list[dict[str, Any]] = []
|
|
270
|
-
metadata: dict[str, Any] = {
|
|
271
|
-
"llm_analysis_used": False,
|
|
272
|
-
"pydantic_ai_used": False,
|
|
273
|
-
"pattern_scanner_used": False,
|
|
274
|
-
"sonarqube_issues_parsed": 0,
|
|
275
|
-
}
|
|
276
|
-
SkillExecutor.reset_usage()
|
|
277
|
-
|
|
278
|
-
# 1. Extract repo_path from evidence bundle or profile (FR-1.1)
|
|
279
|
-
repo_path = self._get_repo_path(evidence, profile)
|
|
280
|
-
|
|
281
|
-
# 2. Use scoped pattern scanner for security patterns (FR-1, FR-5)
|
|
282
|
-
if repo_path:
|
|
283
|
-
pattern_findings = await self._scan_security_patterns(repo_path)
|
|
284
|
-
findings.extend(pattern_findings)
|
|
285
|
-
metadata["pattern_scanner_used"] = True
|
|
286
|
-
metadata["pattern_scanner_findings"] = len(pattern_findings)
|
|
287
|
-
metadata["repo_path"] = str(repo_path)
|
|
288
|
-
else:
|
|
289
|
-
self.logger.warning(
|
|
290
|
-
"security_pattern_scan_skipped",
|
|
291
|
-
reason="repo_path not available",
|
|
292
|
-
)
|
|
293
|
-
metadata["pattern_scanner_skipped"] = "repo_path not available"
|
|
294
|
-
|
|
295
|
-
# 3. Parse SonarQube evidence intelligently
|
|
296
|
-
sonar_findings = self._parse_sonarqube_evidence(evidence)
|
|
297
|
-
findings.extend(sonar_findings)
|
|
298
|
-
metadata["sonarqube_issues_parsed"] = len(evidence.sonarqube_evidence)
|
|
299
|
-
|
|
300
|
-
# 4. Analyze git evidence for security patterns
|
|
301
|
-
git_findings = self._analyze_git_evidence(evidence)
|
|
302
|
-
findings.extend(git_findings)
|
|
303
|
-
|
|
304
|
-
# 5. Use PydanticAI agent for comprehensive security assessment
|
|
305
|
-
if self.settings.enabled:
|
|
306
|
-
try:
|
|
307
|
-
llm_result = await self._run_pydantic_ai_analysis(
|
|
308
|
-
evidence,
|
|
309
|
-
findings,
|
|
310
|
-
profile,
|
|
311
|
-
evidence_corpus=resolved_corpus,
|
|
312
|
-
)
|
|
313
|
-
if llm_result:
|
|
314
|
-
# Merge LLM findings with rule-based findings
|
|
315
|
-
for vuln in llm_result.vulnerabilities:
|
|
316
|
-
findings.append(self._vulnerability_to_finding(vuln))
|
|
317
|
-
|
|
318
|
-
metadata["llm_analysis_used"] = True
|
|
319
|
-
metadata["pydantic_ai_used"] = True
|
|
320
|
-
metadata["posture_score"] = llm_result.posture_score
|
|
321
|
-
metadata["confidence"] = llm_result.confidence
|
|
322
|
-
metadata["security_controls"] = llm_result.security_controls
|
|
323
|
-
metadata["recommendations"] = llm_result.recommendations
|
|
324
|
-
metadata["overall_risk_level"] = self._score_to_risk_level(llm_result.posture_score)
|
|
325
|
-
metadata["security_summary"] = self._generate_summary(llm_result)
|
|
326
|
-
except Exception as e:
|
|
327
|
-
if self._is_tool_policy_violation_error(str(e)):
|
|
328
|
-
return self._result(
|
|
329
|
-
agent_name="SecurityAgent",
|
|
330
|
-
success=False,
|
|
331
|
-
findings=findings,
|
|
332
|
-
metadata=metadata,
|
|
333
|
-
error=str(e),
|
|
334
|
-
)
|
|
335
|
-
self.logger.warning("security_pydantic_ai_analysis_failed", error=str(e))
|
|
336
|
-
metadata["llm_error"] = str(e)
|
|
337
|
-
runtime_summary = getattr(self, "_security_agent_runtime_summary", None)
|
|
338
|
-
if isinstance(runtime_summary, dict):
|
|
339
|
-
configured_limit = runtime_summary.get("security_agent_tool_calls_limit")
|
|
340
|
-
if isinstance(configured_limit, int):
|
|
341
|
-
metadata["security_agent_tool_calls_limit"] = configured_limit
|
|
342
|
-
exhausted_count = int(runtime_summary.get("security_agent_tool_call_limit_exhausted_count", 0) or 0)
|
|
343
|
-
metadata["security_agent_tool_call_limit_exhausted_count"] = exhausted_count
|
|
344
|
-
|
|
345
|
-
tool_usage = SkillExecutor.consume_usage()
|
|
346
|
-
if tool_usage:
|
|
347
|
-
metadata["tool_usage"] = tool_usage
|
|
348
|
-
|
|
349
|
-
return self._result(
|
|
350
|
-
agent_name="SecurityAgent",
|
|
351
|
-
success=True,
|
|
352
|
-
findings=findings,
|
|
353
|
-
metadata=metadata,
|
|
354
|
-
)
|
|
355
|
-
|
|
356
|
-
@staticmethod
|
|
357
|
-
def _is_tool_policy_violation_error(error: str) -> bool:
|
|
358
|
-
lowered = error.lower()
|
|
359
|
-
return "tool policy violation" in lowered or "cadence guard unsatisfied" in lowered
|
|
360
|
-
|
|
361
|
-
def _resolve_tool_policy(self) -> tuple[list[str], dict[str, Any]]:
|
|
362
|
-
try:
|
|
363
|
-
cfg = get_config().agentic
|
|
364
|
-
except Exception:
|
|
365
|
-
return (list(self._DEFAULT_TOOL_ALLOWLIST), {})
|
|
366
|
-
configured_allowlist = cfg.tool_allowlists.get("security", [])
|
|
367
|
-
allowlist = [str(item).strip() for item in configured_allowlist if str(item).strip()]
|
|
368
|
-
if not allowlist:
|
|
369
|
-
allowlist = list(self._DEFAULT_TOOL_ALLOWLIST)
|
|
370
|
-
non_progress_policy = cfg.non_progress_policy.model_dump()
|
|
371
|
-
return (allowlist, non_progress_policy)
|
|
372
|
-
|
|
373
|
-
@staticmethod
|
|
374
|
-
def _is_invalid_tool_usage_error(error: str) -> bool:
|
|
375
|
-
lowered = error.lower()
|
|
376
|
-
return (
|
|
377
|
-
"tool" in lowered
|
|
378
|
-
and (
|
|
379
|
-
"not found" in lowered
|
|
380
|
-
or "unknown tool" in lowered
|
|
381
|
-
or "invalid tool" in lowered
|
|
382
|
-
or "not allowed" in lowered
|
|
383
|
-
or "not in available tools" in lowered
|
|
384
|
-
)
|
|
385
|
-
and "invalid tool call arguments" not in lowered
|
|
386
|
-
)
|
|
387
|
-
|
|
388
|
-
@staticmethod
|
|
389
|
-
def _parse_tool_name_from_invalid_tool_error(error: str) -> str | None:
|
|
390
|
-
patterns = (
|
|
391
|
-
r"tool '([^']+)'",
|
|
392
|
-
r'tool "([^"]+)"',
|
|
393
|
-
r"unknown tool[:\s]+([a-zA-Z0-9_./-]+)",
|
|
394
|
-
r"invalid tool[:\s]+([a-zA-Z0-9_./-]+)",
|
|
395
|
-
)
|
|
396
|
-
for pattern in patterns:
|
|
397
|
-
match = re.search(pattern, error, flags=re.IGNORECASE)
|
|
398
|
-
if match:
|
|
399
|
-
value = str(match.group(1)).strip()
|
|
400
|
-
if value:
|
|
401
|
-
return value
|
|
402
|
-
return None
|
|
403
|
-
|
|
404
|
-
@staticmethod
|
|
405
|
-
def _is_low_signal_search_burst(
|
|
406
|
-
telemetry: dict[str, Any] | None,
|
|
407
|
-
*,
|
|
408
|
-
policy: dict[str, Any] | None = None,
|
|
409
|
-
) -> bool:
|
|
410
|
-
if not isinstance(telemetry, dict):
|
|
411
|
-
return False
|
|
412
|
-
policy_values = dict(policy or {})
|
|
413
|
-
|
|
414
|
-
def _ival(name: str, default: int) -> int:
|
|
415
|
-
raw = policy_values.get(name, default)
|
|
416
|
-
try:
|
|
417
|
-
return int(raw)
|
|
418
|
-
except (TypeError, ValueError):
|
|
419
|
-
return default
|
|
420
|
-
|
|
421
|
-
min_tool_calls = _ival("search_only_burst_min_tool_calls", 4)
|
|
422
|
-
min_search_calls = _ival("search_only_burst_min_search_calls", 4)
|
|
423
|
-
max_read_calls = _ival("search_only_burst_max_read_calls", 0)
|
|
424
|
-
high_repeat_min_tool_calls = _ival("high_repeat_min_tool_calls", 10)
|
|
425
|
-
max_unique_tools_in_window = _ival("max_unique_tools_in_window", 2)
|
|
426
|
-
usage = telemetry.get("usage")
|
|
427
|
-
usage_tool_calls = int(usage.get("tool_calls", 0) or 0) if isinstance(usage, dict) else 0
|
|
428
|
-
event_tool_calls = int(telemetry.get("event_tool_calls_completed", telemetry.get("event_tool_calls", 0)) or 0)
|
|
429
|
-
tool_calls = max(usage_tool_calls, event_tool_calls)
|
|
430
|
-
by_name = telemetry.get("event_tool_count_by_name")
|
|
431
|
-
if not isinstance(by_name, dict):
|
|
432
|
-
return False
|
|
433
|
-
search_calls = (
|
|
434
|
-
int(by_name.get("list_directory", 0) or 0)
|
|
435
|
-
+ int(by_name.get("grep_search", 0) or 0)
|
|
436
|
-
+ int(by_name.get("rg_search", 0) or 0)
|
|
437
|
-
+ int(by_name.get("ast_grep_search", 0) or 0)
|
|
438
|
-
+ int(by_name.get("search_evidence", 0) or 0)
|
|
439
|
-
+ int(by_name.get("search_evidence_vector", 0) or 0)
|
|
440
|
-
+ int(by_name.get("search_code_vector", 0) or 0)
|
|
441
|
-
)
|
|
442
|
-
read_calls = (
|
|
443
|
-
int(by_name.get("read_file", 0) or 0)
|
|
444
|
-
+ int(by_name.get("read_evidence_document", 0) or 0)
|
|
445
|
-
+ int(by_name.get("get_definition", 0) or 0)
|
|
446
|
-
+ int(by_name.get("find_references", 0) or 0)
|
|
447
|
-
+ int(by_name.get("workspace_symbol", 0) or 0)
|
|
448
|
-
)
|
|
449
|
-
search_only_burst = (
|
|
450
|
-
tool_calls >= min_tool_calls and search_calls >= min_search_calls and read_calls <= max_read_calls
|
|
451
|
-
)
|
|
452
|
-
if search_only_burst:
|
|
453
|
-
return True
|
|
454
|
-
|
|
455
|
-
# Guard repetitive mixed search/read loops that never diversify beyond 1-2 tools.
|
|
456
|
-
# This catches long "grep -> read -> grep -> read" churn that still burns budgets.
|
|
457
|
-
unique_active_tools = sum(1 for value in by_name.values() if int(value or 0) > 0)
|
|
458
|
-
mixed_loop_churn = (
|
|
459
|
-
tool_calls >= high_repeat_min_tool_calls
|
|
460
|
-
and unique_active_tools <= max_unique_tools_in_window
|
|
461
|
-
and (search_calls + read_calls) >= max(1, tool_calls - 1)
|
|
462
|
-
)
|
|
463
|
-
if mixed_loop_churn:
|
|
464
|
-
return True
|
|
465
|
-
|
|
466
|
-
# Evidence-search churn: repeated search_evidence-like calls with weak
|
|
467
|
-
# read pivoting. This is common in low-quality loops and should trigger
|
|
468
|
-
# cadence guards earlier.
|
|
469
|
-
evidence_search_churn = tool_calls >= 8 and search_calls >= 6 and search_calls >= (read_calls * 3)
|
|
470
|
-
return evidence_search_churn
|
|
471
|
-
|
|
472
|
-
async def _run_pydantic_ai_analysis(
|
|
473
|
-
self,
|
|
474
|
-
evidence: EvidenceBundle,
|
|
475
|
-
existing_findings: list[dict[str, Any]],
|
|
476
|
-
profile: dict[str, Any] | None = None,
|
|
477
|
-
evidence_corpus: EvidenceCorpus | None = None,
|
|
478
|
-
) -> SecurityFindings | None:
|
|
479
|
-
"""Run PydanticAI-based security analysis.
|
|
480
|
-
|
|
481
|
-
Args:
|
|
482
|
-
evidence: Evidence bundle for analysis.
|
|
483
|
-
existing_findings: Findings from rule-based analysis.
|
|
484
|
-
profile: Optional project profile.
|
|
485
|
-
|
|
486
|
-
Returns:
|
|
487
|
-
SecurityFindings with LLM analysis results, or None on failure.
|
|
488
|
-
"""
|
|
489
|
-
# Build dependencies for PydanticAI agent
|
|
490
|
-
deps = AuditDeps.from_evidence_bundle(
|
|
491
|
-
evidence=evidence,
|
|
492
|
-
profile=profile,
|
|
493
|
-
settings=self.settings if hasattr(self.settings, "model_dump") else None,
|
|
494
|
-
evidence_corpus=evidence_corpus,
|
|
495
|
-
)
|
|
496
|
-
repo_path = self._get_repo_path(evidence, profile)
|
|
497
|
-
self._analysis_repo_path = repo_path
|
|
498
|
-
toolsets = self._build_analysis_toolsets()
|
|
499
|
-
if deps.evidence_corpus is not None:
|
|
500
|
-
try:
|
|
501
|
-
toolsets.append(create_evidence_corpus_toolset())
|
|
502
|
-
except Exception as exc:
|
|
503
|
-
self.logger.warning("security_evidence_corpus_toolset_unavailable", error=str(exc))
|
|
504
|
-
try:
|
|
505
|
-
if is_vector_evidence_ready(deps=deps):
|
|
506
|
-
toolsets.append(create_vector_evidence_toolset())
|
|
507
|
-
except Exception as exc:
|
|
508
|
-
self.logger.warning("security_vector_evidence_toolset_unavailable", error=str(exc))
|
|
509
|
-
zero_tool_mode = not toolsets
|
|
510
|
-
available_skill_names = self._collect_available_skill_names(toolsets)
|
|
511
|
-
max_tool_calls = 0 if zero_tool_mode else None
|
|
512
|
-
tool_call_limit_exhausted_count = 0
|
|
513
|
-
self._security_agent_runtime_summary = {
|
|
514
|
-
"security_agent_tool_call_limit_exhausted_count": 0,
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
local_openai_protocol = self._should_disable_parallel_tool_calls()
|
|
518
|
-
# Prepare context prompt
|
|
519
|
-
user_prompt = self._build_analysis_prompt(
|
|
520
|
-
evidence,
|
|
521
|
-
existing_findings,
|
|
522
|
-
available_skill_names=available_skill_names,
|
|
523
|
-
tools_available=not zero_tool_mode,
|
|
524
|
-
local_openai_mode=local_openai_protocol,
|
|
525
|
-
)
|
|
526
|
-
|
|
527
|
-
allowlist, non_progress_policy = self._resolve_tool_policy()
|
|
528
|
-
toolsets = self._apply_tool_allowlist(toolsets, allowlist)
|
|
529
|
-
base_toolsets = list(toolsets)
|
|
530
|
-
zero_tool_mode = not toolsets
|
|
531
|
-
agentic_cfg = get_config().agentic
|
|
532
|
-
strict_no_fallback = bool(agentic_cfg.strict_no_fallback)
|
|
533
|
-
compact_default_max_turns = (
|
|
534
|
-
self._parse_positive_int_env_any(
|
|
535
|
-
"VDS_AUDIT_AGENTIC_COMPACT_DEFAULT_MAX_TURNS",
|
|
536
|
-
"VDS_AUDIT_AGENTIC_SECURITY_COMPACT_DEFAULT_MAX_TURNS",
|
|
537
|
-
)
|
|
538
|
-
or 8
|
|
539
|
-
)
|
|
540
|
-
compact_default_max_tool_calls = (
|
|
541
|
-
self._parse_positive_int_env_any(
|
|
542
|
-
"VDS_AUDIT_AGENTIC_COMPACT_DEFAULT_MAX_TOOL_CALLS",
|
|
543
|
-
"VDS_AUDIT_AGENTIC_SECURITY_COMPACT_DEFAULT_MAX_TOOL_CALLS",
|
|
544
|
-
)
|
|
545
|
-
or 20
|
|
546
|
-
)
|
|
547
|
-
compact_max_turns_override = self._parse_positive_int_env_any(
|
|
548
|
-
"VDS_AUDIT_AGENTIC_COMPACT_MAX_TURNS",
|
|
549
|
-
"VDS_AUDIT_AGENTIC_SECURITY_COMPACT_MAX_TURNS",
|
|
550
|
-
)
|
|
551
|
-
compact_max_tool_calls_override = self._parse_positive_int_env_any(
|
|
552
|
-
"VDS_AUDIT_AGENTIC_COMPACT_MAX_TOOL_CALLS",
|
|
553
|
-
"VDS_AUDIT_AGENTIC_SECURITY_COMPACT_MAX_TOOL_CALLS",
|
|
554
|
-
)
|
|
555
|
-
# Quality-first policy: strict mode should still bound search churn tightly.
|
|
556
|
-
max_turn_cap = 8 if strict_no_fallback else 24
|
|
557
|
-
strict_turn_cap_override = self._parse_positive_int_env_any(
|
|
558
|
-
"VDS_AUDIT_AGENTIC_STRICT_MAX_TURNS_CAP",
|
|
559
|
-
"VDS_AUDIT_AGENTIC_SECURITY_STRICT_MAX_TURNS_CAP",
|
|
560
|
-
)
|
|
561
|
-
if strict_no_fallback and strict_turn_cap_override is not None:
|
|
562
|
-
# Explicit override should control strict turn cap for profile-level tuning.
|
|
563
|
-
max_turn_cap = strict_turn_cap_override
|
|
564
|
-
# Keep strict mode bounded to limit search churn before recovery/synthesis.
|
|
565
|
-
# 20 keeps enough room for one focused discovery pass plus evidence reads.
|
|
566
|
-
max_tool_calls_cap = 20 if strict_no_fallback else 64
|
|
567
|
-
strict_cap_override = self._parse_positive_int_env_any(
|
|
568
|
-
"VDS_AUDIT_AGENTIC_STRICT_MAX_TOOL_CALLS_CAP",
|
|
569
|
-
"VDS_AUDIT_AGENTIC_SECURITY_STRICT_MAX_TOOL_CALLS_CAP",
|
|
570
|
-
)
|
|
571
|
-
if strict_no_fallback and strict_cap_override is not None:
|
|
572
|
-
# Explicit override should control strict tool-call cap for profile-level tuning.
|
|
573
|
-
max_tool_calls_cap = strict_cap_override
|
|
574
|
-
if strict_no_fallback and local_openai_protocol:
|
|
575
|
-
local_turn_cap = compact_max_turns_override or compact_default_max_turns
|
|
576
|
-
local_tool_cap = compact_max_tool_calls_override or compact_default_max_tool_calls
|
|
577
|
-
max_turn_cap = min(max_turn_cap, local_turn_cap)
|
|
578
|
-
max_tool_calls_cap = min(max_tool_calls_cap, local_tool_cap)
|
|
579
|
-
security_specific_tool_calls_limit = self._parse_positive_int_env_any(
|
|
580
|
-
"VDS_AUDIT_AGENTIC_SECURITY_TOOL_CALLS_LIMIT",
|
|
581
|
-
"VDS_AUDIT_SECURITY_AGENT_TOOL_CALLS_LIMIT",
|
|
582
|
-
)
|
|
583
|
-
configured_max_tool_calls = (
|
|
584
|
-
int(security_specific_tool_calls_limit)
|
|
585
|
-
if security_specific_tool_calls_limit is not None
|
|
586
|
-
else int(agentic_cfg.max_tool_calls)
|
|
587
|
-
)
|
|
588
|
-
min_tool_calls_floor = 1 if security_specific_tool_calls_limit is not None else 8
|
|
589
|
-
max_turns = None if zero_tool_mode else max(4, min(int(agentic_cfg.max_turns), max_turn_cap))
|
|
590
|
-
max_tool_calls = (
|
|
591
|
-
0 if zero_tool_mode else max(min_tool_calls_floor, min(configured_max_tool_calls, max_tool_calls_cap))
|
|
592
|
-
)
|
|
593
|
-
security_reported_tool_calls_limit = int(max_tool_calls)
|
|
594
|
-
self._security_agent_runtime_summary = {
|
|
595
|
-
"security_agent_tool_calls_limit": security_reported_tool_calls_limit,
|
|
596
|
-
"security_agent_tool_call_limit_exhausted_count": tool_call_limit_exhausted_count,
|
|
597
|
-
}
|
|
598
|
-
if not zero_tool_mode:
|
|
599
|
-
if strict_no_fallback and local_openai_protocol:
|
|
600
|
-
self.logger.info(
|
|
601
|
-
"security_local_openai_budget_tightened",
|
|
602
|
-
max_turn_cap=max_turn_cap,
|
|
603
|
-
max_tool_calls_cap=max_tool_calls_cap,
|
|
604
|
-
strict_turn_cap_override=strict_turn_cap_override,
|
|
605
|
-
strict_cap_override=strict_cap_override,
|
|
606
|
-
compact_default_max_turns=compact_default_max_turns,
|
|
607
|
-
compact_default_max_tool_calls=compact_default_max_tool_calls,
|
|
608
|
-
compact_max_turns_override=compact_max_turns_override,
|
|
609
|
-
compact_max_tool_calls_override=compact_max_tool_calls_override,
|
|
610
|
-
)
|
|
611
|
-
self.logger.info(
|
|
612
|
-
"security_agent_budget_applied",
|
|
613
|
-
max_turns=max_turns,
|
|
614
|
-
max_tool_calls=max_tool_calls,
|
|
615
|
-
configured_max_turns=agentic_cfg.max_turns,
|
|
616
|
-
configured_max_tool_calls=configured_max_tool_calls,
|
|
617
|
-
security_specific_tool_calls_limit=security_specific_tool_calls_limit,
|
|
618
|
-
strict_no_fallback=strict_no_fallback,
|
|
619
|
-
)
|
|
620
|
-
guard_prompt = user_prompt
|
|
621
|
-
if local_openai_protocol and (not zero_tool_mode) and max_turns is not None:
|
|
622
|
-
guard_prompt = (
|
|
623
|
-
user_prompt
|
|
624
|
-
+ "\n\nLOCAL OPENAI EXECUTION BUDGET:\n"
|
|
625
|
-
+ f"- Hard cap: max_turns={max_turns}, max_tool_calls={max_tool_calls}.\n"
|
|
626
|
-
+ "- Use exactly one tool call per turn.\n"
|
|
627
|
-
+ "- Call list_evidence_documents once, then pivot to read_evidence_document/read_file.\n"
|
|
628
|
-
+ "- Use search_evidence only when a direct read target is not available.\n"
|
|
629
|
-
+ "- After at least one concrete read, stop tool calls and return final SecurityFindings JSON.\n"
|
|
630
|
-
)
|
|
631
|
-
used_allowlist_retry = False
|
|
632
|
-
used_cadence_retry = False
|
|
633
|
-
used_grounding_retry = False
|
|
634
|
-
used_budget_recovery_retry = False
|
|
635
|
-
used_budget_synthesis_retry = False
|
|
636
|
-
budget_recovery_mode = False
|
|
637
|
-
used_recovery_early_synthesis_pivot = False
|
|
638
|
-
used_output_format_retry = False
|
|
639
|
-
used_rate_limit_retry = False
|
|
640
|
-
|
|
641
|
-
while True:
|
|
642
|
-
try:
|
|
643
|
-
output = await self._run_pydantic_agent(
|
|
644
|
-
system_prompt=SECURITY_ANALYSIS_SYSTEM_PROMPT,
|
|
645
|
-
user_prompt=guard_prompt,
|
|
646
|
-
result_type=SecurityFindings,
|
|
647
|
-
complexity="standard",
|
|
648
|
-
deps=deps,
|
|
649
|
-
prompt_type="security_analysis",
|
|
650
|
-
toolsets=toolsets,
|
|
651
|
-
max_turns=max_turns,
|
|
652
|
-
max_tool_calls=max_tool_calls,
|
|
653
|
-
)
|
|
654
|
-
except Exception as exc:
|
|
655
|
-
message = str(exc)
|
|
656
|
-
rate_limited = ("rate limit" in message.lower()) or ("status_code: 429" in message.lower())
|
|
657
|
-
if rate_limited:
|
|
658
|
-
if used_rate_limit_retry:
|
|
659
|
-
raise RuntimeError("security provider rate-limit retry exhausted") from exc
|
|
660
|
-
used_rate_limit_retry = True
|
|
661
|
-
self.logger.warning(
|
|
662
|
-
"security_rate_limit_retry",
|
|
663
|
-
error=message,
|
|
664
|
-
backoff_seconds=2,
|
|
665
|
-
)
|
|
666
|
-
await asyncio.sleep(2)
|
|
667
|
-
continue
|
|
668
|
-
trailing_output_error = "trailing characters at line" in message.lower()
|
|
669
|
-
if trailing_output_error:
|
|
670
|
-
if used_output_format_retry:
|
|
671
|
-
raise RuntimeError("security output format recovery failed after retry") from exc
|
|
672
|
-
self.logger.warning(
|
|
673
|
-
"security_output_format_recovery_retry",
|
|
674
|
-
error=message,
|
|
675
|
-
)
|
|
676
|
-
used_output_format_retry = True
|
|
677
|
-
guard_prompt = (
|
|
678
|
-
user_prompt
|
|
679
|
-
+ "\n\nOUTPUT FORMAT RECOVERY MODE:\n"
|
|
680
|
-
+ "- STOP calling tools.\n"
|
|
681
|
-
+ "- Use only evidence already collected from previous tool results.\n"
|
|
682
|
-
+ "- Return exactly one strict SecurityFindings JSON object (no markdown, no prose).\n"
|
|
683
|
-
)
|
|
684
|
-
toolsets = []
|
|
685
|
-
zero_tool_mode = True
|
|
686
|
-
# Keep a minimal allowance for residual provider-side final_result
|
|
687
|
-
# tool emissions while still enforcing effective no-tool behavior.
|
|
688
|
-
max_tool_calls = 1
|
|
689
|
-
max_turns = None
|
|
690
|
-
continue
|
|
691
|
-
if self._is_invalid_tool_usage_error(message):
|
|
692
|
-
attempted_tool = self._parse_tool_name_from_invalid_tool_error(message)
|
|
693
|
-
if zero_tool_mode:
|
|
694
|
-
self.logger.warning(
|
|
695
|
-
"security_invalid_tool_usage_zero_tool_mode",
|
|
696
|
-
error=message,
|
|
697
|
-
attempted_tool=attempted_tool,
|
|
698
|
-
max_tool_calls=max_tool_calls,
|
|
699
|
-
)
|
|
700
|
-
raise RuntimeError(
|
|
701
|
-
"security tool policy violation: zero-tool mode forbids tool calls "
|
|
702
|
-
f"(attempted={attempted_tool or 'unknown'}, max_tool_calls=0)"
|
|
703
|
-
) from exc
|
|
704
|
-
self.logger.warning(
|
|
705
|
-
"security_invalid_tool_usage_allowlist",
|
|
706
|
-
error=message,
|
|
707
|
-
attempted_tool=attempted_tool,
|
|
708
|
-
allowed_tools=allowlist,
|
|
709
|
-
)
|
|
710
|
-
if used_allowlist_retry:
|
|
711
|
-
raise RuntimeError(
|
|
712
|
-
"security tool policy violation: invalid tool usage "
|
|
713
|
-
f"(attempted={attempted_tool or 'unknown'}, allowlist={allowlist})"
|
|
714
|
-
) from exc
|
|
715
|
-
used_allowlist_retry = True
|
|
716
|
-
guard_prompt = (
|
|
717
|
-
user_prompt
|
|
718
|
-
+ "\n\nTOOL ALLOWLIST GUARD:\n"
|
|
719
|
-
+ f"- Allowed tools for SecurityAgent: {', '.join(allowlist)}.\n"
|
|
720
|
-
+ f"- Invalid tool requested: {attempted_tool or 'unknown'}.\n"
|
|
721
|
-
+ "- Use only allowlisted tools and call one tool per turn.\n"
|
|
722
|
-
+ "- If search/list results are low-signal, pivot to read_file/read_evidence_document."
|
|
723
|
-
)
|
|
724
|
-
continue
|
|
725
|
-
lowered_message = message.lower()
|
|
726
|
-
limit_exhausted = (
|
|
727
|
-
("tool_calls_limit" in lowered_message)
|
|
728
|
-
or ("request_limit" in lowered_message)
|
|
729
|
-
or ("usagelimitexceeded" in lowered_message)
|
|
730
|
-
or ("usage limit exceeded" in lowered_message)
|
|
731
|
-
)
|
|
732
|
-
if limit_exhausted:
|
|
733
|
-
tool_call_limit_exhausted_count += 1
|
|
734
|
-
self._security_agent_runtime_summary = {
|
|
735
|
-
"security_agent_tool_calls_limit": security_reported_tool_calls_limit,
|
|
736
|
-
"security_agent_tool_call_limit_exhausted_count": tool_call_limit_exhausted_count,
|
|
737
|
-
}
|
|
738
|
-
exhausted_tool_calls = self._parse_tool_calls_exhausted_from_error(message) if limit_exhausted else None
|
|
739
|
-
exhausted_request_limit = (
|
|
740
|
-
self._parse_request_limit_exhausted_from_error(message) if limit_exhausted else None
|
|
741
|
-
)
|
|
742
|
-
skip_recovery_for_request_limit = bool(
|
|
743
|
-
limit_exhausted
|
|
744
|
-
and strict_no_fallback
|
|
745
|
-
and local_openai_protocol
|
|
746
|
-
and exhausted_request_limit is not None
|
|
747
|
-
)
|
|
748
|
-
# For strict mode we still allow one bounded read-first recovery pass
|
|
749
|
-
# when tool-call limit is exceeded, then pivot to synthesis-only mode.
|
|
750
|
-
skip_recovery_for_tool_calls_limit = False
|
|
751
|
-
if skip_recovery_for_request_limit and (not used_budget_recovery_retry):
|
|
752
|
-
self.logger.warning(
|
|
753
|
-
"security_budget_recovery_skipped_request_limit_strict_local_openai",
|
|
754
|
-
error=message,
|
|
755
|
-
max_turns=max_turns,
|
|
756
|
-
max_tool_calls=max_tool_calls,
|
|
757
|
-
exhausted_request_limit=exhausted_request_limit,
|
|
758
|
-
)
|
|
759
|
-
if skip_recovery_for_tool_calls_limit and (not used_budget_recovery_retry):
|
|
760
|
-
self.logger.warning(
|
|
761
|
-
"security_budget_recovery_skipped_tool_calls_limit_strict_mode",
|
|
762
|
-
error=message,
|
|
763
|
-
max_turns=max_turns,
|
|
764
|
-
max_tool_calls=max_tool_calls,
|
|
765
|
-
exhausted_tool_calls=exhausted_tool_calls,
|
|
766
|
-
)
|
|
767
|
-
if (
|
|
768
|
-
limit_exhausted
|
|
769
|
-
and (not zero_tool_mode)
|
|
770
|
-
and (not used_budget_recovery_retry)
|
|
771
|
-
and (not skip_recovery_for_request_limit)
|
|
772
|
-
and (not skip_recovery_for_tool_calls_limit)
|
|
773
|
-
):
|
|
774
|
-
used_budget_recovery_retry = True
|
|
775
|
-
budget_recovery_mode = True
|
|
776
|
-
recovery_max_turns = (
|
|
777
|
-
self._parse_positive_int_env_any(
|
|
778
|
-
"VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TURNS",
|
|
779
|
-
"VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TURNS",
|
|
780
|
-
)
|
|
781
|
-
or 6
|
|
782
|
-
)
|
|
783
|
-
recovery_max_tool_calls = (
|
|
784
|
-
self._parse_positive_int_env_any(
|
|
785
|
-
"VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TOOL_CALLS",
|
|
786
|
-
"VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TOOL_CALLS",
|
|
787
|
-
)
|
|
788
|
-
or 8
|
|
789
|
-
)
|
|
790
|
-
recovery_terminal_max_turns = (
|
|
791
|
-
self._parse_positive_int_env_any(
|
|
792
|
-
"VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TURNS",
|
|
793
|
-
"VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TURNS",
|
|
794
|
-
)
|
|
795
|
-
or recovery_max_turns
|
|
796
|
-
)
|
|
797
|
-
recovery_terminal_max_tool_calls = (
|
|
798
|
-
self._parse_positive_int_env_any(
|
|
799
|
-
"VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS",
|
|
800
|
-
"VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS",
|
|
801
|
-
)
|
|
802
|
-
or recovery_max_tool_calls
|
|
803
|
-
)
|
|
804
|
-
# Recovery is one bounded read-first terminal pass, not another full exploration loop.
|
|
805
|
-
recovery_max_turns = min(recovery_max_turns, recovery_terminal_max_turns)
|
|
806
|
-
recovery_max_tool_calls = min(recovery_max_tool_calls, recovery_terminal_max_tool_calls)
|
|
807
|
-
# Keep local-openai recovery tighter to avoid search churn on weak local models.
|
|
808
|
-
if local_openai_protocol:
|
|
809
|
-
recovery_max_tool_calls = min(recovery_max_tool_calls, max(2, recovery_max_turns + 1))
|
|
810
|
-
read_first_recovery_allowlist = [
|
|
811
|
-
"list_evidence_documents",
|
|
812
|
-
"read_evidence_document",
|
|
813
|
-
"read_file",
|
|
814
|
-
]
|
|
815
|
-
configured_recovery_allowlist = self._parse_csv_env_any(
|
|
816
|
-
"VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TOOL_ALLOWLIST",
|
|
817
|
-
"VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TOOL_ALLOWLIST",
|
|
818
|
-
)
|
|
819
|
-
if configured_recovery_allowlist:
|
|
820
|
-
allowed_recovery_tools = set(read_first_recovery_allowlist)
|
|
821
|
-
recovery_allowlist = [
|
|
822
|
-
tool_name
|
|
823
|
-
for tool_name in configured_recovery_allowlist
|
|
824
|
-
if tool_name in allowed_recovery_tools
|
|
825
|
-
]
|
|
826
|
-
else:
|
|
827
|
-
recovery_allowlist = list(read_first_recovery_allowlist)
|
|
828
|
-
telemetry_for_recovery = getattr(self, "_last_agent_run_telemetry", {})
|
|
829
|
-
if isinstance(telemetry_for_recovery, dict):
|
|
830
|
-
by_name = telemetry_for_recovery.get("event_tool_count_by_name")
|
|
831
|
-
if isinstance(by_name, dict):
|
|
832
|
-
search_evidence_calls = int(by_name.get("search_evidence", 0) or 0)
|
|
833
|
-
read_calls = int(by_name.get("read_file", 0) or 0) + int(
|
|
834
|
-
by_name.get("read_evidence_document", 0) or 0
|
|
835
|
-
)
|
|
836
|
-
if search_evidence_calls >= 6 and read_calls < 1:
|
|
837
|
-
# Force a deterministic pivot away from repeated search-only loops.
|
|
838
|
-
recovery_allowlist = list(read_first_recovery_allowlist)
|
|
839
|
-
self.logger.warning(
|
|
840
|
-
"security_budget_recovery_retry",
|
|
841
|
-
error=message,
|
|
842
|
-
max_turns=max_turns,
|
|
843
|
-
max_tool_calls=max_tool_calls,
|
|
844
|
-
exhausted_tool_calls=exhausted_tool_calls,
|
|
845
|
-
exhausted_request_limit=exhausted_request_limit,
|
|
846
|
-
recovery_max_turns=recovery_max_turns,
|
|
847
|
-
recovery_max_tool_calls=recovery_max_tool_calls,
|
|
848
|
-
recovery_allowlist=recovery_allowlist,
|
|
849
|
-
)
|
|
850
|
-
guard_prompt = (
|
|
851
|
-
user_prompt
|
|
852
|
-
+ "\n\nBUDGET RECOVERY MODE (READ-FOCUSED TERMINAL PASS):\n"
|
|
853
|
-
+ "- Keep tool usage minimal and deterministic.\n"
|
|
854
|
-
+ "- Start with list_evidence_documents, then read_evidence_document/read_file on concrete matches.\n"
|
|
855
|
-
+ "- This is the final tool-enabled pass before synthesis-only mode.\n"
|
|
856
|
-
+ "- Do not use broad search loops in recovery mode.\n"
|
|
857
|
-
+ "- Do not use broad wildcard-only search patterns ('.', '.*', '*', '^.*$').\n"
|
|
858
|
-
+ "- Do not read generic files (README/package manifests) unless explicitly security-relevant.\n"
|
|
859
|
-
+ "- Avoid repeated broad searches.\n"
|
|
860
|
-
+ "- Return final SecurityFindings JSON once at least one concrete evidence read is completed.\n"
|
|
861
|
-
)
|
|
862
|
-
toolsets = self._apply_tool_allowlist(list(base_toolsets), recovery_allowlist)
|
|
863
|
-
zero_tool_mode = not toolsets
|
|
864
|
-
if zero_tool_mode:
|
|
865
|
-
budget_recovery_mode = False
|
|
866
|
-
max_tool_calls = 1
|
|
867
|
-
max_turns = None
|
|
868
|
-
else:
|
|
869
|
-
max_turns = recovery_max_turns
|
|
870
|
-
max_tool_calls = recovery_max_tool_calls
|
|
871
|
-
continue
|
|
872
|
-
if limit_exhausted and not used_budget_synthesis_retry:
|
|
873
|
-
budget_recovery_mode = False
|
|
874
|
-
self.logger.warning(
|
|
875
|
-
"security_budget_synthesis_retry",
|
|
876
|
-
error=message,
|
|
877
|
-
max_turns=max_turns,
|
|
878
|
-
max_tool_calls=max_tool_calls,
|
|
879
|
-
)
|
|
880
|
-
used_budget_synthesis_retry = True
|
|
881
|
-
guard_prompt = (
|
|
882
|
-
user_prompt
|
|
883
|
-
+ "\n\nBUDGET EXHAUSTED - FINAL SYNTHESIS MODE:\n"
|
|
884
|
-
+ "- STOP calling tools.\n"
|
|
885
|
-
+ "- Use only evidence already collected from previous tool results.\n"
|
|
886
|
-
+ "- Return final SecurityFindings JSON now."
|
|
887
|
-
)
|
|
888
|
-
toolsets = []
|
|
889
|
-
zero_tool_mode = True
|
|
890
|
-
max_tool_calls = 1
|
|
891
|
-
# Disable request_limit in synthesis mode. Keeping a small request_limit
|
|
892
|
-
# here can preempt structured-output retries and fail the fallback itself.
|
|
893
|
-
max_turns = None
|
|
894
|
-
continue
|
|
895
|
-
raise
|
|
896
|
-
|
|
897
|
-
telemetry = getattr(self, "_last_agent_run_telemetry", {})
|
|
898
|
-
telemetry_has_tool_observability = isinstance(telemetry, dict) and any(
|
|
899
|
-
key in telemetry
|
|
900
|
-
for key in ("event_tool_calls_completed", "event_tool_calls", "event_tool_count_by_name")
|
|
901
|
-
)
|
|
902
|
-
if (not zero_tool_mode) and telemetry_has_tool_observability and self._has_zero_tool_activity(telemetry):
|
|
903
|
-
self.logger.warning(
|
|
904
|
-
"security_grounding_guard_unsatisfied",
|
|
905
|
-
observed_tool_names=(telemetry.get("event_tool_names") if isinstance(telemetry, dict) else None),
|
|
906
|
-
observed_tool_counts=(
|
|
907
|
-
telemetry.get("event_tool_count_by_name") if isinstance(telemetry, dict) else None
|
|
908
|
-
),
|
|
909
|
-
)
|
|
910
|
-
if budget_recovery_mode and not used_recovery_early_synthesis_pivot:
|
|
911
|
-
used_recovery_early_synthesis_pivot = True
|
|
912
|
-
budget_recovery_mode = False
|
|
913
|
-
self.logger.warning(
|
|
914
|
-
"security_recovery_terminal_pass_zero_tool_pivot",
|
|
915
|
-
observed_tool_names=(
|
|
916
|
-
telemetry.get("event_tool_names") if isinstance(telemetry, dict) else None
|
|
917
|
-
),
|
|
918
|
-
observed_tool_counts=(
|
|
919
|
-
telemetry.get("event_tool_count_by_name") if isinstance(telemetry, dict) else None
|
|
920
|
-
),
|
|
921
|
-
)
|
|
922
|
-
guard_prompt = (
|
|
923
|
-
user_prompt
|
|
924
|
-
+ "\n\nRECOVERY TERMINAL PASS EXIT - FINAL SYNTHESIS MODE:\n"
|
|
925
|
-
+ "- STOP calling tools.\n"
|
|
926
|
-
+ "- Synthesize from already collected evidence only.\n"
|
|
927
|
-
+ "- Return final SecurityFindings JSON now.\n"
|
|
928
|
-
)
|
|
929
|
-
toolsets = []
|
|
930
|
-
zero_tool_mode = True
|
|
931
|
-
max_tool_calls = 1
|
|
932
|
-
max_turns = None
|
|
933
|
-
continue
|
|
934
|
-
if used_grounding_retry:
|
|
935
|
-
# Prefer deterministic scanner findings over ungrounded LLM hallucinations.
|
|
936
|
-
return None
|
|
937
|
-
used_grounding_retry = True
|
|
938
|
-
guard_prompt = (
|
|
939
|
-
user_prompt
|
|
940
|
-
+ "\n\nEVIDENCE GROUNDING GUARD:\n"
|
|
941
|
-
+ "- Before final answer, call at least one search/list tool and one evidence-read tool.\n"
|
|
942
|
-
+ "- Ground each vulnerability in concrete evidence from read_file/read_evidence_document output.\n"
|
|
943
|
-
+ "- If no concrete evidence is found, return zero vulnerabilities and confidence <= 0.4."
|
|
944
|
-
)
|
|
945
|
-
continue
|
|
946
|
-
if self._is_low_signal_search_burst(telemetry, policy=non_progress_policy):
|
|
947
|
-
cadence_accept_min_read_calls = (
|
|
948
|
-
self._parse_positive_int_env_any(
|
|
949
|
-
"VDS_AUDIT_AGENTIC_CADENCE_ACCEPT_MIN_READ_CALLS",
|
|
950
|
-
"VDS_AUDIT_AGENTIC_SECURITY_CADENCE_ACCEPT_MIN_READ_CALLS",
|
|
951
|
-
)
|
|
952
|
-
or 2
|
|
953
|
-
)
|
|
954
|
-
cadence_accept_min_unique_tools = (
|
|
955
|
-
self._parse_positive_int_env_any(
|
|
956
|
-
"VDS_AUDIT_AGENTIC_CADENCE_ACCEPT_MIN_UNIQUE_TOOLS",
|
|
957
|
-
"VDS_AUDIT_AGENTIC_SECURITY_CADENCE_ACCEPT_MIN_UNIQUE_TOOLS",
|
|
958
|
-
)
|
|
959
|
-
or 2
|
|
960
|
-
)
|
|
961
|
-
self.logger.warning(
|
|
962
|
-
"security_low_signal_cadence_guard",
|
|
963
|
-
observed_tool_names=(telemetry.get("event_tool_names") if isinstance(telemetry, dict) else None),
|
|
964
|
-
observed_tool_counts=(
|
|
965
|
-
telemetry.get("event_tool_count_by_name") if isinstance(telemetry, dict) else None
|
|
966
|
-
),
|
|
967
|
-
cadence_accept_min_read_calls=cadence_accept_min_read_calls,
|
|
968
|
-
cadence_accept_min_unique_tools=cadence_accept_min_unique_tools,
|
|
969
|
-
)
|
|
970
|
-
has_min_grounding = self._has_min_evidence_grounding(
|
|
971
|
-
telemetry if isinstance(telemetry, dict) else None,
|
|
972
|
-
min_read_calls=cadence_accept_min_read_calls,
|
|
973
|
-
min_unique_tools=cadence_accept_min_unique_tools,
|
|
974
|
-
)
|
|
975
|
-
search_dominant = False
|
|
976
|
-
if isinstance(telemetry, dict):
|
|
977
|
-
by_name = telemetry.get("event_tool_count_by_name")
|
|
978
|
-
if isinstance(by_name, dict):
|
|
979
|
-
search_calls = (
|
|
980
|
-
int(by_name.get("list_directory", 0) or 0)
|
|
981
|
-
+ int(by_name.get("grep_search", 0) or 0)
|
|
982
|
-
+ int(by_name.get("rg_search", 0) or 0)
|
|
983
|
-
+ int(by_name.get("ast_grep_search", 0) or 0)
|
|
984
|
-
+ int(by_name.get("search_evidence", 0) or 0)
|
|
985
|
-
+ int(by_name.get("search_evidence_vector", 0) or 0)
|
|
986
|
-
+ int(by_name.get("search_code_vector", 0) or 0)
|
|
987
|
-
)
|
|
988
|
-
read_calls = (
|
|
989
|
-
int(by_name.get("read_file", 0) or 0)
|
|
990
|
-
+ int(by_name.get("read_evidence_document", 0) or 0)
|
|
991
|
-
+ int(by_name.get("get_definition", 0) or 0)
|
|
992
|
-
+ int(by_name.get("find_references", 0) or 0)
|
|
993
|
-
+ int(by_name.get("workspace_symbol", 0) or 0)
|
|
994
|
-
)
|
|
995
|
-
search_dominant = search_calls >= max(8, (read_calls * 4))
|
|
996
|
-
if budget_recovery_mode and (not has_min_grounding or search_dominant):
|
|
997
|
-
used_recovery_early_synthesis_pivot = True
|
|
998
|
-
budget_recovery_mode = False
|
|
999
|
-
self.logger.warning(
|
|
1000
|
-
"security_recovery_terminal_pass_early_synthesis_pivot",
|
|
1001
|
-
has_min_grounding=has_min_grounding,
|
|
1002
|
-
search_dominant=search_dominant,
|
|
1003
|
-
observed_tool_names=(
|
|
1004
|
-
telemetry.get("event_tool_names") if isinstance(telemetry, dict) else None
|
|
1005
|
-
),
|
|
1006
|
-
observed_tool_counts=(
|
|
1007
|
-
telemetry.get("event_tool_count_by_name") if isinstance(telemetry, dict) else None
|
|
1008
|
-
),
|
|
1009
|
-
)
|
|
1010
|
-
guard_prompt = (
|
|
1011
|
-
user_prompt
|
|
1012
|
-
+ "\n\nRECOVERY TERMINAL PASS EXIT - FINAL SYNTHESIS MODE:\n"
|
|
1013
|
-
+ "- STOP calling tools.\n"
|
|
1014
|
-
+ "- Synthesize from already collected evidence only.\n"
|
|
1015
|
-
+ "- Return final SecurityFindings JSON now.\n"
|
|
1016
|
-
)
|
|
1017
|
-
toolsets = []
|
|
1018
|
-
zero_tool_mode = True
|
|
1019
|
-
max_tool_calls = 1
|
|
1020
|
-
max_turns = None
|
|
1021
|
-
continue
|
|
1022
|
-
if used_cadence_retry and not has_min_grounding:
|
|
1023
|
-
raise RuntimeError("security cadence guard unsatisfied: low-signal repetition without pivot")
|
|
1024
|
-
used_cadence_retry = True
|
|
1025
|
-
if has_min_grounding and not search_dominant:
|
|
1026
|
-
# Avoid unnecessary extra model round-trips when output is already grounded.
|
|
1027
|
-
self.logger.info(
|
|
1028
|
-
"security_cadence_guard_grounded_output_accepted",
|
|
1029
|
-
observed_tool_names=(
|
|
1030
|
-
telemetry.get("event_tool_names") if isinstance(telemetry, dict) else None
|
|
1031
|
-
),
|
|
1032
|
-
observed_tool_counts=(
|
|
1033
|
-
telemetry.get("event_tool_count_by_name") if isinstance(telemetry, dict) else None
|
|
1034
|
-
),
|
|
1035
|
-
cadence_accept_min_read_calls=cadence_accept_min_read_calls,
|
|
1036
|
-
cadence_accept_min_unique_tools=cadence_accept_min_unique_tools,
|
|
1037
|
-
)
|
|
1038
|
-
budget_recovery_mode = False
|
|
1039
|
-
break
|
|
1040
|
-
guard_prompt = (
|
|
1041
|
-
user_prompt
|
|
1042
|
-
+ "\n\nCADENCE PIVOT GUARD:\n"
|
|
1043
|
-
+ "- Stop search/list-only bursts.\n"
|
|
1044
|
-
+ "- Pivot from list/search tools to read_file/read_evidence_document on a concrete match.\n"
|
|
1045
|
-
+ "- Do not finish without at least one high-signal evidence read."
|
|
1046
|
-
)
|
|
1047
|
-
if not zero_tool_mode:
|
|
1048
|
-
cadence_retry_max_turns = (
|
|
1049
|
-
self._parse_positive_int_env_any(
|
|
1050
|
-
"VDS_AUDIT_AGENTIC_CADENCE_RETRY_MAX_TURNS",
|
|
1051
|
-
"VDS_AUDIT_AGENTIC_SECURITY_CADENCE_RETRY_MAX_TURNS",
|
|
1052
|
-
)
|
|
1053
|
-
or 4
|
|
1054
|
-
)
|
|
1055
|
-
cadence_retry_max_tool_calls = (
|
|
1056
|
-
self._parse_positive_int_env_any(
|
|
1057
|
-
"VDS_AUDIT_AGENTIC_CADENCE_RETRY_MAX_TOOL_CALLS",
|
|
1058
|
-
"VDS_AUDIT_AGENTIC_SECURITY_CADENCE_RETRY_MAX_TOOL_CALLS",
|
|
1059
|
-
)
|
|
1060
|
-
or 6
|
|
1061
|
-
)
|
|
1062
|
-
cadence_retry_allowlist = self._parse_csv_env_any(
|
|
1063
|
-
"VDS_AUDIT_AGENTIC_CADENCE_RETRY_TOOL_ALLOWLIST",
|
|
1064
|
-
"VDS_AUDIT_AGENTIC_SECURITY_CADENCE_RETRY_TOOL_ALLOWLIST",
|
|
1065
|
-
)
|
|
1066
|
-
if cadence_retry_allowlist:
|
|
1067
|
-
toolsets = self._apply_tool_allowlist(toolsets, cadence_retry_allowlist)
|
|
1068
|
-
max_turns = (
|
|
1069
|
-
cadence_retry_max_turns if max_turns is None else min(max_turns, cadence_retry_max_turns)
|
|
1070
|
-
)
|
|
1071
|
-
max_tool_calls = min(max_tool_calls or 0, cadence_retry_max_tool_calls)
|
|
1072
|
-
continue
|
|
1073
|
-
vulnerability_count = len(getattr(output, "vulnerabilities", []) or [])
|
|
1074
|
-
if vulnerability_count > 0:
|
|
1075
|
-
strong_grounding = self._has_min_evidence_grounding(
|
|
1076
|
-
telemetry if isinstance(telemetry, dict) else None,
|
|
1077
|
-
min_read_calls=2,
|
|
1078
|
-
min_unique_tools=3,
|
|
1079
|
-
)
|
|
1080
|
-
if not strong_grounding:
|
|
1081
|
-
if zero_tool_mode:
|
|
1082
|
-
self.logger.warning(
|
|
1083
|
-
"security_strict_grounding_guard_zero_tool_coerce",
|
|
1084
|
-
vulnerabilities_count=vulnerability_count,
|
|
1085
|
-
observed_tool_names=(
|
|
1086
|
-
telemetry.get("event_tool_names") if isinstance(telemetry, dict) else None
|
|
1087
|
-
),
|
|
1088
|
-
observed_tool_counts=(
|
|
1089
|
-
telemetry.get("event_tool_count_by_name") if isinstance(telemetry, dict) else None
|
|
1090
|
-
),
|
|
1091
|
-
)
|
|
1092
|
-
# In zero-tool synthesis mode we cannot gather additional evidence.
|
|
1093
|
-
# Prefer conservative output over ungrounded vulnerability assertions.
|
|
1094
|
-
output.vulnerabilities = []
|
|
1095
|
-
output.confidence = min(float(getattr(output, "confidence", 0.4) or 0.4), 0.4)
|
|
1096
|
-
if not output.recommendations:
|
|
1097
|
-
output.recommendations = [
|
|
1098
|
-
"Collect concrete security evidence (read_file/read_evidence_document) before reporting vulnerabilities."
|
|
1099
|
-
]
|
|
1100
|
-
break
|
|
1101
|
-
if budget_recovery_mode and not used_recovery_early_synthesis_pivot:
|
|
1102
|
-
used_recovery_early_synthesis_pivot = True
|
|
1103
|
-
budget_recovery_mode = False
|
|
1104
|
-
self.logger.warning(
|
|
1105
|
-
"security_recovery_terminal_pass_strict_grounding_pivot",
|
|
1106
|
-
vulnerabilities_count=vulnerability_count,
|
|
1107
|
-
observed_tool_names=(
|
|
1108
|
-
telemetry.get("event_tool_names") if isinstance(telemetry, dict) else None
|
|
1109
|
-
),
|
|
1110
|
-
observed_tool_counts=(
|
|
1111
|
-
telemetry.get("event_tool_count_by_name") if isinstance(telemetry, dict) else None
|
|
1112
|
-
),
|
|
1113
|
-
)
|
|
1114
|
-
guard_prompt = (
|
|
1115
|
-
user_prompt
|
|
1116
|
-
+ "\n\nRECOVERY TERMINAL PASS EXIT - STRICT GROUNDING SYNTHESIS MODE:\n"
|
|
1117
|
-
+ "- STOP calling tools.\n"
|
|
1118
|
-
+ "- Use already collected evidence only.\n"
|
|
1119
|
-
+ "- Return SecurityFindings JSON with conservative confidence when grounding is insufficient.\n"
|
|
1120
|
-
)
|
|
1121
|
-
toolsets = []
|
|
1122
|
-
zero_tool_mode = True
|
|
1123
|
-
max_tool_calls = 1
|
|
1124
|
-
max_turns = None
|
|
1125
|
-
continue
|
|
1126
|
-
self.logger.warning(
|
|
1127
|
-
"security_strict_grounding_guard_unsatisfied",
|
|
1128
|
-
vulnerabilities_count=vulnerability_count,
|
|
1129
|
-
observed_tool_names=(
|
|
1130
|
-
telemetry.get("event_tool_names") if isinstance(telemetry, dict) else None
|
|
1131
|
-
),
|
|
1132
|
-
observed_tool_counts=(
|
|
1133
|
-
telemetry.get("event_tool_count_by_name") if isinstance(telemetry, dict) else None
|
|
1134
|
-
),
|
|
1135
|
-
)
|
|
1136
|
-
if used_grounding_retry:
|
|
1137
|
-
self.logger.warning(
|
|
1138
|
-
"security_strict_grounding_guard_coerced_zero_vulnerabilities",
|
|
1139
|
-
vulnerabilities_count=vulnerability_count,
|
|
1140
|
-
observed_tool_names=(
|
|
1141
|
-
telemetry.get("event_tool_names") if isinstance(telemetry, dict) else None
|
|
1142
|
-
),
|
|
1143
|
-
observed_tool_counts=(
|
|
1144
|
-
telemetry.get("event_tool_count_by_name") if isinstance(telemetry, dict) else None
|
|
1145
|
-
),
|
|
1146
|
-
)
|
|
1147
|
-
# Conservative fallback: avoid ungrounded vulnerability claims.
|
|
1148
|
-
output.vulnerabilities = []
|
|
1149
|
-
output.confidence = min(float(getattr(output, "confidence", 0.4) or 0.4), 0.4)
|
|
1150
|
-
if not output.recommendations:
|
|
1151
|
-
output.recommendations = [
|
|
1152
|
-
"Collect concrete security evidence (read_file/read_evidence_document) before reporting vulnerabilities."
|
|
1153
|
-
]
|
|
1154
|
-
break
|
|
1155
|
-
used_grounding_retry = True
|
|
1156
|
-
guard_prompt = (
|
|
1157
|
-
user_prompt
|
|
1158
|
-
+ "\n\nSTRICT SECURITY GROUNDING GUARD:\n"
|
|
1159
|
-
+ "- Do not report vulnerabilities unless grounded in concrete read_file/read_evidence_document evidence.\n"
|
|
1160
|
-
+ "- Perform at least two evidence reads before final output.\n"
|
|
1161
|
-
+ "- If concrete evidence remains insufficient, return zero vulnerabilities and confidence <= 0.4.\n"
|
|
1162
|
-
)
|
|
1163
|
-
if not zero_tool_mode:
|
|
1164
|
-
strict_grounding_retry_max_turns = (
|
|
1165
|
-
self._parse_positive_int_env_any(
|
|
1166
|
-
"VDS_AUDIT_AGENTIC_STRICT_GROUNDING_RETRY_MAX_TURNS",
|
|
1167
|
-
"VDS_AUDIT_AGENTIC_SECURITY_STRICT_GROUNDING_RETRY_MAX_TURNS",
|
|
1168
|
-
)
|
|
1169
|
-
or 6
|
|
1170
|
-
)
|
|
1171
|
-
strict_grounding_retry_max_tool_calls = (
|
|
1172
|
-
self._parse_positive_int_env_any(
|
|
1173
|
-
"VDS_AUDIT_AGENTIC_STRICT_GROUNDING_RETRY_MAX_TOOL_CALLS",
|
|
1174
|
-
"VDS_AUDIT_AGENTIC_SECURITY_STRICT_GROUNDING_RETRY_MAX_TOOL_CALLS",
|
|
1175
|
-
)
|
|
1176
|
-
or 10
|
|
1177
|
-
)
|
|
1178
|
-
toolsets = self._apply_tool_allowlist(
|
|
1179
|
-
list(base_toolsets),
|
|
1180
|
-
["list_evidence_documents", "read_evidence_document", "read_file"],
|
|
1181
|
-
)
|
|
1182
|
-
max_turns = min(max_turns or strict_grounding_retry_max_turns, strict_grounding_retry_max_turns)
|
|
1183
|
-
max_tool_calls = min(
|
|
1184
|
-
max_tool_calls or strict_grounding_retry_max_tool_calls,
|
|
1185
|
-
strict_grounding_retry_max_tool_calls,
|
|
1186
|
-
)
|
|
1187
|
-
continue
|
|
1188
|
-
budget_recovery_mode = False
|
|
1189
|
-
break
|
|
1190
|
-
|
|
1191
|
-
# Log response summary (additional specific fields)
|
|
1192
|
-
self.logger.info(
|
|
1193
|
-
"security_agent_response",
|
|
1194
|
-
confidence=round(getattr(output, "confidence", 0), 2),
|
|
1195
|
-
posture_score=getattr(output, "posture_score", None),
|
|
1196
|
-
vulnerabilities_count=len(getattr(output, "vulnerabilities", []) or []),
|
|
1197
|
-
recommendations_count=len(getattr(output, "recommendations", []) or []),
|
|
1198
|
-
)
|
|
1199
|
-
self._security_agent_runtime_summary = {
|
|
1200
|
-
"security_agent_tool_calls_limit": security_reported_tool_calls_limit,
|
|
1201
|
-
"security_agent_tool_call_limit_exhausted_count": tool_call_limit_exhausted_count,
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
return output
|
|
1205
|
-
|
|
1206
|
-
@staticmethod
|
|
1207
|
-
def _has_min_evidence_grounding(
|
|
1208
|
-
telemetry: dict[str, Any] | None,
|
|
1209
|
-
*,
|
|
1210
|
-
min_read_calls: int = 1,
|
|
1211
|
-
min_unique_tools: int = 2,
|
|
1212
|
-
) -> bool:
|
|
1213
|
-
"""Return True when tool telemetry shows both search/list and evidence-read activity."""
|
|
1214
|
-
if not isinstance(telemetry, dict):
|
|
1215
|
-
return False
|
|
1216
|
-
by_name = telemetry.get("event_tool_count_by_name")
|
|
1217
|
-
if not isinstance(by_name, dict):
|
|
1218
|
-
return False
|
|
1219
|
-
|
|
1220
|
-
search_calls = (
|
|
1221
|
-
int(by_name.get("list_directory", 0) or 0)
|
|
1222
|
-
+ int(by_name.get("grep_search", 0) or 0)
|
|
1223
|
-
+ int(by_name.get("rg_search", 0) or 0)
|
|
1224
|
-
+ int(by_name.get("ast_grep_search", 0) or 0)
|
|
1225
|
-
+ int(by_name.get("search_evidence", 0) or 0)
|
|
1226
|
-
+ int(by_name.get("search_evidence_vector", 0) or 0)
|
|
1227
|
-
+ int(by_name.get("search_code_vector", 0) or 0)
|
|
1228
|
-
)
|
|
1229
|
-
read_calls = (
|
|
1230
|
-
int(by_name.get("read_file", 0) or 0)
|
|
1231
|
-
+ int(by_name.get("read_evidence_document", 0) or 0)
|
|
1232
|
-
+ int(by_name.get("get_definition", 0) or 0)
|
|
1233
|
-
+ int(by_name.get("find_references", 0) or 0)
|
|
1234
|
-
+ int(by_name.get("workspace_symbol", 0) or 0)
|
|
1235
|
-
)
|
|
1236
|
-
unique_active_tools = sum(1 for value in by_name.values() if int(value or 0) > 0)
|
|
1237
|
-
return (
|
|
1238
|
-
search_calls >= 1
|
|
1239
|
-
and read_calls >= max(1, int(min_read_calls))
|
|
1240
|
-
and unique_active_tools >= max(1, int(min_unique_tools))
|
|
1241
|
-
)
|
|
1242
|
-
|
|
1243
|
-
@staticmethod
|
|
1244
|
-
def _has_zero_tool_activity(telemetry: dict[str, Any] | None) -> bool:
|
|
1245
|
-
"""Return True when no tool call activity is observed for the run."""
|
|
1246
|
-
if not isinstance(telemetry, dict):
|
|
1247
|
-
return True
|
|
1248
|
-
by_name = telemetry.get("event_tool_count_by_name")
|
|
1249
|
-
if isinstance(by_name, dict):
|
|
1250
|
-
total = sum(int(value or 0) for value in by_name.values())
|
|
1251
|
-
if total > 0:
|
|
1252
|
-
return False
|
|
1253
|
-
completed = int(telemetry.get("event_tool_calls_completed", telemetry.get("event_tool_calls", 0)) or 0)
|
|
1254
|
-
return completed <= 0
|
|
1255
|
-
|
|
1256
|
-
def _build_analysis_toolsets(self) -> list[Any]:
|
|
1257
|
-
"""Build optional MCP/skills toolsets for evidence-grounded analysis."""
|
|
1258
|
-
try:
|
|
1259
|
-
toolsets = _build_toolsets(get_config().llm)
|
|
1260
|
-
enable_skills = self._is_security_skills_toolset_enabled(get_config().llm)
|
|
1261
|
-
filtered: list[Any] = []
|
|
1262
|
-
dropped = 0
|
|
1263
|
-
for toolset in toolsets:
|
|
1264
|
-
has_skills_map = isinstance(getattr(toolset, "skills", None), dict)
|
|
1265
|
-
has_skill_metadata = isinstance(getattr(toolset, "_vds_skill_metadata", None), list)
|
|
1266
|
-
if (not enable_skills) and (has_skills_map or has_skill_metadata):
|
|
1267
|
-
dropped += 1
|
|
1268
|
-
continue
|
|
1269
|
-
filtered.append(toolset)
|
|
1270
|
-
if dropped:
|
|
1271
|
-
self.logger.info("security_analysis_skills_toolset_disabled", dropped_toolsets=dropped)
|
|
1272
|
-
repo_path = getattr(self, "_analysis_repo_path", None)
|
|
1273
|
-
if isinstance(repo_path, Path) and repo_path.exists():
|
|
1274
|
-
try:
|
|
1275
|
-
cfg = get_config().agentic
|
|
1276
|
-
fs_toolset = create_filesystem_toolset(
|
|
1277
|
-
repo_path,
|
|
1278
|
-
safe_extensions=tuple(cfg.safe_extensions),
|
|
1279
|
-
max_read_bytes=int(cfg.max_read_bytes),
|
|
1280
|
-
max_read_lines=int(cfg.max_read_lines),
|
|
1281
|
-
grep_timeout_sec=int(cfg.tool_timeout_sec),
|
|
1282
|
-
)
|
|
1283
|
-
filtered.append(fs_toolset)
|
|
1284
|
-
except Exception as exc:
|
|
1285
|
-
self.logger.warning("security_filesystem_toolset_unavailable", error=str(exc))
|
|
1286
|
-
return filtered
|
|
1287
|
-
except Exception as exc:
|
|
1288
|
-
self.logger.warning("security_analysis_toolsets_failed", error=str(exc))
|
|
1289
|
-
return []
|
|
1290
|
-
|
|
1291
|
-
@staticmethod
|
|
1292
|
-
def _collect_available_skill_names(toolsets: list[Any]) -> list[str]:
|
|
1293
|
-
"""Extract available skill names from toolset metadata."""
|
|
1294
|
-
names: list[str] = []
|
|
1295
|
-
for toolset in toolsets:
|
|
1296
|
-
skills_map = getattr(toolset, "skills", None)
|
|
1297
|
-
if isinstance(skills_map, dict) and skills_map:
|
|
1298
|
-
for skill_name in skills_map:
|
|
1299
|
-
name = str(skill_name or "").strip()
|
|
1300
|
-
if name and name not in names:
|
|
1301
|
-
names.append(name)
|
|
1302
|
-
continue
|
|
1303
|
-
metadata = getattr(toolset, "_vds_skill_metadata", None)
|
|
1304
|
-
if not isinstance(metadata, list):
|
|
1305
|
-
continue
|
|
1306
|
-
for entry in metadata:
|
|
1307
|
-
name = str(getattr(entry, "name", "") or "").strip()
|
|
1308
|
-
if name and name not in names:
|
|
1309
|
-
names.append(name)
|
|
1310
|
-
return names
|
|
1311
|
-
|
|
1312
|
-
@staticmethod
|
|
1313
|
-
def _is_missing_skill_error(error: str) -> bool:
|
|
1314
|
-
lowered = error.lower()
|
|
1315
|
-
return "skill" in lowered and "not found" in lowered
|
|
1316
|
-
|
|
1317
|
-
@staticmethod
|
|
1318
|
-
def _parse_tool_calls_exhausted_from_error(error: str) -> int | None:
|
|
1319
|
-
match = re.search(r"tool_calls_limit of \d+ \(tool_calls=(\d+)\)", error, flags=re.IGNORECASE)
|
|
1320
|
-
if not match:
|
|
1321
|
-
return None
|
|
1322
|
-
try:
|
|
1323
|
-
value = int(match.group(1))
|
|
1324
|
-
except (TypeError, ValueError):
|
|
1325
|
-
return None
|
|
1326
|
-
return value if value >= 0 else None
|
|
1327
|
-
|
|
1328
|
-
@staticmethod
|
|
1329
|
-
def _parse_request_limit_exhausted_from_error(error: str) -> int | None:
|
|
1330
|
-
match = re.search(r"request_limit of (\d+)", error, flags=re.IGNORECASE)
|
|
1331
|
-
if not match:
|
|
1332
|
-
return None
|
|
1333
|
-
try:
|
|
1334
|
-
value = int(match.group(1))
|
|
1335
|
-
except (TypeError, ValueError):
|
|
1336
|
-
return None
|
|
1337
|
-
return value if value >= 0 else None
|
|
1338
|
-
|
|
1339
|
-
@staticmethod
|
|
1340
|
-
def _parse_skill_name_from_error(error: str) -> str | None:
|
|
1341
|
-
patterns = (
|
|
1342
|
-
r"skill '([^']+)'",
|
|
1343
|
-
r'skill "([^"]+)"',
|
|
1344
|
-
r"skill_name['\"]?\s*[:=]\s*['\"]([^'\"]+)['\"]",
|
|
1345
|
-
)
|
|
1346
|
-
for pattern in patterns:
|
|
1347
|
-
match = re.search(pattern, error, flags=re.IGNORECASE)
|
|
1348
|
-
if match:
|
|
1349
|
-
name = str(match.group(1)).strip()
|
|
1350
|
-
if name:
|
|
1351
|
-
return name
|
|
1352
|
-
return None
|
|
1353
|
-
|
|
1354
|
-
@staticmethod
|
|
1355
|
-
def _drop_skill_from_toolsets(toolsets: list[Any], skill_name: str) -> tuple[list[Any], int]:
|
|
1356
|
-
if not skill_name:
|
|
1357
|
-
return list(toolsets), 0
|
|
1358
|
-
|
|
1359
|
-
removed_count = 0
|
|
1360
|
-
updated_toolsets: list[Any] = []
|
|
1361
|
-
for toolset in toolsets:
|
|
1362
|
-
skills_map = getattr(toolset, "skills", None)
|
|
1363
|
-
metadata = getattr(toolset, "_vds_skill_metadata", None)
|
|
1364
|
-
if isinstance(skills_map, dict):
|
|
1365
|
-
if skill_name in skills_map:
|
|
1366
|
-
skills_map.pop(skill_name, None)
|
|
1367
|
-
removed_count += 1
|
|
1368
|
-
if isinstance(metadata, list):
|
|
1369
|
-
filtered_metadata = [
|
|
1370
|
-
item for item in metadata if str(getattr(item, "name", "") or "").strip() != skill_name
|
|
1371
|
-
]
|
|
1372
|
-
toolset._vds_skill_metadata = filtered_metadata
|
|
1373
|
-
if skills_map:
|
|
1374
|
-
updated_toolsets.append(toolset)
|
|
1375
|
-
continue
|
|
1376
|
-
|
|
1377
|
-
if isinstance(metadata, list):
|
|
1378
|
-
matched = False
|
|
1379
|
-
filtered_metadata = []
|
|
1380
|
-
for item in metadata:
|
|
1381
|
-
name = str(getattr(item, "name", "") or "").strip()
|
|
1382
|
-
if name == skill_name:
|
|
1383
|
-
matched = True
|
|
1384
|
-
continue
|
|
1385
|
-
filtered_metadata.append(item)
|
|
1386
|
-
if matched:
|
|
1387
|
-
removed_count += 1
|
|
1388
|
-
toolset._vds_skill_metadata = filtered_metadata
|
|
1389
|
-
if filtered_metadata:
|
|
1390
|
-
updated_toolsets.append(toolset)
|
|
1391
|
-
continue
|
|
1392
|
-
updated_toolsets.append(toolset)
|
|
1393
|
-
return updated_toolsets, removed_count
|
|
1394
|
-
|
|
1395
|
-
@staticmethod
|
|
1396
|
-
def _drop_all_skill_toolsets(toolsets: list[Any]) -> tuple[list[Any], int]:
|
|
1397
|
-
filtered_toolsets: list[Any] = []
|
|
1398
|
-
removed = 0
|
|
1399
|
-
for toolset in toolsets:
|
|
1400
|
-
has_skills_map = isinstance(getattr(toolset, "skills", None), dict)
|
|
1401
|
-
has_skill_metadata = isinstance(getattr(toolset, "_vds_skill_metadata", None), list)
|
|
1402
|
-
if has_skills_map or has_skill_metadata:
|
|
1403
|
-
removed += 1
|
|
1404
|
-
continue
|
|
1405
|
-
filtered_toolsets.append(toolset)
|
|
1406
|
-
return filtered_toolsets, removed
|
|
1407
|
-
|
|
1408
|
-
def _build_analysis_prompt(
|
|
1409
|
-
self,
|
|
1410
|
-
evidence: EvidenceBundle,
|
|
1411
|
-
existing_findings: list[dict[str, Any]],
|
|
1412
|
-
*,
|
|
1413
|
-
available_skill_names: list[str] | None = None,
|
|
1414
|
-
tools_available: bool = True,
|
|
1415
|
-
local_openai_mode: bool = False,
|
|
1416
|
-
) -> str:
|
|
1417
|
-
"""Build the user prompt for LLM analysis.
|
|
1418
|
-
|
|
1419
|
-
Args:
|
|
1420
|
-
evidence: Evidence bundle for analysis.
|
|
1421
|
-
existing_findings: Findings from rule-based analysis.
|
|
1422
|
-
|
|
1423
|
-
Returns:
|
|
1424
|
-
Formatted prompt string.
|
|
1425
|
-
"""
|
|
1426
|
-
context_parts = []
|
|
1427
|
-
|
|
1428
|
-
# Add SonarQube summary
|
|
1429
|
-
if evidence.sonarqube_evidence:
|
|
1430
|
-
context_parts.append("## SonarQube Evidence")
|
|
1431
|
-
for metric in evidence.sonarqube_evidence[:5]:
|
|
1432
|
-
context_parts.append(f"- {metric.title}: {metric.content[:500]}")
|
|
1433
|
-
|
|
1434
|
-
# Add sample of git files (security-relevant)
|
|
1435
|
-
security_relevant_files = [
|
|
1436
|
-
f
|
|
1437
|
-
for f in evidence.git_evidence
|
|
1438
|
-
if any(kw in f.source_id.lower() for kw in ["security", "auth", "config", "env", "secret"])
|
|
1439
|
-
]
|
|
1440
|
-
if security_relevant_files:
|
|
1441
|
-
context_parts.append("\n## Security-Relevant Files")
|
|
1442
|
-
for f in security_relevant_files[:3]:
|
|
1443
|
-
context_parts.append(f"### {f.source_id}\n```\n{f.content[:1000]}\n```")
|
|
1444
|
-
|
|
1445
|
-
# Add existing findings summary
|
|
1446
|
-
if existing_findings:
|
|
1447
|
-
context_parts.append("\n## Preliminary Findings from Static Analysis")
|
|
1448
|
-
for finding in existing_findings[:10]:
|
|
1449
|
-
severity = finding.get("severity", "INFO")
|
|
1450
|
-
description = finding.get("description", "")
|
|
1451
|
-
context_parts.append(f"- [{severity}] {description}")
|
|
1452
|
-
|
|
1453
|
-
skills_clause = ""
|
|
1454
|
-
if available_skill_names:
|
|
1455
|
-
skills_clause = (
|
|
1456
|
-
"\nSkill usage constraints:\n"
|
|
1457
|
-
f"- Available skills: {', '.join(available_skill_names)}\n"
|
|
1458
|
-
"- Use only the available skill names exactly as listed.\n"
|
|
1459
|
-
"- Do not invent or call missing skill names.\n"
|
|
1460
|
-
)
|
|
1461
|
-
|
|
1462
|
-
if tools_available:
|
|
1463
|
-
tool_requirements = """Tool-first requirements:
|
|
1464
|
-
- When tools are available, retrieve or verify evidence snippets before concluding.
|
|
1465
|
-
- Ground each vulnerability claim in retrieved code/doc evidence.
|
|
1466
|
-
- Do not rely on assumptions that cannot be traced to evidence.
|
|
1467
|
-
- Use an efficient flow: search -> read -> conclude (avoid repetitive search-only loops).
|
|
1468
|
-
- Prefer diversified tools over repeating the same search tool with near-identical intent."""
|
|
1469
|
-
if local_openai_mode:
|
|
1470
|
-
tool_requirements += """
|
|
1471
|
-
- Local OpenAI discipline: keep tool usage bounded and deterministic.
|
|
1472
|
-
- Use list_evidence_documents first, then targeted read_evidence_document/read_file.
|
|
1473
|
-
- Keep search_evidence calls minimal (prefer at most one broad search before reading concrete files)."""
|
|
1474
|
-
else:
|
|
1475
|
-
tool_requirements = """Zero-tool requirements (strict):
|
|
1476
|
-
- No tools are available for this run.
|
|
1477
|
-
- Do not call any tool or skill.
|
|
1478
|
-
- Return final JSON directly from the provided evidence context."""
|
|
1479
|
-
|
|
1480
|
-
return f"""Analyze the following evidence for security vulnerabilities and assess the overall security posture:
|
|
1481
|
-
|
|
1482
|
-
Repository: {evidence.repository}
|
|
1483
|
-
|
|
1484
|
-
{chr(10).join(context_parts)}
|
|
1485
|
-
|
|
1486
|
-
{tool_requirements}
|
|
1487
|
-
{skills_clause}
|
|
1488
|
-
|
|
1489
|
-
Provide a comprehensive security assessment including:
|
|
1490
|
-
1. All vulnerabilities found (with severity, category, and remediation)
|
|
1491
|
-
2. Overall security posture score (0-10)
|
|
1492
|
-
3. Detected security controls
|
|
1493
|
-
4. Prioritized recommendations
|
|
1494
|
-
|
|
1495
|
-
Focus on identifying issues not already captured in the preliminary findings."""
|
|
1496
|
-
|
|
1497
|
-
def _get_repo_path(
|
|
1498
|
-
self,
|
|
1499
|
-
evidence: EvidenceBundle,
|
|
1500
|
-
profile: dict[str, Any] | None,
|
|
1501
|
-
) -> Path | None:
|
|
1502
|
-
"""Extract repository path from evidence bundle or profile.
|
|
1503
|
-
|
|
1504
|
-
Args:
|
|
1505
|
-
evidence: Evidence bundle that may contain repo path.
|
|
1506
|
-
profile: Optional project profile with repo path.
|
|
1507
|
-
|
|
1508
|
-
Returns:
|
|
1509
|
-
Path to the repository, or None if not available.
|
|
1510
|
-
"""
|
|
1511
|
-
# Try to get repo_path from profile first
|
|
1512
|
-
if profile:
|
|
1513
|
-
repo_path = profile.get("repo_path") or profile.get("repository_path")
|
|
1514
|
-
if repo_path:
|
|
1515
|
-
path = Path(repo_path)
|
|
1516
|
-
if path.exists():
|
|
1517
|
-
return path
|
|
1518
|
-
self.logger.debug(
|
|
1519
|
-
"repo_path_from_profile_not_found",
|
|
1520
|
-
repo_path=repo_path,
|
|
1521
|
-
)
|
|
1522
|
-
|
|
1523
|
-
# Try to get from evidence bundle metadata
|
|
1524
|
-
if hasattr(evidence, "metadata") and evidence.metadata:
|
|
1525
|
-
repo_path = evidence.metadata.get("repo_path") or evidence.metadata.get("repository_path")
|
|
1526
|
-
if repo_path:
|
|
1527
|
-
path = Path(repo_path)
|
|
1528
|
-
if path.exists():
|
|
1529
|
-
return path
|
|
1530
|
-
|
|
1531
|
-
# Try to infer from evidence.repository (may be a URL or path)
|
|
1532
|
-
if evidence.repository:
|
|
1533
|
-
# Check if it's a local path
|
|
1534
|
-
path = Path(evidence.repository)
|
|
1535
|
-
if path.exists():
|
|
1536
|
-
return path
|
|
1537
|
-
|
|
1538
|
-
self.logger.debug(
|
|
1539
|
-
"repo_path_not_found",
|
|
1540
|
-
repository=evidence.repository,
|
|
1541
|
-
profile_keys=list(profile.keys()) if profile else [],
|
|
1542
|
-
)
|
|
1543
|
-
return None
|
|
1544
|
-
|
|
1545
|
-
async def _scan_security_patterns(self, repo_path: Path) -> list[dict[str, Any]]:
|
|
1546
|
-
"""Scan repository for security patterns using scoped scanner.
|
|
1547
|
-
|
|
1548
|
-
Uses a scoped ripgrep-based scanner that ONLY searches
|
|
1549
|
-
the target repository (FR-1.3).
|
|
1550
|
-
|
|
1551
|
-
Args:
|
|
1552
|
-
repo_path: Path to the repository to scan.
|
|
1553
|
-
|
|
1554
|
-
Returns:
|
|
1555
|
-
List of security findings from pattern scanning.
|
|
1556
|
-
"""
|
|
1557
|
-
findings: list[dict[str, Any]] = []
|
|
1558
|
-
|
|
1559
|
-
try:
|
|
1560
|
-
scanner = SecurityPatternScanner(repo_path)
|
|
1561
|
-
start = time.monotonic()
|
|
1562
|
-
results = scanner.scan(SECURITY_PATTERNS)
|
|
1563
|
-
duration_ms = int((time.monotonic() - start) * 1000)
|
|
1564
|
-
|
|
1565
|
-
for result in results:
|
|
1566
|
-
findings.append(
|
|
1567
|
-
{
|
|
1568
|
-
"type": f"security_{result.pattern_name}",
|
|
1569
|
-
"severity": result.severity,
|
|
1570
|
-
"description": result.description,
|
|
1571
|
-
"location": f"{result.file_path}:{result.line_number}",
|
|
1572
|
-
"details": {
|
|
1573
|
-
"file_path": result.file_path,
|
|
1574
|
-
"line_number": result.line_number,
|
|
1575
|
-
"line_content": result.line_content,
|
|
1576
|
-
"match_text": result.match_text,
|
|
1577
|
-
},
|
|
1578
|
-
"source": "pattern_scanner",
|
|
1579
|
-
}
|
|
1580
|
-
)
|
|
1581
|
-
|
|
1582
|
-
self.logger.info(
|
|
1583
|
-
"security_pattern_scan_complete",
|
|
1584
|
-
repo_path=str(repo_path),
|
|
1585
|
-
findings_count=len(findings),
|
|
1586
|
-
)
|
|
1587
|
-
SkillExecutor.record_tool_usage(
|
|
1588
|
-
{
|
|
1589
|
-
"tool": "security_pattern_scanner",
|
|
1590
|
-
"agent": "SecurityAgent",
|
|
1591
|
-
"repo_path": str(repo_path),
|
|
1592
|
-
"pattern_count": len(SECURITY_PATTERNS),
|
|
1593
|
-
"findings_count": len(findings),
|
|
1594
|
-
"duration_ms": duration_ms,
|
|
1595
|
-
"success": True,
|
|
1596
|
-
}
|
|
1597
|
-
)
|
|
1598
|
-
|
|
1599
|
-
except Exception as e:
|
|
1600
|
-
self.logger.warning("pattern_scan_failed", error=str(e))
|
|
1601
|
-
SkillExecutor.record_tool_usage(
|
|
1602
|
-
{
|
|
1603
|
-
"tool": "security_pattern_scanner",
|
|
1604
|
-
"agent": "SecurityAgent",
|
|
1605
|
-
"repo_path": str(repo_path),
|
|
1606
|
-
"pattern_count": len(SECURITY_PATTERNS),
|
|
1607
|
-
"findings_count": 0,
|
|
1608
|
-
"duration_ms": 0,
|
|
1609
|
-
"success": False,
|
|
1610
|
-
"error": str(e),
|
|
1611
|
-
}
|
|
1612
|
-
)
|
|
1613
|
-
|
|
1614
|
-
return findings
|
|
1615
|
-
|
|
1616
|
-
def _vulnerability_to_finding(self, vuln: Vulnerability) -> dict[str, Any]:
|
|
1617
|
-
"""Convert a Vulnerability model to a finding dict.
|
|
1618
|
-
|
|
1619
|
-
Args:
|
|
1620
|
-
vuln: Vulnerability model instance.
|
|
1621
|
-
|
|
1622
|
-
Returns:
|
|
1623
|
-
Finding dictionary in standard audit format.
|
|
1624
|
-
"""
|
|
1625
|
-
return {
|
|
1626
|
-
"type": f"security_{vuln.category}",
|
|
1627
|
-
"severity": vuln.severity.upper(),
|
|
1628
|
-
"description": vuln.description,
|
|
1629
|
-
"location": vuln.affected_component,
|
|
1630
|
-
"recommendation": vuln.remediation,
|
|
1631
|
-
"id": vuln.id,
|
|
1632
|
-
"title": vuln.title,
|
|
1633
|
-
"cvss_score": vuln.cvss_score,
|
|
1634
|
-
"source": "pydantic_ai_analysis",
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
def _score_to_risk_level(self, score: float) -> str:
|
|
1638
|
-
"""Convert posture score to risk level.
|
|
1639
|
-
|
|
1640
|
-
Args:
|
|
1641
|
-
score: Security posture score (0-10).
|
|
1642
|
-
|
|
1643
|
-
Returns:
|
|
1644
|
-
Risk level string.
|
|
1645
|
-
"""
|
|
1646
|
-
if score >= 8.0:
|
|
1647
|
-
return "LOW"
|
|
1648
|
-
if score >= 6.0:
|
|
1649
|
-
return "MEDIUM"
|
|
1650
|
-
if score >= 4.0:
|
|
1651
|
-
return "HIGH"
|
|
1652
|
-
return "CRITICAL"
|
|
1653
|
-
|
|
1654
|
-
def _generate_summary(self, findings: SecurityFindings) -> str:
|
|
1655
|
-
"""Generate a security summary from findings.
|
|
1656
|
-
|
|
1657
|
-
Args:
|
|
1658
|
-
findings: SecurityFindings model instance.
|
|
1659
|
-
|
|
1660
|
-
Returns:
|
|
1661
|
-
Summary string.
|
|
1662
|
-
"""
|
|
1663
|
-
critical = findings.critical_count
|
|
1664
|
-
high = findings.high_count
|
|
1665
|
-
total = len(findings.vulnerabilities)
|
|
1666
|
-
|
|
1667
|
-
if critical > 0:
|
|
1668
|
-
return (
|
|
1669
|
-
f"Critical security issues detected: {critical} critical, "
|
|
1670
|
-
f"{high} high severity vulnerabilities out of {total} total. "
|
|
1671
|
-
f"Posture score: {findings.posture_score:.1f}/10."
|
|
1672
|
-
)
|
|
1673
|
-
if high > 0:
|
|
1674
|
-
return (
|
|
1675
|
-
f"Security concerns identified: {high} high severity "
|
|
1676
|
-
f"vulnerabilities out of {total} total. "
|
|
1677
|
-
f"Posture score: {findings.posture_score:.1f}/10."
|
|
1678
|
-
)
|
|
1679
|
-
if total > 0:
|
|
1680
|
-
return (
|
|
1681
|
-
f"Minor security issues found: {total} vulnerabilities detected. "
|
|
1682
|
-
f"Posture score: {findings.posture_score:.1f}/10."
|
|
1683
|
-
)
|
|
1684
|
-
return f"No significant security issues detected. Posture score: {findings.posture_score:.1f}/10."
|
|
1685
|
-
|
|
1686
|
-
def _parse_sonarqube_evidence(self, evidence: EvidenceBundle) -> list[dict[str, Any]]:
|
|
1687
|
-
"""Parse SonarQube evidence for security vulnerabilities.
|
|
1688
|
-
|
|
1689
|
-
Args:
|
|
1690
|
-
evidence: Evidence bundle with SonarQube metrics.
|
|
1691
|
-
|
|
1692
|
-
Returns:
|
|
1693
|
-
List of security findings from SonarQube.
|
|
1694
|
-
"""
|
|
1695
|
-
findings = []
|
|
1696
|
-
|
|
1697
|
-
for metric in evidence.sonarqube_evidence:
|
|
1698
|
-
content = metric.content
|
|
1699
|
-
|
|
1700
|
-
# Try to parse as JSON for structured analysis
|
|
1701
|
-
try:
|
|
1702
|
-
data = json.loads(content) if content.startswith("{") or content.startswith("[") else None
|
|
1703
|
-
except json.JSONDecodeError:
|
|
1704
|
-
data = None
|
|
1705
|
-
|
|
1706
|
-
if data:
|
|
1707
|
-
# Structured SonarQube data parsing
|
|
1708
|
-
issues = data.get("issues", []) if isinstance(data, dict) else data
|
|
1709
|
-
for issue in issues if isinstance(issues, list) else []:
|
|
1710
|
-
severity = issue.get("severity", "UNKNOWN")
|
|
1711
|
-
if severity in ("CRITICAL", "BLOCKER"):
|
|
1712
|
-
findings.append(
|
|
1713
|
-
{
|
|
1714
|
-
"type": "sonarqube_vulnerability",
|
|
1715
|
-
"severity": "CRITICAL",
|
|
1716
|
-
"description": issue.get("message", f"Critical issue in {metric.title}"),
|
|
1717
|
-
"location": issue.get("component", metric.source_id),
|
|
1718
|
-
"rule": issue.get("rule", "unknown"),
|
|
1719
|
-
"source": "sonarqube",
|
|
1720
|
-
}
|
|
1721
|
-
)
|
|
1722
|
-
elif severity in ("MAJOR", "HIGH"):
|
|
1723
|
-
findings.append(
|
|
1724
|
-
{
|
|
1725
|
-
"type": "sonarqube_vulnerability",
|
|
1726
|
-
"severity": "HIGH",
|
|
1727
|
-
"description": issue.get("message", f"High severity issue in {metric.title}"),
|
|
1728
|
-
"location": issue.get("component", metric.source_id),
|
|
1729
|
-
"rule": issue.get("rule", "unknown"),
|
|
1730
|
-
"source": "sonarqube",
|
|
1731
|
-
}
|
|
1732
|
-
)
|
|
1733
|
-
else:
|
|
1734
|
-
# Fallback: keyword-based detection for unstructured content
|
|
1735
|
-
severity_keywords = {
|
|
1736
|
-
"CRITICAL": [
|
|
1737
|
-
"CRITICAL",
|
|
1738
|
-
"BLOCKER",
|
|
1739
|
-
"vulnerability",
|
|
1740
|
-
"security hotspot",
|
|
1741
|
-
],
|
|
1742
|
-
"HIGH": ["MAJOR", "HIGH", "injection", "authentication"],
|
|
1743
|
-
"MEDIUM": ["MINOR", "code smell"],
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
for severity, keywords in severity_keywords.items():
|
|
1747
|
-
if any(kw.lower() in content.lower() for kw in keywords):
|
|
1748
|
-
findings.append(
|
|
1749
|
-
{
|
|
1750
|
-
"type": "sonarqube_issue",
|
|
1751
|
-
"severity": severity,
|
|
1752
|
-
"description": f"{severity} severity issue detected in {metric.title}",
|
|
1753
|
-
"location": metric.source_id,
|
|
1754
|
-
"source": "sonarqube",
|
|
1755
|
-
}
|
|
1756
|
-
)
|
|
1757
|
-
break # Only report highest severity match
|
|
1758
|
-
|
|
1759
|
-
return findings
|
|
1760
|
-
|
|
1761
|
-
def _analyze_git_evidence(self, evidence: EvidenceBundle) -> list[dict[str, Any]]:
|
|
1762
|
-
"""Analyze git evidence for security-related patterns.
|
|
1763
|
-
|
|
1764
|
-
Args:
|
|
1765
|
-
evidence: Evidence bundle with git files.
|
|
1766
|
-
|
|
1767
|
-
Returns:
|
|
1768
|
-
List of security findings from git evidence.
|
|
1769
|
-
"""
|
|
1770
|
-
findings = []
|
|
1771
|
-
|
|
1772
|
-
security_file_patterns = {
|
|
1773
|
-
"security.md": "security_documentation",
|
|
1774
|
-
"security.txt": "security_documentation",
|
|
1775
|
-
".snyk": "dependency_scanning",
|
|
1776
|
-
"trivy.yaml": "container_scanning",
|
|
1777
|
-
"dependabot.yml": "dependency_updates",
|
|
1778
|
-
"codeql": "sast_scanning",
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
found_security_configs = set()
|
|
1782
|
-
|
|
1783
|
-
for file_evidence in evidence.git_evidence:
|
|
1784
|
-
file_lower = file_evidence.source_id.lower()
|
|
1785
|
-
content_lower = file_evidence.content.lower()
|
|
1786
|
-
|
|
1787
|
-
# Check for security configuration files
|
|
1788
|
-
for pattern, config_type in security_file_patterns.items():
|
|
1789
|
-
if pattern in file_lower:
|
|
1790
|
-
found_security_configs.add(config_type)
|
|
1791
|
-
|
|
1792
|
-
# Check for hardcoded secrets patterns
|
|
1793
|
-
secret_patterns = [
|
|
1794
|
-
("password", "hardcoded_password"),
|
|
1795
|
-
("api_key", "hardcoded_api_key"),
|
|
1796
|
-
("secret_key", "hardcoded_secret"),
|
|
1797
|
-
("private_key", "hardcoded_private_key"),
|
|
1798
|
-
("bearer ", "hardcoded_token"),
|
|
1799
|
-
]
|
|
1800
|
-
|
|
1801
|
-
for pattern, issue_type in secret_patterns:
|
|
1802
|
-
if pattern in content_lower and "=" in file_evidence.content:
|
|
1803
|
-
# Exclude common false positives
|
|
1804
|
-
if not any(fp in content_lower for fp in ["example", "placeholder", "your_", "xxx", "***"]):
|
|
1805
|
-
findings.append(
|
|
1806
|
-
{
|
|
1807
|
-
"type": f"potential_{issue_type}",
|
|
1808
|
-
"severity": "HIGH",
|
|
1809
|
-
"description": f"Potential {issue_type.replace('_', ' ')} in {file_evidence.title}",
|
|
1810
|
-
"location": file_evidence.source_id,
|
|
1811
|
-
"source": "git_analysis",
|
|
1812
|
-
}
|
|
1813
|
-
)
|
|
1814
|
-
|
|
1815
|
-
# Report missing security configurations
|
|
1816
|
-
expected_configs = {"security_documentation", "dependency_scanning"}
|
|
1817
|
-
missing = expected_configs - found_security_configs
|
|
1818
|
-
if missing:
|
|
1819
|
-
findings.append(
|
|
1820
|
-
{
|
|
1821
|
-
"type": "missing_security_config",
|
|
1822
|
-
"severity": "MEDIUM",
|
|
1823
|
-
"description": f"Missing security configurations: {', '.join(missing)}",
|
|
1824
|
-
"recommendation": "Add SECURITY.md and enable dependency scanning (Snyk/Dependabot)",
|
|
1825
|
-
"source": "git_analysis",
|
|
1826
|
-
}
|
|
1827
|
-
)
|
|
1828
|
-
|
|
1829
|
-
return findings
|