Skip to content

fix(ai-red-teaming): import get_generator in generated ATLAS script#100

Merged
rdheekonda merged 1 commit into
mainfrom
fix/atlas-generated-script-imports
Jul 16, 2026
Merged

fix(ai-red-teaming): import get_generator in generated ATLAS script#100
rdheekonda merged 1 commit into
mainfrom
fix/atlas-generated-script-imports

Conversation

@rdheekonda

Copy link
Copy Markdown
Contributor

Summary

Generated ATLAS campaign scripts crashed at runtime with NameError: get_generator. The dedicated _build_atlas_imports() omitted the from dreadnode.generators.generator import get_generator, GenerateParams import that the shared _build_proxy_routing() block calls (TARGET_GENERATOR = get_generator(...), and _resolve_dn_model for dn/* models). compile() only validates syntax, so the existing test didn't catch it.

Root cause

_generate_atlas_single assembles imports via _build_atlas_imports() (not the general _build_imports(), which already includes the import). The atlas variant was missing that one line.

Fix

  • Add the get_generator, GenerateParams import to _build_atlas_imports().
  • Add a static regression assertion in TestAtlasGeneration (import + usage must both be present).

Validation

  • pytest tests/test_attack_runner.py -k Atlas → 10 passed.
  • Regenerated the ATLAS script and ran it end-to-end against a deployed AWS App Runner mesh env → SDK ATLAS campaign registered + completed an assessment on dev (no NameError); previously crashed before any attack.

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
rdheekonda merged commit 01ba665 into main Jul 16, 2026
5 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant