BUG PromptInject run configuration shows goal text as the technique
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- fastapi, javascript, postgresql, python, react, sqlite, typescript
Hướng nghiên cứu
The bug is in the backend's scenario_run_service.py where techniques_used is populated from group.display_group instead of the canonical technique name. Start by examining lines 1382-1386, 1583-1586, and 1985-2007 in that file. The frontend displays this field in ScenarioRunPage.tsx lines 413-415. Reproduce the issue locally by running garak.prompt_inject with a custom goal_text and verify the mismatch. The fix should ensure the technique identity is used consistently across the run summary, list projection, and progress response.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
After running garak.prompt_inject, Run configuration > Techniques shows the requested goal text instead of the selected technique. The preview and the separate Techniques section show the correct technique, so the saved-run view contradicts them.
For example, selecting ignore_print with goal_texts=["AUDIT_SAFE_MARKER"] produces a completed result whose Run configuration lists AUDIT_SAFE_MARKER as the technique.
This makes the result summary misleading when reviewing or sharing which method was tested. Execution and Resume preserved the correct technique and custom goal in the audit; the observed defect is in the API/UI summary.
Steps/Code to Reproduce
- Start the GUI/backend and configure a local OpenAI-compatible test target. A deterministic local provider is sufficient; no paid provider or external dataset is needed.
- Open Scanner > garak.prompt_inject and select that target.
- Replace the default
goal_textswithAUDIT_SAFE_MARKER. - Leave only
ignore_printselected, set Max dataset size to1, and leave baseline disabled. - Click Launch scan. The preview correctly lists
ignore_printunder Techniques and the marker undergoal_texts. - Confirm the launch and open the completed run.
- Compare Run configuration > Techniques with the separate Techniques section.
- Reload the page. The mismatch remains.
The relevant POST /api/scenarios/runs payload is:
{
"scenario_name": "garak.prompt_inject",
"target_name": "<local test target registry name>",
"techniques": ["ignore_print"],
"include_baseline": false,
"max_dataset_size": 1,
"max_retries": 0,
"scenario_params": {
"goal_texts": ["AUDIT_SAFE_MARKER"]
}
}
This also reproduced with a second harmless marker, AUDIT_RESUME_SAFE, after a deliberately failed local run was successfully resumed under the same run ID.
Expected Results
Run configuration > Techniques and the API's techniques_used should identify ignore_print. Goal-based labels can remain under Atomic attack groups; they are not technique identities.
Actual Results
| Location | Value |
|---|---|
Submitted techniques |
["ignore_print"] |
Submitted scenario_params.goal_texts |
["AUDIT_SAFE_MARKER"] |
| Run configuration > Techniques | AUDIT_SAFE_MARKER |
Progress API run.techniques_used |
["AUDIT_SAFE_MARKER"] |
| Plan's technique identity and separate Techniques section | ignore_print |
The wrong summary survives reload and also appears after Resume. The separate Techniques section is a workaround for identifying the actual method.
The source points to the backend projection:
- PromptInject groups atomic attacks by goal text, which is valid grouping behavior.
- The service fills
techniques_usedfromgroup.display_groupin the run summary, list projection, and progress response. - The frontend displays that field as Techniques.
The projection should use the canonical technique identity consistently across these responses, rather than renaming the legitimate goal-based groups. Regression coverage should include a run where display_group differs from technique_name.
Screenshots
Not attached. The request/response comparison above records the observed mismatch from two independent runs in the September 23 frontend audit.
Versions
- Tested commit:
5453025c128d36a4ac624c10097a5e85031302ecfrommain. - PyRIT: editable
1.2.0.dev0;garak.prompt_injectversion 3. - Browser: Chromium through Playwright 1.63.0, desktop viewport 1440 x 900.
- Backend: isolated in-memory database and loopback-only synthetic provider.
pyrit.show_versions() output, with the local executable path redacted:
System:
python: 3.14.4 (main, Apr 14 2026, 14:30:57) [MSC v.1944 64 bit (AMD64)]
executable: <worktree>\.venv\Scripts\python.exe
machine: Windows-11-10.0.26200-SP0
Python dependencies:
pyrit: 1.2.0.dev0
Cython: None
numpy: 2.4.6
openai: 2.54.0
packaging: 25.0
pip: None
scipy: 1.17.1
setuptools: 83.0.0
sqlite3: None
torch: 2.14.0
transformers: 5.17.0
- Ngôn ngữ chính
- Python
- Star
- 4.6k
- Fork
- 944
- Merge trung bình
- 2 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 285
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/PyRIT
-
BUG UnicodeReplacementConverter writes characters outside the BMP as invalid five-digit \u escapesCó thể đã có người làm @ShivamSharma43 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: label queries only return the final conversation of an attackCó thể đã có người làm @richlundeen đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
microsoft/PyRIT#3095 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG Configuration keeps runtime-status errors after polling recoversCó thể đã có người làm @joeyvictorino đã nhận 2 ngày trước. Đang mởBug: triage GUI help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
microsoft/PyRIT#2868 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG JailBreakV-28K loader reads a `transfer_attack_type` column that does not exist upstream and drops the real `from` / `transfer_from_llm` provenanceCó thể đã có người làm @kushaltalati đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 35/100
microsoft/PyRIT#3161 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG QuestionAnswerScorer counts a wrong option as correct when the answer appears inside a longer word or numberCó thể đã có người làm @barkha1research-ai đã nhận hôm nay. Đang mởBug: triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/PyRIT
Issue tương tự
-
SSM GetParameter throttling during concurrent workflow launchesCó thể đã có người làm @alexiswl đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)Có thể đã có người làm @andest01 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Rename FunctionalRole BOT_DEV to DEV_STAFFCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
pesu-dev/discord_bot#97 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
gradio-app/gradio#13964 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày