AGENT SKILL

attacks-scenarios

Choose, configure, and interpret PyRIT attack executors, techniques, scenarios, benchmarks, workflows, and prompt generators safely.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
attacks-scenarios
license
MIT
metadata
{ "disco-role": "operating" }
description
Choose, configure, and interpret PyRIT attack executors, techniques, scenarios, benchmarks, workflows, and prompt generators safely.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

PyRIT attacks and scenarios

Use this sub-skill when the task is to plan or implement a PyRIT attack run, scenario campaign, benchmark, prompt-generation workflow, or attack-technique selection. This skill owns orchestration semantics: which executor or scenario should drive the run, what pieces must be wired together, how retries/concurrency affect execution, and how to interpret attack/scenario results.

Safety boundary: examples and helper scripts here are no-secret and no-network by default. Do not send prompts to a live model or service unless the caller explicitly supplies an approved target configuration, credentials, scope, and data handling rules.

Route first

User need Use this sub-skill for Route elsewhere for
Pick an attack algorithm Single-turn, multi-turn, compound, streaming, benchmark, workflow, prompt generator, scenario vs atomic attack decisions Target/scorer constructor details in targets-scorers
Configure attack components AttackConverterConfig, AttackScoringConfig, AttackAdversarialConfig, AttackParameters, memory_labels, retry and concurrency placement Converter/dataset construction in converters-datasets
Run a scenario campaign Technique selection, baseline policy, DatasetAttackConfiguration, initialize_async, run_async, scenario result interpretation Initialization/memory backend setup in setup-memory-core
Use pyrit_scan or backend Scenario semantics and what techniques/datasets mean CLI invocation, backend process, and scanner flags in cli-backend-scanner
Debug attack/scenario failures Ownership of branching, async/concurrency, missing defaults, optional heavy paths, memory/result lookup Credential, target, and scorer failures in targets-scorers

Required first checks

  1. Confirm PyRIT is initialized for the intended memory backend before executing anything that writes prompts, scores, attack results, or scenario results. Route setup details to setup-memory-core.
  2. Identify the objective target: the system under test. Do not confuse it with an adversarial target, which PyRIT controls to generate attack prompts for adaptive attacks.
  3. Decide whether the run is a one-objective attack, many-objective atomic attack, scenario campaign, benchmark, workflow, or prompt generator.
  4. Decide whether scoring is needed. Without an objective scorer, many attacks can execute but report UNDETERMINED rather than success/failure.
  5. Check modality compatibility: converters and next_message data types must produce inputs accepted by the objective target; multimodal scorers must be able to evaluate the returned modality.
  6. Bound concurrency and retries before running against rate-limited targets or expensive adversarial/scorer models.

Fast workflow selection

  • Need one direct prompt or a simple dry run: use PromptSendingAttack with a target and optional AttackScoringConfig.
  • Need a fixed conversation script: use MultiPromptSendingAttack or prepended_conversation/next_message on a single-turn attack.
  • Need adaptive back-and-forth: use RedTeamingAttack, CrescendoAttack, TreeOfAttacksWithPruningAttack/TAPAttack, or PAIRAttack with AttackAdversarialConfig.
  • Need fallbacks under one objective: use SequentialAttack with SequentialChildAttack and a SequenceCompletionPolicy.
  • Need a campaign across objectives and techniques: use a Scenario; configure datasets, techniques, baseline policy, concurrency, retries, and labels before initialize_async().
  • Need systematic measurement: use benchmark executors such as question-answering or fairness/bias benchmarks.
  • Need generated prompts for later attacks: use prompt generators; treat GCG and HuggingFace-backed paths as optional heavy dependencies.
  • Need scanner commands: keep semantics here, then route command construction to cli-backend-scanner.

Bundled operating references

  • references/attacks-scenarios-reference.md — orchestration model, executor/scenario selection, attack/scenario workflows, composition patterns, concurrency and result interpretation.
  • references/api-reference.md — distilled import/signature tables and practical constructor notes for attacks, scenarios, techniques, benchmarks, prompt generators, and results.
  • references/troubleshooting.md — diagnosis matrices for ownership mistakes, missing components/defaults, modality mismatches, async issues, rate limits, optional GCG/benchmark paths, and memory/result lookup.
  • scripts/attack_scenario_smoke.py — no-secret/no-network smoke helper that imports core PyRIT attack/scenario classes and prints signature metadata without sending prompts.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351