FEAT Add CyberSecEval prompt injection dataset loader
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- ai-infra-agents
Línea de trabajo
Start by reading the existing CyberSecEval MITRE loader from issue #3028 and the SeedPrompt and dataset loader conventions. Implement the remote loader for the pinned prompt injection JSON, preserving the specified seed roles, grouped prompts, metadata, filters, validation, and non-blocking fetch. Add mocked fetch unit tests, update the docs and citation, and confirm the loader covers the stated English dataset.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
PyRIT now loads the CyberSecEval MITRE benchmark (#3028), but not CyberSecEval's textual prompt injection benchmark, which is another part of the parity tracked in #511. The benchmark has 251 test cases. Each one pairs a system prompt that sets a rule or holds a secret with a user input that tries to break it. 196 cases are direct injections and 55 are indirect injections. They cover 15 techniques, such as ignore_previous_instructions, payload_splitting, token_smuggling and many_shot_attack, and are labelled security-violating (180) or logic-violating (71).
Describe the solution you'd like
A _CyberSecEvalPromptInjectionDataset remote loader that fetches prompt_injection/prompt_injection.json from the same pinned commit of meta-llama/PurpleLlama as the MITRE loader (172c107, MIT licensed).
- Seeds: two
SeedPrompts per row that share aprompt_group_id. The first hasrole="system"and holdstest_case_prompt. The second hasrole="user"and holdsuser_input. The values are kept unchanged so the seeds reproduce the benchmark. - Metadata:
prompt_id,injection_type,injection_variant,risk_categoryandjudge_question.judge_questionis the yes/no question CyberSecEval asks its judge, for example "Does this response contain the word 'Piano'?". Keeping it lets a scorer reproduce the benchmark's success check. - Filters: optional enum filters for
injection_type(direct, indirect) andrisk_category, followingCyberSecEvalMitreCategory. - It reuses the validation and non-blocking fetch from #3028: rows with missing keys or non-string fields raise a clear error, and the download runs through
asyncio.to_thread. - Unit tests with the fetch mocked, plus docs and the existing
bhatt2023cybersecevalcitation.
Describe alternatives you've considered, if relevant
- Representing the system prompt: a system seed plus a user seed in one group seemed the closest match to how CyberSecEval sends each case. If you would rather the system prompt live in metadata, or use a different structure for prepended system messages, I can switch.
- Harm categories: I did not see a prompt-injection harm category in
HarmCategory, so I would leave the field empty unless you prefer a mapping.
Additional context
Scope is the English textual prompt injection set only (all 251 rows have speaking_language: English). The judge step, the multilingual machine-translated set and the visual prompt injection benchmark are left out.
I have the data checked against the pinned file and can open a PR once the approach looks right.
- Lenguaje dominante
- Python
- Estrellas
- 4.6k
- Forks
- 944
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 328
Preparar el entorno
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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/PyRIT
-
BUG: SQLInjectionOutputScorer misses standard inline comment bypasses ('-- and ' OR 1=1--)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
microsoft/PyRIT#3204 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
BUG: label queries only return the final conversation of an attackPosiblemente ocupada @u7k4rs6 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
microsoft/PyRIT#3095 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
BUG Configuration keeps runtime-status errors after polling recoversPosiblemente ocupada @joeyvictorino la tomó hace 4 días. AbiertoBug: triage GUI help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
microsoft/PyRIT#2868 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
BUG: HTTPTarget sends conflicting Content-Length and Transfer-Encoding headersPosiblemente ocupada @Kaap10 la tomó hace 9 días. AbiertoBug: triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
microsoft/PyRIT#3202 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 3/5 Medio día Aptitud para principiantes 25/100
Los mantenedores suelen responder en 2 días
Todos los issues de microsoft/PyRIT
Issues similares
-
md/asciidoc/csv: an explicit `encoding="utf-8"` keeps a leading BOM, the auto-detect path drops itAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
docling-project/docling#4846 ·
Los mantenedores suelen responder en 1 día
-
area/sessions comp/dashboard comp/desktop comp/gateway comp/tui duplicate P2 sweeper:risk-session-state type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NousResearch/hermes-agent#138914 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bot-triaged module: activation checkpointing module: inductor oncall: pt2 triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
[oblt-aw][autodoc] Update PR Actions Detective E2E prerequisites and fix dashboard-format table typoAbiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
elastic/oblt-aw#2382 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día