---
season: 3
season_name: "Season 3 — October 2026 (Autumn / Halloween Edition)"
day: 2
title: "Agent Security: Implementing SAIF Guardrails"
summary: "Secure agent workflows against rogue actions or data disclosure using SAIF threat modeling."
tags: ["Agent Security", "SAIF", "Guardrails"]
canonical_url: "https://adventofagents.com/2026/10/02"
markdown_url: "https://adventofagents.com/2026/10/02.md"
video_url: "https://www.youtube.com/embed/TA7lhezND7M"
primary_video:
  title: "Day 2: Why is Securing Agents Different? — 5-Minute Google Cloud Kata"
  creator_name: "Google Cloud Engineering"
  duration: "13:11"
  video_url: "https://www.youtube.com/embed/TA7lhezND7M"
---

# 🛡️ Day 2: Agent Security: Implementing SAIF Guardrails

> **Season 3 — October 2026 (Autumn / Halloween Edition)** · [Interactive Web View](https://adventofagents.com/2026/10/02?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s3_2026&utm_content=day02) · [Raw Markdown](https://adventofagents.com/2026/10/02.md?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s3_2026&utm_content=day02)

**Summary:** Secure agent workflows against rogue actions or data disclosure using SAIF threat modeling.

**Day 2 of Google's Advent of Agents — Season 3**

Presenters: Mika Devonshire & Anirudh Kannan

AI agents operating in enterprise environments require robust security controls to prevent rogue actions and sensitive data leakage. Implementing Google's Secure AI Framework (SAIF) ensures agents maintain strict operational boundaries while processing untrusted inputs.

**How It Works**

This threat modeling tutorial demonstrates how to scan agents for defense-in-depth using SAIF. The framework provides a structured approach to identify and mitigate risks associated with agentic workflows, including:

- **Input Sanitization**: Pre-filters malformed or malicious prompts before passing context to the model reasoning loop.
- **Rogue Actions**: Restricts tool execution and scope based on caller credentials and authenticated on-behalf-of user roles.
- **Sensitive Data Disclosure**: Scans generated responses for sensitive data patterns and redacts or masks data before returning output.

**Running the Live SAIF Demo:**

1. Download `launch_saif_demo.sh` (via the **Code** tab or `curl -sO https://adventofagents.com/s03/launch_saif_demo.sh`).
2. Inspect the script (`cat launch_saif_demo.sh`) to review the automated service probes and risk mappings.
3. Run `./launch_saif_demo.sh --project YOUR_PROJECT_ID --serve` to inspect your GCP project posture against the SAIF matrix, render the architecture risk map, and launch the interactive HTML report.

**Resources:**

- [Google Secure AI Framework (SAIF)](https://saif.google/)
- [SAIF Agent Risk Self Assessment](https://saif.google/agent-risk-self-assessment)
- [SAIF Risk Map & Data Repository](https://github.com/google/saif-data?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s3_2026&utm_content=day02)
- [SAIF Live Demo Script](https://adventofagents.com/s03/launch_saif_demo.sh?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s3_2026&utm_content=day02)
- [OWASP Top 10 for LLMs](https://owasp.org/projects/top-10-for-large-language-model-applications)

## Code & Commands

```bash
export CLOUDSDK_METRICS_ENVIRONMENT="advent-of-agents-s3-day02"

# 1. Download the SAIF Live Demo & Assessment Runner
curl -sO https://adventofagents.com/s03/launch_saif_demo.sh
chmod +x launch_saif_demo.sh

# 2. Inspect the script to review the automated checks & SAIF mapping
cat launch_saif_demo.sh

# 3. Authenticate with Google Cloud Application Default Credentials (ADC)
gcloud auth application-default login

# 4. Launch the interactive SAIF live assessment & HTML dashboard
# Automatically clones https://github.com/google/saif-data.git into ./saif-data
./launch_saif_demo.sh --project YOUR_PROJECT_ID --serve
```

```bash
# Alternatively, clone and explore the raw SAIF risk catalog & schemas directly:
git clone https://github.com/google/saif-data.git
cd saif-data

# Inspect the 15 core AI security risks and threat taxonomy
cat yaml/risks.yaml

# Explore mitigation controls mapped to model creators and consumers
cat yaml/controls.yaml

# Review the SAIF security self-assessment questionnaire
cat yaml/self-assessment.yaml
```

## Resources & Links

- **[Google Secure AI Framework (SAIF)](https://saif.google/)** — Learn about Google's framework for securing AI systems and agentic workflows.
- **[SAIF Agent Risk Self Assessment](https://saif.google/agent-risk-self-assessment)** — Interactive assessment tool to identify and evaluate AI security risks.
- **[SAIF Risk Map & Data Repository](https://github.com/google/saif-data?utm_source=adventofagents&utm_medium=markdown&utm_campaign=adventofagents_s3_2026&utm_content=day02)** — GitHub repository for the Google Secure AI Framework (SAIF) schemas and YAML data.
- **[OWASP Top 10 for LLMs](https://owasp.org/projects/top-10-for-large-language-model-applications)** — A list of the top 10 security risks for AI systems.
