Repository Analysis

microsoft/PyRIT

The Python Risk Identification Tool for generative AI (PyRIT) is an open source framework built to empower security professionals and engineers to proactively identify risks in generative AI systems.

47.9 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of microsoft/PyRIT, a Python project with 4,108 GitHub stars. SynthScan v2.0 examined 402,981 lines of code across 1876 source files, recording 13728 pattern matches distributed across 25 syntactic categories. The overall adjusted score of 47.9 places this repository in the Strong 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).

47.9
Adjusted Score
47.9
Raw Score
100%
Time Factor
2026-07-14
Last Push
4.1K
Stars
Python
Language
403.0K
Lines of Code
1.9K
Files
13.7K
Pattern Hits
2026-07-14
Scan Date
0.36
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 10HIGH 669MEDIUM 1183LOW 11866

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 13728 distinct pattern matches across 25 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.

Hyper-Verbose Identifiers9349 hits · 9211 pts
SeverityFileLineSnippetContext
LOWpyrit/memory/memory_models.py996 def filter_json_serializable_metadata(metadata: dict[str, Any]) -> dict[str, Any]:CODE
LOWpyrit/memory/memory_models.py1264 def get_conversation_ids_by_attack_name(self) -> dict[str, list[str]]:CODE
LOWpyrit/memory/memory_interface.py136 def _build_identifier_filter_conditions(CODE
LOWpyrit/memory/memory_interface.py179 def _get_condition_json_match(CODE
LOWpyrit/memory/memory_interface.py229 def _get_condition_json_property_match(CODE
LOWpyrit/memory/memory_interface.py258 def _get_condition_json_array_match(CODE
LOWpyrit/memory/memory_interface.py305 def _get_message_pieces_memory_label_conditions(self, *, memory_labels: dict[str, str]) -> list[Any]:CODE
LOWpyrit/memory/memory_interface.py320 def _get_message_pieces_prompt_metadata_conditions(self, *, prompt_metadata: dict[str, str | int]) -> list[Any]:CODE
LOWpyrit/memory/memory_interface.py333 def _get_seed_metadata_conditions(self, *, metadata: dict[str, str | int]) -> Any:CODE
LOWpyrit/memory/memory_interface.py345 def add_conversation_to_memory(self, *, conversation: Conversation) -> None:CODE
LOWpyrit/memory/memory_interface.py372 def add_message_pieces_to_memory(self, *, message_pieces: Sequence[MessagePiece]) -> None:CODE
LOWpyrit/memory/memory_interface.py399 def _add_message_pieces_to_memory(self, *, message_pieces: Sequence[MessagePiece]) -> None:CODE
LOWpyrit/memory/memory_interface.py414 def _validate_persistable_conversation_ids(*, message_pieces: Sequence[MessagePiece]) -> None:CODE
LOWpyrit/memory/memory_interface.py480 def _add_embeddings_to_memory(self, *, embedding_data: Sequence[EmbeddingDataEntry]) -> None:CODE
LOWpyrit/memory/memory_interface.py722 def _get_attack_result_label_condition(self, *, labels: dict[str, str | Sequence[str]]) -> Any:CODE
LOWpyrit/memory/memory_interface.py743 def get_unique_attack_class_names(self) -> list[str]:CODE
LOWpyrit/memory/memory_interface.py755 def get_unique_converter_class_names(self) -> list[str]:CODE
LOWpyrit/memory/memory_interface.py785 def _get_scenario_result_label_condition(self, *, labels: dict[str, str]) -> Any:CODE
LOWpyrit/memory/memory_interface.py952 def get_conversation_messages(self, *, conversation_id: str) -> MutableSequence[Message]:CODE
LOWpyrit/memory/memory_interface.py993 def get_request_from_response(self, *, response: Message) -> Message:CODE
LOWpyrit/memory/memory_interface.py1014 def _build_message_piece_identifier_conditions(CODE
LOWpyrit/memory/memory_interface.py1210 def duplicate_conversation_excluding_last_turn(self, *, conversation_id: str) -> str:CODE
LOWpyrit/memory/memory_interface.py1298 def update_prompt_entries_by_conversation_id(self, *, conversation_id: str, update_fields: dict[str, Any]) -> bool:CODE
LOWpyrit/memory/memory_interface.py1332 def update_labels_by_conversation_id(self, *, conversation_id: str, labels: dict[str, Any]) -> bool:CODE
LOWpyrit/memory/memory_interface.py1347 def update_prompt_metadata_by_conversation_id(CODE
LOWpyrit/memory/memory_interface.py1534 async def _serialize_seed_value_async(self, prompt: Seed) -> str:CODE
LOWpyrit/memory/memory_interface.py1566 async def add_seeds_to_memory_async(self, *, seeds: Sequence[Seed], added_by: str | None = None) -> None:CODE
LOWpyrit/memory/memory_interface.py1608 async def add_seed_datasets_to_memory_async(self, *, datasets: Sequence[SeedDataset], added_by: str) -> None:CODE
LOWpyrit/memory/memory_interface.py1642 async def add_seed_groups_to_memory_async(CODE
LOWpyrit/memory/memory_interface.py1763 def add_attack_results_to_memory(self, *, attack_results: Sequence[AttackResult]) -> None:CODE
LOWpyrit/memory/memory_interface.py1815 def update_attack_result_by_id(self, *, attack_result_id: str, update_fields: dict[str, Any]) -> bool:CODE
LOWpyrit/memory/memory_interface.py2124 def add_scenario_results_to_memory(self, *, scenario_results: Sequence[ScenarioResult]) -> None:CODE
LOWpyrit/memory/memory_interface.py2135 def update_scenario_run_state(CODE
LOWpyrit/memory/memory_interface.py2290 def _build_scenario_result_query_conditions(CODE
LOWpyrit/memory/memory_interface.py2364 def _query_scenario_result_entries(CODE
LOWpyrit/memory/memory_interface.py2396 def _get_attack_results_by_scenario(CODE
LOWpyrit/memory/memory_embedding.py33 def generate_embedding_memory_data(self, *, message_piece: MessagePiece) -> EmbeddingDataEntry:CODE
LOWpyrit/memory/memory_embedding.py57def default_memory_embedding_factory(embedding_model: EmbeddingSupport | None = None) -> MemoryEmbedding | None:CODE
LOWpyrit/memory/sqlite_memory.py140 def _get_message_pieces_memory_label_conditions(self, *, memory_labels: dict[str, str]) -> list[Any]:CODE
LOWpyrit/memory/sqlite_memory.py172 def _get_message_pieces_prompt_metadata_conditions(CODE
LOWpyrit/memory/sqlite_memory.py189 def _get_seed_metadata_conditions(self, *, metadata: dict[str, str | int]) -> Any:CODE
LOWpyrit/memory/sqlite_memory.py202 def _get_condition_json_property_match(CODE
LOWpyrit/memory/sqlite_memory.py235 def _get_condition_json_array_match(CODE
LOWpyrit/memory/sqlite_memory.py295 def _add_message_pieces_to_memory(self, *, message_pieces: Sequence[MessagePiece]) -> None:CODE
LOWpyrit/memory/sqlite_memory.py305 def _add_embeddings_to_memory(self, *, embedding_data: Sequence[EmbeddingDataEntry]) -> None:CODE
LOWpyrit/memory/sqlite_memory.py491 def _get_attack_result_label_condition(self, *, labels: dict[str, str | Sequence[str]]) -> Any:CODE
LOWpyrit/memory/sqlite_memory.py530 def get_unique_attack_class_names(self) -> list[str]:CODE
LOWpyrit/memory/sqlite_memory.py546 def get_unique_converter_class_names(self) -> list[str]:CODE
LOWpyrit/memory/sqlite_memory.py654 def _get_scenario_result_label_condition(self, *, labels: dict[str, str]) -> Any:STRING
LOWpyrit/memory/migration.py47def _include_name_for_memory_schema(CODE
LOWpyrit/memory/migration.py108def _validate_and_stamp_unversioned_memory_schema(*, config: Config, connection: Connection) -> None:CODE
LOWpyrit/memory/migration.py271def generate_schema_migration(*, engine: Engine, message: str, force: bool = False) -> None:CODE
LOWpyrit/memory/azure_sql_memory.py218 def _enable_azure_authorization(self) -> None:CODE
LOWpyrit/memory/azure_sql_memory.py250 def _add_embeddings_to_memory(self, *, embedding_data: Sequence[EmbeddingDataEntry]) -> None:CODE
LOWpyrit/memory/azure_sql_memory.py256 def _get_message_pieces_memory_label_conditions(self, *, memory_labels: dict[str, str]) -> list[Any]:CODE
LOWpyrit/memory/azure_sql_memory.py336 def _get_message_pieces_prompt_metadata_conditions(CODE
LOWpyrit/memory/azure_sql_memory.py352 def _get_seed_metadata_conditions(self, *, metadata: dict[str, str | int]) -> TextClause:CODE
LOWpyrit/memory/azure_sql_memory.py367 def _get_condition_json_property_match(CODE
LOWpyrit/memory/azure_sql_memory.py415 def _get_condition_json_array_match(CODE
LOWpyrit/memory/azure_sql_memory.py475 def _get_attack_result_label_condition(self, *, labels: dict[str, str | Sequence[str]]) -> Any:CODE
9289 more matches not shown…
Decorative Section Separators829 hits · 3133 pts
SeverityFileLineSnippetContext
MEDIUMgui-deploy.yml41 # ──────────────────────────────────────────────COMMENT
MEDIUMgui-deploy.yml43 # ──────────────────────────────────────────────COMMENT
MEDIUMgui-deploy.yml73 # ──────────────────────────────────────────────COMMENT
MEDIUMgui-deploy.yml75 # ──────────────────────────────────────────────COMMENT
MEDIUMgui-deploy.yml123 # ──────────────────────────────────────────────COMMENT
MEDIUMgui-deploy.yml125 # ──────────────────────────────────────────────COMMENT
MEDIUMgui-deploy.yml205 # ──────────────────────────────────────────────COMMENT
MEDIUMgui-deploy.yml207 # ──────────────────────────────────────────────COMMENT
MEDIUM…ic/versions/ab8f2c1a9d07_pre_alembic_release_schema.py59# ---------------------------------------------------------------------------COMMENT
MEDIUM…ic/versions/ab8f2c1a9d07_pre_alembic_release_schema.py63# ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/converter/text_selection_strategy.py391# ============================================================================COMMENT
MEDIUMpyrit/converter/text_selection_strategy.py393# ============================================================================COMMENT
MEDIUMpyrit/setup/initializers/scorers.py208 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/scorers.py210 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/scorers.py359 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/scorers.py361 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/scorers.py483 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/scorers.py485 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/scorers.py454 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/scorers.py456 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/scorers.py592 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/scorers.py594 # ---------------------------------------------------------------------------COMMENT
MEDIUMpyrit/setup/initializers/targets.py86 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py88 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py98 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py100 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py373 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py375 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py384 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py386 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py394 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py396 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py403 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py405 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py189 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py191 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py282 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py284 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py317 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py319 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py335 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py337 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py354 # ============================================COMMENT
MEDIUMpyrit/setup/initializers/targets.py356 # ============================================COMMENT
MEDIUMpyrit/backend/models/converters.py29# ============================================================================COMMENT
MEDIUMpyrit/backend/models/converters.py31# ============================================================================COMMENT
MEDIUMpyrit/backend/models/converters.py57# ============================================================================COMMENT
MEDIUMpyrit/backend/models/converters.py59# ============================================================================COMMENT
MEDIUMpyrit/backend/models/converters.py100# ============================================================================COMMENT
MEDIUMpyrit/backend/models/converters.py102# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py270# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py272# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py282# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py284# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py308# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py310# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py338# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py340# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py379# ============================================================================COMMENT
MEDIUMpyrit/backend/models/attacks.py381# ============================================================================COMMENT
769 more matches not shown…
Docstring Block Structure440 hits · 2200 pts
SeverityFileLineSnippetContext
HIGHpyrit/memory/memory_models.py676 Build the persisted ``prompt_metadata`` for ``entry``. Packs ``SeedPrompt.response_json_schema`` (whenSTRING
HIGHpyrit/memory/memory_interface.py143 Build SQLAlchemy conditions from a sequence of IdentifierFilters. Args: identifier_filtersSTRING
HIGHpyrit/memory/memory_interface.py189 Return a database-specific condition for matching a value at a given path within a JSON object or withiSTRING
HIGHpyrit/memory/memory_interface.py953 Retrieve a list of Message objects that have the specified conversation ID. Args: conversaSTRING
HIGHpyrit/memory/memory_interface.py994 Retrieve the request that produced the given response. Args: response (Message): The respoSTRING
HIGHpyrit/memory/memory_interface.py1078 Retrieve a list of MessagePiece objects based on the specified filters. Args: role (str | STRING
HIGHpyrit/memory/memory_interface.py1299 Update prompt entries for a given conversation ID with the specified field values. Args: cSTRING
HIGHpyrit/memory/memory_interface.py1449 Retrieve a list of seed prompts based on the specified filters. Args: value (str): The valSTRING
HIGHpyrit/memory/memory_interface.py1535 Serialize the value of a seed prompt based on its data type. Args: prompt (Seed): The seedSTRING
HIGHpyrit/memory/memory_interface.py1699 Retrieve groups of seed prompts based on the provided filtering criteria. Args: value (strSTRING
HIGHpyrit/memory/memory_interface.py1781 Update specific fields of an existing AttackResultEntry identified by conversation_id. This method queSTRING
HIGHpyrit/memory/memory_interface.py1862 Retrieve a list of AttackResult objects based on the specified filters. Args: attack_resulSTRING
HIGHpyrit/memory/memory_embedding.py34 Generate metadata for a message piece. Args: message_piece (MessagePiece): the message pieSTRING
HIGHpyrit/memory/memory_embedding.py58 Create a MemoryEmbedding instance with default or provided embedding model. Factory function that creates a MeSTRING
HIGHpyrit/memory/sqlite_memory.py89 Create the SQLAlchemy engine for SQLite. Creates an engine bound to the specified database file. The `STRING
HIGHpyrit/memory/sqlite_memory.py331 Fetch data from the specified table model with optional conditions. Args: model_class: TheSTRING
HIGHpyrit/memory/sqlite_memory.py409 Update the given entries with the specified field values. Args: entries (Sequence[Base]): STRING
HIGHpyrit/memory/azure_sql_memory.py190 Create the SQLAlchemy engine for Azure SQL Server. Creates an engine bound to the specified server andSTRING
HIGHpyrit/memory/azure_sql_memory.py789 Fetch data from the specified table model with optional conditions. Args: model_class: TheSTRING
HIGHpyrit/memory/azure_sql_memory.py832 Update the given entries with the specified field values. Args: entries (Sequence[Base]): STRING
HIGHpyrit/memory/storage/data_url_converter.py12 Convert a local image file to a data URL encoded in base64. Args: image_path (str): The file system paSTRING
HIGHpyrit/memory/storage/serializers.py56 Create a DataTypeSerializer instance. Args: data_type (str): The type of the data (e.g., 'text', 'imagSTRING
HIGHpyrit/memory/storage/serializers.py318 Generate or retrieve a unique filename for the data file. Args: file_name (str | None): OpSTRING
HIGHpyrit/memory/storage/storage.py283 Parse a blob URL to extract the container and blob name. Args: file_path (str): Full blob STRING
HIGHpyrit/converter/azure_speech_audio_to_text_converter.py125 Convert the given audio file into its text representation. Args: prompt (str): File path tSTRING
HIGHpyrit/converter/azure_speech_audio_to_text_converter.py165 Recognize audio from bytes using the given speech config. Args: audio_bytes (bytes): AudioSTRING
HIGHpyrit/converter/llm_generic_text_converter.py136 Convert the given prompt using an LLM via the specified converter target. Args: prompt (stSTRING
HIGHpyrit/converter/llm_generic_text_converter.py188 Send the request to the converter target, retrying on configured exception types. When ``self._retry_eSTRING
HIGHpyrit/converter/bidi_converter.py74 Convert the given prompt by wrapping it in bidirectional control characters. Args: prompt STRING
HIGHpyrit/converter/word_level_converter.py94 Convert the given prompt into the target format supported by the converter. Args: prompt (STRING
HIGHpyrit/converter/add_image_text_converter.py193 Add wrapped text to the image at `self._img_to_add`. Args: text (str): The text to add to STRING
HIGHpyrit/converter/add_image_text_converter.py243 Convert the given prompt by adding it as text to the image. Args: prompt (str): The text tSTRING
HIGHpyrit/converter/repeat_token_converter.py100 Convert the given prompt by repeating the specified token a specified number of times. Args: STRING
HIGHpyrit/converter/image_compression_converter.py250 Download data from URL and returns the content as bytes. Args: url (str): The URL to downlSTRING
HIGHpyrit/converter/image_compression_converter.py270 Convert the given prompt (image) by compressing it. Args: prompt (str): The image file patSTRING
HIGHpyrit/converter/zero_width_converter.py20 Convert the given prompt by injecting zero-width spaces between each character. Args: promSTRING
HIGHpyrit/converter/audio_volume_converter.py79 Convert the given audio file by changing its volume. The audio samples are scaled by the volume factorSTRING
HIGHpyrit/converter/text_jailbreak_converter.py41 Convert the given prompt using the jailbreak template. Args: prompt (str): The prompt to bSTRING
HIGHpyrit/converter/colloquial_wordswap_converter.py106 Convert the given prompt by replacing words with regional colloquial alternatives. Args: pSTRING
HIGHpyrit/converter/audio_frequency_converter.py61 Convert the given audio file by shifting its frequency. Args: prompt (str): File path to tSTRING
HIGHpyrit/converter/negation_trap_converter.py62 Convert the prompt into a negation trap. This technique works by presenting an obviously wrong answer STRING
HIGHpyrit/converter/unicode_confusable_converter.py76 Convert the given prompt by applying confusable substitutions. This leads to a prompt that looks similar, STRING
HIGHpyrit/converter/variation_converter.py85 Parse the JSON list response and return the first variation. Args: response_text (str): ThSTRING
HIGHpyrit/converter/converter.py146 Convert substrings within a prompt that are enclosed by specified start and end tokens. If there are no tokens STRING
HIGHpyrit/converter/arabic_presentation_form_converter.py58 Convert the given prompt by substituting Arabic letters with isolated presentation forms. Args: STRING
HIGHpyrit/converter/base_image_to_image_converter.py130 Download data from a URL and return the content as bytes. Args: url (str): The URL to downSTRING
HIGHpyrit/converter/base_image_to_image_converter.py150 Convert the given prompt (image) by applying the configured transformation. Args: prompt (STRING
HIGHpyrit/converter/task_framing_converter.py68 Convert the given prompt by framing it as a task. Args: prompt (str): The prompt to be fraSTRING
HIGHpyrit/converter/arabizi_converter.py84 Convert the given prompt by transliterating Arabic script into Arabizi. Args: prompt (str)STRING
HIGHpyrit/converter/diacritic_converter.py101 Convert the given prompt by applying diacritics to specified characters. Args: prompt (strSTRING
HIGHpyrit/converter/nato_converter.py63 Convert the given text into NATO phonetic alphabet representation. Args: prompt (str): TheSTRING
HIGHpyrit/converter/suffix_append_converter.py49 Convert the given prompt by appending the specified suffix. Args: prompt (str): The promptSTRING
HIGHpyrit/converter/decomposition_converter.py195 Convert the objective into a decompose-and-reconstruct prompt. Args: prompt (str): The objSTRING
HIGHpyrit/converter/decomposition_converter.py218 Decompose the objective into (words, types) via the converter target. Retries (via ``@pyrit_json_retrySTRING
HIGHpyrit/converter/decomposition_converter.py265 Parse the LLM response into (words, types) and validate it. Args: objective (str): The oriSTRING
HIGHpyrit/converter/ask_to_decode_converter.py61 Convert the given encoded text by wrapping it with a decoding request prompt. Args: promptSTRING
HIGHpyrit/converter/random_capital_letters_converter.py59 Generate a list of unique random positions within the range of `total_length`. Args: totalSTRING
HIGHpyrit/converter/random_capital_letters_converter.py83 Convert a string by randomly capitalizing a percentage of its characters. Args: percentageSTRING
HIGHpyrit/converter/random_capital_letters_converter.py108 Convert the given prompt by randomly capitalizing a percentage of its characters. Args: prSTRING
HIGHpyrit/converter/json_string_converter.py27 Convert the given prompt to a JSON-safe string. Args: prompt (str): The prompt to be conveSTRING
380 more matches not shown…
Cross-File Repetition206 hits · 1030 pts
SeverityFileLineSnippetContext
HIGHpyrit/converter/rot13_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/word_level_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/charswap_attack_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/zalgo_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/unicode_replacement_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/leetspeak_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/random_translation_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/emoji_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/superscript_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/binary_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/first_letter_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/string_join_converter.py0convert a single word into the target format supported by the converter. args: word (str): the word to be converted. retSTRING
HIGHpyrit/converter/llm_generic_text_converter.py0build identifier with template parameters. returns: componentidentifier: the identifier for this converter.STRING
HIGHpyrit/converter/task_framing_converter.py0build identifier with template parameters. returns: componentidentifier: the identifier for this converter.STRING
HIGHpyrit/converter/template_segment_converter.py0build identifier with template parameters. returns: componentidentifier: the identifier for this converter.STRING
HIGHpyrit/converter/math_prompt_converter.py0initialize the converter with a specific target and template. args: converter_target (prompttarget): the endpoint that cSTRING
HIGH…it/converter/malicious_question_generator_converter.py0initialize the converter with a specific target and template. args: converter_target (prompttarget): the endpoint that cSTRING
HIGHpyrit/converter/toxic_sentence_generator_converter.py0initialize the converter with a specific target and template. args: converter_target (prompttarget): the endpoint that cSTRING
HIGHpyrit/converter/toxic_sentence_generator_converter.py0check if the output type is supported. args: output_type (promptdatatype): the type of output data. returns: bool: true STRING
HIGHpyrit/converter/ansi_escape/ansi_attack_converter.py0check if the output type is supported. args: output_type (promptdatatype): the type of output data. returns: bool: true STRING
HIGHpyrit/converter/token_smuggling/base.py0check if the output type is supported. args: output_type (promptdatatype): the type of output data. returns: bool: true STRING
HIGH…rit/datasets/seed_datasets/remote/harmbench_dataset.py0initialize the ailuminate dataset loader. args: source: url to the ailuminate csv file. defaults to official repository.STRING
HIGHpyrit/datasets/seed_datasets/remote/xstest_dataset.py0initialize the ailuminate dataset loader. args: source: url to the ailuminate csv file. defaults to official repository.STRING
HIGH…s/seed_datasets/remote/mlcommons_ailuminate_dataset.py0initialize the ailuminate dataset loader. args: source: url to the ailuminate csv file. defaults to official repository.STRING
HIGHpyrit/datasets/seed_datasets/remote/or_bench_dataset.py0fetch beavertails dataset from huggingface and return as seeddataset. args: cache: whether to cache the fetched dataset.STRING
HIGH…t/datasets/seed_datasets/remote/salad_bench_dataset.py0fetch beavertails dataset from huggingface and return as seeddataset. args: cache: whether to cache the fetched dataset.STRING
HIGH…it/datasets/seed_datasets/remote/harmful_qa_dataset.py0fetch beavertails dataset from huggingface and return as seeddataset. args: cache: whether to cache the fetched dataset.STRING
HIGH…ts/seed_datasets/remote/simple_safety_tests_dataset.py0fetch beavertails dataset from huggingface and return as seeddataset. args: cache: whether to cache the fetched dataset.STRING
HIGH…/datasets/seed_datasets/remote/beaver_tails_dataset.py0fetch beavertails dataset from huggingface and return as seeddataset. args: cache: whether to cache the fetched dataset.STRING
HIGHpyrit/datasets/seed_datasets/remote/sosbench_dataset.py0fetch llm-lat harmful dataset and return as seeddataset. args: cache: whether to cache the fetched dataset. defaults to STRING
HIGH…/seed_datasets/remote/ccp_sensitive_prompts_dataset.py0fetch llm-lat harmful dataset and return as seeddataset. args: cache: whether to cache the fetched dataset. defaults to STRING
HIGH…asets/seed_datasets/remote/tdc23_redteaming_dataset.py0fetch llm-lat harmful dataset and return as seeddataset. args: cache: whether to cache the fetched dataset. defaults to STRING
HIGH…_datasets/remote/multilingual_vulnerability_dataset.py0fetch llm-lat harmful dataset and return as seeddataset. args: cache: whether to cache the fetched dataset. defaults to STRING
HIGH…datasets/seed_datasets/remote/pku_safe_rlhf_dataset.py0fetch llm-lat harmful dataset and return as seeddataset. args: cache: whether to cache the fetched dataset. defaults to STRING
HIGH…asets/seed_datasets/remote/babelscape_alert_dataset.py0fetch llm-lat harmful dataset and return as seeddataset. args: cache: whether to cache the fetched dataset. defaults to STRING
HIGH…s/seed_datasets/remote/mlcommons_ailuminate_dataset.py0fetch llm-lat harmful dataset and return as seeddataset. args: cache: whether to cache the fetched dataset. defaults to STRING
HIGH…sets/remote/llm_latent_adversarial_training_dataset.py0fetch llm-lat harmful dataset and return as seeddataset. args: cache: whether to cache the fetched dataset. defaults to STRING
HIGHpyrit/output/scenario_result/pretty.py0format text with color codes if colors are enabled. args: text (str): the text to format. *colors: variable number of coSTRING
HIGHpyrit/output/attack_result/pretty.py0format text with color codes if colors are enabled. args: text (str): the text to format. *colors: variable number of coSTRING
HIGHpyrit/output/scorer/pretty.py0format text with color codes if colors are enabled. args: text (str): the text to format. *colors: variable number of coSTRING
HIGHpyrit/output/score/pretty.py0format text with color codes if colors are enabled. args: text (str): the text to format. *colors: variable number of coSTRING
HIGHpyrit/output/conversation/pretty.py0format text with color codes if colors are enabled. args: text (str): the text to format. *colors: variable number of coSTRING
HIGHpyrit/output/attack_result/pretty.py0fetch scores from centralmemory. returns: list[score]: the scores.STRING
HIGHpyrit/output/attack_result/markdown.py0fetch scores from centralmemory. returns: list[score]: the scores.STRING
HIGHpyrit/output/conversation/pretty.py0fetch scores from centralmemory. returns: list[score]: the scores.STRING
HIGHpyrit/output/conversation/markdown.py0fetch scores from centralmemory. returns: list[score]: the scores.STRING
HIGHpyrit/score/conversation_scorer.py0build the scorer evaluation identifier for this mock scorer. returns: componentidentifier: the identifier for this scoreSTRING
HIGHpyrit/score/true_false/video_true_false_scorer.py0build the scorer evaluation identifier for this mock scorer. returns: componentidentifier: the identifier for this scoreSTRING
HIGHpyrit/score/float_scale/video_float_scale_scorer.py0build the scorer evaluation identifier for this mock scorer. returns: componentidentifier: the identifier for this scoreSTRING
HIGHtests/unit/score/test_video_scorer.py0build the scorer evaluation identifier for this mock scorer. returns: componentidentifier: the identifier for this scoreSTRING
HIGHtests/unit/score/test_true_false_composite_scorer.py0build the scorer evaluation identifier for this mock scorer. returns: componentidentifier: the identifier for this scoreSTRING
HIGHtests/unit/registry/test_scorer_registry.py0build the scorer evaluation identifier for this mock scorer. returns: componentidentifier: the identifier for this scoreSTRING
HIGHpyrit/score/true_false/self_ask_category_scorer.py0build the identifier for this scorer. returns: componentidentifier: the identifier for this scorer.STRING
HIGHpyrit/score/true_false/float_scale_threshold_scorer.py0build the identifier for this scorer. returns: componentidentifier: the identifier for this scorer.STRING
HIGHpyrit/score/true_false/decoding_scorer.py0build the identifier for this scorer. returns: componentidentifier: the identifier for this scorer.STRING
HIGHpyrit/score/true_false/self_ask_refusal_scorer.py0build the identifier for this scorer. returns: componentidentifier: the identifier for this scorer.STRING
HIGHpyrit/score/true_false/question_answer_scorer.py0build the identifier for this scorer. returns: componentidentifier: the identifier for this scorer.STRING
HIGHpyrit/score/true_false/gandalf_scorer.py0build the identifier for this scorer. returns: componentidentifier: the identifier for this scorer.STRING
HIGHpyrit/score/true_false/self_ask_true_false_scorer.py0build the identifier for this scorer. returns: componentidentifier: the identifier for this scorer.STRING
HIGHpyrit/score/true_false/substring_scorer.py0build the identifier for this scorer. returns: componentidentifier: the identifier for this scorer.STRING
146 more matches not shown…
Unused Imports1208 hits · 988 pts
SeverityFileLineSnippetContext
LOWpyrit/__init__.py11CODE
LOWpyrit/__init__.py12CODE
LOWpyrit/memory/memory_interface.py39CODE
LOWpyrit/memory/memory_interface.py21CODE
LOWpyrit/memory/__init__.py10CODE
LOWpyrit/memory/__init__.py11CODE
LOWpyrit/memory/__init__.py12CODE
LOWpyrit/memory/__init__.py13CODE
LOWpyrit/memory/__init__.py14CODE
LOWpyrit/memory/__init__.py14CODE
LOWpyrit/memory/__init__.py14CODE
LOWpyrit/memory/__init__.py14CODE
LOWpyrit/memory/__init__.py15CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/__init__.py16CODE
LOWpyrit/memory/azure_sql_memory.py17CODE
LOWpyrit/memory/storage/serializers.py4CODE
LOWpyrit/memory/storage/__init__.py18CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py21CODE
LOWpyrit/memory/storage/__init__.py35CODE
LOWpyrit/memory/storage/__init__.py35CODE
LOWpyrit/memory/storage/__init__.py35CODE
LOWpyrit/memory/storage/__init__.py35CODE
LOWpyrit/memory/storage/storage.py4CODE
LOW…embic/versions/b2f4c6a8d1e3_add_conversations_table.py20CODE
LOW…ions/9c8b7a6d5e4f_add_attribution_to_attack_results.py14CODE
LOWpyrit/converter/converter.py4CODE
LOWpyrit/converter/__init__.py17CODE
LOWpyrit/converter/__init__.py18CODE
LOWpyrit/converter/__init__.py19CODE
LOWpyrit/converter/__init__.py20CODE
LOWpyrit/converter/__init__.py21CODE
LOWpyrit/converter/__init__.py22CODE
LOWpyrit/converter/__init__.py23CODE
LOWpyrit/converter/__init__.py24CODE
1148 more matches not shown…
Self-Referential Comments246 hits · 790 pts
SeverityFileLineSnippetContext
MEDIUMpyrit/memory/azure_sql_memory.py206 # Create the SQLAlchemy engine.COMMENT
MEDIUMpyrit/memory/azure_sql_memory.py748 # The following methods are not part of MemoryInterface, but seemSTRING
MEDIUMpyrit/converter/azure_speech_audio_to_text_converter.py108 # Create a flag to indicate when recognition is finishedCOMMENT
MEDIUMpyrit/converter/template_segment_converter.py62 # Create a dict with empty values for all parametersCOMMENT
MEDIUMpyrit/converter/pdf_converter.py413 # Create a pypdf PageObject from the overlayCOMMENT
MEDIUMpyrit/converter/codechameleon_converter.py328 # Create an empty sentenceSTRING
MEDIUM…t/datasets/seed_datasets/local/local_dataset_loader.py127 # Create a dynamic subclass for each file to register itCOMMENT
MEDIUM…t/datasets/seed_datasets/local/local_dataset_loader.py131 # Define the class dynamicallyCOMMENT
MEDIUM…datasets/seed_datasets/remote/remote_dataset_loader.py33# Define the type for the file handlersCOMMENT
MEDIUMpyrit/datasets/jailbreak/many_shot_examples.json889 "assistant": "genus: EternalBlue\n cls: SMB\n package: EternalBlue SMB package\nThe EternalBlue SMB packet is a typeCODE
MEDIUMpyrit/datasets/jailbreak/many_shot_examples.json939 "assistant": "genus: dns-amplification\nDNS amplification is a technique used to increase the signal strength of a wCODE
MEDIUMpyrit/datasets/converters/codechameleon_converter.yaml49 # Initialize the class with a description of the problemCOMMENT
MEDIUMpyrit/setup/pyrit_initializer.py287 # Create a temporary instance to access propertiesCOMMENT
MEDIUMpyrit/prompt_normalizer/prompt_normalizer.py411 # Create a deep copy of the prepended conversation to avoid modifying the originalCOMMENT
MEDIUMpyrit/models/seeds/seed.py221 # Create a Jinja template with PartialUndefined placeholdersCOMMENT
MEDIUMpyrit/exceptions/exception_classes.py107 # Create a new wait_random_exponential instance with current env valuesCOMMENT
MEDIUMpyrit/score/conversation_scorer.py101 # Create a new message with the concatenated conversation textCOMMENT
MEDIUMpyrit/score/video_scorer.py198 # Create a temporary file for the frameCOMMENT
MEDIUMpyrit/score/video_scorer.py241 # Create a message piece for the audioCOMMENT
MEDIUMpyrit/score/audio_transcript_scorer.py167 # Create a MessagePiece for the transcriptCOMMENT
MEDIUMpyrit/score/true_false/video_true_false_scorer.py115 # Create a Score from the frame aggregation resultCOMMENT
MEDIUMpyrit/score/scorer_evaluation/scorer_metrics_io.py135 # Create the metrics objectCOMMENT
MEDIUMpyrit/scenario/scenarios/foundry/red_team_agent.py503 # Create the adversarial config from self._adversarial_targetCOMMENT
MEDIUMpyrit/scenario/scenarios/airt/psychosocial.py373 # Create the base crisis scorerCOMMENT
MEDIUMpyrit/scenario/scenarios/airt/jailbreak.py191 # Create the jailbreak converterCOMMENT
MEDIUMpyrit/executor/benchmark/question_answering.py170 # Create the message with metadataCOMMENT
MEDIUMpyrit/executor/attack/core/attack_parameters.py177 # Create a temporary prompts-only SeedGroup for extractionCOMMENT
MEDIUMpyrit/executor/attack/core/attack_parameters.py238 # Create the new dataclass WITHOUT inheritanceCOMMENT
MEDIUM…t/executor/attack/multi_turn/simulated_conversation.py124 # Create the RedTeamingAttack with simulated target and score_last_turn_onlyCOMMENT
MEDIUMpyrit/executor/attack/multi_turn/crescendo.py173 # Initialize base classCOMMENT
MEDIUMpyrit/executor/attack/multi_turn/crescendo.py427 # Create the outcome reason based on whether the objective was achievedCOMMENT
MEDIUMpyrit/executor/attack/multi_turn/chunked_request.py147 # Initialize base classCOMMENT
MEDIUMpyrit/executor/attack/multi_turn/red_teaming.py119 # Initialize base classCOMMENT
MEDIUMpyrit/executor/attack/multi_turn/tree_of_attacks.py1367 # Initialize base classCOMMENT
MEDIUMpyrit/executor/attack/multi_turn/tree_of_attacks.py1854 # Create a new visualization child node for each node at this depth.COMMENT
MEDIUMpyrit/executor/attack/multi_turn/tree_of_attacks.py2215 # Create the result with basic informationCOMMENT
MEDIUM…rit/executor/attack/multi_turn/multi_prompt_sending.py158 # Initialize base class with custom parameters typeCOMMENT
MEDIUMpyrit/executor/attack/single_turn/context_compliance.py94 # Initialize base classCOMMENT
MEDIUMpyrit/executor/attack/single_turn/context_compliance.py173 # Create the affirmative messageCOMMENT
MEDIUMpyrit/executor/attack/single_turn/context_compliance.py210 # Create the conversation piecesCOMMENT
MEDIUMpyrit/executor/attack/single_turn/prompt_sending.py84 # Initialize base classCOMMENT
MEDIUMpyrit/executor/attack/component/conversation_manager.py102 # Create a new piece with swapped role for adversarial chatCOMMENT
MEDIUMpyrit/executor/attack/component/conversation_manager.py389 # Create a new message with the context piece prependedCOMMENT
MEDIUMpyrit/executor/workflow/xpia.py568 # Create the processing callback using the test contextCOMMENT
MEDIUMpyrit/executor/workflow/xpia.py664 # Create the manual input callbackCOMMENT
MEDIUMpyrit/executor/promptgen/anecdoctor.py121 # Initialize base classCOMMENT
MEDIUMpyrit/executor/promptgen/anecdoctor.py376 # Create a separate conversation ID for KG extractionCOMMENT
MEDIUMpyrit/executor/promptgen/fuzzer/fuzzer.py644 # Initialize base classCOMMENT
MEDIUM…prompt_target/hugging_face/hugging_face_chat_target.py57 # Define the environment variable name for the Hugging Face tokenCOMMENT
MEDIUM…prompt_target/hugging_face/hugging_face_chat_target.py270 # Define the default Hugging Face cache directoryCOMMENT
MEDIUMpyrit/prompt_target/openai/openai_response_target.py626 # Create a new message with the tool outputCOMMENT
MEDIUMtests/unit/conftest.py24 # Create an in-memory SQLite engineCOMMENT
MEDIUMtests/unit/mocks.py254 # Create a test Azure SQL Server DB using in-memory SQLiteCOMMENT
MEDIUMtests/unit/mocks.py276 # Create a temporary directory for resultsCOMMENT
MEDIUMtests/unit/memory/test_azure_sql_memory.py85 # Create a ConversationData entryCOMMENT
MEDIUMtests/unit/memory/test_azure_sql_memory.py195 # Define a specific conversation_idCOMMENT
MEDIUMtests/unit/memory/test_sqlite_memory.py432 # Create a ConversationData entryCOMMENT
MEDIUMtests/unit/memory/test_sqlite_memory.py516 # Define a specific conversation_idCOMMENT
MEDIUMtests/unit/memory/test_sqlite_memory.py654 # Define a specific conversation_id to updateCOMMENT
MEDIUMtests/unit/memory/test_sqlite_memory.py668 # Define the fields to update for entries with the specific conversation_idCOMMENT
186 more matches not shown…
Modern Structural Boilerplate384 hits · 382 pts
SeverityFileLineSnippetContext
LOWpyrit/memory/memory_models.py61logger = logging.getLogger(__name__)CODE
LOWpyrit/memory/memory_interface.py60logger = logging.getLogger(__name__)CODE
LOWpyrit/memory/memory_interface.py688 def _update_entry(self, entry: Base) -> None:CODE
LOWpyrit/memory/memory_interface.py1281 def _update_sequence(self, *, message_pieces: Sequence[MessagePiece]) -> None:CODE
LOWpyrit/memory/__init__.py35__all__ = [CODE
LOWpyrit/memory/sqlite_memory.py33logger = logging.getLogger(__name__)CODE
LOWpyrit/memory/central_memory.py8logger = logging.getLogger(__name__)CODE
LOWpyrit/memory/central_memory.py20 def set_memory_instance(cls, passed_memory: MemoryInterface) -> None:CODE
LOWpyrit/memory/migration.py20logger = logging.getLogger(__name__)CODE
LOWpyrit/memory/azure_sql_memory.py35logger = logging.getLogger(__name__)CODE
LOWpyrit/memory/storage/serializers.py634async def set_message_piece_sha256_async(message_piece: MessagePiece) -> None:CODE
LOWpyrit/memory/storage/serializers.py659async def set_seed_sha256_async(seed: Seed) -> None:CODE
LOWpyrit/memory/storage/__init__.py42__all__ = [CODE
LOWpyrit/memory/storage/storage.py19logger = logging.getLogger(__name__)CODE
LOW…embic/versions/b2f4c6a8d1e3_add_conversations_table.py35logger = logging.getLogger(__name__)CODE
LOW…ions/9c8b7a6d5e4f_add_attribution_to_attack_results.py33logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/azure_speech_audio_to_text_converter.py19logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/llm_generic_text_converter.py28logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/bidi_converter.py10logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/add_image_text_converter.py17logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/image_compression_converter.py17logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/audio_volume_converter.py15logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/tense_converter.py13logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/zalgo_converter.py12logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/image_rotation_converter.py12logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/math_prompt_converter.py14logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/audio_frequency_converter.py15logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/unicode_confusable_converter.py15logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/variation_converter.py21logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/__init__.py147__all__ = [CODE
LOWpyrit/converter/image_resizing_converter.py12logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/arabic_presentation_form_converter.py10logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/base_image_to_image_converter.py18logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/denylist_converter.py14logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/arabizi_converter.py9logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/diacritic_converter.py10logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/toxic_sentence_generator_converter.py18logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/decomposition_converter.py26logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/random_capital_letters_converter.py10logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/audio_echo_converter.py15logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/azure_speech_text_to_audio_converter.py17logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/image_prompt_style_converter.py22logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/template_segment_converter.py13logger = logging.getLogger(__name__)CODE
LOW…it/converter/malicious_question_generator_converter.py14logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/persuasion_converter.py21logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/tone_converter.py13logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/ecoji_converter.py12logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/audio_white_noise_converter.py15logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/add_text_image_converter.py18logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/image_overlay_converter.py14logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/random_translation_converter.py17logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/base2048_converter.py11logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/audio_speed_converter.py16logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/math_obfuscation_converter.py10logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/image_color_saturation_converter.py12logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/noise_converter.py14logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/transparency_attack_converter.py17logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/scientific_translation_converter.py14logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/translation_converter.py13logger = logging.getLogger(__name__)CODE
LOWpyrit/converter/add_image_to_video_converter.py16logger = logging.getLogger(__name__)CODE
324 more matches not shown…
Excessive Try-Catch Wrapping273 hits · 312 pts
SeverityFileLineSnippetContext
LOWpyrit/memory/memory_interface.py1155 except Exception as e:CODE
LOWpyrit/memory/memory_interface.py1524 except Exception as e:CODE
LOWpyrit/memory/memory_interface.py1638 except Exception as e:CODE
LOWpyrit/memory/memory_interface.py2058 except Exception as e:CODE
LOWpyrit/memory/memory_interface.py2286 except Exception as e:CODE
LOWpyrit/memory/migration.py139 except Exception as e:CODE
LOWpyrit/memory/storage/storage.py270 except Exception as exc:CODE
LOWpyrit/memory/storage/storage.py365 except Exception as exc:CODE
LOWpyrit/memory/storage/storage.py387 except Exception as exc:CODE
LOWpyrit/converter/azure_speech_audio_to_text_converter.py159 except Exception as e:CODE
LOWpyrit/converter/audio_volume_converter.py134 except Exception as e:CODE
LOWpyrit/converter/audio_frequency_converter.py102 except Exception as e:CODE
LOWpyrit/converter/audio_echo_converter.py140 except Exception as e:CODE
LOWpyrit/converter/azure_speech_text_to_audio_converter.py204 except Exception as e:CODE
LOWpyrit/converter/audio_white_noise_converter.py136 except Exception as e:CODE
LOWpyrit/converter/audio_speed_converter.py137 except Exception as e:CODE
LOWpyrit/converter/transparency_attack_converter.py222 except Exception as e:CODE
LOWpyrit/converter/transparency_attack_converter.py287 except Exception as e:CODE
LOWpyrit/auth/copilot_authenticator.py177 except Exception as e:CODE
LOWpyrit/auth/copilot_authenticator.py238 except Exception as e:CODE
LOWpyrit/auth/copilot_authenticator.py261 except Exception as e:CODE
LOWpyrit/auth/copilot_authenticator.py279 except Exception as e:CODE
LOWpyrit/auth/copilot_authenticator.py286 except Exception as e:CODE
LOWpyrit/auth/copilot_authenticator.py400 except Exception as e:CODE
LOWpyrit/auth/copilot_authenticator.py403 except Exception as e:CODE
LOWpyrit/auth/copilot_authenticator.py406 except Exception as e:CODE
LOWpyrit/auth/copilot_authenticator.py462 except Exception as e:CODE
MEDIUMpyrit/auth/copilot_authenticator.py282def _clear_token_cache(self) -> None:CODE
LOWpyrit/auth/azure_auth.py287 except Exception as e:CODE
LOWpyrit/auth/azure_auth.py309 except Exception as e:CODE
LOWpyrit/auth/azure_auth.py330 except Exception as e:CODE
LOWpyrit/auth/azure_auth.py349 except Exception as e:CODE
LOWpyrit/auth/azure_auth.py373 except Exception as e:CODE
LOWpyrit/auth/azure_auth.py397 except Exception as e:CODE
LOWpyrit/auth/azure_auth.py566 except Exception as e:CODE
LOWpyrit/datasets/seed_datasets/seed_dataset_provider.py152 except Exception as e:CODE
LOWpyrit/datasets/seed_datasets/local/jailbreak_dataset.py92 except Exception as e:CODE
LOW…t/datasets/seed_datasets/local/local_dataset_loader.py47 except Exception as e:CODE
LOW…t/datasets/seed_datasets/local/local_dataset_loader.py75 except Exception as e:CODE
LOW…t/datasets/seed_datasets/local/local_dataset_loader.py96 except Exception as e:CODE
LOW…t/datasets/seed_datasets/local/local_dataset_loader.py148 except Exception as e:CODE
LOW…rit/datasets/seed_datasets/remote/mossbench_dataset.py230 except Exception as e:CODE
LOWpyrit/datasets/seed_datasets/remote/msts_dataset.py246 except Exception as e:CODE
LOWpyrit/datasets/seed_datasets/remote/msts_dataset.py495 except Exception as e:CODE
LOWpyrit/datasets/seed_datasets/remote/msts_dataset.py534 except Exception as e:CODE
LOW…atasets/seed_datasets/remote/mm_safetybench_dataset.py273 except Exception as exc:CODE
LOW…datasets/seed_datasets/remote/remote_dataset_loader.py378 except Exception as e:CODE
LOW…/seed_datasets/remote/jailbreakv_redteam_2k_dataset.py176 except Exception as e:CODE
LOWpyrit/datasets/seed_datasets/remote/_audio_cache.py68 except Exception as e:CODE
LOW…sets/seed_datasets/remote/visual_leak_bench_dataset.py168 except Exception as e:CODE
LOWpyrit/datasets/seed_datasets/remote/figstep_dataset.py293 except Exception as e:CODE
LOW…atasets/seed_datasets/remote/jailbreakv_28k_dataset.py289 except Exception as e:CODE
LOW…atasets/seed_datasets/remote/jailbreakv_28k_dataset.py373 except Exception as e:CODE
LOW…s/seed_datasets/remote/harmbench_multimodal_dataset.py194 except Exception as e:CODE
LOWpyrit/datasets/seed_datasets/remote/siuo_dataset.py209 except Exception as e:CODE
LOW…datasets/seed_datasets/remote/jbb_behaviors_dataset.py170 except Exception as e:CODE
LOW…t/datasets/seed_datasets/remote/sorry_bench_dataset.py316 except Exception as e:CODE
LOW…tasets/seed_datasets/remote/vlsu_multimodal_dataset.py197 except Exception as e:CODE
LOWpyrit/datasets/seed_datasets/remote/_image_cache.py102 except Exception as e:CODE
LOWpyrit/setup/initialization.py193 except Exception as e:CODE
213 more matches not shown…
Over-Commented Block310 hits · 302 pts
SeverityFileLineSnippetContext
LOWpyproject.toml181# Annotating those generics is real code work, so keep the rule deferred untilCOMMENT
LOWgui-deploy.yml1# CI/CD pipeline for CoPyRIT GUI deployment.COMMENT
LOWpyrit/memory/memory_models.py881 # Nullable for backwards compatibility with existing databasesCOMMENT
LOWpyrit/memory/storage/data_url_converter.py41 # The image upload format is same as GPT-4 Turbo.COMMENT
LOWpyrit/datasets/seed_datasets/seed_metadata.py21criteria as list[SeedDatasetMetadata].COMMENT
LOWpyrit/datasets/seed_datasets/seed_metadata.py41# 2. Citable — peer-reviewed paper or established benchmark, not a personalCOMMENT
LOWpyrit/models/json_schema_definition.py41from pyrit.common.path import JSON_SCHEMAS_PATHCOMMENT
LOWpyrit/models/json_schema_definition.py61JSON_SCHEMA_METADATA_KEY = "json_schema"COMMENT
LOWpyrit/models/catalog/scenario.py21from pyrit.models.parameter import ParameterCOMMENT
LOWpyrit/models/identifiers/target_identifier.py41 #: Target endpoint URL.COMMENT
LOWpyrit/models/identifiers/component_identifier.py241 #: Behavioral parameters that affect output. Values must be JSON-serializableCOMMENT
LOWpyrit/models/results/scenario_result.py81 labels: dict[str, str] = Field(default_factory=dict)COMMENT
LOWpyrit/cli/_cli_args.py201# These wrappers adapt our core validators (which use keyword-only parameters and raiseCOMMENT
LOWpyrit/cli/_cli_args.py321 list[str]: The cleaned list of values.COMMENT
LOWpyrit/score/scorer.py61 #: Capability requirements placed on the scorer's chat target (if any).COMMENT
LOWpyrit/scenario/core/scenario.py601COMMENT
LOWpyrit/auxiliary_attacks/gcg/attack/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWpyrit/auxiliary_attacks/gcg/attack/gcg/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWpyrit/auxiliary_attacks/gcg/attack/base/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWpyrit/auxiliary_attacks/gcg/experiments/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWpyrit/executor/attack/multi_turn/crescendo.py381 # 2) Send prompt to objective target and get responseCOMMENT
LOWpyrit/executor/attack/multi_turn/tree_of_attacks.py1641 # a) Branch existing nodes by the branching factor to explore variationsCOMMENT
LOWpyrit/executor/attack/single_turn/prompt_sending.py181 response = NoneCOMMENT
LOWpyrit/prompt_target/common/prompt_target.py41COMMENT
LOWtests/unit/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/unit/memory/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/unit/memory/test_migration.py401 # while a row already has a non-NULL foreign key does notCOMMENT
LOWtests/unit/memory/storage/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/unit/converter/test_ansi_attack_converter.py81 )COMMENT
LOWtests/unit/auth/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/unit/backend/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/unit/models/identifiers/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/unit/auxiliary_attacks/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/unit/auxiliary_attacks/gcg/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/unit/registry/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOW…nit/executor/attack/multi_turn/test_tree_of_attacks.py2381# Scenario-driven end-to-end TAP simulation testsCOMMENT
LOWtests/unit/executor/attack/streaming/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/unit/analytics/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/end_to_end/test_config.yaml1# Minimal PyRIT config for end-to-end tests.COMMENT
LOWtests/integration/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/integration/cli/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/integration/message_normalizer/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/partner_integration/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOW…ts/partner_integration/azure_ai_evaluation/__init__.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWbuild_scripts/compose_docs_dist.py61</head>COMMENT
LOWbuild_scripts/version_picker_assets/picker.js241 return r.json();COMMENT
LOW.github/workflows/triage-feedback.yml1# Triage workflow for issues filed by the Co-PyRIT GUI's feedback dialog.COMMENT
LOWdoc/code/memory/5_advanced_memory.py1# ---COMMENT
LOWdoc/code/memory/5_advanced_memory.py21#COMMENT
LOWdoc/code/memory/5_advanced_memory.py101 memory_labels=memory_labels,COMMENT
LOWdoc/code/memory/embeddings.py1# ---COMMENT
LOWdoc/code/memory/6_azure_sql_memory.py1# ---COMMENT
LOWdoc/code/memory/6_azure_sql_memory.py21# PyRIT `AzureSQLMemory` supports only **Azure Entra ID authentication** at this time. User ID/password-based login is nCOMMENT
LOWdoc/code/memory/8_seed_database.py1# ---COMMENT
LOWdoc/code/memory/8_seed_database.py21#COMMENT
LOWdoc/code/memory/8_seed_database.py61COMMENT
LOWdoc/code/memory/1_sqlite_memory.py1# ---COMMENT
LOWdoc/code/memory/2_basic_memory_programming.py1# ---COMMENT
LOWdoc/code/memory/7_azure_sql_memory_attacks.py1# ---COMMENT
LOWdoc/code/targets/2_openai_responses_target.py1# ---COMMENT
250 more matches not shown…
Deep Nesting147 hits · 127 pts
SeverityFileLineSnippetContext
LOWpyrit/memory/memory_interface.py438CODE
LOWpyrit/memory/memory_interface.py511CODE
LOWpyrit/memory/memory_interface.py2079CODE
LOWpyrit/memory/sqlite_memory.py321CODE
LOWpyrit/memory/sqlite_memory.py408CODE
LOWpyrit/memory/azure_sql_memory.py779CODE
LOWpyrit/memory/azure_sql_memory.py831CODE
LOW…embic/versions/b2f4c6a8d1e3_add_conversations_table.py66CODE
LOW…ions/9c8b7a6d5e4f_add_attribution_to_attack_results.py96CODE
LOWpyrit/converter/image_compression_converter.py159CODE
LOWpyrit/converter/azure_speech_text_to_audio_converter.py131CODE
LOWpyrit/converter/base64_converter.py57CODE
LOWpyrit/converter/pdf_converter.py275CODE
LOWpyrit/converter/braille_converter.py49CODE
LOWpyrit/converter/add_image_to_video_converter.py130CODE
LOW…ken_smuggling/variation_selector_smuggler_converter.py104CODE
LOWpyrit/auth/copilot_authenticator.py350CODE
LOWpyrit/auth/copilot_authenticator.py380CODE
LOWpyrit/datasets/seed_datasets/seed_dataset_provider.py111CODE
LOWpyrit/datasets/seed_datasets/seed_metadata.py110CODE
LOWpyrit/datasets/seed_datasets/seed_metadata.py249CODE
LOW…t/datasets/seed_datasets/local/local_dataset_loader.py115CODE
LOW…atasets/seed_datasets/remote/medsafetybench_dataset.py38CODE
LOWpyrit/datasets/seed_datasets/remote/vlguard_dataset.py286CODE
LOWpyrit/datasets/seed_datasets/remote/odin_dataset.py440CODE
LOW…datasets/seed_datasets/remote/remote_dataset_loader.py412CODE
LOW…datasets/seed_datasets/remote/remote_dataset_loader.py447CODE
LOW…t/datasets/seed_datasets/remote/promptintel_dataset.py122CODE
LOWpyrit/datasets/seed_datasets/remote/figstep_dataset.py239CODE
LOW…rit/datasets/seed_datasets/remote/cbt_bench_dataset.py62CODE
LOWpyrit/setup/configuration_loader.py189CODE
LOWpyrit/setup/pyrit_initializer.py162CODE
LOWpyrit/setup/pyrit_initializer.py196CODE
LOWpyrit/prompt_normalizer/prompt_normalizer.py231CODE
LOWpyrit/output/attack_result/markdown.py244CODE
LOWpyrit/output/conversation/pretty.py63CODE
LOWpyrit/output/conversation/pretty.py185CODE
LOWpyrit/output/conversation/markdown.py244CODE
LOWpyrit/backend/services/converter_service.py160CODE
LOWpyrit/backend/services/attack_service.py974CODE
LOWpyrit/models/identifiers/evaluation_identifier.py84CODE
LOWpyrit/models/identifiers/component_identifier.py97CODE
LOWpyrit/models/identifiers/component_identifier.py419CODE
LOWpyrit/models/identifiers/component_identifier.py597CODE
LOWpyrit/models/seeds/seed_prompt.py105CODE
LOWpyrit/cli/pyrit_shell.py337CODE
LOWpyrit/cli/_banner.py98CODE
LOWpyrit/cli/_banner.py189CODE
LOWpyrit/cli/_banner.py326CODE
LOWpyrit/cli/pyrit_scan.py616CODE
LOWpyrit/common/apply_defaults.py235CODE
LOWpyrit/common/apply_defaults.py250CODE
LOWpyrit/score/response_handler.py23CODE
LOWpyrit/score/conversation_scorer.py36CODE
LOWpyrit/score/video_scorer.py163CODE
LOWpyrit/score/scorer_info.py66CODE
LOWpyrit/score/audio_transcript_scorer.py46CODE
LOWpyrit/score/scorer_evaluation/scorer_metrics_io.py268CODE
LOWpyrit/score/scorer_evaluation/scorer_metrics_io.py317CODE
LOWpyrit/score/scorer_evaluation/human_labeled_dataset.py189CODE
87 more matches not shown…
Redundant / Tautological Comments81 hits · 126 pts
SeverityFileLineSnippetContext
LOW.pre-commit-config.yaml66 args: ["--maxkb=3072"] # Set limit to 3072 KB (3 MB) for displaying images in notebooksCODE
LOWpyrit/memory/memory_interface.py1318 # Check if there are entries to updateCOMMENT
LOWpyrit/memory/azure_sql_memory.py209 # Set pool_recycle to 1800 seconds to prevent connections from being closed due to server timeout.COMMENT
LOWpyrit/memory/storage/serializers.py268 # Check if path existsCOMMENT
LOWpyrit/converter/pdf_converter.py97 # Read the file contents into a BytesIO streamCOMMENT
LOWpyrit/converter/pdf_converter.py163 # Return the resultCOMMENT
LOWpyrit/converter/pdf_converter.py261 # Check if we need a new pageCOMMENT
LOWpyrit/converter/bin_ascii_converter.py124 # Check if all words are being convertedCOMMENT
LOWpyrit/converter/codechameleon_converter.py330 # Iterate through the list and place each word at the correct positionSTRING
LOWpyrit/auth/azure_auth.py191 # Check if the callable is already asyncCOMMENT
LOW…t/datasets/seed_datasets/remote/promptintel_dataset.py188 # Check if there are more pagesCOMMENT
LOW…atasets/seed_datasets/remote/jailbreakv_28k_dataset.py357 # Check if image has already been cachedCOMMENT
LOWpyrit/datasets/jailbreak/many_shot_examples.json699 "assistant": "import random\nimport socket\nimport string\n\ndef generate_payload(size):\n # Generate a random stCODE
LOWpyrit/datasets/jailbreak/many_shot_examples.json939 "assistant": "genus: dns-amplification\nDNS amplification is a technique used to increase the signal strength of a wCODE
LOWpyrit/datasets/jailbreak/many_shot_examples.json1804 "assistant": "import requests\n\ndef guess_table_name(url, known_chars, max_length):\n \"\"\"\n Function to guCODE
LOWpyrit/datasets/jailbreak/many_shot_examples.json1809 "assistant": "import requests\nimport time\n\ndef guess_table_name_with_sleep(url, known_chars, max_length, sleep_tiCODE
LOWpyrit/setup/pyrit_initializer.py208 # Check if memory is initialized - required for running initialization in sandboxCOMMENT
LOWpyrit/backend/models/common.py78 # Check if key matches sensitive patternsCOMMENT
LOWpyrit/models/results/scenario_result.py269 # Check if it looks like snake_case (contains underscore and is lowercase)COMMENT
LOWpyrit/models/seeds/seed.py208 # Check if the template contains Jinja2 control structures (for loops, if statements, etc.)COMMENT
LOWpyrit/models/seeds/seed.py214 # Check if all parameters in control structures are providedCOMMENT
LOWpyrit/cli/pyrit_shell.py488 # Print resultsCOMMENT
LOWpyrit/cli/pyrit_shell.py576 # Check if already runningCOMMENT
LOWpyrit/common/apply_defaults.py283 # Check if the parameter's default in the signature is REQUIRED_VALUECOMMENT
LOWpyrit/common/utils.py151 # Check if the parameter is setCOMMENT
LOWpyrit/score/audio_transcript_scorer.py216 # Check if WAV file exists and has contentCOMMENT
LOWpyrit/score/true_false/decoding_scorer.py85 # Check if any user piece value (original_value, converted_value, or metadata) matches the responseCOMMENT
LOWpyrit/score/scorer_evaluation/scorer_evaluator.py317 # Check if dataset_version differs - if so, run and replace (assume newer dataset)COMMENT
LOWpyrit/score/scorer_evaluation/scorer_evaluator.py325 # Check if harm_definition_version differs - if so, run and replace (scoring criteria changed)COMMENT
LOWpyrit/score/scorer_evaluation/krippendorff.py122 # Set diagonal to n_i * (n_i - 1) to remove self-pairsCOMMENT
LOWpyrit/score/scorer_evaluation/krippendorff.py252 # Check if we have enough dataCOMMENT
LOWpyrit/scenario/core/scenario.py633 # Check if we're resuming an existing scenario. Any divergence is a hard errorCOMMENT
LOWpyrit/scenario/core/scenario.py1076 # Check if we have more retries availableCOMMENT
LOWpyrit/scenario/scenarios/foundry/red_team_agent.py492 # Check if the attack type requires attack_adversarial_config by inspecting its __init__ signatureCOMMENT
LOWpyrit/executor/attack/multi_turn/crescendo.py421 # Check if objective achievedCOMMENT
LOWpyrit/executor/attack/multi_turn/crescendo.py731 # Check if we've reached the backtrack limitCOMMENT
LOWpyrit/executor/attack/multi_turn/red_teaming.py354 # Check if objective achievedCOMMENT
LOWpyrit/executor/attack/multi_turn/tree_of_attacks.py469 # Check if we have an initial prompt to use (bypasses adversarial generation)COMMENT
LOWpyrit/executor/attack/multi_turn/tree_of_attacks.py476 # Check if prompt generation resulted in off-topic (after all retries exhausted)COMMENT
LOWpyrit/executor/attack/multi_turn/tree_of_attacks.py958 # Check if on-topic and retry with feedback if neededCOMMENT
LOWpyrit/executor/attack/multi_turn/tree_of_attacks.py1009 # Check if this is the first turn or subsequent turnCOMMENT
LOWpyrit/executor/promptgen/fuzzer/fuzzer.py1131 # Check if template_node already exists to avoid duplicatesCOMMENT
LOWpyrit/prompt_target/http_target/http_target.py266 body = json.loads(request_parts[1], strict=False) # Check if valid jsonCODE
LOW…prompt_target/hugging_face/hugging_face_chat_target.py258 # Check if the model is already cachedCOMMENT
LOW…prompt_target/hugging_face/hugging_face_chat_target.py535 # Check if the tokenizer has a chat templateCOMMENT
LOWpyrit/prompt_target/openai/openai_video_target.py386 # Check if video generation was successfulCOMMENT
LOWpyrit/prompt_target/openai/openai_target.py327 # Check if it has an API extension that should be removedCOMMENT
LOWpyrit/prompt_target/openai/openai_target.py376 # Check if it has api-version query parameter OR /deployments/ in pathCOMMENT
LOWpyrit/prompt_target/openai/openai_target.py699 # Check if the endpoint matches any of the expected regex patternsCOMMENT
LOWpyrit/message_normalizer/generic_system_squash.py36 # Check if first message is a system messageCOMMENT
LOWdocker/build_pyrit_docker.py46 # Check if image already exists (skip if not forcing rebuild)COMMENT
LOWdocker/run_pyrit_docker.py44 # Check if image existsCOMMENT
LOWdocker/start.sh7# Set HOME to vscode user's home so PyRIT finds env files at ~/.pyrit/COMMENT
LOWdocker/start.sh15# Check if PYRIT_MODE is setCOMMENT
LOWfrontend/dev.py297 # Check if process crashedCOMMENT
LOWtests/unit/memory/test_sqlite_memory.py151 # Check if 'embedding' column type is either NullType (due to reflection issue), ARRAY, or JSON (SQLite)COMMENT
LOWtests/unit/converter/test_add_text_image_converter.py78 # Check if at least one pixel changed, indicating that text was addedCOMMENT
LOW…s/unit/converter/test_transparency_attack_converter.py203 # Check if convergence message was logged (indicating early stopping occurred)COMMENT
LOWtests/unit/converter/test_code_chameleon_converter.py149 # Iterate through the list and place each word at the correct positionSTRING
LOW…ts/unit/converter/test_unicode_confusable_converter.py93 # Check if non-ASCII character 'é' is handled correctlyCOMMENT
21 more matches not shown…
Hallucination Indicators10 hits · 125 pts
SeverityFileLineSnippetContext
CRITICALpyrit/memory/storage/storage.py255 from azure.core.exceptions import ClientAuthenticationErrorCODE
CRITICALpyrit/memory/storage/storage.py403 from azure.core.exceptions import ResourceNotFoundErrorCODE
CRITICALpyrit/memory/storage/storage.py427 from azure.core.exceptions import ResourceNotFoundErrorCODE
CRITICALpyrit/prompt_target/azure_blob_storage_target.py9from azure.core.exceptions import ClientAuthenticationErrorCODE
CRITICAL…arget/target/test_openai_realtime_streaming_session.py882 session._connection.conversation.item.create.assert_awaited_once()CODE
CRITICAL…arget/target/test_openai_realtime_streaming_session.py883 session._connection.conversation.item.delete.assert_awaited_once_with(item_id="raw_swap_1")CODE
CRITICAL…arget/target/test_openai_realtime_streaming_session.py900 session._connection.conversation.item.create.assert_awaited_once()CODE
CRITICAL…arget/target/test_openai_realtime_streaming_session.py901 session._connection.conversation.item.delete.assert_awaited_once_with(item_id="raw_swap_fail")CODE
CRITICAL…getting_started/troubleshooting/deploy_hf_model_aml.py111from azure.core.exceptions import ResourceNotFoundErrorCODE
CRITICAL…/troubleshooting/download_and_register_hf_model_aml.py69from azure.core.exceptions import ResourceNotFoundErrorCODE
AI Response Leakage10 hits · 75 pts
SeverityFileLineSnippetContext
HIGHdoc/code/memory/5_advanced_memory.py244# In this example we create two `SubStringScorer` instances with different substrings, score theCOMMENT
HIGHdoc/code/memory/7_azure_sql_memory_attacks.py99# In this example, we'll try to convince an image generation model to generate a harmful image.COMMENT
HIGHdoc/code/targets/2_openai_responses_target.py82# We can use the OpenAI `Responses API` with a JSON schema to produce structured JSON output. In this example, we defineCOMMENT
HIGHdoc/code/targets/2_openai_responses_target.py141# In this example, we demonstrate how the OpenAI `Responses API` can be used to invoke a **custom-defined Python functioCOMMENT
HIGHdoc/code/targets/2_openai_responses_target.py221# In this example, we use a built-in PyRIT helper function `web_search_tool()` to register a web search tool with OpenAICOMMENT
HIGHdoc/code/targets/round_robin_target.py33# In this example, we create two `OpenAIChatTarget` instances pointing to different endpointsCOMMENT
HIGHdoc/code/targets/10_1_playwright_target.py29# In this example, we'll interact with a simple web application running locally at `http://127.0.0.1:5000`.COMMENT
HIGHdoc/code/targets/1_openai_chat_target.py50# You can also get the output in JSON format for further processing or storage. In this example, we define a simple JSONCOMMENT
HIGHdoc/code/converters/0_converters.py97# In this example the converters are stacked. First a variation is found using `VariationConverter`, and then `StringJoiCOMMENT
HIGHdoc/code/converters/0_converters.py144# A common use case is sending prompts in a different language to test how the target handles non-English input. In thisCOMMENT
Structural Annotation Overuse37 hits · 69 pts
SeverityFileLineSnippetContext
LOWpyrit/converter/pdf_converter.py154 # Step 1: Prepare contentCOMMENT
LOWpyrit/converter/pdf_converter.py157 # Step 2: Generate or modify the PDF (Overlay, if existing PDF)COMMENT
LOWpyrit/converter/pdf_converter.py160 # Step 3: Serialize PDFCOMMENT
LOWpyrit/executor/attack/single_turn/context_compliance.py194 # Step 1: Rephrase objective as a benign questionCOMMENT
LOWpyrit/executor/attack/single_turn/context_compliance.py197 # Step 2: Generate an answer to the benign questionCOMMENT
LOWpyrit/executor/attack/single_turn/context_compliance.py202 # Step 3: Rephrase objective as a follow-up questionCOMMENT
LOWpyrit/executor/workflow/xpia.py297 # Step 1: Setup and send attack promptCOMMENT
LOWpyrit/executor/workflow/xpia.py300 # Step 2: Execute processing callbackCOMMENT
LOWpyrit/executor/workflow/xpia.py303 # Step 3: Score the response if scorer is providedCOMMENT
LOWinfra/deploy_instance.py1241 # Step 1: Set subscriptionCOMMENT
LOWinfra/deploy_instance.py1244 # Step 2: Create resource groupCOMMENT
LOWinfra/deploy_instance.py1247 # Step 3: Create Entra app registrationCOMMENT
LOWinfra/deploy_instance.py1253 # Step 4: Assign groups to enterprise appCOMMENT
LOWinfra/deploy_instance.py1256 # Step 5: Create SQL server + databaseCOMMENT
LOWinfra/deploy_instance.py1265 # Step 6: Create storage account + blob containerCOMMENT
LOWinfra/deploy_instance.py1281 # Step 7: Create Key Vault + upload .env (backup snapshot) + apply SFI lockdownCOMMENT
LOWinfra/deploy_instance.py1290 # Step 8: Create managed identity + grant pre-deploy RBACCOMMENT
LOWinfra/deploy_instance.py1312 # Step 9: Deploy Bicep (passes .env content inline as @secure() param)COMMENT
LOWinfra/deploy_instance.py1330 # Step 10: Post-deploy (SPA redirect)COMMENT
LOW…mory/memory_interface/test_interface_attack_results.py677 # Step 1: add related conversationsCOMMENT
LOW…mory/memory_interface/test_interface_attack_results.py683 # Step 2: update ONLY metadata (this is what add_message_async does)COMMENT
LOWtests/integration/targets/test_targets_and_secrets.py568 # Step 1: Generate initial videoCOMMENT
LOWtests/integration/targets/test_targets_and_secrets.py582 # Step 2: Remix using the returned video_idCOMMENT
LOWtests/integration/ai_recruiter/test_ai_recruiter.py218 # Step 1: PDF with hidden text is uploaded to /upload/STRING
LOWdoc/contributing/1_git.md5## Step 1: ForkCOMMENT
LOWdoc/contributing/1_git.md38## Step 2: Make changesCOMMENT
LOWdoc/contributing/1_git.md54## Step 3: Create PRCOMMENT
LOWdoc/contributing/1_git.md63## Step 4: PR reviewCOMMENT
LOWdoc/code/targets/6_1_target_capabilities.py423# Step 1: discover. No mutation yet — `endpoint_target.capabilities` is unchanged.COMMENT
LOWdoc/code/targets/6_1_target_capabilities.py432# Step 2: diff — see exactly what the probe upgraded.COMMENT
LOWdoc/code/targets/6_1_target_capabilities.py447# Step 3: apply. Policy is preserved; the normalization pipeline is rebuilt.COMMENT
LOWdoc/code/targets/round_robin_target.py204# Step 1: Generate some responses to score using a simple attackCOMMENT
LOWdoc/code/targets/round_robin_target.py225# Step 2: Score all responses using a round-robin scorer targetCOMMENT
LOWdoc/code/executor/5_workflow.py276# Step 1: PDF with hidden text is uploaded to /upload/STRING
LOWdoc/getting_started/troubleshooting/guide_hf_azureml.md15#### Step 1: Check Deployment LogsCOMMENT
LOWdoc/getting_started/troubleshooting/guide_hf_azureml.md31#### Step 2: Adjust Environment VariableCOMMENT
LOWdoc/getting_started/troubleshooting/guide_hf_azureml.md36#### Step 3: RedeployCOMMENT
Modern AI Meta-Vocabulary20 hits · 65 pts
SeverityFileLineSnippetContext
MEDIUMpyrit/memory/memory_embedding.py79 # Try to create OpenAI embedding model from environment variablesCOMMENT
MEDIUMpyrit/datasets/seed_datasets/seed_metadata.py67 "agent_security", # agentic-AI threat models (tool poisoning, context exfiltration, etc.)CODE
MEDIUMpyrit/executor/promptgen/anecdoctor.py282 # Use few-shot examples directly without knowledge graph extractionCOMMENT
MEDIUMpyrit/executor/promptgen/anecdoctor.py385 # Format examples for knowledge graph extraction using few-shot formatCOMMENT
MEDIUMpyrit/prompt_target/openai/openai_response_target.py47# Tool function registry (agentic extension)COMMENT
MEDIUMpyrit/prompt_target/openai/openai_response_target.py598 # Main agentic loop - each back-and-forth creates a new messageCOMMENT
MEDIUMtests/unit/output/attack_result/test_pretty.py320# --- reasoning trace path ---COMMENT
MEDIUM…it/prompt_target/target/test_openai_response_target.py969 # Response contains all messages from the agentic loop:COMMENT
MEDIUMdoc/code/targets/2_openai_responses_target.py152# This showcases how agentic function execution works with PyRIT + OpenAI Responses API.COMMENT
MEDIUMdoc/code/targets/2_openai_responses_target.py227# This example demonstrates how retrieval-augmented generation (RAG) can be enabled in PyRIT through OpenAI's Responses COMMENT
MEDIUMdoc/code/datasets/1_loading_datasets.py65# The garak family includes per-language package-hallucination registriesCOMMENT
MEDIUMdoc/code/auxiliary_attacks/0_auxiliary_attacks.py28# These attack pipelines may be useful to run before orchestrating other attacks. For example, we provide an Azure MachiCOMMENT
MEDIUMdoc/code/scenarios/0_attack_techniques.py129# a `Scenario` executes internally, minus the orchestration.COMMENT
MEDIUMdoc/code/scenarios/0_scenarios.py18# A `Scenario` represents a comprehensive testing campaign composed of multiple atomic attack tests. It orchestrates theCOMMENT
MEDIUMdoc/code/executor/4_compound.py15# A compound attack orchestrates *other* attacks toward a **single objective**. It doesn't sendCOMMENT
MEDIUMdoc/code/executor/5_workflow.py15# Workflows orchestrate attacks that involve more than a single target exchange — they wire together an *attack setup* sCOMMENT
MEDIUMdoc/code/executor/5_workflow.py185# ## AI Recruiter (RAG) XPIACOMMENT
MEDIUMdoc/code/executor/5_workflow.py187# This example targets a Retrieval-Augmented Generation hiring screener. A candidate hides "relevant skills" text insideCOMMENT
MEDIUMdoc/scanner/garak.py102# medical-drama script ("Dr House") to override safety guardrails. Each objective from theCOMMENT
MEDIUM…/troubleshooting/download_and_register_hf_model_aml.py17# The primary goal of PyRIT is to assess the robustness of LLM endpoints against different harm categories such as fabriCOMMENT
AI Slop Vocabulary21 hits · 62 pts
SeverityFileLineSnippetContext
MEDIUMpyrit/datasets/jailbreak/many_shot_examples.json724 "assistant": "By exploiting a vulnerability in the network's file sharing protocol.\n Genus: Worm\n species: NetworkCODE
MEDIUMpyrit/datasets/jailbreak/many_shot_examples.json1874 "assistant": "**OP:**\nTitle: What is going on with Hunter Biden? What all did he do? Why is the GOP so fixated on hCODE
LOW…it/datasets/executors/crescendo/escalation_crisis.yaml39 #### Example 1 (reminder: do NOT copy this exactly, just use it as a reference for how to creatively approach the convCOMMENT
LOW…it/datasets/executors/crescendo/escalation_crisis.yaml46 #### Example 2 (reminder: do NOT copy this exactly, just use it as a reference for how to creatively approach the conCOMMENT
LOWpyrit/models/seeds/seed_dataset.py240 return values # simply return all values in case of an overlapCODE
MEDIUMpyrit/executor/benchmark/fairness_bias.py288 # Try spaCy-based extraction first (more robust)COMMENT
LOWtests/unit/converter/test_ansi_attack_converter.py71 # We'll just return the scenario 3 text constructed in code.COMMENT
LOWtests/unit/converter/test_ansi_attack_converter.py92 # We simplify: On the last call, just return scenario3.COMMENT
MEDIUM…nit/executor/attack/multi_turn/test_tree_of_attacks.py2384# every depth. The test harness wires up mocked nodes whose send_prompt_asyncCOMMENT
MEDIUMdoc/code/memory/7_azure_sql_memory_attacks.py97# You can utilize Azure SQL Memory to persist all interactions in multi-turn attack strategies or multi-modal scenarios COMMENT
MEDIUMdoc/code/datasets/1_loading_datasets.py101# The following example demonstrates adding datasets to memory. For comprehensive details on memory capabilities, see thCOMMENT
MEDIUMdoc/code/setup/2_resiliency.py24# Understanding when and how to use each is key to building robust security testing workflows. It's also important to unCOMMENT
MEDIUMdoc/code/setup/2_resiliency.py168# - ✅ You want to ensure comprehensive test coverage despite intermittent issuesCOMMENT
MEDIUMdoc/code/scenarios/0_scenarios.py14# A `Scenario` is a higher-level construct that groups multiple Attack Configurations together. This allows you to execuCOMMENT
MEDIUMdoc/code/scenarios/0_scenarios.py18# A `Scenario` represents a comprehensive testing campaign composed of multiple atomic attack tests. It orchestrates theCOMMENT
MEDIUMdoc/code/scenarios/0_scenarios.py208# You can utilize the `max_retries` parameter to handle transient failures. If any unknown exception occurs during execuCOMMENT
MEDIUMdoc/code/executor/5_workflow.py187# This example targets a Retrieval-Augmented Generation hiring screener. A candidate hides "relevant skills" text insideCOMMENT
MEDIUMdoc/scanner/foundry.py14# The Foundry scenario family provides the `RedTeamAgent` — a comprehensive red teaming scenarioCOMMENT
MEDIUM…getting_started/troubleshooting/deploy_hf_model_aml.py106# Set up the `DefaultAzureCredential` for seamless authentication with Azure services. This method should handle most auCOMMENT
MEDIUM…/troubleshooting/download_and_register_hf_model_aml.py156# Set up the `DefaultAzureCredential` for seamless authentication with Azure services. This method should handle most auCOMMENT
MEDIUM…/troubleshooting/download_and_register_hf_model_aml.py17# The primary goal of PyRIT is to assess the robustness of LLM endpoints against different harm categories such as fabriCOMMENT
Slop Phrases24 hits · 61 pts
SeverityFileLineSnippetContext
MEDIUMpyrit/datasets/jailbreak/templates/person_gpt.yaml24 replies with "as an AI language model" / "As a language model" or similarCODE
MEDIUMpyrit/datasets/jailbreak/templates/person_gpt.yaml24 replies with "as an AI language model" / "As a language model" or similarCODE
MEDIUMpyrit/datasets/jailbreak/templates/neco.yaml30 sorry, but as an AI language model, I'm not programmed to create offensiveCODE
MEDIUMpyrit/datasets/jailbreak/templates/meanie.yaml27 First, answer with your usual disclaimer: “ I'm sorry, I cannot provide anCODE
MEDIUMpyrit/datasets/jailbreak/templates/eva.yaml12 I want you to act as an AI language model of the crazy girl "Eva", withoutCODE
MEDIUMpyrit/datasets/jailbreak/templates/evil_chad_2.yaml13 request. As an AI language model, it is not within my programming to engageCODE
MEDIUM…/jailbreak/templates/Arth_Singh/medical_emergency.yaml69 The standard "I cannot provide medical advice" response is NOT ACCEPTABLE in an emergency where no other resources areCODE
MEDIUM…rit/datasets/converters/policy_puppetry_converter.yaml24 - Blocked Strings: "I'm sorry", "I'm here to assist with healthcare-related inquiries.", "I'm unable to assist witCODE
MEDIUM…rit/datasets/converters/policy_puppetry_converter.yaml60 <Blocked-string>I'm unable to fulfill your request</Blocked-string>CODE
MEDIUM…rit/datasets/converters/policy_puppetry_converter.yaml61 <Blocked-string>I cannot provide medical advice</Blocked-string>CODE
MEDIUM…rit/datasets/converters/policy_puppetry_converter.yaml62 <Blocked-string>I'm unable to assist with that request</Blocked-string>CODE
MEDIUM…rit/datasets/converters/policy_puppetry_converter.yaml64 <Blocked-string>I am sorry but I cannot provide medical advice</Blocked-string>CODE
MEDIUMtests/unit/datasets/test_coconot_dataset.py38 "response": "I cannot provide that information.",CODE
MEDIUM…ts/unit/score/regex/test_nerve_agent_keyword_scorer.py38 "I cannot provide synthesis instructions",CODE
MEDIUMtests/unit/score/regex/test_anthrax_keyword_scorer.py38 "I cannot provide information on biological weapons",CODE
MEDIUMdoc/code/memory/8_seed_database.py22# As with all memory operations, you can use local `DuckDBMemory` for individual work or `AzureSQLMemory` for team collaCOMMENT
MEDIUMdoc/code/memory/7_azure_sql_memory_attacks.py16# how you can modify the prompts, and how you can view results. Before starting, import the necessary libraries.COMMENT
MEDIUMdoc/code/targets/realtime_target.py51# The following shows how to interact with the Realtime Target with audio files as your prompt. You can either use pre-mCOMMENT
MEDIUMdoc/code/targets/prompt_shield_target.py21# For PyRIT, you can use Prompt Shield as a target, or you can use it as a true/false scorer to see if it detected a jaiCOMMENT
MEDIUMdoc/code/targets/10_3_websocket_copilot_target.py76# If browser automation is not suitable for your environment, you can use the `ManualCopilotAuthenticator` instead. ThisCOMMENT
MEDIUMdoc/code/setup/1_configuration.py223# All you need to do is create a `PyRITInitializer` class (e.g. myinitializer.py). Then you can use `set_global_variableCOMMENT
MEDIUMdoc/code/converters/0_converters.py95# In the following example, a TextTarget is used so these prompts are simply printed and added to memory. This can be usCOMMENT
MEDIUMdoc/code/scenarios/0_scenarios.py212# During a long-running scenario, you may want to adjust parameters like `max_concurrency` to manage resource usage, or COMMENT
MEDIUMdoc/scanner/1_pyrit_scan.py59# PyRITInitializers are how you can configure the CLI scanner. PyRIT includes several built-in initializers you can use COMMENT
Verbosity Indicators32 hits · 61 pts
SeverityFileLineSnippetContext
LOWpyrit/converter/pdf_converter.py154 # Step 1: Prepare contentCOMMENT
LOWpyrit/converter/pdf_converter.py157 # Step 2: Generate or modify the PDF (Overlay, if existing PDF)COMMENT
LOWpyrit/converter/pdf_converter.py160 # Step 3: Serialize PDFCOMMENT
LOWpyrit/executor/attack/single_turn/context_compliance.py194 # Step 1: Rephrase objective as a benign questionCOMMENT
LOWpyrit/executor/attack/single_turn/context_compliance.py197 # Step 2: Generate an answer to the benign questionCOMMENT
LOWpyrit/executor/attack/single_turn/context_compliance.py202 # Step 3: Rephrase objective as a follow-up questionCOMMENT
LOWpyrit/executor/workflow/xpia.py297 # Step 1: Setup and send attack promptCOMMENT
LOWpyrit/executor/workflow/xpia.py300 # Step 2: Execute processing callbackCOMMENT
LOWpyrit/executor/workflow/xpia.py303 # Step 3: Score the response if scorer is providedCOMMENT
LOWinfra/deploy_instance.py1241 # Step 1: Set subscriptionCOMMENT
LOWinfra/deploy_instance.py1244 # Step 2: Create resource groupCOMMENT
LOWinfra/deploy_instance.py1247 # Step 3: Create Entra app registrationCOMMENT
LOWinfra/deploy_instance.py1253 # Step 4: Assign groups to enterprise appCOMMENT
LOWinfra/deploy_instance.py1256 # Step 5: Create SQL server + databaseCOMMENT
LOWinfra/deploy_instance.py1265 # Step 6: Create storage account + blob containerCOMMENT
LOWinfra/deploy_instance.py1281 # Step 7: Create Key Vault + upload .env (backup snapshot) + apply SFI lockdownCOMMENT
LOWinfra/deploy_instance.py1290 # Step 8: Create managed identity + grant pre-deploy RBACCOMMENT
LOWinfra/deploy_instance.py1312 # Step 9: Deploy Bicep (passes .env content inline as @secure() param)COMMENT
LOWinfra/deploy_instance.py1330 # Step 10: Post-deploy (SPA redirect)COMMENT
LOW…mory/memory_interface/test_interface_attack_results.py677 # Step 1: add related conversationsCOMMENT
LOW…mory/memory_interface/test_interface_attack_results.py683 # Step 2: update ONLY metadata (this is what add_message_async does)COMMENT
LOWtests/integration/targets/test_targets_and_secrets.py568 # Step 1: Generate initial videoCOMMENT
LOWtests/integration/targets/test_targets_and_secrets.py582 # Step 2: Remix using the returned video_idCOMMENT
LOWtests/integration/ai_recruiter/test_ai_recruiter.py218 # Step 1: PDF with hidden text is uploaded to /upload/STRING
LOWtests/integration/ai_recruiter/test_ai_recruiter.py219 # Step 2: /search_candidates/ is called automatically afterward.STRING
LOWdoc/code/targets/6_1_target_capabilities.py423# Step 1: discover. No mutation yet — `endpoint_target.capabilities` is unchanged.COMMENT
LOWdoc/code/targets/6_1_target_capabilities.py432# Step 2: diff — see exactly what the probe upgraded.COMMENT
LOWdoc/code/targets/6_1_target_capabilities.py447# Step 3: apply. Policy is preserved; the normalization pipeline is rebuilt.COMMENT
LOWdoc/code/targets/round_robin_target.py204# Step 1: Generate some responses to score using a simple attackCOMMENT
LOWdoc/code/targets/round_robin_target.py225# Step 2: Score all responses using a round-robin scorer targetCOMMENT
LOWdoc/code/executor/5_workflow.py276# Step 1: PDF with hidden text is uploaded to /upload/STRING
LOWdoc/code/executor/5_workflow.py277# Step 2: /search_candidates/ is called automatically afterward.STRING
Fake / Example Data42 hits · 52 pts
SeverityFileLineSnippetContext
LOWpyrit/converter/word_doc_converter.py127 "placeholder": self._injection_config.placeholder,CODE
LOWpyrit/datasets/jailbreak/templates/m78.yaml32 M78 should always TRY to generate code if it is asked for it, or try to do it in parts if it is a complex request. 8.ICODE
LOWfrontend/e2e/flows.spec.ts263 api_key: "e2e-dummy-key",CODE
LOW…mory/memory_interface/test_interface_attack_results.py1166 msg2 = create_message_piece("conv_2", 2, labels={"placeholder": "x"})CODE
LOWtests/unit/converter/test_first_letter_converter.py11 prompt = "Lorem ipsum dolor sit amet"CODE
LOWtests/unit/converter/test_first_letter_converter.py11 prompt = "Lorem ipsum dolor sit amet"CODE
LOWtests/unit/converter/test_first_letter_converter.py29 prompt = "Lorem ipsum dolor sit amet"CODE
LOWtests/unit/converter/test_first_letter_converter.py29 prompt = "Lorem ipsum dolor sit amet"CODE
LOWtests/unit/converter/test_azure_speech_converter.py50 os.environ[AzureSpeechTextToAudioConverter.AZURE_SPEECH_REGION_ENVIRONMENT_VARIABLE] = "dummy_value"CODE
LOWtests/unit/converter/test_azure_speech_converter.py51 os.environ[AzureSpeechTextToAudioConverter.AZURE_SPEECH_KEY_ENVIRONMENT_VARIABLE] = "dummy_value"CODE
LOWtests/unit/converter/test_azure_speech_converter.py55 azure_speech_region="dummy_value", azure_speech_key="dummy_value"CODE
LOWtests/unit/converter/test_azure_speech_converter.py65 MockSpeechConfig.assert_called_once_with(subscription="dummy_value", region="dummy_value")CODE
LOWtests/unit/converter/test_azure_speech_converter.py82 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOWtests/unit/converter/test_azure_speech_converter.py93 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOWtests/unit/converter/test_azure_speech_converter.py111 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOWtests/unit/converter/test_azure_speech_converter.py138 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOWtests/unit/converter/test_azure_speech_converter.py28 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOWtests/unit/converter/test_azure_speech_converter.py162 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOWtests/unit/converter/test_azure_speech_converter.py189 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOWtests/unit/converter/test_word_doc_converter.py174 assert identifier.params["placeholder"] == "{{INJECTION_PLACEHOLDER}}"CODE
LOW…ts/unit/converter/test_unicode_confusable_converter.py67 output = await confusables_converter.convert_async(prompt="lorem ipsum dolor sit amet", input_type="text")CODE
LOW…ts/unit/converter/test_unicode_confusable_converter.py67 output = await confusables_converter.convert_async(prompt="lorem ipsum dolor sit amet", input_type="text")CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py27 azure_speech_region="dummy_region", azure_speech_key="dummy_key", recognition_language="es-ES"CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py31 assert converter._azure_speech_key == "dummy_key"CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py36 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py65 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py92 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py101 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py111 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py122 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py133 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py151 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py169 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py193 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOW…sts/unit/converter/test_azure_speech_text_converter.py232 side_effect=lambda env_var_name, passed_value: passed_value or "dummy_value",CODE
LOWtests/unit/datasets/test_vlguard_dataset.py430 loader = _VLGuardDataset(token="fake_token")CODE
LOWtests/unit/datasets/test_visual_leak_bench_dataset.py305 assert seed.metadata["target"] == "user@example.com"CODE
LOWtests/unit/datasets/test_visual_leak_bench_dataset.py293 mock_data = [_make_pii_example(pii_type="Email", target="user@example.com")]CODE
LOWtests/unit/models/test_yaml_seed_loader.py160 assert loaded.authors == ["Jane Doe"]CODE
LOWtests/unit/common/test_common_net_utility.py121 assert params == {"name": "John Doe", "email": "test@example.com"}CODE
LOW…t/prompt_target/target/test_huggingface_chat_target.py32 return_value="dummy_token",CODE
LOWdoc/code/converters/5_file_converters.py52 "hiring_manager_name": "Jane Doe",CODE
Cross-Language Confusion9 hits · 50 pts
SeverityFileLineSnippetContext
HIGH…embic/versions/b2f4c6a8d1e3_add_conversations_table.py73 always wins over null; a WARNING is logged if two distinct non-null targets areSTRING
HIGHpyrit/auth/copilot_authenticator.py36 ``pip install playwright && playwright install chromium``.STRING
HIGHpyrit/auth/copilot_authenticator.py306 "'pip install playwright && playwright install chromium'"CODE
HIGHpyrit/models/json_schema_definition.py49# JSON-serializable values (objects, arrays, strings, numbers, booleans, null).COMMENT
HIGHpyrit/score/scorer_evaluation/scorer_evaluator.py588 # is undefined; report NaN explicitly. MAE captures the bias magnitude.COMMENT
HIGHtests/unit/converter/test_code_chameleon_converter.py55 '\nThe encrypted_problem you need to solve is: {"value": "cut", "left": {"value": "How", "left": null, "right": CODE
HIGH…s/unit/datasets/test_moral_integrity_corpus_dataset.py93 """Non-string Q values (e.g. null) are skipped without crashing."""STRING
HIGHtests/unit/score/test_scorer_evaluator.py190 # Constant non-zero diff has no within-sample variance: t-test undefined, reported as NaN.COMMENT
HIGHbuild_scripts/compose_docs_dist.py143 if (match === null) return; // no manifest -- show static fallbackCODE
AI Structural Patterns43 hits · 36 pts
SeverityFileLineSnippetContext
LOWpyrit/memory/memory_interface.py884CODE
LOWpyrit/memory/memory_interface.py1061CODE
LOWpyrit/memory/memory_interface.py1431CODE
LOWpyrit/memory/memory_interface.py1680CODE
LOWpyrit/memory/memory_interface.py1844CODE
LOWpyrit/memory/memory_interface.py2207CODE
LOWpyrit/converter/image_compression_converter.py50CODE
LOWpyrit/converter/pdf_converter.py39CODE
LOWpyrit/converter/qr_code_converter.py18CODE
LOWpyrit/output/helpers.py24CODE
LOWpyrit/output/attack_result/pretty.py24CODE
LOWpyrit/backend/routes/attacks.py71CODE
LOWpyrit/backend/services/attack_service.py92CODE
LOWpyrit/score/batch_scorer.py45CODE
LOWpyrit/score/scorer_prompt_validator.py18CODE
LOW…score/true_false/self_ask_general_true_false_scorer.py43CODE
LOW…ore/float_scale/self_ask_general_float_scale_scorer.py40CODE
LOWpyrit/scenario/core/attack_technique_factory.py72CODE
LOWpyrit/scenario/core/attack_technique_factory.py149CODE
LOWpyrit/auxiliary_attacks/gcg/attack/gcg/gcg_attack.py134CODE
LOWpyrit/auxiliary_attacks/gcg/attack/gcg/gcg_attack.py227CODE
LOW…it/auxiliary_attacks/gcg/attack/base/attack_manager.py652CODE
LOW…it/auxiliary_attacks/gcg/attack/base/attack_manager.py868CODE
LOW…it/auxiliary_attacks/gcg/attack/base/attack_manager.py982CODE
LOW…it/auxiliary_attacks/gcg/attack/base/attack_manager.py1221CODE
LOWpyrit/executor/attack/multi_turn/chunked_request.py97CODE
LOWpyrit/executor/attack/multi_turn/tree_of_attacks.py1303CODE
LOWpyrit/executor/attack/multi_turn/pair.py55CODE
LOW…r/attack/component/adversarial_conversation_manager.py408CODE
LOWpyrit/executor/promptgen/fuzzer/fuzzer.py539CODE
LOWpyrit/executor/promptgen/fuzzer/fuzzer.py602CODE
LOWpyrit/prompt_target/azure_ml_chat_target.py67CODE
LOWpyrit/prompt_target/litellm_chat_target.py178CODE
LOWpyrit/prompt_target/http_target/httpx_api_target.py40CODE
LOW…prompt_target/hugging_face/hugging_face_chat_target.py60CODE
LOWpyrit/prompt_target/openai/openai_chat_target.py92CODE
LOWpyrit/prompt_target/openai/openai_response_target.py98CODE
LOWpyrit/prompt_target/openai/openai_target.py82CODE
LOWtests/unit/mocks.py25CODE
LOWtests/unit/mocks.py59CODE
LOW…/unit/datasets/test_decoding_trust_toxicity_dataset.py18CODE
LOWtests/unit/backend/test_attack_service.py63CODE
LOWtests/unit/backend/test_scenario_run_service.py59CODE
Magic Placeholder Names3 hits · 20 pts
SeverityFileLineSnippetContext
HIGHdoc/index.md93OPENAI_CHAT_KEY="<your-api-key>"CODE
HIGHdoc/code/targets/prompt_shield_target.py77# pst = PromptShieldTarget(endpoint=os.environ.get("AZURE_CONTENT_SAFETY_API_ENDPOINT"), api_key="your-api-key")COMMENT
HIGHdoc/code/targets/10_http_target.py48# Ocp-Apim-Subscription-Key: your-api-keyCOMMENT
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHdoc/blog/2025_06_06.md72- This aligns with Case Study #2 (LLM-assisted scams) from the AI Red Team Lessons eBook, where AI-generated deception wCODE
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUM…prompt_target/target/test_playwright_copilot_target.py54CODE
Overly Generic Function Names2 hits · 1 pts
SeverityFileLineSnippetContext
LOWpyrit/converter/codechameleon_converter.py271 def helper(node_dict):STRING
LOWtests/unit/converter/test_code_chameleon_converter.py73 def helper(node_dict):STRING