fix(ai-red-teaming): import get_generator in generated ATLAS script#100
Merged
Conversation
The ATLAS campaign template (`_build_atlas_imports`) omitted the `from dreadnode.generators.generator import get_generator, GenerateParams` import that the shared proxy-routing block relies on. Generated scripts raised `NameError: get_generator` at runtime (compile() only checks syntax, so it was not caught). Add the import and a static regression assertion.
rdheekonda
added a commit
that referenced
this pull request
Jul 16, 2026
…#101) Same missing-import bug as the ATLAS template (#100), in the separate `_build_agentic_imports`: generated agentic-attack scripts call get_generator (proxy-routing block) but never imported it, raising NameError at runtime. Add the import and a TestAgenticGeneration regression test (the agentic generator was previously untested).
rdheekonda
added a commit
that referenced
this pull request
Jul 21, 2026
…#104) * fix(ai-red-teaming): import get_generator in generated agentic script Same missing-import bug as the ATLAS template (#100), in the separate `_build_agentic_imports`: generated agentic-attack scripts call get_generator (proxy-routing block) but never imported it, raising NameError at runtime. Add the import and a TestAgenticGeneration regression test (the agentic generator was previously untested). * feat(airt): add model-extraction & membership-inference attack generators Adds generate_extraction_attack and generate_membership_attack to attack_runner. They build workflow scripts that construct a PredictionTargetSpec from a target's predict endpoint (or an environment challenge_url) and run the SDK's extraction (equation_solving/jacobian/copycat/knockoff) or membership (threshold/label_only) attacks under an Assessment, exporting airt spans to the platform. Verified: a generated knockoff-extraction workflow ran against a live fraud target (fidelity 0.93, 500 queries) and completed its assessment on the local platform. * feat(airt): expose extraction/membership attacks as agent tools Add generate_extraction_attack and generate_membership_attack @safe_tool wrappers so the AIRT agent (and TUI) can run the new traditional-ML privacy attacks, mirroring the existing generate_image_attack wrapper over the attack_runner generators. * feat(airt): add model-evasion attack generator and bump to 1.9.0 Wire the boundary (numeric L2/Linf decision search) and text (token-flip) evasion attacks into the workflow runner and expose generate_evasion_attack as an agent tool. Bump capability to 1.9.0 and note traditional black-box ML coverage (extraction, membership inference, evasion) in the description. * feat(airt): add deepwordbug evasion strategy to generator * feat(airt): expand traditional-ML attack roster to 1.10.0 Register the new named attacks in the generator dispatch maps: evasion (hopskipjump, simba, square, zoo, textfooler), extraction (activethief, distillation), and membership (lira, shadow_model, entropy, loss). * docs(airt): advertise new attack types in generator tool descriptions Update the attack_type parameter descriptions so the agent surfaces the new evasion (hopskipjump/simba/square/zoo/textfooler), extraction (activethief/ distillation), and membership (entropy/loss/shadow_model/lira) options.
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
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
Generated ATLAS campaign scripts crashed at runtime with
NameError: get_generator. The dedicated_build_atlas_imports()omitted thefrom dreadnode.generators.generator import get_generator, GenerateParamsimport that the shared_build_proxy_routing()block calls (TARGET_GENERATOR = get_generator(...), and_resolve_dn_modelfordn/*models).compile()only validates syntax, so the existing test didn't catch it.Root cause
_generate_atlas_singleassembles imports via_build_atlas_imports()(not the general_build_imports(), which already includes the import). The atlas variant was missing that one line.Fix
get_generator, GenerateParamsimport to_build_atlas_imports().TestAtlasGeneration(import + usage must both be present).Validation
pytest tests/test_attack_runner.py -k Atlas→ 10 passed.