Skip to content

Commit 03bb90f

Browse files
committed
Update extension configuration and prepare for release
1 parent d877c23 commit 03bb90f

File tree

20 files changed

+769
-0
lines changed

20 files changed

+769
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ env.bak/
138138
venv.bak/
139139
.gemini
140140
extensions/google-secops/skills/setup-antigravity/.env
141+
extensions/google-secops-staging/.env
141142

142143
# Spyder project settings
143144
.spyderproject
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PROJECT_ID=your-project-id-string
2+
CUSTOMER_ID=12345678-abcd-4321-8765-1234567890ab
3+
REGION=us
4+
SERVER_URL=https://chronicle.us.rep.googleapis.com/mcp
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PROJECT_ID=secops-demo-env
2+
CUSTOMER_ID=a13f6726-efed-452e-9008-8fe0d3cb0f75
3+
REGION=us
4+
SERVER_URL=https://chronicle.us.rep.googleapis.com/mcp
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PROJECT_ID=secops-ai-staging
2+
CUSTOMER_ID=eb3b937b-3ab6-47e5-8185-24837b826691
3+
REGION=us
4+
SERVER_URL=https://staging-chronicle.sandbox.googleapis.com/mcp
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Google SecOps Extension
2+
3+
This folder contains the **Google SecOps Extension**, providing specialized skills for security operations.
4+
5+
## Overview
6+
7+
The extension `extensions/google-secops-staging` packages setup and key security workflows into [skills](https://agentskills.io/specification).
8+
9+
These skills are **Adaptive**, designed to work seamlessly with:
10+
* [Google SecOps Remote MCP Server](https://google.github.io/mcp-security/docs/remote_server.html) (Preferred)
11+
* **Local Python Tools** (Fallback)
12+
13+
This allows the skills to function in diverse environments, automatically selecting the best available tool for the job.
14+
15+
The (`.agent`) symlink makes them available as [Antigravity Agent Skills](https://antigravity.google/docs/skills) at the workspace level. You could also install/copy/symlink the skills to `~/.gemini/antigravity/skills/` to make them available globally to all workspaces.
16+
17+
18+
## Prerequisites
19+
20+
1. **Install Gemini CLI (Preview)**:
21+
```bash
22+
npm install -g @google/gemini-cli@preview
23+
```
24+
25+
26+
2. **GUI Login Requirement**: You MUST have logged into the Google SecOps GUI at least once before using the API/MCP server.
27+
28+
3. **Enable Skills**: Ensure your `~/.gemini/settings.json` has `experimental.skills` enabled:
29+
```json
30+
{
31+
"security": {
32+
"auth": {
33+
"selectedType": "gemini-api-key"
34+
}
35+
},
36+
"general": {
37+
"previewFeatures": true
38+
},
39+
"experimental": {
40+
"skills": true,
41+
"extensionConfig": true
42+
}
43+
}
44+
```
45+
46+
Verify skills are enabled from the Gemini CLI prompt:
47+
```
48+
/skills list
49+
```
50+
51+
## Installation
52+
53+
To install this extension in your Gemini CLI environment:
54+
55+
1. **Navigate** to the project root.
56+
2. **Run**:
57+
```bash
58+
gemini extensions install ./extensions/google-secops
59+
```
60+
61+
You will be prompted for environment variables for the MCP configuration:
62+
63+
1. `PROJECT_ID` (GCP Project ID on your SecOps tenant's /settings/profile page)
64+
2. `CUSTOMER_ID` (Your Chronicle Customer UUID)
65+
3. `REGION` (Your Chronicle Region, e.g., `us`, `europe-west1`)
66+
4. `SERVER_URL` (e.g. https://chronicle.northamerica-northeast2.rep.googleapis.com/mcp, https://chronicle.us.rep.googleapis.com/mcp, etc.)
67+
68+
> **Note**: These values are persisted in `~/.gemini/extensions/google-secops/.env` and can be referenced by skills. Also, you can change the values in this file if needed.
69+
70+
When using the secops-hosted-mcp MCP Server, use these parameters from the `.env` file (located at `~/.gemini/extensions/google-secops/.env`) for EVERY request:
71+
Customer ID: ${CUSTOMER_ID}
72+
Region: ${REGION}
73+
Project ID: ${PROJECT_ID}
74+
75+
## Available Skills
76+
77+
78+
### 1. Setup Assistant (Antigravity) (`secops-setup-antigravity`)
79+
* **Trigger**: "Help me set up Antigravity", "Configure Antigravity for SecOps".
80+
* **Function**: checks for Google Cloud authentication and environment variables, then merges the correct `remote-secops-investigate` and `remote-secops-admin` configuration into your Antigravity settings (`~/.gemini/antigravity/mcp_config.json`).
81+
82+
### 2. Alert Triage (`secops-triage`)
83+
* **Trigger**: "Triage alert [ID]", "Analyze case [ID]".
84+
* **Function**: Orchestrates a Tier 1 triage workflow by following the `triage_alerts.md` runbook. It checks for duplicates, enriches entities, and provides a classification recommendation (FP/TP).
85+
86+
### 3. Investigation (`secops-investigate`)
87+
* **Trigger**: "Investigate case [ID]", "Deep dive on [Entity]".
88+
* **Function**: Guides deep-dive investigations using specialized runbooks (e.g., Lateral Movement, Malware).
89+
90+
### 4. Threat Hunting (`secops-hunt`)
91+
* **Trigger**: "Hunt for [Threat]", "Search for TTP [ID]".
92+
* **Function**: Assists in proactive threat hunting by generating hypotheses and constructing complex UDM queries for Chronicle.
93+
94+
### 5. Cases (`secops-cases`)
95+
* **Trigger**: "List cases", "Show recent cases", "/secops:cases".
96+
* **Function**: Lists recent SOAR cases to verify connectivity and view case status.
97+
98+
## Custom Commands
99+
100+
You can use the following slash commands as shortcuts for common tasks:
101+
102+
* `/secops:triage <ALERT_ID>`: Quickly start triaging an alert.
103+
* `/secops:investigate <CASE_ID>`: Start an investigation.
104+
* `/secops:hunt <THREAT>`: Start a threat hunt.
105+
* `/secops:cases`: List recent cases.
106+
107+
## How it Works
108+
109+
These skills act as **Driver Agents** that:
110+
1. **Read** the standardized Runbooks in `rules_bank/run_books/`.
111+
2. **Execute** the steps using the available MCP tools.
112+
3. **Standardize** the output according to SOC best practices.
113+
114+
### Tool Selection
115+
116+
The skills employ an **Adaptive Execution** strategy to ensure robustness:
117+
118+
1. **Check Environment**: The skill first identifies which tools are available in the current workspace.
119+
2. **Prioritize Remote**: If the **Remote MCP Server** is connected, the skill uses remote tools (e.g., `list_cases`, `udm_search`) for maximum capability.
120+
3. **Fallback to Local**: If remote tools are unavailable, the skill attempts to use **Local Python Tools**.
121+
> **Note**: Local tools are not included in this extension release. To use them, you must clone the [Google SecOps MCP Repository](https://github.com/google/mcp-security) and configure the local server separately.
122+
123+
For a detailed mapping of Remote vs. Local capabilities, see [`TOOL_MAPPING.md`](https://github.com/google/mcp-security/blob/main/extensions/google-secops/TOOL_MAPPING.md).
124+
125+
126+
## Cross-Compatibility
127+
128+
These skills are designed to be compatible with **Claude Code** and other AI agents. The `slash_command` and `personas` metadata in the YAML frontmatter allow other tools to index and trigger these skills effectively.
129+
130+
* `slash_command`: Defines the equivalent command pattern (e.g., `/security:triage`).
131+
* `personas`: detailed which security personas (e.g., `threat_hunter`) are best suited for the task.
132+
133+
134+
## Known Issues
135+
* If the `SERVER_URL` requires regionalization (i.e. LEP vs REP vs MREP), it can be very difficult for the user to know what value to use.
136+
137+
## References
138+
* [Agent Skills Specification](https://agentskills.io/specification)
139+
* [Gemini CLI Documentation](https://geminicli.com)
140+
* [Gemini CLI Preview Features](https://geminicli.com/docs/settings/general#previewfeatures)
141+
* [Antigravity Skills](https://antigravity.google/docs/skills)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Tool Mapping: Local vs. Remote
2+
3+
This document maps the tools defined in the local MCP server implementation (`server/secops` and `server/secops-soar`) to the tools available in the remote Google SecOps MCP server.
4+
5+
**Configuration & Selection Strategy:**
6+
When executing a skill, the agent should first check which tools are available in the current environment.
7+
1. **Prioritize Remote Tools**: If a remote tool is available, use it.
8+
2. **Fallback to Local Tools**: If the remote tool is unavailable, use the corresponding local tool.
9+
3. **Adapt Workflow**: Some operations (like Natural Language Search) require a multi-step workflow in Remote (Translate -> Search) but a single step in Local.
10+
11+
| Category | Capability | Remote Tool (MCP Server) | Local Tool (Python) | Notes |
12+
| :--- | :--- | :--- | :--- | :--- |
13+
| **Case Management** | List Cases | `list_cases` | `list_cases` | |
14+
| | Get Case Details | `get_case` | `get_case_full_details` | Local `get_case_full_details` aggregates alerts/comments. Remote `get_case` fetches the case object; use `expand='tasks,tags,products'` or call `list_case_alerts`/`list_case_comments` for full context. |
15+
| | Comment on Case | `create_case_comment` | `post_case_comment` | |
16+
| | Update Case | `update_case` | `change_case_priority` | Remote tool is general (priority, status, assignee). Local tool is specific to priority. |
17+
| | Close Case | `execute_bulk_close_case` | *(No local tool)* | Only remote tool can close cases. |
18+
| **Alerts (SOAR)** | List Alerts for Case | `list_case_alerts` | `list_alerts_by_case` | |
19+
| | List Events for Alert | `list_connector_events` | `list_events_by_alert` | Remote tool lists "connector events". |
20+
| | List Alert Groups | *(No direct equivalent)* | `list_alert_group_identifiers_by_case` | Remote `list_case_alerts` returns alert objects which may contain grouping info. |
21+
| **Entities (SOAR)** | Search Entities | `search_entity` | `search_entity` | |
22+
| | Get Involved Entities | `list_involved_entities` | `get_entities_by_alert_group_identifiers` | Remote tool lists involved entities for a specific case alert. |
23+
| | Get Entity Details | *(No direct equivalent)* | `get_entity_details` | |
24+
| **SIEM / UDM** | UDM Search (Query) | `udm_search` | `search_udm` | |
25+
| | UDM Search (Nat. Lang.) | `translate_udm_query` -> `udm_search` | `search_security_events` | **Critical:** Remote requires 2 steps (Translate then Search). Local does both in one call. |
26+
| | Entity Summary | `summarize_entity` | `lookup_entity` | Both provide a summary of entity activity in SIEM. |
27+
| | IoC Matching | `get_ioc_match` | `get_ioc_matches` | |
28+
| | Export Results | *(No direct equivalent)* | `export_udm_search_csv` | |
29+
| **Alerts (SIEM)** | List SIEM Alerts | `list_security_alerts` | `list_security_alerts` | Lists alerts directly from SIEM (not SOAR cases). |
30+
| | Get SIEM Alert | `get_security_alert` | `get_security_alert` | |
31+
| | Update SIEM Alert | `update_security_alert` | `update_security_alert` | |
32+
| **Rules** | List Rules | `list_rules` | `list_rules` | |
33+
| | Get Rule | `get_rule` | `get_rule` | |
34+
| | Create Rule | `create_rule` | `create_rule` | |
35+
| | Validate Rule | `validate_rule` | `validate_rule` | |
36+
| | Test/Run Rule | `list_rule_detections` | `list_rule_detections` | Use to see historical detections. |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
prompt = """Run the secops-cases skill."""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
prompt = """Run the secops-hunt skill for `{{args}}`."""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
prompt = """Run the secops-investigate skill on case `{{args}}`."""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
prompt = """Run the secops-triage skill on alert `{{args}}`."""

0 commit comments

Comments
 (0)