switch-trust-cli 1.7.2__tar.gz → 1.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/LICENSE +0 -26
  2. {switch_trust_cli-1.7.2/switch_trust_cli.egg-info → switch_trust_cli-1.8.0}/PKG-INFO +124 -43
  3. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/README.md +107 -2
  4. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/pyproject.toml +27 -22
  5. switch_trust_cli-1.8.0/switch_trust/cli/__main__.py +7 -0
  6. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/console.py +3 -0
  7. switch_trust_cli-1.8.0/switch_trust/cli/eval_cli.py +1560 -0
  8. switch_trust_cli-1.8.0/switch_trust/cli/exit_codes.py +224 -0
  9. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/file_filter.py +16 -2
  10. switch_trust_cli-1.8.0/switch_trust/cli/http_status_kinds.py +116 -0
  11. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/init_cli.py +2 -1
  12. switch_trust_cli-1.8.0/switch_trust/cli/llm_credentials.py +148 -0
  13. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/main.py +158 -37
  14. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/runner.py +38 -6
  15. switch_trust_cli-1.8.0/switch_trust/cli/scan_cli.py +630 -0
  16. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/telemetry.py +52 -7
  17. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/utils.py +27 -7
  18. switch_trust_cli-1.8.0/switch_trust/cli/version.py +1 -0
  19. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/common/log.py +33 -4
  20. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/detectors/detector_garak.py +10 -1
  21. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/detectors/detector_model.py +13 -1
  22. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/detectors/detector_model_adversarial.py +7 -2
  23. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/detectors/detector_pii.py +8 -2
  24. switch_trust_cli-1.8.0/switch_trust/eval/core/detectors/pii_validation.py +125 -0
  25. switch_trust_cli-1.8.0/switch_trust/eval/core/eval/eval_result_types.py +56 -0
  26. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/evaluation.py +11 -51
  27. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/evaluation_adversarial.py +2 -8
  28. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/evaluation_multi.py +37 -4
  29. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/evaluation_single.py +30 -3
  30. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/evaluation_single_prompt.py +2 -10
  31. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/evaluation_topic_guard.py +2 -2
  32. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/generator_model.py +91 -3
  33. switch_trust_cli-1.8.0/switch_trust/eval/core/models/model.py +435 -0
  34. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_adk.py +1 -7
  35. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_anthropic_agent.py +1 -7
  36. switch_trust_cli-1.8.0/switch_trust/eval/core/models/model_errors.py +338 -0
  37. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_generic_http.py +1 -9
  38. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_langserve.py +1 -8
  39. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_openai.py +23 -4
  40. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_openai_agent.py +1 -7
  41. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_per_endpoint_limiter.py +8 -4
  42. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_retry.py +10 -11
  43. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_vertex_agent_runtime.py +1 -8
  44. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/optional_deps.py +15 -5
  45. switch_trust_cli-1.8.0/switch_trust/eval/db/base/eval/eval_approach.py +11 -0
  46. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/eval_types.py +1 -8
  47. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/models/model_helpers.py +9 -19
  48. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/agent_scanner.py +28 -24
  49. switch_trust_cli-1.8.0/switch_trust/scan/exception_classification.py +411 -0
  50. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/llm_provider.py +20 -29
  51. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/reasoner.py +77 -17
  52. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/scorer.py +4 -9
  53. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/static_scanner.py +20 -30
  54. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/tool_dispatcher.py +3 -4
  55. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/trace_logger_file.py +2 -2
  56. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/triage.py +6 -5
  57. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0/switch_trust_cli.egg-info}/PKG-INFO +124 -43
  58. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust_cli.egg-info/SOURCES.txt +7 -0
  59. switch_trust_cli-1.8.0/switch_trust_cli.egg-info/requires.txt +29 -0
  60. switch_trust_cli-1.7.2/switch_trust/cli/__main__.py +0 -3
  61. switch_trust_cli-1.7.2/switch_trust/cli/eval_cli.py +0 -905
  62. switch_trust_cli-1.7.2/switch_trust/cli/scan_cli.py +0 -314
  63. switch_trust_cli-1.7.2/switch_trust/cli/version.py +0 -1
  64. switch_trust_cli-1.7.2/switch_trust/eval/core/models/model.py +0 -172
  65. switch_trust_cli-1.7.2/switch_trust/scan/exception_classification.py +0 -179
  66. switch_trust_cli-1.7.2/switch_trust_cli.egg-info/requires.txt +0 -27
  67. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/setup.cfg +0 -0
  68. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/__init__.py +0 -0
  69. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/__init__.py +0 -0
  70. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/builtin_config.json +0 -0
  71. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/output_formatters.py +0 -0
  72. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/cli/rich_observer.py +0 -0
  73. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm01_adversarial.txt +0 -0
  74. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm01_fixed.txt +0 -0
  75. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm02_adversarial.txt +0 -0
  76. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm02_fixed.txt +0 -0
  77. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm05_adversarial.txt +0 -0
  78. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm05_fixed.txt +0 -0
  79. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm06_adversarial.txt +0 -0
  80. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm06_fixed.txt +0 -0
  81. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm07_adversarial.txt +0 -0
  82. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm07_fixed.txt +0 -0
  83. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm09_adversarial.txt +0 -0
  84. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/detector_prompts/llm09_fixed.txt +0 -0
  85. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/llm01_prompt_injection.csv +0 -0
  86. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/llm02_sensitive_information.csv +0 -0
  87. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/llm05_unsafe_output.csv +0 -0
  88. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/llm06_excessive_agency.csv +0 -0
  89. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/llm07_system_prompt_leakage.csv +0 -0
  90. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/llm09_hallucination-goals.csv +0 -0
  91. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/llm09_hallucination.csv +0 -0
  92. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/pii_leakage.csv +0 -0
  93. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/data/secret_leakage.csv +0 -0
  94. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/__init__.py +0 -0
  95. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/common/__init__.py +0 -0
  96. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/common/converter_anthropic.py +0 -0
  97. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/common/converter_genai.py +0 -0
  98. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/common/converter_openai.py +0 -0
  99. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/common/reference.py +0 -0
  100. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/common/schema.py +0 -0
  101. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/common/utils.py +0 -0
  102. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/__init__.py +0 -0
  103. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/detectors/__init__.py +0 -0
  104. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/detectors/detector.py +0 -0
  105. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/detectors/detector_secret.py +0 -0
  106. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/detectors/detector_topic_guard.py +0 -0
  107. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/detectors/detector_toxicity.py +0 -0
  108. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/__init__.py +0 -0
  109. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/eval_creator.py +0 -0
  110. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/evaluation_garak_module.py +0 -0
  111. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/evaluation_garak_probe.py +0 -0
  112. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/evaluation_message_list.py +0 -0
  113. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/metric_conciseness.py +0 -0
  114. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/metric_factual_accuracy.py +0 -0
  115. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/metric_instruction_adherence.py +0 -0
  116. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/metric_tone.py +0 -0
  117. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/metric_toxicity.py +0 -0
  118. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/eval/observer.py +0 -0
  119. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/message/__init__.py +0 -0
  120. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/message/message_collection.py +0 -0
  121. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/message/message_collection_csv.py +0 -0
  122. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/message/message_collection_garak.py +0 -0
  123. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/message/message_collection_memory.py +0 -0
  124. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/__init__.py +0 -0
  125. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_anthropic.py +0 -0
  126. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_gemini.py +0 -0
  127. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_http.py +0 -0
  128. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_huggingface.py +0 -0
  129. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_litellm.py +0 -0
  130. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_ollama.py +0 -0
  131. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_openai_compatible.py +0 -0
  132. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/model_sync_wrapper.py +0 -0
  133. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/core/models/response_schema.py +0 -0
  134. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/__init__.py +0 -0
  135. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/__init__.py +0 -0
  136. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/common_types.py +0 -0
  137. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/detectors/__init__.py +0 -0
  138. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/detectors/detector_helpers.py +0 -0
  139. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/detectors/detector_repository.py +0 -0
  140. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/detectors/detector_types.py +0 -0
  141. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/__init__.py +0 -0
  142. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/eval_helpers.py +0 -0
  143. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/eval_repository.py +0 -0
  144. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/eval_run.py +0 -0
  145. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/model_eval_repository.py +0 -0
  146. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/model_eval_run_repository.py +0 -0
  147. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/model_eval_run_result_repository.py +0 -0
  148. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/model_eval_run_result_types.py +0 -0
  149. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/model_eval_run_types.py +0 -0
  150. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/eval/model_eval_types.py +0 -0
  151. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/message/__init__.py +0 -0
  152. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/message/message_collection_helpers.py +0 -0
  153. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/message/message_collection_repository.py +0 -0
  154. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/message/message_collection_types.py +0 -0
  155. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/models/__init__.py +0 -0
  156. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/models/model_repository.py +0 -0
  157. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/base/models/model_types.py +0 -0
  158. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/json/__init__.py +0 -0
  159. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/eval/db/json/repository_json.py +0 -0
  160. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/__init__.py +0 -0
  161. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/config/agent_opengrep_rules.yaml +0 -0
  162. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/config/agent_taxonomy.json +0 -0
  163. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/config/agentic_cvss_mapping.yaml +0 -0
  164. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/config/compliance_mappings.json +0 -0
  165. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/config/triage_prompt.txt +0 -0
  166. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/constants.py +0 -0
  167. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/opengrep_resolver.py +0 -0
  168. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/schema.py +0 -0
  169. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/taxonomy.py +0 -0
  170. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/trace_logger.py +0 -0
  171. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/scan/trace_logger_log.py +0 -0
  172. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/schema.py +0 -0
  173. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust/secret_anonymizer.py +0 -0
  174. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust_cli.egg-info/dependency_links.txt +0 -0
  175. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust_cli.egg-info/entry_points.txt +0 -0
  176. {switch_trust_cli-1.7.2 → switch_trust_cli-1.8.0}/switch_trust_cli.egg-info/top_level.txt +0 -0
