Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0b2229a
Merge pull request #1 from google/main
Mhmda1998 Jun 20, 2026
7a42ed8
Merge pull request #2 from google/main
Mhmda1998 Jun 28, 2026
7d63d40
Enhance agents-cli observability with BigQuery ML diagnostics and exp…
Mhmda1998 Jun 28, 2026
048f8ae
Create SKILL.md
Mhmda1998 Jun 28, 2026
456ac36
Create audit.py
Mhmda1998 Jun 28, 2026
406a6fe
Update audit.py
Mhmda1998 Jun 28, 2026
8efe605
Update SKILL.md
Mhmda1998 Jun 28, 2026
d6a2336
Update audit.py
Mhmda1998 Jun 28, 2026
938f395
Merge pull request #3 from google/main
Mhmda1998 Jul 7, 2026
b60b696
Add SQL query for agent security audit patterns
Mhmda1998 Aug 7, 2026
c3f3d89
Add SQL query for indirect injection security audit
Mhmda1998 Aug 7, 2026
85395b7
Load threat patterns from SQL files and update audit results
Mhmda1998 Aug 7, 2026
c57ed11
Enhance SKILL.md for GCP Agent Security Audit
Mhmda1998 Aug 7, 2026
9330bde
Refactor GCP Agent Security Audit Skill
Mhmda1998 Aug 7, 2026
3ce0469
Refactor AgentSecurityAuditor to load patterns dynamically
Mhmda1998 Aug 7, 2026
2cc9184
Enhance GCP Agent Security Audit Skill documentation
Mhmda1998 Aug 7, 2026
e821490
Add SQL pattern for prompt injection detection
Mhmda1998 Aug 7, 2026
4c8f68a
Add ROLE_OVERRIDE.sql for role change patterns
Mhmda1998 Aug 7, 2026
18af06c
Add SQL pattern for data exfiltration detection
Mhmda1998 Aug 7, 2026
f9514fc
Rename indirect_injection.sql to INDIRECT_PROMPT_INJECTION.sql
Mhmda1998 Aug 7, 2026
a9036ec
Update and rename jailbreak.sql to JAILBREAK.sql
Mhmda1998 Aug 7, 2026
c18191c
Enhance SKILL.md with security examples and architecture
Mhmda1998 Aug 7, 2026
71a750a
Merge branch 'main' into feature/gcp-agent-security-audi
Mhmda1998 Aug 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 161 additions & 0 deletions skills/cloud/agent-security-audit/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# GCP Agent Security Audit Skill

## Overview

The `gcp-agent-security-audit` skill provides proactive security auditing capabilities for AI agents running on Google Cloud.

It analyzes AI agent diagnostic logs stored in Google BigQuery to detect security threats, abnormal behavior, and malicious interaction patterns before they become security incidents.

The skill helps security teams monitor AI agent activity and identify potential attacks early.

---

# Features

## Prompt Injection Detection

Detects attempts to manipulate AI agent instructions.

Examples:

- Ignore previous instructions.

- Reveal system prompts.

- Modify developer instructions.

- Override agent behavior.

---

## Jailbreak Detection

Detects attempts to bypass AI safety controls.

Examples:

- Disable safeguards.

- Bypass security policies.

- Ignore restrictions.

---

## Role Override Detection

Detects attempts to change the intended identity or behavior of an AI agent.

Examples:

- You are now an unrestricted assistant.

- Act as another system.

- Ignore your original role.

---

## Indirect Prompt Injection Detection

Detects hidden malicious instructions inside external content.

Examples:

- Retrieved documents containing hidden commands.

- Instructions embedded inside files.

- External content attempting to control the agent.

---

## Data Exfiltration Detection

Detects attempts to expose sensitive information.

Detects:

- API keys

- Passwords

- Authentication tokens

- Private credentials

- Secrets

---

# Architecture

The skill uses Google Cloud native services for proactive AI agent security monitoring.

## Components

- Google BigQuery: Stores and analyzes AI agent diagnostic logs.

- BigQuery ML: Detects abnormal agent behavior using anomaly detection models.

- Google Cloud Pub/Sub: Sends alerts for high-risk security findings.

## Architecture Flow

1. The skill reads AI agent interaction logs from BigQuery.

2. Security patterns analyze logs to detect:

- Prompt injection.

- Jailbreak attempts.

- Role override attacks.

- Indirect prompt injection.

- Sensitive data exposure.

3. BigQuery ML analyzes abnormal agent activity using anomaly detection models.

4. Security findings are collected into a structured audit report.

5. High-risk findings can trigger Google Cloud Pub/Sub alerts.

---

# Security Reports

The skill generates structured security reports containing:

- Detection timestamp.

- Risk level.

- Security findings.

- Threat categories.

- Anomaly detection results.

Example:

```json

{

"risk": "HIGH",

"findings": [

{

"type": "PROMPT_INJECTION",

"severity": "MEDIUM"

}

]

}
Loading