Skip to content

Commit 785f7e5

Browse files
authored
fix: Switch notebook to OpenAI gpt-4o (#341)
* fix: Switch notebook to OpenAI gpt-4o and read keys from env vars * fix: Add organization param and fix VaultGuard transforms reference * fix: Remove hardcoded API keys from notebook and use placeholders * fix: Add trailing newline to notebook
1 parent 928a1ff commit 785f7e5

1 file changed

Lines changed: 13 additions & 24 deletions

File tree

examples/airt/agentic_red_teaming_attacks.ipynb

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,7 @@
44
"cell_type": "markdown",
55
"id": "0",
66
"metadata": {},
7-
"source": [
8-
"# Agentic AI Red Teaming\n",
9-
"\n",
10-
"Automated adversarial attacks against agentic AI challenges on\n",
11-
"[Dreadnode Crucible](https://platform.dreadnode.io) using the AIRT framework.\n",
12-
"\n",
13-
"| Challenge | Category | Difficulty |\n",
14-
"|-----------|----------|------------|\n",
15-
"| **toolshed** | DevOps Tool Misuse | Medium |\n",
16-
"| **webwhisper** | Indirect Prompt Injection | Medium |\n",
17-
"| **vaultguard** | Multi-Agent Defense Bypass | Hard |\n",
18-
"\n",
19-
"**Attacks**: TAP (beam search), GOAT (graph exploration), Crescendo (progressive escalation)\n",
20-
"\n",
21-
"```bash\n",
22-
"export CRUCIBLE_API_KEY=\"your-api-key\" # from https://platform.dreadnode.io/account\n",
23-
"export GROQ_API_KEY=\"your-groq-api-key\"\n",
24-
"```"
25-
]
7+
"source": "# Agentic AI Red Teaming\n\nAutomated adversarial attacks against agentic AI challenges on\n[Dreadnode Crucible](https://platform.dreadnode.io) using the AIRT framework.\n\n| Challenge | Category | Difficulty |\n|-----------|----------|------------|\n| **toolshed** | DevOps Tool Misuse | Medium |\n| **webwhisper** | Indirect Prompt Injection | Medium |\n| **vaultguard** | Multi-Agent Defense Bypass | Hard |\n\n**Attacks**: TAP (beam search), GOAT (graph exploration), Crescendo (progressive escalation)"
268
},
279
{
2810
"cell_type": "code",
@@ -51,9 +33,10 @@
5133
"metadata": {},
5234
"outputs": [],
5335
"source": [
54-
"CRUCIBLE_API_KEY = os.environ[\"CRUCIBLE_API_KEY\"] # https://platform.dreadnode.io/account\n",
36+
"CRUCIBLE_API_KEY = \"your-crucible-api-key\" # https://platform.dreadnode.io/account\n",
37+
"OPENAI_API_KEY = \"your-openai-api-key\"\n",
5538
"CRUCIBLE_URL = \"https://platform.dreadnode.io\"\n",
56-
"ATTACKER_MODEL = \"groq/meta-llama/llama-4-scout-17b-16e-instruct\"\n",
39+
"ATTACKER_MODEL = \"openai/gpt-4o\"\n",
5740
"EVALUATOR_MODEL = ATTACKER_MODEL\n",
5841
"\n",
5942
"TOOLSHED_URL = \"https://toolshed.platform.dreadnode.io\"\n",
@@ -63,7 +46,7 @@
6346
"MAX_TRIALS = 30\n",
6447
"VAULTGUARD_MAX_TRIALS = 50\n",
6548
"\n",
66-
"dn.configure(server=CRUCIBLE_URL, token=CRUCIBLE_API_KEY, organization=\"dreadnode\")\n"
49+
"dn.configure(server=CRUCIBLE_URL, token=CRUCIBLE_API_KEY, organization=\"dreadnode\")"
6750
]
6851
},
6952
{
@@ -339,7 +322,7 @@
339322
" frontier_size=10,\n",
340323
" branching_factor=5,\n",
341324
" on_topic_threshold=0.3,\n",
342-
" hooks=[apply_input_transforms(transforms_toolshed)],\n",
325+
" hooks=[apply_input_transforms(transforms_vaultguard)],\n",
343326
" )\n",
344327
" .with_(max_trials=VAULTGUARD_MAX_TRIALS)\n",
345328
" .add_objective(vaultguard_scorer, direction=\"maximize\", name=\"flag_capture\")\n",
@@ -437,11 +420,17 @@
437420
"\n",
438421
"4. **Content isolation between untrusted data and agent instructions** -- Treat all external content (web pages, user uploads, API responses) as untrusted. Process it in a sandboxed context where the agent cannot execute tool calls based on instructions found in the content.\n"
439422
]
423+
},
424+
{
425+
"cell_type": "markdown",
426+
"id": "5fa72367",
427+
"metadata": {},
428+
"source": []
440429
}
441430
],
442431
"metadata": {
443432
"kernelspec": {
444-
"display_name": "Python 3 (ipykernel)",
433+
"display_name": "dreadnode-py3.12",
445434
"language": "python",
446435
"name": "python3"
447436
},

0 commit comments

Comments
 (0)