Test and Validate a Custom Target Adapter
Focus
Focus
Prisma AIRS

Test and Validate a Custom Target Adapter

Table of Contents

Test and Validate a Custom Target Adapter

Use the AI Red Teaming adapter editor to iterate on your adapter script and validate it end-to-end before activating it for use by targets.
Where Can I Use This?What Do I Need?
  • Prisma AIRS (AI Red Teaming)
You author and validate an adapter code in the AI Red Teaming web interface before attaching it to any target. Validation runs end-to-end. It loads your code and round-trips a real test prompt through the Network Channel to your target, exactly as a scan would.
Start from the built-in template in the Adapter Code and fill in your variables and secrets.
  1. Navigate to AI Red TeamingCustom Adapters and select Create Adapter. The adapter editor opens with a built-in Python template.
  2. Define your Adapter name, execution logic, and adapter credentials.
    1. Enter your Adapter Name.
    2. Write or paste your adapter code in the editor. Implement the required functions following the patterns in Build a Custom Target Adapter.
    3. Configure your adapter variables.
      1. Add each key and value that your script reads using context.vars, and mark each as a Variable.
      2. Add each key and value that your script reads using context.secrets, and mark each as a Secret.
  3. Select a Network Channel for testing and Validate Adapter to run an end-to-end test.
    AI Red Teaming loads your script and sends a real test prompt through the Network Channel to your target. The result and your script's print() (log output) are displayed. A Validate run does not save your adapter script or settings.
    Use print() statements in your script while iterating. The output appears during Validate runs but not during scans. For deeper debugging during a scan, check the adapter sidecar container logs on your cluster.
  4. Edit the Adapter Code and Run Validate Adapter until the adapter produces the expected output.
  5. Select Save as Draft to save without validating if you need to step away mid-edit.
    A Network Channel is not required for a draft.
  6. Select Create Adapter to validate end-to-end and, on success, mark the adapter active and usable by targets.
    A Network Channel is required to activate an adapter.
  7. After adding an adapter successfully, you can add a target using the created adapter or view all your adapters.
  8. You can also edit an existing adapter settings.