FEAT Add role-aware Scenario target-attempt accounting
维护者通常 2 天内回复
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
调研方向
Start with pyrit/analytics/scenario_statistics.py, pyrit/backend/services/scenario_progress_read_model.py, and pyrit/memory/memory_interface.py, plus the AttackResultMetadata contract and doc/code/framework.md. Trace how shared analytics policy reaches memory aggregation and backend/SDK/report consumers; the issue also calls for SQLite runtime and Azure SQL compilation parity checks. Done means adding role-aware target-facing counts while preserving existing logical-progress and raw-history semantics, with the listed edge cases covered.
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
Current main records producer roles but does not use them for target-attempt
rollups. The shared analytics helper, progress, and history SQL count attempts
without a producer-role predicate. Thus their existing
logical-unit/raw-history counts must not be presented as target-attempt counts.
For example, two target-facing child results plus one Sequential envelope
are three historical result rows, but only two target-facing producer attempts.
The envelope can still complete one outer planned logical unit. A preparation
error may also have a target-facing role, so this role alone does not prove a
target request occurred. This check inspected code; it did not run an attack.
Describe the solution you'd like
Add a consumed typed target-facing accounting projection using the existing
AttackResultMetadata contract and shared Scenario analytics/identity policy.
Keep planned logical progress, raw historical attempts, and target-facing
attempts distinct. Memory owns database aggregation; backend/SDK/report
consumers present the shared policy rather than independently infer roles.
Acceptance criteria:
- Orchestration envelopes remain observable but contribute zero to target-facing
attempts and their target-facing error/retry totals. - Preserve exact saved-plan denominators, outer-unit completion, existing
latest-attempt identity/order, raw history, and #2551/#2820 cache inclusion.
Add the new rollup without silently redefining existing unit/raw fields. - Legacy/malformed roles remain explicitly unknown using conservative decoding;
never infer a role from a conversation ID, class name, display text, or index.
Keep orchestration and unknown-role totals visible alongside target-facing
totals so the producer categories reconcile with raw history. - Report unmatched attempts separately, with the same matching policy across
progress, detail, SDK/report consumers, and history. - Real-domain/SQLite parity cases cover ordinary/baseline, flat and nested
Sequential/Adaptive, retry/resume, recovered and unrecovered errors,
preparation failure, negative retries, unknown roles, invalid plans,
tied timestamps, and cache hits. - SQLite runtime and Azure SQL compilation cover equivalent database-side
role filtering. Do not add full-result hydration, per-attempt queries, or
Python grouping as a replacement for the new SQL aggregate. - Field names and documentation say target-facing producer attempts, not
confirmed target invocations; no new request-tracing feature is required.
Dependencies: merged #2997 and #2820; coordinate indexed analytics #2792 and
history-query extractions #2768/#2769. The separate child-link fix #3039 and
dataset/technique UX are not hard dependencies for counting persisted roles.
Describe alternatives you've considered, if relevant
Do not redo shared success statistics, change logical completion to child
counts, or remove historical rows. Exclude schema/duplicate hierarchy stores,
child-link repair, hierarchy endpoints/UI, dataset/estimate changes, request
tracing, scorer semantics, and new attack algorithms.
Additional context
Roadmap: scope 8.
Design: original result/accounting references.
Evidence: upstream 58a93534838ed58e766276c060c4f0d9149d6483,
pyrit/analytics/scenario_statistics.py,
pyrit/backend/services/scenario_progress_read_model.py, and
pyrit/memory/memory_interface.py.
Follow doc/code/framework.md: models own types, analytics owns counting
policy, memory persists/aggregates, and backend/output present it.
No GUI change or unrelated screenshots are requested.
- 主要语言
- Python
- 星标
- 4.6k
- 派生
- 944
- 平均合并
- 2 天 18 小时
- 30 天内合并 PR
- 358
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/PyRIT 的其他 Issue
-
BUG: label queries only return the final conversation of an attack可能已有人在做 @u7k4rs6 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
microsoft/PyRIT#3095 · 4 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
BUG Configuration keeps runtime-status errors after polling recovers可能已有人在做 @joeyvictorino 于 6 天前认领。 未关闭Bug: triage GUI help wanted
难度 2/5 1-3 小时 新手友好度 86/100
microsoft/PyRIT#2868 · 6 条评论 ·
维护者通常 2 天内回复
-
FEAT: Support PDF and file inputs via `binary_path` in OpenAI chat and response targets可能已有人在做 @PranavD2905 今天认领。 未关闭feature-request help wanted
难度 4/5 3-5 天 新手友好度 35/100
microsoft/PyRIT#3274 · 1 条评论 ·
维护者通常 2 天内回复
-
feature-request
难度 5/5 一周以上 新手友好度 18/100
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
维护者通常 2 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
noontide-co/mainbranch#1211 · 1 条评论 ·
维护者通常 1 天内回复
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adapters未关闭triage
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
bug settings ui
难度 2/5 1-3 小时 新手友好度 72/100
DewaldOosthuizen/py-tray-command-launcher#162 ·
维护者通常 1 天内回复
-
run_all sleeps after the final job despite documenting delays between jobs可能已有人在做 @Gambit-Checkmate 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100