Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0dc56a9
FEAT: Unify InitializerParameter and ScenarioParameter into pyrit.com…
Apr 29, 2026
8e51ae7
FEAT: Address PR review feedback on unified Parameter
Apr 29, 2026
8707044
FEAT: Add custom-parameter support to Scenario base class
Apr 30, 2026
ceba2ea
FEAT: Reject choices on list param_types at declaration time
Apr 30, 2026
3181a68
REFACTOR: Move parameter coercion helpers to pyrit.common.parameter
Apr 30, 2026
f739641
FEAT: Use print_deprecation_message for InitializerParameter alias
Apr 30, 2026
a1b6ecb
REFACTOR: Extract pyrit_scan parser builder into _build_base_parser
Apr 30, 2026
b9e7607
FEAT: Wire scenario custom parameters through pyrit_scan CLI
Apr 30, 2026
d3847f5
DOCS: Tighten docstrings and inline comments in scenario-parameter fe…
Apr 30, 2026
a973da8
FEAT: Wire scenario custom parameters through pyrit_shell run command
Apr 30, 2026
d93c45c
FEAT: Add scenario block to ConfigurationLoader and merge with CLI
Apr 30, 2026
4c0540c
FEAT: Surface scenario-declared parameters in --list-scenarios
Apr 30, 2026
f6e1a2f
FEAT: Persist scenario params on ScenarioResult and validate on resume
Apr 30, 2026
375a383
FIX: Materialize Scenario param defaults lazily in initialize_async
May 1, 2026
a03a753
FEAT: Declare max_turns as a Parameter on the Scam scenario (POC)
May 1, 2026
45df9e9
DOCS: Add notebook walking through custom scenario parameters
May 1, 2026
3612ffc
FIX: Address final review findings on scenario custom parameters
May 1, 2026
785e7d2
TEST: Cover --help rendering and document programmatic surface
May 1, 2026
5ff56aa
Merge remote-tracking branch 'origin/main' into feature/scenario-cust…
May 1, 2026
9b7baa1
FIX: Address Copilot review feedback and CI failure on 3.10
May 1, 2026
869365f
FIX: Address Copilot review feedback
May 1, 2026
ab1f49a
Address review findings on scenario custom parameters
May 4, 2026
c81c9c1
Merge remote-tracking branch 'origin/main' into feature/scenario-cust…
May 4, 2026
2dce2e8
Address rlundeen2 review feedback on custom scenario parameters
May 4, 2026
f853754
Always materialize declared scenario params into self.params
May 5, 2026
08a9d9b
Merge branch 'main' into feature/scenario-custom-parameters
adrian-gavrila May 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .pyrit_conf_example
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@ initializers:
- default
- scorer

# Default Scenario
# ----------------
# Optional default scenario to run when invoking `pyrit_scan` without a
# positional scenario name. Also accepts custom parameters declared by the
# scenario via its `supported_parameters()` classmethod (see
# `pyrit_scan <scenario> --help` to discover them).
#
# - name: scenario registry name (e.g. `airt.scam`, `foundry.red_team_agent`)
# - args: per-scenario custom parameters; CLI flags override these per key
#
# Example:
# scenario:
# name: airt.scam
# args:
# max_turns: 10

# Operator and Operation Labels
# ------------------------------
# Default labels applied to all attacks created with PyRIT.
Expand Down
7 changes: 5 additions & 2 deletions doc/code/scenarios/0_scenarios.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"\n",
"Scenarios should take almost no effort to run with default values. The [PyRIT Scanner](../../scanner/0_scanner.md) provides two CLIs for running scenarios: [pyrit_scan](../../scanner/1_pyrit_scan.ipynb) for automated execution and [pyrit_shell](../../scanner/2_pyrit_shell.md) for interactive exploration.\n",
"\n",
"For programmatic configuration — customizing datasets, strategies, scorers, and baseline mode — see [Scenario Parameters](./1_scenario_parameters.ipynb).\n",
"For programmatic configuration — customizing datasets, strategies, scorers, and baseline mode — see [Common Scenario Parameters](./1_common_scenario_parameters.ipynb).\n",
"\n",
"## How It Works\n",
"\n",
Expand Down Expand Up @@ -393,7 +393,7 @@
"\n",
"To run *only* the baseline (no attack strategies), create a `RedTeamAgent` with\n",
"`include_baseline=True` (the default) and pass `scenario_strategies=None`. See\n",
"[Scenario Parameters](./1_scenario_parameters.ipynb) for a working example."
"[Common Scenario Parameters](./1_common_scenario_parameters.ipynb) for a working example."
]
},
{
Expand Down Expand Up @@ -423,6 +423,9 @@
}
],
"metadata": {
"jupytext": {
"main_language": "python"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
Expand Down
4 changes: 2 additions & 2 deletions doc/code/scenarios/0_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#
# Scenarios should take almost no effort to run with default values. The [PyRIT Scanner](../../scanner/0_scanner.md) provides two CLIs for running scenarios: [pyrit_scan](../../scanner/1_pyrit_scan.ipynb) for automated execution and [pyrit_shell](../../scanner/2_pyrit_shell.md) for interactive exploration.
#
# For programmatic configuration — customizing datasets, strategies, scorers, and baseline mode — see [Scenario Parameters](./1_scenario_parameters.ipynb).
# For programmatic configuration — customizing datasets, strategies, scorers, and baseline mode — see [Common Scenario Parameters](./1_common_scenario_parameters.ipynb).
#
# ## How It Works
#
Expand Down Expand Up @@ -178,7 +178,7 @@ def _build_display_group(self, *, technique_name: str, seed_group_name: str) ->
#
# To run *only* the baseline (no attack strategies), create a `RedTeamAgent` with
# `include_baseline=True` (the default) and pass `scenario_strategies=None`. See
# [Scenario Parameters](./1_scenario_parameters.ipynb) for a working example.
# [Common Scenario Parameters](./1_common_scenario_parameters.ipynb) for a working example.

# %% [markdown]
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "0",
"metadata": {},
"source": [
"# Scenario Parameters\n",
"# Common Scenario Parameters\n",
"\n",
"This guide covers the key parameters for configuring scenarios programmatically: datasets,\n",
"strategies, baseline execution, and custom scorers. All examples use `RedTeamAgent` but the\n",
Expand Down Expand Up @@ -455,6 +455,9 @@
}
],
"metadata": {
"jupytext": {
"main_language": "python"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# ---

# %% [markdown]
# # Scenario Parameters
# # Common Scenario Parameters
#
# This guide covers the key parameters for configuring scenarios programmatically: datasets,
# strategies, baseline execution, and custom scorers. All examples use `RedTeamAgent` but the
Expand Down
Loading
Loading