-
Notifications
You must be signed in to change notification settings - Fork 650
FEAT Support baseline-only execution in Scenario #1321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
hannahwestra25
merged 13 commits into
Azure:main
from
slister1001:feature/baseline-only-execution
Jan 28, 2026
Merged
FEAT Support baseline-only execution in Scenario #1321
hannahwestra25
merged 13 commits into
Azure:main
from
slister1001:feature/baseline-only-execution
Jan 28, 2026
+746
−194
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change allows scenarios to be initialized with an empty strategies list when include_baseline=True. Previously, empty strategies would raise a ValueError even when baseline was requested. Changes: - Add allow_empty parameter to prepare_scenario_strategies() in ScenarioStrategy. When True and an empty sequence is explicitly provided, returns an empty list instead of raising ValueError. - Update Scenario.initialize_async() to pass allow_empty=include_baseline so baseline-only execution is allowed when baseline is requested. - Add _create_standalone_baseline() method to Scenario that creates a baseline attack directly from dataset_config when no other atomic attacks exist to derive from. - Add unit tests for baseline-only execution scenarios. This enables use cases where users want to run only baseline attacks without any additional attack strategies, such as for establishing baseline metrics before applying attack techniques.
…nd consolidate methods
- Add return type annotation to _get_baseline_data() method - Apply ruff formatting to scenario files
rlundeen2
reviewed
Jan 23, 2026
rlundeen2
approved these changes
Jan 28, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR enables scenarios to be initialized with an empty strategies list when
include_baseline=True. Previously, empty strategies would raise aValueErroreven when baseline was requested.Problem
When using
RedTeamAgent(orFoundryScenario) withinclude_baseline=Trueandscenario_strategies=[], the scenario would fail with:This prevented users from running baseline-only attacks, which is useful for:
Changes
scenario_strategy.py: Addedallow_emptyparameter toprepare_scenario_strategies(). WhenTrueand an empty sequence is explicitly provided, returns an empty list instead of raisingValueError.Tests: Added unit tests covering baseline-only execution scenarios & updated tests to use dataset_config rather than objectives
Usage Example
Test Results
All tests passing