Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

FEAT: Add a converter for indirect prompt injection via hidden HTML/Markdown text

已关闭
#2,780 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
70/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
ai, security

调研方向

The new converter belongs in pyrit/converter/. Start by examining existing converters like AnsiAttackConverter to understand the base class and SUPPORTED_INPUT_TYPES. The issue lists specific hiding techniques (html_comment, css_display_none, etc.); implement each, ensuring proper escaping. Write unit tests for each technique. Check doc/references.bib for the WASP benchmark citation. Done means the converter passes all tests and can be used with the XPIA workflow.

由索引模型根据 Issue 内容生成。

描述

feature-request

Summary

I would like to add a new text-to-text converter, HiddenTextConverter, that embeds
the input prompt as hidden or de-emphasized text inside an HTML or Markdown carrier.

Motivation

PyRIT already has the XPIA workflow for indirect prompt injection, but there is no
converter that produces a hidden payload for it to deliver. Systems that summarize or
act on external content (web pages, documents, emails) read the raw source, so text can
be present in the source while staying invisible to a human reviewer. A model that parses
that source may still read and follow it.

This is the same idea as the existing AnsiAttackConverter (terminal escape sequences) and
TransparencyAttackConverter (image layers), applied to HTML and Markdown documents. The
hiding methods are documented injection vectors from the WASP web-agent security benchmark
(arXiv:2504.18575).

Proposed behavior

The converter takes a prompt and wraps it using a chosen technique:

  • html_comment
  • css_display_none
  • css_offscreen
  • html_alt_text
  • aria_label
  • markdown_comment
  • markdown_link_title

An optional carrier_text places the hidden payload inside normal looking content. The
converter only formats the text it is given and does not generate any attack content on
its own. Input is escaped so the payload cannot break out of the surrounding markup.

Scope

  • New converter in pyrit/converter with SUPPORTED_INPUT_TYPES and SUPPORTED_OUTPUT_TYPES of text
  • Unit tests for each technique, escaping, carrier text, and input validation
  • Reference added to doc/references.bib
  • Intended for use as a request converter with the XPIA workflow

I have a working implementation and would like to take this issue if it fits the project's plans.

主要语言
Python
星标
4.6k
派生
944
平均合并
2 天 16 小时
30 天内合并 PR
350

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/PyRIT 的其他 Issue

查看 microsoft/PyRIT 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。