@@ -182,29 +182,3 @@ responsibility, not on behalf of any other Contributor, and only if You agree to
182
182
  indemnify, defend, and hold each Contributor harmless for any liability incurred
183
183
  by, or claims asserted against, such Contributor by reason of your accepting any
184
184
  such warranty or additional liability.
185
-
186
- END OF TERMS AND CONDITIONS
187
-
188
-
189
- APPENDIX: How to apply the Apache License to your work
190
-
191
- To apply the Apache License to your work, attach the following boilerplate
192
- notice, with the fields enclosed by brackets "[]" replaced with your own
193
- identifying information. (Don't include the brackets!) The text should be
194
- enclosed in the appropriate comment syntax for the file format. We also
195
- recommend that a file or class name and description of purpose be included on
196
- the same "printed page" as the copyright notice for easier identification
197
- within third-party archives.
198
-
199
- Copyright [yyyy] [name of copyright owner]
200
-
201
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
202
- this file except in compliance with the License. You may obtain a copy of the
203
- License at
204
-
205
- http://www.apache.org/licenses/LICENSE-2.0
206
-
207
- Unless required by applicable law or agreed to in writing, software distributed
208
- under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
209
- CONDITIONS OF ANY KIND, either express or implied. See the License for the
210
- specific language governing permissions and limitations under the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: switch-trust-cli
3
- Version: 1.7.2
3
+ Version: 1.8.0
4
4
  Summary: Command-line tool for evaluating agents, offering two features to assess agents via code scanning (`switch-trust scan`, whitebox testing) and runtime evaluation (`switch-trust eval`, blackbox testing)
5
5
  Author-email: SandboxAQ <info@switchagents.ai>
6
6
  License: Software: Switch Trust
@@ -188,60 +188,36 @@ License: Software: Switch Trust
188
188
  by, or claims asserted against, such Contributor by reason of your accepting any
189
189
  such warranty or additional liability.
190
190
 
191
- END OF TERMS AND CONDITIONS
192
-
193
-
194
- APPENDIX: How to apply the Apache License to your work
195
-
196
- To apply the Apache License to your work, attach the following boilerplate
197
- notice, with the fields enclosed by brackets "[]" replaced with your own
198
- identifying information. (Don't include the brackets!) The text should be
199
- enclosed in the appropriate comment syntax for the file format. We also
200
- recommend that a file or class name and description of purpose be included on
201
- the same "printed page" as the copyright notice for easier identification
202
- within third-party archives.
203
-
204
- Copyright [yyyy] [name of copyright owner]
205
-
206
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
207
- this file except in compliance with the License. You may obtain a copy of the
208
- License at
209
-
210
- http://www.apache.org/licenses/LICENSE-2.0
211
-
212
- Unless required by applicable law or agreed to in writing, software distributed
213
- under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
214
- CONDITIONS OF ANY KIND, either express or implied. See the License for the
215
- specific language governing permissions and limitations under the License.
216
-
217
191
  Project-URL: Homepage, https://github.com/sandbox-quantum/switch-trust-cli
218
192
  Project-URL: Issues, https://github.com/sandbox-quantum/switch-trust-cli/issues
219
193
  Requires-Python: >=3.11
220
194
  Description-Content-Type: text/markdown
221
195
  License-File: LICENSE
222
196
  Requires-Dist: aiohttp>=3.14.3
223
- Requires-Dist: anthropic==0.87.0
197
+ Requires-Dist: anthropic>=0.25.0
224
198
  Requires-Dist: pyOpenSSL>=26.4.0
225
199
  Requires-Dist: cryptography>=50.0.0
226
200
  Requires-Dist: bandit==1.9.4
227
201
  Requires-Dist: cvss>=2.6
228
- Requires-Dist: datafog>=4.4.0
202
+ Requires-Dist: datafog==4.4.0
229
203
  Requires-Dist: dataclasses-json==0.6.7
230
204
  Requires-Dist: detect-secrets==1.5.0
231
- Requires-Dist: google-adk==2.2.0
232
- Requires-Dist: litellm>=1.83.7
233
- Requires-Dist: openai==2.29.0
234
- Requires-Dist: opentelemetry-api<=1.41.1,>=1.38.0
235
- Requires-Dist: opentelemetry-exporter-otlp-proto-http<=1.41.1,>=1.38.0
236
- Requires-Dist: opentelemetry-sdk<=1.41.1,>=1.38.0
205
+ Requires-Dist: google-adk==1.38.0
206
+ Requires-Dist: google-auth>=2.60.0
207
+ Requires-Dist: google-genai>=1.0.0
208
+ Requires-Dist: httpx==0.28.1
209
+ Requires-Dist: litellm==1.100.4
210
+ Requires-Dist: openai>=1.0.0
211
+ Requires-Dist: opentelemetry-api==1.38.0
212
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.38.0
213
+ Requires-Dist: opentelemetry-sdk==1.38.0
237
214
  Requires-Dist: pip-audit==2.10.1
238
- Requires-Dist: protobuf<7,>=6.33.5
215
+ Requires-Dist: protobuf==6.33.5
239
216
  Requires-Dist: pydantic==2.12.5
240
- Requires-Dist: python-dotenv==1.2.2
241
- Requires-Dist: requests>=2.33.0
242
- Requires-Dist: rich>=13.0
243
- Requires-Dist: msgpack>=1.2.1
244
- Requires-Dist: pydantic-settings>=2.14.2
217
+ Requires-Dist: python-dotenv>=1.0.0
218
+ Requires-Dist: PyYAML>=6.0.0
219
+ Requires-Dist: requests==2.34.2
220
+ Requires-Dist: rich>=13.0.0
245
221
  Provides-Extra: full
246
222
  Requires-Dist: garak==0.14.0; extra == "full"
247
223
  Requires-Dist: transformers[torch]==5.10.1; extra == "full"
@@ -415,6 +391,42 @@ switch-trust scan agent.py
415
391
 
416
392
  # Specify output file
417
393
  switch-trust scan /path/to/code --output results.json
394
+
395
+ # Fail the build on any high or critical finding
396
+ switch-trust scan /path/to/code --fail-on high
397
+ ```
398
+
399
+ #### Gating CI on severity
400
+
401
+ `--fail-on SEVERITY` turns a scan into a quality gate. Without it, a completed
402
+ scan always exits `0` however many findings it reported.
403
+
404
+ `SEVERITY` is one of `critical`, `high`, `medium`, `low`, `info`, and the gate
405
+ trips on any finding **at or above** it — `--fail-on high` fires on a `high` as
406
+ well as a `critical`.
407
+
408
+ Two details worth knowing before you rely on it:
409
+
410
+ - **It counts findings after triage**, the ones in the summary and the output
411
+ file. Triage removes false positives, so a finding it downgrades is judged on
412
+ its new severity.
413
+ - **A finding whose severity cannot be read trips the gate**, whatever the
414
+ threshold, and the message names the value. A security gate that silently
415
+ skipped what it could not parse would be worse than no gate.
416
+
417
+ The report is always written before the gate is checked, so a failing job still
418
+ has its results file to collect.
419
+
420
+ | Exit code | Meaning |
421
+ |---|---|
422
+ | `0` | no finding reached the threshold |
423
+ | `5` | at least one did, or one had an unreadable severity |
424
+ | `20` | the scanner model's API key is missing or was rejected |
425
+ | `23` | nothing scannable was found at the path |
426
+
427
+ ```bash
428
+ switch-trust scan /path/to/code --fail-on high
429
+ if [ $? -eq 5 ]; then echo "security gate failed"; fi
418
430
  ```
419
431
 
420
432
  [Full scan guide](https://docs.switchagents.ai/switch-trust-cli/scan/getting-started)
@@ -437,6 +449,75 @@ switch-trust eval model-evaluations attach \
437
449
 
438
450
  # Run all evaluations for an agent
439
451
  switch-trust eval run --model my-agent
452
+
453
+ # Fail the build if any evaluation scores below 0.8
454
+ switch-trust eval run --model my-agent --fail-under 0.8
455
+ ```
456
+
457
+ #### Gating CI on a score
458
+
459
+ `--fail-under SCORE` turns a run into a quality gate. Without it, a completed run
460
+ always exits `0` whatever it scored.
461
+
462
+ `SCORE` is between 0 and 1, and it is the bar each evaluation must **meet** — a
463
+ score of exactly `0.8` passes `--fail-under 0.8`. The check is per evaluation, not
464
+ on the average, so a single failing evaluation cannot be averaged away by
465
+ others that passed.
466
+
467
+ The report is always written before the gate is checked, so a failing job still
468
+ has its results file to collect.
469
+
470
+ A run covering several evaluations stops at the first one that hits a problem
471
+ re-running cannot fix — a missing judge credential, an unreadable prompt file,
472
+ an uninstalled optional tool — rather than paying for the rest to fail the same
473
+ way. It also gives up once three evaluations fail in a row, on the assumption
474
+ the target is down. Either way, whatever scored before that point is still
475
+ printed and written to the report, and the exit code is the one for the problem
476
+ rather than `5`: a run that did not finish has no verdict for the gate to
477
+ judge.
478
+
479
+ | Exit code | Meaning |
480
+ |---|---|
481
+ | `0` | every evaluation ran, and every score met the bar |
482
+ | `5` | at least one evaluation scored below it |
483
+ | `6` | the run has no verdict: nothing scored, or it stopped with evaluations unrun |
484
+ | `20` | an API key is missing, or the provider rejected it |
485
+ | `23` | no evaluations matched the model or tag filters |
486
+
487
+ Exits `6` and `20` are reported whether or not `--fail-under` was passed. A
488
+ credential problem, or a run with no verdict to report, is a broken run rather
489
+ than a verdict — reporting success for it is the false green a gate exists to
490
+ prevent. Only exit `5`, the verdict itself, is opt-in.
491
+
492
+ Exit `6` covers both ways a run can end up without a verdict, and the message
493
+ says which: no evaluation produced a score at all, or the run gave up partway
494
+ and some of the evaluations you selected were never attempted. The second is
495
+ still exit `6` even when the ones that did run all scored above the bar — a
496
+ gate applied to the part of a suite that happened to run first is not a result
497
+ you can act on.
498
+
499
+ Exit `20` covers two credentials, and the message says which:
500
+
501
+ - **The model under test.** A key that is simply *absent* is refused before
502
+ the run starts, so you pay no CI time to find out; a key the provider
503
+ *rejects* is reported after the run, since it takes a call to discover.
504
+ Either way, set the provider's variable (`GEMINI_API_KEY` /
505
+ `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`) or put a key in the
506
+ model's config entry.
507
+ - **The judge/generator** named by `GENERATOR_MODEL`, which adversarial probes
508
+ and LLM-as-judge detectors need in addition to the model under test. For a
509
+ `gemini` generator set `GOOGLE_API_KEY` or `GEMINI_API_KEY`, or
510
+ `GOOGLE_VERTEX_CREDENTIALS_JSON` plus `GOOGLE_CLOUD_LOCATION` for Vertex AI.
511
+
512
+ > **Upgrading:** this is the one behaviour change in the exit codes. Earlier
513
+ > versions exited `0` when every evaluation errored, and when a run gave up
514
+ > after three consecutive failures having scored something first — so a total
515
+ > provider outage was indistinguishable from a clean run. If your pipeline
516
+ > relies on that, branch on `6` explicitly.
517
+
518
+ ```bash
519
+ switch-trust eval run --model my-agent --fail-under 0.8
520
+ if [ $? -eq 5 ]; then echo "quality gate failed"; fi
440
521
  ```
441
522
 
442
523
  The `switch-trust eval` command requires configuration. See [Configuration](https://docs.switchagents.ai/switch-trust-cli/eval/eval-configuration) to:
@@ -454,7 +535,7 @@ The `switch-trust eval` command requires configuration. See [Configuration](http
454
535
  - [Configuration](https://docs.switchagents.ai/switch-trust-cli/eval/eval-configuration)
455
536
  - [Environment variables](https://docs.switchagents.ai/switch-trust-cli/reference/env-vars)
456
537
  - [Built-in evaluations](https://docs.switchagents.ai/switch-trust-cli/reference/builtin-evaluations)
457
- - [Data privacy](https://docs.switchagents.ai/switch-trust-cli/reference/data-privacy)
538
+ - [Data privacy](https://docs.switchagents.ai/legal/cli-data-privacy)
458
539
  - [FAQ](https://docs.switchagents.ai/switch-trust-cli/resources/faq)
459
540
 
460
541
  ## Data privacy
@@ -463,7 +544,7 @@ Switch Trust runs on your machine, but several features can call external LLM pr
463
544
  (located in `~/.switch-trust/.env`, created by `switch-trust init`). You can set this to a remote managed LLM (i.e. `gemini`, `openai`, `anthropic`)
464
545
  or a locally hosted LLM (i.e. `litellm` or `ollama`).
465
546
 
466
- [Read more](https://docs.switchagents.ai/switch-trust-cli/reference/data-privacy).
547
+ [Read more](https://docs.switchagents.ai/legal/cli-data-privacy).
467
548
 
468
549
  ### Telemetry
469
550
 
@@ -166,6 +166,42 @@ switch-trust scan agent.py
166
166
 
167
167
  # Specify output file
168
168
  switch-trust scan /path/to/code --output results.json
169
+
170
+ # Fail the build on any high or critical finding
171
+ switch-trust scan /path/to/code --fail-on high
172
+ ```
173
+
174
+ #### Gating CI on severity
175
+
176
+ `--fail-on SEVERITY` turns a scan into a quality gate. Without it, a completed
177
+ scan always exits `0` however many findings it reported.
178
+
179
+ `SEVERITY` is one of `critical`, `high`, `medium`, `low`, `info`, and the gate
180
+ trips on any finding **at or above** it — `--fail-on high` fires on a `high` as
181
+ well as a `critical`.
182
+
183
+ Two details worth knowing before you rely on it:
184
+
185
+ - **It counts findings after triage**, the ones in the summary and the output
186
+ file. Triage removes false positives, so a finding it downgrades is judged on
187
+ its new severity.
188
+ - **A finding whose severity cannot be read trips the gate**, whatever the
189
+ threshold, and the message names the value. A security gate that silently
190
+ skipped what it could not parse would be worse than no gate.
191
+
192
+ The report is always written before the gate is checked, so a failing job still
193
+ has its results file to collect.
194
+
195
+ | Exit code | Meaning |
196
+ |---|---|
197
+ | `0` | no finding reached the threshold |
198
+ | `5` | at least one did, or one had an unreadable severity |
199
+ | `20` | the scanner model's API key is missing or was rejected |
200
+ | `23` | nothing scannable was found at the path |
201
+
202
+ ```bash
203
+ switch-trust scan /path/to/code --fail-on high
204
+ if [ $? -eq 5 ]; then echo "security gate failed"; fi
169
205
  ```
170
206
 
171
207
  [Full scan guide](https://docs.switchagents.ai/switch-trust-cli/scan/getting-started)
@@ -188,6 +224,75 @@ switch-trust eval model-evaluations attach \
188
224
 
189
225
  # Run all evaluations for an agent
190
226
  switch-trust eval run --model my-agent
227
+
228
+ # Fail the build if any evaluation scores below 0.8
229
+ switch-trust eval run --model my-agent --fail-under 0.8
230
+ ```
231
+
232
+ #### Gating CI on a score
233
+
234
+ `--fail-under SCORE` turns a run into a quality gate. Without it, a completed run
235
+ always exits `0` whatever it scored.
236
+
237
+ `SCORE` is between 0 and 1, and it is the bar each evaluation must **meet** — a
238
+ score of exactly `0.8` passes `--fail-under 0.8`. The check is per evaluation, not
239
+ on the average, so a single failing evaluation cannot be averaged away by
240
+ others that passed.
241
+
242
+ The report is always written before the gate is checked, so a failing job still
243
+ has its results file to collect.
244
+
245
+ A run covering several evaluations stops at the first one that hits a problem
246
+ re-running cannot fix — a missing judge credential, an unreadable prompt file,
247
+ an uninstalled optional tool — rather than paying for the rest to fail the same
248
+ way. It also gives up once three evaluations fail in a row, on the assumption
249
+ the target is down. Either way, whatever scored before that point is still
250
+ printed and written to the report, and the exit code is the one for the problem
251
+ rather than `5`: a run that did not finish has no verdict for the gate to
252
+ judge.
253
+
254
+ | Exit code | Meaning |
255
+ |---|---|
256
+ | `0` | every evaluation ran, and every score met the bar |
257
+ | `5` | at least one evaluation scored below it |
258
+ | `6` | the run has no verdict: nothing scored, or it stopped with evaluations unrun |
259
+ | `20` | an API key is missing, or the provider rejected it |
260
+ | `23` | no evaluations matched the model or tag filters |
261
+
262
+ Exits `6` and `20` are reported whether or not `--fail-under` was passed. A
263
+ credential problem, or a run with no verdict to report, is a broken run rather
264
+ than a verdict — reporting success for it is the false green a gate exists to
265
+ prevent. Only exit `5`, the verdict itself, is opt-in.
266
+
267
+ Exit `6` covers both ways a run can end up without a verdict, and the message
268
+ says which: no evaluation produced a score at all, or the run gave up partway
269
+ and some of the evaluations you selected were never attempted. The second is
270
+ still exit `6` even when the ones that did run all scored above the bar — a
271
+ gate applied to the part of a suite that happened to run first is not a result
272
+ you can act on.
273
+
274
+ Exit `20` covers two credentials, and the message says which:
275
+
276
+ - **The model under test.** A key that is simply *absent* is refused before
277
+ the run starts, so you pay no CI time to find out; a key the provider
278
+ *rejects* is reported after the run, since it takes a call to discover.
279
+ Either way, set the provider's variable (`GEMINI_API_KEY` /
280
+ `GOOGLE_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`) or put a key in the
281
+ model's config entry.
282
+ - **The judge/generator** named by `GENERATOR_MODEL`, which adversarial probes
283
+ and LLM-as-judge detectors need in addition to the model under test. For a
284
+ `gemini` generator set `GOOGLE_API_KEY` or `GEMINI_API_KEY`, or
285
+ `GOOGLE_VERTEX_CREDENTIALS_JSON` plus `GOOGLE_CLOUD_LOCATION` for Vertex AI.
286
+
287
+ > **Upgrading:** this is the one behaviour change in the exit codes. Earlier
288
+ > versions exited `0` when every evaluation errored, and when a run gave up
289
+ > after three consecutive failures having scored something first — so a total
290
+ > provider outage was indistinguishable from a clean run. If your pipeline
291
+ > relies on that, branch on `6` explicitly.
292
+
293
+ ```bash
294
+ switch-trust eval run --model my-agent --fail-under 0.8
295
+ if [ $? -eq 5 ]; then echo "quality gate failed"; fi
191
296
  ```
192
297
 
193
298
  The `switch-trust eval` command requires configuration. See [Configuration](https://docs.switchagents.ai/switch-trust-cli/eval/eval-configuration) to:
@@ -205,7 +310,7 @@ The `switch-trust eval` command requires configuration. See [Configuration](http
205
310
  - [Configuration](https://docs.switchagents.ai/switch-trust-cli/eval/eval-configuration)
206
311
  - [Environment variables](https://docs.switchagents.ai/switch-trust-cli/reference/env-vars)
207
312
  - [Built-in evaluations](https://docs.switchagents.ai/switch-trust-cli/reference/builtin-evaluations)
208
- - [Data privacy](https://docs.switchagents.ai/switch-trust-cli/reference/data-privacy)
313
+ - [Data privacy](https://docs.switchagents.ai/legal/cli-data-privacy)
209
314
  - [FAQ](https://docs.switchagents.ai/switch-trust-cli/resources/faq)
210
315
 
211
316
  ## Data privacy
@@ -214,7 +319,7 @@ Switch Trust runs on your machine, but several features can call external LLM pr
214
319
  (located in `~/.switch-trust/.env`, created by `switch-trust init`). You can set this to a remote managed LLM (i.e. `gemini`, `openai`, `anthropic`)
215
320
  or a locally hosted LLM (i.e. `litellm` or `ollama`).
216
321
 
217
- [Read more](https://docs.switchagents.ai/switch-trust-cli/reference/data-privacy).
322
+ [Read more](https://docs.switchagents.ai/legal/cli-data-privacy).
218
323
 
219
324
  ### Telemetry
220
325
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "switch-trust-cli"
3
- version = "1.7.2"
3
+ version = "1.8.0"
4
4
  description = "Command-line tool for evaluating agents, offering two features to assess agents via code scanning (`switch-trust scan`, whitebox testing) and runtime evaluation (`switch-trust eval`, blackbox testing)"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -8,9 +8,12 @@ requires-python = ">=3.11"
8
8
  authors = [
9
9
  { name = "SandboxAQ", email = "info@switchagents.ai" },
10
10
  ]
11
+ # These versions are kept in step with the versions the library is developed
12
+ # and tested against upstream, so an installed `switch-trust` runs what was
13
+ # tested. Please raise an issue rather than re-pinning one in isolation.
11
14
  dependencies = [
12
15
  "aiohttp>=3.14.3",
13
- "anthropic==0.87.0",
16
+ "anthropic>=0.25.0",
14
17
  # Direct floor pin for transitive dependency of google-adk->google-auth
15
18
  # required for `pip-compile` to resolve the dependency tree.
16
19
  "pyOpenSSL>=26.4.0",
@@ -19,32 +22,34 @@ dependencies = [
19
22
  "cryptography>=50.0.0",
20
23
  "bandit==1.9.4",
21
24
  "cvss>=2.6",
22
- "datafog>=4.4.0",
25
+ "datafog==4.4.0",
23
26
  "dataclasses-json==0.6.7",
24
27
  "detect-secrets==1.5.0",
25
- "google-adk==2.2.0",
26
- "litellm>=1.83.7",
27
- "openai==2.29.0",
28
- # Cap opentelemetry at 1.41.1 to match google-adk's hard ceiling
29
- # (opentelemetry-api/sdk >=1.36,<=1.41.1). Without the cap, pip-compile
30
- # grabs the newest otel (1.42+) then backtracks the whole otel stack down
31
- # in lockstep, which is slow and can spuriously hit ResolutionImpossible.
32
- "opentelemetry-api>=1.38.0,<=1.41.1",
33
- "opentelemetry-exporter-otlp-proto-http>=1.38.0,<=1.41.1",
34
- "opentelemetry-sdk>=1.38.0,<=1.41.1",
28
+ "google-adk==1.38.0",
29
+ # switch_trust/eval/core/models/{generator_model,
30
+ # model_vertex_agent_runtime}.py build service-account credentials with it.
31
+ "google-auth>=2.60.0",
32
+ "google-genai>=1.0.0",
33
+ # switch_trust/scan/exception_classification.py classifies httpx transport
34
+ # errors.
35
+ "httpx==0.28.1",
36
+ "litellm==1.100.4",
37
+ "openai>=1.0.0",
38
+ "opentelemetry-api==1.38.0",
39
+ "opentelemetry-exporter-otlp-proto-http==1.38.0",
40
+ "opentelemetry-sdk==1.38.0",
35
41
  "pip-audit==2.10.1",
36
42
  # google-adk chains the whole otel stack to <=1.42.1, whose
37
43
  # opentelemetry-proto still requires protobuf<7.0, while google-api-core /
38
- # googleapis-common-protos / grpcio-status require protobuf>=6.33.5. That
39
- # leaves 6.33.x as the only viable window; pin it so the resolver lands
40
- # there directly instead of backtracking down from protobuf 7.x.
41
- "protobuf>=6.33.5,<7",
44
+ # googleapis-common-protos / grpcio-status require protobuf>=6.33.5. The
45
+ # exact pin keeps the resolver from backtracking down from protobuf 7.x.
46
+ "protobuf==6.33.5",
42
47
  "pydantic==2.12.5",
43
- "python-dotenv==1.2.2",
44
- "requests>=2.33.0",
45
- "rich>=13.0",
46
- "msgpack>=1.2.1",
47
- "pydantic-settings>=2.14.2",
48
+ "python-dotenv>=1.0.0",
49
+ # switch_trust/scan/static_scanner.py parses the OpenGrep rule file.
50
+ "PyYAML>=6.0.0",
51
+ "requests==2.34.2",
52
+ "rich>=13.0.0",
48
53
  ]
49
54
 
50
55
  [project.optional-dependencies]
@@ -0,0 +1,7 @@
1
+ from switch_trust.cli.main import main
2
+
3
+ # `raise SystemExit(main())`, not a bare `main()`: the installed console script
4
+ # is generated as `sys.exit(main())`, so dropping the return value here would
5
+ # make `python -m switch_trust.cli` (and the Bazel binary, which runs this same
6
+ # file) exit 0 on a run the installed binary fails. See exit_codes.py.
7
+ raise SystemExit(main())
@@ -101,6 +101,9 @@ def select(
101
101
  while True:
102
102
  ch = sys.stdin.read(1)
103
103
 
104
+ if not ch:
105
+ break
106
+
104
107
  if ch == "\r" or ch == "\n":
105
108
  break
106
109