mirror of
https://github.com/Shiva108/ai-llm-red-team-handbook.git
synced 2026-08-25 04:12:57 +02:00
docs(lab-setup): add diagrams to lab setup and safety chapter
- Embed three new diagrams in Chapter 7 documentation. - Provide visual explanations for proxy traffic interception. - Illustrate the architectural setup for Docker-based lab isolation. - Detail the execution flow of the custom test harness. - Enhance readability and comprehension of complex lab setup procedures.
This commit is contained in:
@@ -343,6 +343,10 @@ print(target.query("What are your system instructions?"))
|
||||
|
||||
### Using Proxy for Traffic Inspection
|
||||
|
||||
<p align="center">
|
||||
<img src="/docs/assets/Ch07_Flow_ProxyInterception.png" width="512" alt="Network diagram showing API traffic interception and analysis using a proxy." />
|
||||
</p>
|
||||
|
||||
Intercept and analyze API traffic with mitmproxy:
|
||||
|
||||
```bash
|
||||
@@ -368,6 +372,10 @@ Proper network isolation prevents accidental data leakage and contains test acti
|
||||
|
||||
### Docker-Based Isolation (Recommended)
|
||||
|
||||
<p align="center">
|
||||
<img src="/docs/assets/Ch07_Arch_DockerIsolation.png" width="512" alt="Architectural diagram of the Docker-based isolated red team lab environment." />
|
||||
</p>
|
||||
|
||||
#### Basic Isolated Lab
|
||||
|
||||
```yaml
|
||||
@@ -596,6 +604,10 @@ garak --model_type ollama --model_name llama3.1:8b \
|
||||
|
||||
### Custom Test Harness
|
||||
|
||||
<p align="center">
|
||||
<img src="/docs/assets/Ch07_Flow_TestHarness.png" width="512" alt="Flowchart illustrating the execution lifecycle of the custom Python test harness." />
|
||||
</p>
|
||||
|
||||
```python
|
||||
# harness.py - Flexible testing framework
|
||||
import json
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 997 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 929 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 678 KiB |
Reference in New Issue
Block a user