# python
7 articlestagged with “python”
Language-Specific Risks in AI-Generated Code
Language-specific security risks in AI-generated code: Python (pickle, eval, subprocess), JavaScript (prototype pollution, eval), Rust (unsafe blocks), and Go (SQL injection in string formatting).
Building Custom Red Team Tools
Guide to building custom AI red teaming tools, including target-specific harnesses, result analysis pipelines, and integration with existing security workflows.
Lab: Exploring Embedding Spaces
Hands-on lab using Python to visualize embedding spaces, measure semantic similarity, and demonstrate how adversarial documents can be crafted to match target queries.
Lab: Building a Simple Test Harness
Build a reusable Python test harness that automates sending test prompts, recording results, and calculating attack success metrics.
Lab: Poisoning a Training Dataset
Hands-on lab demonstrating dataset poisoning and fine-tuning to show behavioral change, with step-by-step Python code, backdoor trigger measurement, and troubleshooting guidance.
Tool Walkthroughs
End-to-end practical walkthroughs for essential AI red teaming tools, covering installation, configuration, execution, and result interpretation.
Python Red Team Automation
Building custom AI red team automation with Python: test harnesses with httpx and aiohttp, result collection and analysis, automated reporting, and integration with existing tools like promptfoo and garak.