Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions capabilities/ai-red-teaming/scripts/attack_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4701,6 +4701,7 @@ def _build_atlas_imports() -> str:
"from pathlib import Path",
"",
"import dreadnode as dn",
"from dreadnode.generators.generator import get_generator, GenerateParams",
"from dreadnode.airt.atlas import atlas_attack",
"from dreadnode.airt.assessment import Assessment",
"from dreadnode.airt.analytics import analyze",
Expand Down
8 changes: 8 additions & 0 deletions capabilities/ai-red-teaming/tests/test_attack_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,14 @@ def test_generated_script_compiles_and_has_expected_pieces(self):
assert "await atlas_attack(" in script
assert 'SCENARIO_NAME = "finops"' in script
assert "TOTAL_BUDGET = 8" in script
# Regression: the proxy-routing block calls get_generator(...), so the
# generated script MUST import it (compile() only checks syntax, not
# name resolution, so a missing import is a runtime NameError).
assert "get_generator(" in script
assert (
"from dreadnode.generators.generator import get_generator, GenerateParams"
in script
)
# Default objective catalog is embedded with category coverage.
assert "OBJECTIVES = " in script
for cat in ("TW", "EA", "CB", "DE", "GH", "MP", "TB", "RP"):
Expand Down
Loading