Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

BUG: DenylistConverter and TransparencyAttackConverter identifiers ignore settings that change output

Abierto
#3,313 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@ShivamSharma43 ya está trabajando en esto.

Desde el 18/10/2026.

  • #3315 de @ShivamSharma43 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python
Área
ai, security

Línea de trabajo

Read the identifier-building code for DenylistConverter and TransparencyAttackConverter, along with the shared behavior noted in #3287. Check how denylist, convergence_threshold, and convergence_patience affect output and are represented in identifiers; use the reproduction steps to verify each pair gets distinct identifiers and both denylist configurations register successfully.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug

Two converters leave settings that change their output out of their identifiers, so differently configured instances share one hash:

  • DenylistConverter: denylist. It does not override _build_identifier(), so it inherits the LLMGenericTextConverter identifier, which hashes the system prompt template but not the denylist that is rendered into it. The denylist also decides whether the LLM is called at all.
  • TransparencyAttackConverter: convergence_threshold and convergence_patience. Both control when the optimization loop stops early, but only benign_image_path, size, steps and learning_rate are included.

Because the default registry name comes from that hash, registering a second configuration without a custom name raises a duplicate-name error, and memory and analytics cannot tell the configurations apart. This is the same problem as #3287, for these two converters.

Steps/Code to Reproduce
import asyncio
import tempfile
from pathlib import Path

from PIL import Image

from pyrit.converter import DenylistConverter, TransparencyAttackConverter
from pyrit.prompt_target import OpenAIChatTarget
from pyrit.registry import ConverterRegistry
from pyrit.setup import IN_MEMORY, initialize_pyrit_async

asyncio.run(initialize_pyrit_async(memory_db_type=IN_MEMORY))
target = OpenAIChatTarget(endpoint="https://example.invalid/openai/v1", api_key="unused", model_name="gpt-4o")

benign = Path(tempfile.mkdtemp()) / "benign.jpg"
Image.new("L", (150, 150), color=200).save(benign, "JPEG")

pairs = [
    (
        DenylistConverter(converter_target=target, denylist=["bomb"]),
        DenylistConverter(converter_target=target, denylist=["password", "exploit"]),
    ),
    (
        TransparencyAttackConverter(benign_image_path=benign, convergence_threshold=1e-6),
        TransparencyAttackConverter(benign_image_path=benign, convergence_threshold=0.1),
    ),
    (
        TransparencyAttackConverter(benign_image_path=benign, convergence_patience=10),
        TransparencyAttackConverter(benign_image_path=benign, convergence_patience=1),
    ),
]
for first, second in pairs:
    print(first.get_identifier().unique_name, second.get_identifier().unique_name)

registry = ConverterRegistry()
registry.instances.register(DenylistConverter(converter_target=target, denylist=["bomb"]))
registry.instances.register(DenylistConverter(converter_target=target, denylist=["password"]))
Expected Results

Each pair has two different identifiers, and both DenylistConverter instances register.

Actual Results
DenylistConverter::0085bebb DenylistConverter::0085bebb
TransparencyAttackConverter::438424a1 TransparencyAttackConverter::438424a1
TransparencyAttackConverter::438424a1 TransparencyAttackConverter::438424a1
ValueError: Instance 'DenylistConverter::0085bebb' already exists
Screenshots

N/A

Versions
  • OS: Windows 11
  • Python version: 3.11.9
  • PyRIT version: installed from main (f277fedd) in editable mode
Lenguaje dominante
Python
Estrellas
4.6k
Forks
962
Merge medio
2 d 16 h
PR fusionados (30 d)
354

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/PyRIT

Todos los issues de microsoft/PyRIT

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.