Adding guardrails to large language models.
This report presents the forensic synthetic code analysis of guardrails-ai/guardrails, a Python project with 7,236 GitHub stars. SynthScan v2.0 examined 52,595 lines of code across 468 source files, recording 1109 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 28.0 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1109 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | guardrails/validator_base.py | 47 | def split_sentence_word_tokenizers_jl_separator( | CODE |
| LOW | guardrails/llm_providers.py | 902 | def model_is_supported_server_side( | CODE |
| LOW | guardrails/document_store.py | 213 | def get_pages_for_for_indexes(self, indexes: List[int]) -> List[Page]: | CODE |
| LOW | guardrails/guard.py | 186 | def must_be_valid_json_schema( | CODE |
| LOW | guardrails/guard.py | 1081 | def response_format_json_schema(self) -> Dict[str, Any]: | CODE |
| LOW | guardrails/guard.py | 1084 | def json_function_calling_tool( | CODE |
| LOW | …ails/validator_service/sequential_validator_service.py | 110 | def run_validators_stream_fix( | CODE |
| LOW | …ails/validator_service/sequential_validator_service.py | 259 | def run_validators_stream_noop( | CODE |
| LOW | guardrails/classes/llm/llm_response.py | 83 | def deserialize_stream_output(cls, stream_output: Any | None) -> Iterator | None: | CODE |
| LOW | guardrails/classes/llm/llm_response.py | 94 | def serialize_async_stream_output( | CODE |
| LOW | guardrails/classes/llm/llm_response.py | 112 | def deserialize_async_stream_output( | CODE |
| LOW | guardrails/classes/history/iteration.py | 83 | def completion_tokens_consumed(self) -> Optional[int]: | CODE |
| LOW | guardrails/classes/history/call.py | 218 | def completion_tokens_consumed(self) -> Optional[int]: | CODE |
| LOW | guardrails/classes/history/outputs.py | 60 | def deserialize_validation_response( | CODE |
| LOW | guardrails/classes/validation/validator_logs.py | 51 | def serialize_validation_result( | CODE |
| LOW | guardrails/classes/validation/validator_logs.py | 60 | def deserialize_validation_result( | CODE |
| LOW | guardrails/classes/validation/validation_summary.py | 12 | def _generate_summaries_from_validator_logs( | CODE |
| LOW | guardrails/classes/validation/validation_summary.py | 47 | def from_validator_logs_only_fails( | CODE |
| LOW | guardrails/vectordb/faiss.py | 82 | def similarity_search_vector_with_threshold( | CODE |
| LOW | guardrails/vectordb/base.py | 43 | def similarity_search_vector_with_threshold( | CODE |
| LOW | guardrails/vectordb/base.py | 66 | def similarity_search_with_threshold( | CODE |
| LOW | guardrails/hub_telemetry/hub_tracing.py | 19 | def get_guard_call_attributes( | CODE |
| LOW | guardrails/hub_telemetry/hub_tracing.py | 56 | def get_validator_inference_attributes( | CODE |
| LOW | guardrails/hub_telemetry/hub_tracing.py | 76 | def get_validator_usage_attributes( | CODE |
| LOW | guardrails/formatters/json_formatter.py | 28 | def _jsonschema_to_jsonformer( | CODE |
| LOW | guardrails/utils/pydantic_utils.py | 16 | def convert_pydantic_model_to_openai_fn( | CODE |
| LOW | guardrails/utils/validator_utils.py | 174 | def verify_metadata_requirements( | CODE |
| LOW | guardrails/utils/validator_utils.py | 187 | def parse_validator_reference(ref: ValidatorReference) -> Optional[Validator]: | CODE |
| LOW | guardrails/utils/structured_data_utils.py | 21 | def set_additional_properties_false_iteratively(schema): | CODE |
| LOW | guardrails/utils/structured_data_utils.py | 53 | def json_function_calling_tool( | CODE |
| LOW | guardrails/utils/structured_data_utils.py | 62 | def output_format_json_schema(schema: ModelOrListOfModels) -> dict: | CODE |
| LOW | guardrails/utils/docs_utils.py | 24 | def messages_to_prompt_string( | CODE |
| LOW | guardrails/utils/docs_utils.py | 74 | def prompt_template_token_length(self, prompt_template: Prompt) -> int: | CODE |
| LOW | guardrails/utils/prompt_utils.py | 20 | def prompt_content_for_string_schema( | CODE |
| LOW | guardrails/utils/prompt_utils.py | 44 | def prompt_content_for_schema( | CODE |
| LOW | guardrails/utils/prompt_utils.py | 55 | def messages_to_prompt_string( | CODE |
| LOW | guardrails/utils/api_utils.py | 15 | def extract_serializeable_metadata(metadata: Dict[str, Any]) -> Dict[str, Any]: | CODE |
| LOW | guardrails/utils/openai_utils/v1.py | 71 | def construct_nonchat_response( | CODE |
| LOW | guardrails/cli/version.py | 15 | def version_warnings_if_applicable(console: Console): | CODE |
| LOW | guardrails/cli/create.py | 152 | def split_and_install_validators( | CODE |
| LOW | guardrails/cli/create.py | 162 | def install_local_models_confirm(): | CODE |
| LOW | guardrails/cli/hub/utils.py | 52 | def pip_process_with_custom_exception( | CODE |
| LOW | …ls/integrations/llama_index/guardrails_query_engine.py | 106 | def _update_response_metadata(self, validated_output): | CODE |
| LOW⚡ | …drails/integrations/databricks/ml_flow_instrumentor.py | 228 | def _instrument_stream_runner_step( | CODE |
| LOW⚡ | …drails/integrations/databricks/ml_flow_instrumentor.py | 232 | def trace_stream_step_wrapper( | CODE |
| LOW⚡ | …drails/integrations/databricks/ml_flow_instrumentor.py | 291 | def _instrument_async_stream_runner_step( | CODE |
| LOW⚡ | …drails/integrations/databricks/ml_flow_instrumentor.py | 295 | async def trace_async_stream_step_wrapper( | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 167 | async def _async_guard_execute_wrapper( | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 266 | def _instrument_async_runner_step( | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 354 | def _instrument_async_runner_call( | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 379 | def _instrument_validator_validate( | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 445 | def _instrument_validator_async_validate( | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 450 | async def trace_async_validator_wrapper(*args, **kwargs): | CODE |
| LOW | guardrails/schema/rail_schema.py | 516 | def build_choice_case_element_from_if( | CODE |
| LOW | guardrails/schema/rail_schema.py | 609 | def build_choice_case_element_from_discriminator( | CODE |
| LOW | guardrails/schema/rail_schema.py | 903 | def json_schema_to_rail_output( | CODE |
| LOW | guardrails/prompt/base_prompt.py | 85 | def get_format_instructions_idx(self, text: str) -> Optional[int]: | CODE |
| LOW | guardrails/actions/reask.py | 205 | def get_reask_setup_for_string( | CODE |
| LOW | guardrails/actions/reask.py | 555 | def sub_reasks_with_fixed_values(value: Any) -> Any: | CODE |
| LOW | guardrails/applications/text2sql.py | 157 | def _create_docstore_with_examples( | STRING |
| 453 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | SECURITY_ADVISORY.md | 1 | # Security Advisory: Malicious code in guardrails-ai 0.10.1 | COMMENT |
| MEDIUM⚡ | SECURITY_ADVISORY.md | 3 | **Status:** Active. Package quarantined on PyPI. Tracking issue: [#1473](https://github.com/guardrails-ai/guardrails/iss | CODE |
| MEDIUM⚡ | SECURITY_ADVISORY.md | 3 | **Status:** Active. Package quarantined on PyPI. Tracking issue: [#1473](https://github.com/guardrails-ai/guardrails/iss | CODE |
| MEDIUM | SECURITY_ADVISORY.md | 20 | ### 1. Do not install `guardrails-ai==0.10.1` | COMMENT |
| MEDIUM | SECURITY_ADVISORY.md | 31 | pip install git+https://github.com/guardrails-ai/guardrails.git@v0.10.0 | CODE |
| MEDIUM | SECURITY_ADVISORY.md | 71 | - Worked with PyPI to lift the quarantine and publish a clean release (tracked in [#1473](https://github.com/guardrails- | CODE |
| MEDIUM | SECURITY_ADVISORY.md | 71 | - Worked with PyPI to lift the quarantine and publish a clean release (tracked in [#1473](https://github.com/guardrails- | CODE |
| MEDIUM⚡ | SECURITY_ADVISORY.md | 84 | - Tracking issue: [#1473](https://github.com/guardrails-ai/guardrails/issues/1473) | CODE |
| MEDIUM⚡ | SECURITY_ADVISORY.md | 84 | - Tracking issue: [#1473](https://github.com/guardrails-ai/guardrails/issues/1473) | CODE |
| MEDIUM⚡ | SECURITY_ADVISORY.md | 85 | - GHSA: [GHSA-xmpw-2vmm-p4p6](https://github.com/guardrails-ai/guardrails/security/advisories/GHSA-xmpw-2vmm-p4p6) | CODE |
| MEDIUM | pyproject.toml | 13 | documentation = "https://www.guardrailsai.com/guardrails/docs" | CODE |
| MEDIUM⚡ | README.md | 3 | <img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/assets/Guardrails-ai-logo-for-dark-bg.svg | CODE |
| MEDIUM⚡ | README.md | 4 | <img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/assets/Guardrails-ai-logo-for-white-bg.sv | CODE |
| MEDIUM⚡ | README.md | 9 |  | CODE |
| MEDIUM⚡ | README.md | 10 | [](https://pepy.tech/project/guardrails-ai) | CODE |
| MEDIUM⚡ | README.md | 11 | [](https://github.com/guardrails-ai | CODE |
| MEDIUM⚡ | README.md | 12 | [](https://codecov.io/gh/guar | CODE |
| MEDIUM⚡ | README.md | 16 | [](https://guardra | CODE |
| MEDIUM⚡ | README.md | 18 | [](https://gurubase.io/g/guardrails) | CODE |
| MEDIUM | README.md | 33 | <img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/assets/with_and_without_guardrails.svg" a | CODE |
| MEDIUM | README.md | 42 | <img src="https://raw.githubusercontent.com/guardrails-ai/guardrails/main/docs/assets/guardrails_hub.gif" alt="Guardrail | CODE |
| MEDIUM⚡ | README.md | 112 | ) # Both the guardrails pass | CODE |
| MEDIUM⚡ | README.md | 117 | ) # Both the guardrails fail | CODE |
| MEDIUM | README.md | 178 | 3. Create a config: `guardrails create --validators=hub://guardrails/two_words --guard-name=two-word-guard` | STRING |
| MEDIUM | README.md | 182 | # with the guardrails client | STRING |
| MEDIUM | README.md | 217 | Yes, Guardrails can be used with proprietary and open-source LLMs. Check out this guide on [how to use Guardrails with a | STRING |
| MEDIUM | README.md | 221 | Yes, you can create your own validators and contribute them to Guardrails Hub. Check out this guide on [how to create yo | STRING |
| MEDIUM | CONTRIBUTING.md | 12 | 1. Clone the repository: `git clone https://github.com/guardrails-ai/guardrails.git` | CODE |
| MEDIUM | CLAUDE.md | 36 | make type # pyright guardrails/ | CODE |
| MEDIUM | guardrails/__init__.py | 1 | # Set up __init__.py so that users can do from guardrails import Response, Schema, etc. | COMMENT |
| MEDIUM | guardrails/guard.py | 876 | # https://github.com/guardrails-ai/guardrails/pull/525 is merged | COMMENT |
| MEDIUM | guardrails/guard.py | 876 | # https://github.com/guardrails-ai/guardrails/pull/525 is merged | COMMENT |
| MEDIUM | guardrails/classes/output_type.py | 1 | # TODO: Move this file to guardrails.types | COMMENT |
| MEDIUM⚡ | guardrails/utils/constants.py | 5 | # TODO: Move this to guardrails/constants/__init__.py | COMMENT |
| MEDIUM⚡ | guardrails/utils/constants.py | 10 | # TODO: Consolidate this and guardrails/utils/prompt_utils.py | COMMENT |
| MEDIUM⚡ | guardrails/utils/constants.py | 11 | # into guardrails/utils/templating_utils.py | COMMENT |
| MEDIUM | guardrails/cli/configure.py | 130 | guardrails hub install hub://guardrails/regex_match | CODE |
| MEDIUM | guardrails/cli/create.py | 40 | " For example hub:template://guardrails/chatbot or hub:template://guardrails/summarizer." | CODE |
| MEDIUM | guardrails/cli/hub/create_validator.py | 20 | The template repository can be found here: https://github.com/guardrails-ai/validator-template | CODE |
| MEDIUM | guardrails/cli/hub/create_validator.py | 70 | $ guardrails hub install hub://guardrails/${package_name} | CODE |
| MEDIUM | guardrails/cli/hub/create_validator.py | 162 | https://github.com/guardrails-ai/validator-template?tab=readme-ov-file#how-to-create-a-guardrails-validator | CODE |
| MEDIUM | guardrails/cli/hub/create_validator.py | 162 | https://github.com/guardrails-ai/validator-template?tab=readme-ov-file#how-to-create-a-guardrails-validator | CODE |
| MEDIUM | guardrails/cli/hub/create_validator.py | 176 | https://github.com/guardrails-ai/validator-template | CODE |
| MEDIUM | guardrails/cli/hub/submit.py | 47 | guardrails hub install hub://guardrails/${package_name} | STRING |
| MEDIUM | guardrails/cli/hub/uninstall.py | 60 | help="URI to the package to uninstall. Example: hub://guardrails/regex_match." | CODE |
| MEDIUM⚡ | guardrails/cli/hub/install.py | 13 | # Quick note: This is the command for `guardrails hub install`. We change the name of | COMMENT |
| MEDIUM⚡ | guardrails/cli/hub/install.py | 16 | # call install from a script, please consider importing install from guardrails, | COMMENT |
| MEDIUM⚡ | guardrails/cli/hub/install.py | 17 | # not guardrails.cli.hub.install. | COMMENT |
| MEDIUM⚡ | guardrails/cli/hub/install.py | 23 | help="URIs to the packages to install. Example: hub://guardrails/regex_match hub://guardrails/toxic_language", | CODE |
| MEDIUM | guardrails/telemetry/default_otlp_tracer_mod.py | 67 | do that is in our (docs)[https://guardrailsai.com/guardrails/docs/concepts/telemetry] | STRING |
| MEDIUM⚡ | guardrails/hub/install.py | 57 | >>> RegexMatch = install("hub://guardrails/regex_match").RegexMatch | STRING |
| MEDIUM⚡ | guardrails/hub/install.py | 58 | >>> RegexMatch = install("hub://guardrails/regex_match~=1.4").RegexMatch | STRING |
| MEDIUM⚡ | guardrails/hub/install.py | 61 | >>> install("hub://guardrails/regex_match>=1.4,==1.*.") | STRING |
| MEDIUM⚡ | guardrails/hub/validator_package_service.py | 341 | # ``guardrails-ai-<name>`` (e.g. ``guardrails/detect_pii`` -> | STRING |
| MEDIUM⚡ | guardrails/hub/validator_package_service.py | 342 | # ``guardrails-ai-detect-pii``). The hub namespace component of the | STRING |
| MEDIUM⚡ | guardrails/hub/validator_package_service.py | 343 | # validator id is dropped because every guardrails-owned validator now | STRING |
| MEDIUM⚡ | guardrails/hub/validator_package_service.py | 344 | # publishes under the single ``guardrails-ai-*`` dist namespace on | STRING |
| MEDIUM⚡ | guardrails/hub/validator_package_service.py | 355 | # package: ``guardrails/detect_pii`` -> ``guardrails_ai.detect_pii``. | STRING |
| MEDIUM | guardrails/hub/validator_package_service.py | 375 | # Validators now publish to public PyPI as ``guardrails-ai-<name>``; | STRING |
| MEDIUM⚡ | tests/unit_tests/cli/hub/test_deprecation.py | 12 | ("hub://guardrails/detect_pii", "guardrails-ai-detect-pii"), | CODE |
| 53 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | guardrails/validator_base.py | 24 | CODE | |
| LOW | guardrails/embedding.py | 19 | CODE | |
| LOW | guardrails/llm_providers.py | 270 | CODE | |
| LOW | guardrails/llm_providers.py | 375 | CODE | |
| LOW | guardrails/__init__.py | 3 | CODE | |
| LOW | guardrails/__init__.py | 4 | CODE | |
| LOW | guardrails/__init__.py | 5 | CODE | |
| LOW | guardrails/__init__.py | 6 | CODE | |
| LOW | guardrails/__init__.py | 7 | CODE | |
| LOW | guardrails/__init__.py | 7 | CODE | |
| LOW | guardrails/__init__.py | 7 | CODE | |
| LOW | guardrails/__init__.py | 8 | CODE | |
| LOW | guardrails/__init__.py | 8 | CODE | |
| LOW | guardrails/__init__.py | 9 | CODE | |
| LOW | guardrails/__init__.py | 10 | CODE | |
| LOW | guardrails/__init__.py | 10 | CODE | |
| LOW | guardrails/__init__.py | 11 | CODE | |
| LOW | guardrails/__init__.py | 12 | CODE | |
| LOW | guardrails/__init__.py | 13 | CODE | |
| LOW | guardrails/__init__.py | 14 | CODE | |
| LOW | guardrails/types/__init__.py | 1 | CODE | |
| LOW | guardrails/types/__init__.py | 2 | CODE | |
| LOW | guardrails/types/__init__.py | 3 | CODE | |
| LOW | guardrails/types/__init__.py | 4 | CODE | |
| LOW | guardrails/types/__init__.py | 4 | CODE | |
| LOW | guardrails/types/__init__.py | 4 | CODE | |
| LOW | guardrails/types/__init__.py | 9 | CODE | |
| LOW | guardrails/types/__init__.py | 10 | CODE | |
| LOW | guardrails/types/__init__.py | 10 | CODE | |
| LOW | guardrails/types/__init__.py | 10 | CODE | |
| LOW | guardrails/types/__init__.py | 10 | CODE | |
| LOW | guardrails/types/__init__.py | 10 | CODE | |
| LOW | guardrails/types/__init__.py | 10 | CODE | |
| LOW | guardrails/validator_service/__init__.py | 15 | CODE | |
| LOW | guardrails/classes/__init__.py | 1 | CODE | |
| LOW | guardrails/classes/__init__.py | 2 | CODE | |
| LOW | guardrails/classes/__init__.py | 3 | CODE | |
| LOW | guardrails/classes/__init__.py | 4 | CODE | |
| LOW | guardrails/classes/__init__.py | 4 | CODE | |
| LOW | guardrails/classes/__init__.py | 4 | CODE | |
| LOW | guardrails/classes/__init__.py | 4 | CODE | |
| LOW | guardrails/classes/__init__.py | 10 | CODE | |
| LOW | guardrails/classes/schema/__init__.py | 1 | CODE | |
| LOW | guardrails/classes/execution/__init__.py | 1 | CODE | |
| LOW | guardrails/classes/history/iteration.py | 1 | CODE | |
| LOW | guardrails/classes/history/__init__.py | 1 | CODE | |
| LOW | guardrails/classes/history/__init__.py | 2 | CODE | |
| LOW | guardrails/classes/history/__init__.py | 3 | CODE | |
| LOW | guardrails/classes/history/__init__.py | 4 | CODE | |
| LOW | guardrails/classes/history/__init__.py | 5 | CODE | |
| LOW | guardrails/classes/history/inputs.py | 1 | CODE | |
| LOW | guardrails/classes/history/call_inputs.py | 1 | CODE | |
| LOW | guardrails/classes/history/call.py | 1 | CODE | |
| LOW | guardrails/classes/history/outputs.py | 1 | CODE | |
| LOW | guardrails/classes/generic/async_iterable.py | 1 | CODE | |
| LOW | guardrails/classes/generic/__init__.py | 1 | CODE | |
| LOW | guardrails/classes/generic/__init__.py | 2 | CODE | |
| LOW | guardrails/classes/generic/__init__.py | 3 | CODE | |
| LOW | guardrails/classes/validation/validation_result.py | 1 | CODE | |
| LOW | guardrails/classes/validation/validation_result.py | 5 | CODE | |
| 128 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | guardrails/async_guard.py | 231 | self.history.push(call_log) | CODE |
| HIGH | guardrails/guard.py | 571 | self.history.push(call_log) | CODE |
| HIGH | guardrails/run/runner.py | 232 | call_log.iterations.push(iteration) | CODE |
| HIGH | guardrails/run/async_stream_runner.py | 94 | call_log.iterations.push(iteration) | CODE |
| HIGH | guardrails/run/stream_runner.py | 92 | call_log.iterations.push(iteration) | CODE |
| HIGH | guardrails/run/async_runner.py | 157 | call_log.iterations.push(iteration) | CODE |
| HIGH⚡ | tests/unit_tests/test_guard.py | 574 | guard.history.push(mock_call) | CODE |
| HIGH⚡ | tests/unit_tests/test_guard.py | 591 | guard.history.push(mock_call) | CODE |
| HIGH⚡ | tests/unit_tests/test_guard.py | 717 | guard.history.push(call1) | CODE |
| HIGH⚡ | tests/unit_tests/test_guard.py | 718 | guard.history.push(call2) | CODE |
| HIGH⚡ | tests/unit_tests/test_guard.py | 719 | guard.history.push(call3) | CODE |
| HIGH⚡ | tests/unit_tests/classes/generic/test_stack.py | 38 | stack.push(1) | CODE |
| HIGH⚡ | tests/unit_tests/classes/generic/test_stack.py | 42 | stack.push(2) | CODE |
| HIGH⚡ | tests/unit_tests/classes/generic/test_stack.py | 50 | stack.push(1) | CODE |
| HIGH⚡ | tests/unit_tests/classes/generic/test_stack.py | 54 | stack.push(2) | CODE |
| HIGH | tests/unit_tests/classes/generic/test_stack.py | 111 | stack.push(1) | CODE |
| HIGH | …s/integrations/databricks/test_ml_flow_instrumentor.py | 383 | call.iterations.push(iteration) | CODE |
| HIGH | …s/integrations/databricks/test_ml_flow_instrumentor.py | 475 | call.iterations.push(iteration) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 83 | except Exception as e: | CODE |
| LOW⚡ | README.md | 118 | except Exception as e: | CODE |
| LOW | guardrails/llm_providers.py | 620 | except Exception as e: | CODE |
| MEDIUM | guardrails/llm_providers.py | 615 | def __call__(self, *args, **kwargs) -> LLMResponse: | CODE |
| LOW | guardrails/guard.py | 1063 | except Exception as e: | CODE |
| LOW | guardrails/api_client.py | 49 | except Exception: | CODE |
| LOW | guardrails/api_client.py | 70 | except Exception: | CODE |
| LOW | guardrails/api_client.py | 98 | except Exception as e: | CODE |
| LOW | guardrails/api_client.py | 113 | except Exception as e: | CODE |
| LOW | guardrails/types/rail.py | 43 | except Exception: | CODE |
| LOW | guardrails/types/primitives.py | 15 | except Exception as e: | CODE |
| LOW | guardrails/types/on_fail.py | 42 | except Exception as e: | CODE |
| LOW | guardrails/classes/output_type.py | 24 | except Exception: | CODE |
| LOW | guardrails/classes/llm/prompt_callable.py | 35 | except Exception as e: | CODE |
| MEDIUM | guardrails/classes/llm/prompt_callable.py | 30 | def __call__(self, *args, **kwargs) -> LLMResponse: | CODE |
| LOW | guardrails/utils/parsing_utils.py | 277 | except Exception: | CODE |
| LOW | guardrails/utils/sql_utils.py | 70 | except Exception as ex: | CODE |
| LOW | guardrails/utils/sql_utils.py | 86 | except Exception as ex: | CODE |
| LOW | guardrails/utils/serialization_utils.py | 32 | except Exception as e: | CODE |
| LOW | guardrails/utils/serialization_utils.py | 58 | except Exception as e: | CODE |
| LOW | guardrails/utils/safe_get.py | 13 | except Exception as e: | CODE |
| LOW⚡ | guardrails/utils/casting_utils.py | 9 | except Exception: | CODE |
| LOW⚡ | guardrails/utils/casting_utils.py | 17 | except Exception: | CODE |
| LOW⚡ | guardrails/utils/casting_utils.py | 25 | except Exception: | CODE |
| LOW | guardrails/cli/configure.py | 113 | except Exception as e: | CODE |
| LOW | guardrails/cli/server/hub_client.py | 75 | except Exception as e: | CODE |
| LOW | guardrails/cli/server/hub_client.py | 137 | except Exception as e: | CODE |
| LOW | guardrails/cli/server/hub_client.py | 159 | except Exception as e: | CODE |
| LOW | guardrails/cli/server/hub_client.py | 177 | except Exception as e: | CODE |
| LOW | guardrails/cli/server/hub_client.py | 205 | except Exception as e: | CODE |
| MEDIUM | guardrails/cli/server/hub_client.py | 165 | def get_auth(): | CODE |
| LOW | guardrails/cli/hub/submit.py | 57 | except Exception as e: | CODE |
| LOW | guardrails/cli/hub/deprecation.py | 23 | except Exception: | CODE |
| LOW | guardrails/cli/hub/utils.py | 85 | except Exception: | CODE |
| LOW | guardrails/cli/hub/utils.py | 100 | except Exception as e: | CODE |
| LOW | guardrails/cli/hub/utils.py | 157 | except Exception: | CODE |
| LOW | guardrails/cli/hub/utils.py | 174 | except Exception as e: | CODE |
| LOW | guardrails/cli/hub/utils.py | 211 | except Exception: | CODE |
| LOW | guardrails/cli/hub/utils.py | 234 | except Exception as e: | CODE |
| LOW | guardrails/cli/hub/install.py | 80 | except Exception as e: | CODE |
| LOW | …ls/integrations/llama_index/guardrails_query_engine.py | 102 | except Exception as e: | CODE |
| LOW | …ils/integrations/llama_index/guardrails_chat_engine.py | 74 | except Exception as e: | CODE |
| LOW⚡ | …drails/integrations/databricks/ml_flow_instrumentor.py | 221 | except Exception as e: | CODE |
| LOW⚡ | …drails/integrations/databricks/ml_flow_instrumentor.py | 284 | except Exception as e: | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 145 | except Exception as e: | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 200 | except Exception as e: | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 254 | except Exception as e: | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 320 | except Exception as e: | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 347 | except Exception as e: | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 372 | except Exception as e: | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 428 | except Exception as e: | CODE |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 489 | except Exception as e: | CODE |
| LOW | guardrails/telemetry/legacy_validator_tracing.py | 22 | except Exception: | CODE |
| LOW | guardrails/telemetry/guard_tracing.py | 202 | except Exception as e: | STRING |
| LOW | guardrails/telemetry/guard_tracing.py | 289 | except Exception as e: | STRING |
| LOW | guardrails/telemetry/validator_tracing.py | 129 | except Exception as e: | CODE |
| LOW | guardrails/telemetry/validator_tracing.py | 196 | except Exception as e: | CODE |
| LOW | guardrails/telemetry/common.py | 30 | except Exception as e: | CODE |
| LOW | guardrails/telemetry/common.py | 48 | except Exception: | CODE |
| LOW | guardrails/telemetry/common.py | 64 | except Exception: | CODE |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | guardrails/merge.py | 14 | CODE | |
| LOW | guardrails/embedding.py | 149 | CODE | |
| LOW | guardrails/guard.py | 884 | CODE | |
| LOW | guardrails/guard.py | 953 | CODE | |
| LOW | guardrails/api_client.py | 251 | CODE | |
| LOW | …ails/validator_service/sequential_validator_service.py | 110 | CODE | |
| LOW | …ails/validator_service/sequential_validator_service.py | 259 | CODE | |
| LOW | …ails/validator_service/sequential_validator_service.py | 315 | CODE | |
| LOW | guardrails/classes/rc.py | 27 | CODE | |
| LOW | guardrails/classes/history/call.py | 151 | CODE | |
| LOW | guardrails/classes/history/outputs.py | 119 | CODE | |
| LOW | guardrails/classes/history/outputs.py | 152 | CODE | |
| LOW | guardrails/classes/generic/default_json_encoder.py | 8 | CODE | |
| LOW | guardrails/classes/validation/validator_logs.py | 60 | CODE | |
| LOW | guardrails/hub_telemetry/hub_tracing.py | 94 | CODE | |
| LOW | guardrails/formatters/json_formatter.py | 28 | CODE | |
| LOW | guardrails/utils/misc.py | 13 | CODE | |
| LOW | guardrails/utils/validator_utils.py | 111 | CODE | |
| LOW | guardrails/utils/structured_data_utils.py | 21 | CODE | |
| LOW | guardrails/utils/docs_utils.py | 127 | CODE | |
| LOW | guardrails/utils/parsing_utils.py | 141 | CODE | |
| LOW | guardrails/utils/parsing_utils.py | 281 | CODE | |
| LOW | guardrails/utils/serialization_utils.py | 12 | CODE | |
| LOW | guardrails/utils/serialization_utils.py | 40 | CODE | |
| LOW | guardrails/utils/openai_utils/streaming_utils.py | 27 | CODE | |
| LOW | guardrails/cli/create.py | 20 | CODE | |
| LOW | …ls/integrations/llama_index/guardrails_query_engine.py | 52 | CODE | |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 228 | CODE | |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 291 | CODE | |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 232 | CODE | |
| LOW | …drails/integrations/databricks/ml_flow_instrumentor.py | 295 | CODE | |
| LOW | guardrails/schema/pydantic_schema.py | 30 | CODE | |
| LOW | guardrails/schema/pydantic_schema.py | 84 | CODE | |
| LOW | guardrails/schema/pydantic_schema.py | 167 | CODE | |
| LOW | guardrails/schema/rail_schema.py | 105 | CODE | |
| LOW | guardrails/schema/rail_schema.py | 653 | CODE | |
| LOW | guardrails/schema/rail_schema.py | 756 | CODE | |
| LOW | guardrails/schema/rail_schema.py | 809 | CODE | |
| LOW | guardrails/schema/generator.py | 96 | CODE | |
| LOW | guardrails/schema/generator.py | 211 | CODE | |
| LOW | guardrails/actions/refrain.py | 10 | CODE | |
| LOW | guardrails/actions/filter.py | 8 | CODE | |
| LOW | guardrails/actions/reask.py | 130 | CODE | |
| LOW | guardrails/actions/reask.py | 293 | CODE | |
| LOW | guardrails/actions/reask.py | 489 | CODE | |
| LOW | guardrails/actions/reask.py | 584 | CODE | |
| LOW | guardrails/actions/reask.py | 528 | CODE | |
| LOW | guardrails/actions/reask.py | 609 | CODE | |
| LOW | guardrails/telemetry/guard_tracing.py | 137 | CODE | |
| LOW | guardrails/telemetry/guard_tracing.py | 168 | CODE | |
| LOW | guardrails/telemetry/guard_tracing.py | 209 | CODE | |
| LOW | guardrails/telemetry/guard_tracing.py | 241 | CODE | |
| LOW | guardrails/telemetry/open_inference.py | 49 | CODE | |
| LOW | guardrails/telemetry/common.py | 35 | CODE | |
| LOW | guardrails/telemetry/common.py | 52 | CODE | |
| LOW | guardrails/telemetry/common.py | 177 | CODE | |
| LOW | guardrails/telemetry/runner_tracing.py | 109 | CODE | |
| LOW | guardrails/telemetry/runner_tracing.py | 189 | CODE | |
| LOW | guardrails/telemetry/runner_tracing.py | 279 | CODE | |
| LOW | guardrails/telemetry/runner_tracing.py | 281 | CODE | |
| 4 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | guardrails/classes/schema/processed_schema.py | 11 | """This class is just a container for the various pieces of information we | STRING |
| MEDIUM | guardrails/utils/misc.py | 32 | # Create the artifact dir if it doesn't exist. | COMMENT |
| MEDIUM | guardrails/utils/tokenization_utils.py | 1 | # This file contains code adapted from the WordTokenizers.jl | COMMENT |
| MEDIUM | guardrails/utils/hub_telemetry_utils.py | 74 | # Create a resource | COMMENT |
| MEDIUM | guardrails/utils/hub_telemetry_utils.py | 83 | # Create a tracer provider and a processor | COMMENT |
| MEDIUM | guardrails/utils/sql_utils.py | 107 | # Create a nicely formatted schema from the dictionary | COMMENT |
| MEDIUM | guardrails/applications/text2sql.py | 110 | # Initialize the Guard class. | STRING |
| MEDIUM | guardrails/applications/text2sql.py | 137 | # Initialize the Guard class | STRING |
| MEDIUM | guardrails/telemetry/guard_tracing.py | 151 | # Create a new span and link it to the previous span | STRING |
| MEDIUM | guardrails/telemetry/guard_tracing.py | 221 | # Create a new span and link it to the previous span | STRING |
| MEDIUM | guardrails/telemetry/common.py | 71 | """This function is designed to ensure that a given OpenTelemetry context | STRING |
| MEDIUM⚡ | tests/unit_tests/test_guard.py | 560 | # Create a mock call with iterations | COMMENT |
| MEDIUM⚡ | tests/unit_tests/test_guard.py | 587 | # Create a mock call that raises AttributeError | COMMENT |
| MEDIUM | tests/unit_tests/test_guard.py | 462 | # Create a real Guard to return from the mock | COMMENT |
| MEDIUM | tests/unit_tests/test_guard.py | 490 | # Create a real Guard to return from the mock | COMMENT |
| MEDIUM | tests/unit_tests/utils/openai_utils/test_v1.py | 444 | # Create a custom class for message with controlled attribute access | COMMENT |
| MEDIUM | tests/unit_tests/utils/openai_utils/test_v1.py | 550 | # Create a custom class for message with controlled attribute access | COMMENT |
| MEDIUM | tests/unit_tests/cli/server/test_hub_client.py | 49 | # Create a JWT that expires in the future | COMMENT |
| MEDIUM⚡ | tests/unit_tests/cli/hub/test_submit.py | 22 | # Create a temporary file with the package name | COMMENT |
| MEDIUM | tests/integration_tests/test_guard.py | 1035 | # Create a Guard with a top level list return type | COMMENT |
| MEDIUM | .github/workflows/cli-compatibility.yml | 70 | # Create a simple RAIL spec for testing validate command | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit_tests/test_guard_log.py | 11 | "Lorem ipsum dolor sit amet", | CODE |
| LOW | tests/unit_tests/test_guard_log.py | 11 | "Lorem ipsum dolor sit amet", | CODE |
| LOW | tests/integration_tests/test_datatypes.py | 25 | guard.parse(llm_output='{"name": "John Doe", "dob": "2021-01-01"}', num_reasks=0) | STRING |
| LOW | tests/integration_tests/test_datatypes.py | 56 | llm_output='{"name": "John Doe", "dob": "' + date_string + '"}', num_reasks=0 | STRING |
| LOW | tests/integration_tests/test_datatypes.py | 92 | llm_output='{"name": "John Doe", "dob": "' + date_string + '"}', | STRING |
| LOW | tests/integration_tests/test_guard.py | 46 | <email name="dummy_email" description="Any dummy email" /> | CODE |
| LOW | tests/integration_tests/test_guard.py | 76 | "dummy_email": "example@example.com", | CODE |
| LOW | tests/integration_tests/test_guard.py | 97 | "dummy_email": "example@example.com", | CODE |
| LOW | …tegration_tests/test_assets/string/llm_list_output.txt | 4 | {'user_id': 2, 'user_name': 'Jane Doe', 'num_orders': 20, 'last_order_date': '2020-02-01'}, | CODE |
| LOW | …tegration_tests/test_assets/string/llm_list_output.txt | 7 | {'user_id': 5, 'user_name': 'John Doe', 'num_orders': 50, 'last_order_date': '2020-05-01'}, | CODE |
| LOW | …integration_tests/test_assets/validators/detect_pii.py | 20 | For example, if the map is {"John Doe": "REDACTED"}, then the text "John | STRING |
| LOW | …tion_tests/test_assets/pydantic/llm_output_reask_2.txt | 4 | "name": "John Doe", | CODE |
| LOW | …tion_tests/test_assets/pydantic/llm_output_reask_2.txt | 9 | "name": "Jane Doe", | CODE |
| LOW | …tion_tests/test_assets/pydantic/llm_output_reask_1.txt | 4 | "name": "John Doe", | CODE |
| LOW | …tion_tests/test_assets/pydantic/llm_output_reask_1.txt | 9 | "name": "Jane Doe", | CODE |
| LOW | …tests/test_assets/pydantic/llm_output_full_reask_2.txt | 4 | "name": "John Doe", | CODE |
| LOW | …tests/test_assets/pydantic/llm_output_full_reask_2.txt | 9 | "name": "Jane Doe", | CODE |
| LOW | …tests/test_assets/pydantic/llm_output_full_reask_1.txt | 4 | "name": "John Doe", | CODE |
| LOW | …tests/test_assets/pydantic/llm_output_full_reask_1.txt | 9 | "name": "Jane Doe", | CODE |
| LOW | …tests/test_assets/pydantic/validated_response_reask.py | 93 | "name": "John Doe", | CODE |
| LOW | …tests/test_assets/pydantic/validated_response_reask.py | 106 | {"name": "Jane Doe", "age": 32, "zip_code": "94103"}, | CODE |
| LOW | …tests/test_assets/pydantic/validated_response_reask.py | 115 | "name": "John Doe", | CODE |
| LOW | …tests/test_assets/pydantic/validated_response_reask.py | 132 | {"name": "Jane Doe", "age": 32, "zip_code": "94103"}, | CODE |
| LOW | …tests/test_assets/pydantic/validated_response_reask.py | 141 | "name": "John Doe", | CODE |
| LOW | …tests/test_assets/pydantic/validated_response_reask.py | 158 | {"name": "Jane Doe", "age": 32, "zip_code": "94103"}, | CODE |
| LOW | …/integration_tests/test_assets/pydantic/llm_output.txt | 4 | "name": "John Doe", | CODE |
| LOW | …/integration_tests/test_assets/pydantic/llm_output.txt | 9 | "name": "Jane Doe", | CODE |
| LOW | …/test_assets/pydantic/compiled_prompt_full_reask_2.txt | 7 | "name": "John Doe", | CODE |
| LOW | …/test_assets/pydantic/compiled_prompt_full_reask_2.txt | 18 | "name": "Jane Doe", | CODE |
| LOW | …ntegration_tests/test_assets/pydantic/parsing_reask.py | 18 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, | CODE |
| LOW | …ntegration_tests/test_assets/pydantic/parsing_reask.py | 18 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, | CODE |
| LOW | …ntegration_tests/test_assets/pydantic/parsing_reask.py | 35 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, | CODE |
| LOW | …ntegration_tests/test_assets/pydantic/parsing_reask.py | 35 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, | CODE |
| LOW | …/test_assets/pydantic/compiled_prompt_full_reask_1.txt | 7 | "name": "John Doe", | CODE |
| LOW | …/test_assets/pydantic/compiled_prompt_full_reask_1.txt | 17 | "name": "Jane Doe", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | guardrails/__init__.py | 16 | __all__ = [ | CODE |
| LOW | guardrails/guard.py | 219 | def _set_num_reasks(self, num_reasks: Optional[int] = None) -> None: | CODE |
| LOW | guardrails/types/__init__.py | 19 | __all__ = [ | CODE |
| LOW | guardrails/classes/__init__.py | 12 | __all__ = [ | CODE |
| LOW | guardrails/classes/schema/__init__.py | 3 | __all__ = ["ProcessedSchema"] | CODE |
| LOW | guardrails/classes/execution/__init__.py | 3 | __all__ = ["GuardExecutionOptions"] | CODE |
| LOW | guardrails/classes/history/__init__.py | 7 | __all__ = ["Call", "Iteration", "Inputs", "Outputs", "CallInputs"] | CODE |
| LOW | guardrails/classes/generic/__init__.py | 5 | __all__ = ["ArbitraryModel", "Stack", "Serializeable"] | CODE |
| LOW | guardrails/remote_inference/__init__.py | 3 | __all__ = ["get_use_remote_inference"] | CODE |
| LOW | guardrails/vectordb/__init__.py | 4 | __all__ = ["VectorDBBase", "Faiss"] | CODE |
| LOW | guardrails/stores/context.py | 10 | def set_guard_name(guard_name: str) -> None: | CODE |
| LOW | guardrails/stores/context.py | 18 | def set_call_kwargs(kwargs: Dict[str, Any]) -> None: | CODE |
| LOW | guardrails/formatters/__init__.py | 21 | __all__ = [ | CODE |
| LOW | guardrails/utils/__init__.py | 5 | __all__ = ["args", "kwargs", "on_fail"] | CODE |
| LOW | guardrails/utils/openai_utils/__init__.py | 4 | __all__ = [ | CODE |
| LOW | guardrails/cli/hub/utils.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | guardrails/integrations/llama_index/__init__.py | 8 | __all__ = ["GuardrailsQueryEngine", "GuardrailsChatEngine"] | CODE |
| LOW | guardrails/integrations/databricks/__init__.py | 3 | __all__ = ["MlFlowInstrumentor"] | CODE |
| LOW | guardrails/prompt/__init__.py | 5 | __all__ = [ | CODE |
| LOW | guardrails/actions/__init__.py | 7 | __all__ = [ | CODE |
| LOW | guardrails/actions/reask.py | 179 | def update_response_by_path(output: dict, path: List[Any], value: Any) -> None: | CODE |
| LOW | guardrails/validators/__init__.py | 10 | __all__ = [ | CODE |
| LOW | guardrails/telemetry/__init__.py | 23 | __all__ = [ | CODE |
| LOW | guardrails/errors/__init__.py | 22 | __all__ = ["ValidationError", "UserFacingException"] | CODE |
| LOW | guardrails/run/__init__.py | 7 | __all__ = [ | CODE |
| LOW | guardrails/call_tracing/__init__.py | 12 | __all__ = ["GuardTraceEntry", "TraceHandler"] | CODE |
| LOW | …ration_tests/test_assets/entity_extraction/__init__.py | 85 | __all__ = [ | CODE |
| LOW | …/integration_tests/test_assets/python_rail/__init__.py | 39 | __all__ = [ | CODE |
| LOW | tests/integration_tests/test_assets/string/__init__.py | 35 | __all__ = [ | CODE |
| LOW | …s/integration_tests/test_assets/validators/__init__.py | 13 | __all__ = [ | CODE |
| LOW | …sts/integration_tests/test_assets/pydantic/__init__.py | 52 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | guardrails/settings.py | 0 | whether to use a local server for running guardrails. | STRING |
| HIGH | guardrails/telemetry/default_otlp_tracer_mod.py | 0 | whether to use a local server for running guardrails. | STRING |
| HIGH | …rdrails/telemetry/default_otel_collector_tracer_mod.py | 0 | whether to use a local server for running guardrails. | STRING |
| HIGH | tests/integration_tests/test_guard.py | 0 | test that the entity extraction works with re-asking. | STRING |
| HIGH | tests/integration_tests/test_pydantic.py | 0 | test that the entity extraction works with re-asking. | STRING |
| HIGH | tests/integration_tests/test_async.py | 0 | test that the entity extraction works with re-asking. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/unit_tests/test_api_client.py | 204 | # ─── upsert_guard ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/unit_tests/test_api_client.py | 15 | # ─── Helpers ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/unit_tests/test_api_client.py | 112 | # ─── Init ───────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/unit_tests/test_api_client.py | 306 | # ─── fetch_guard ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/unit_tests/test_api_client.py | 392 | # ─── delete_guard ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/unit_tests/test_api_client.py | 463 | # ─── validate ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/unit_tests/test_api_client.py | 604 | # ─── stream_validate ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/unit_tests/test_api_client.py | 767 | # ─── get_history ────────────────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | guardrails/llm_providers.py | 485 | # Check if kwargs stream is passed in | COMMENT |
| LOW | guardrails/guard.py | 255 | # Check if the validator from the reference | COMMENT |
| LOW⚡ | guardrails/utils/parsing_utils.py | 123 | # Check if text is already verified | COMMENT |
| LOW⚡ | guardrails/utils/parsing_utils.py | 127 | # Check if text is valid JSON | COMMENT |
| LOW⚡ | guardrails/utils/parsing_utils.py | 134 | # Check if error is due to missing comma | COMMENT |
| LOW | .github/workflows/scripts/run_notebooks.sh | 13 | # Check if the notebook should be processed | COMMENT |
| LOW | …hub/actions/validator_pypi_publish/add_build_prefix.py | 36 | # Check if the [tool.setuptools] section already exists | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | guardrails/validator_base.py | 355 | Makes a request to the Validator Hub to run a ML based validation model. This request is authed through the hub | STRING |
| HIGH | guardrails/hub/install.py | 44 | Install a validator package from a hub URI. Args: package_uri (str): The URI of the package to install. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | guardrails/schema/rail_schema.py | 321 | COMMENT | |
| LOW | guardrails/actions/reask.py | 101 | # raise RuntimeError("FieldReAsk path is None") | COMMENT |
| LOW | guardrails/telemetry/guard_tracing.py | 81 | if number_of_reasks is not None: | COMMENT |
| LOW | guardrails/telemetry/guard_tracing.py | 101 | # / | COMMENT |
| LOW | guardrails/telemetry/guard_tracing.py | 121 | # ) | COMMENT |
| LOW | tests/unit_tests/actions/test_reask.py | 581 | # property = SubElement(non_empty_root, "list", name="dummy") | COMMENT |
| LOW | tests/unit_tests/actions/test_reask.py | 601 | # fail_results=[FailResult(error_message="child should not be None")], # noqa | COMMENT |
| LOW | tests/integration_tests/test_streaming.py | 641 | # pii_entities="pii", | COMMENT |
| LOW | tests/integration_tests/test_streaming.py | 661 | # model="gpt-4", | COMMENT |
| LOW | docs/pydocs/pydocs_to_md.py | 121 | # pydoc. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tests/unit_tests/test_api_client.py | 223 | mc.http.put.return_value.raise_for_status.assert_called_once() | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | guardrails/telemetry/legacy_validator_tracing.py | 27 | # We want to encourage users to utilize the validator spans | COMMENT |
| MEDIUM | guardrails/telemetry/legacy_validator_tracing.py | 82 | # We want to encourage users to utilize the validator spans | COMMENT |
| LOW | tests/integration_tests/test_guard.py | 1511 | # the prompt and instructions and just pass in the messages. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | guardrails/guard.py | 112 | CODE | |
| LOW | guardrails/applications/text2sql.py | 62 | CODE | |
| LOW | guardrails/telemetry/open_inference.py | 49 | CODE | |
| LOW | guardrails/run/runner.py | 81 | CODE | |
| LOW | guardrails/run/async_runner.py | 30 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …/unit_tests/utils/openai_utils/test_streaming_utils.py | 277 | "content": "Here's how to write a function in Python:\n\ndef my_function():\n pass", # noqa | CODE |