GCP Security Scanner Skill
Purpose
Automated Google Cloud Platform security configuration scanning and hardening to identify misconfigurations, compliance violations, and security risks across GCP projects and organizations.
Capabilities
Security Command Center Integration
- Leverage GCP Security Command Center findings
- Review vulnerability and threat findings
- Check Security Health Analytics results
- Monitor Event Threat Detection alerts
- Track Container Threat Detection findings
- Generate compliance reports
IAM Security Analysis
- Analyze IAM policies for over-permissive access
- Check service account key usage and rotation
- Identify excessive permissions
- Review organization policy constraints
- Detect cross-project access
- Audit IAM recommender suggestions
VPC Firewall Analysis
- Review firewall rules for overly permissive access
- Check for open management ports
- Validate VPC Service Controls
- Review Shared VPC configurations
- Check Private Google Access settings
- Analyze VPC flow logs configuration
Cloud Storage Security
- Identify publicly accessible buckets
- Check bucket IAM policies
- Validate uniform bucket-level access
- Review bucket encryption settings
- Check access logging configuration
- Verify retention policies
Cloud KMS Configuration
- Review key ring and key configurations
- Check key rotation policies
- Validate IAM policies on keys
- Review HSM key protection levels
- Check external key manager usage
- Audit key access patterns
Audit Logging Verification
- Validate Cloud Audit Logs configuration
- Check data access logging
- Review admin activity logging
- Verify log export configuration
- Check Cloud Logging retention
- Validate alert policies
Organization Policy Assessment
- Review organization policy constraints
- Check service restriction policies
- Validate resource location constraints
- Review VM external IP restrictions
- Check service account creation policies
GCP Services Covered
| Category |
Services |
| Identity |
IAM, Cloud Identity, Workforce Identity |
| Compute |
Compute Engine, GKE, Cloud Run, Functions |
| Storage |
Cloud Storage, Persistent Disks |
| Database |
Cloud SQL, Spanner, BigQuery, Firestore |
| Network |
VPC, Firewall, Cloud Armor, Cloud CDN |
| Security |
Security Command Center, Cloud KMS, BeyondCorp |
| Monitoring |
Cloud Logging, Cloud Monitoring, Cloud Audit Logs |
Integrations
- Security Command Center: GCP native CSPM
- Forseti Security: Open-source GCP security toolkit
- ScoutSuite: Multi-cloud security auditing
- Cloud Asset Inventory: Resource visibility
- IAM Recommender: Permission optimization
Target Processes
- Cloud Security Architecture Review
- Compliance Monitoring
- GCP Project Hardening
- Security Posture Assessment
Input Schema
{
"type": "object",
"properties": {
"scanType": {
"type": "string",
"enum": ["full", "cis", "pci", "hipaa", "iso27001", "custom"],
"description": "Type of security scan"
},
"projects": {
"type": "array",
"items": { "type": "string" },
"description": "GCP project IDs to scan"
},
"organization": {
"type": "string",
"description": "GCP organization ID for org-wide scanning"
},
"services": {
"type": "array",
"items": { "type": "string" },
"description": "Specific services to scan"
},
"severityThreshold": {
"type": "string",
"enum": ["critical", "high", "medium", "low"]
},
"complianceFrameworks": {
"type": "array",
"items": {
"type": "string",
"enum": ["CIS", "PCI-DSS", "HIPAA", "ISO27001", "SOC2", "NIST"]
}
},
"includeSCC": {
"type": "boolean",
"description": "Include Security Command Center findings"
}
},
"required": ["scanType"]
}
Output Schema
{
"type": "object",
"properties": {
"scanId": {
"type": "string"
},
"scanTimestamp": {
"type": "string",
"format": "date-time"
},
"projectsScanned": {
"type": "array"
},
"organizationId": {
"type": "string"
},
"summary": {
"type": "object",
"properties": {
"totalChecks": { "type": "integer" },
"passed": { "type": "integer" },
"failed": { "type": "integer" },
"warnings": { "type": "integer" }
}
},
"findingsBySeverity": {
"type": "object",
"properties": {
"critical": { "type": "integer" },
"high": { "type": "integer" },
"medium": { "type": "integer" },
"low": { "type": "integer" }
}
},
"findings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"checkId": { "type": "string" },
"severity": { "type": "string" },
"service": { "type": "string" },
"project": { "type": "string" },
"resourceName": { "type": "string" },
"description": { "type": "string" },
"remediation": { "type": "string" },
"complianceMapping": { "type": "array" }
}
}
},
"sccFindings": {
"type": "array"
},
"organizationPolicyStatus": {
"type": "object"
},
"recommendations": {
"type": "array",
"items": { "type": "string" }
}
}
}
Usage Example
skill: {
name: 'gcp-security-scanner',
context: {
scanType: 'cis',
projects: ['my-project-id'],
complianceFrameworks: ['CIS', 'SOC2'],
includeSCC: true,
severityThreshold: 'medium'
}
}
1---
2name: gcp-security-scanner
3description: GCP security configuration scanning and hardening using Security Command Center, Forseti, and ScoutSuite
4allowed-tools:
5 - Bash
6 - Read
7 - Write
8 - Glob
9 - Grep
10 - WebFetch
11metadata:
12 source: https://skillmd.com/skills/aibot88/gcp-security-scanner
13---
14
15# GCP Security Scanner Skill
16
17## Purpose
18
19Automated Google Cloud Platform security configuration scanning and hardening to identify misconfigurations, compliance violations, and security risks across GCP projects and organizations.
20
21## Capabilities
22
23### Security Command Center Integration
24- Leverage GCP Security Command Center findings
25- Review vulnerability and threat findings
26- Check Security Health Analytics results
27- Monitor Event Threat Detection alerts
28- Track Container Threat Detection findings
29- Generate compliance reports
30
31### IAM Security Analysis
32- Analyze IAM policies for over-permissive access
33- Check service account key usage and rotation
34- Identify excessive permissions
35- Review organization policy constraints
36- Detect cross-project access
37- Audit IAM recommender suggestions
38
39### VPC Firewall Analysis
40- Review firewall rules for overly permissive access
41- Check for open management ports
42- Validate VPC Service Controls
43- Review Shared VPC configurations
44- Check Private Google Access settings
45- Analyze VPC flow logs configuration
46
47### Cloud Storage Security
48- Identify publicly accessible buckets
49- Check bucket IAM policies
50- Validate uniform bucket-level access
51- Review bucket encryption settings
52- Check access logging configuration
53- Verify retention policies
54
55### Cloud KMS Configuration
56- Review key ring and key configurations
57- Check key rotation policies
58- Validate IAM policies on keys
59- Review HSM key protection levels
60- Check external key manager usage
61- Audit key access patterns
62
63### Audit Logging Verification
64- Validate Cloud Audit Logs configuration
65- Check data access logging
66- Review admin activity logging
67- Verify log export configuration
68- Check Cloud Logging retention
69- Validate alert policies
70
71### Organization Policy Assessment
72- Review organization policy constraints
73- Check service restriction policies
74- Validate resource location constraints
75- Review VM external IP restrictions
76- Check service account creation policies
77
78## GCP Services Covered
79
80| Category | Services |
81|----------|----------|
82| Identity | IAM, Cloud Identity, Workforce Identity |
83| Compute | Compute Engine, GKE, Cloud Run, Functions |
84| Storage | Cloud Storage, Persistent Disks |
85| Database | Cloud SQL, Spanner, BigQuery, Firestore |
86| Network | VPC, Firewall, Cloud Armor, Cloud CDN |
87| Security | Security Command Center, Cloud KMS, BeyondCorp |
88| Monitoring | Cloud Logging, Cloud Monitoring, Cloud Audit Logs |
89
90## Integrations
91
92- **Security Command Center**: GCP native CSPM
93- **Forseti Security**: Open-source GCP security toolkit
94- **ScoutSuite**: Multi-cloud security auditing
95- **Cloud Asset Inventory**: Resource visibility
96- **IAM Recommender**: Permission optimization
97
98## Target Processes
99
100- Cloud Security Architecture Review
101- Compliance Monitoring
102- GCP Project Hardening
103- Security Posture Assessment
104
105## Input Schema
106
107```json
108{
109 "type": "object",
110 "properties": {
111 "scanType": {
112 "type": "string",
113 "enum": ["full", "cis", "pci", "hipaa", "iso27001", "custom"],
114 "description": "Type of security scan"
115 },
116 "projects": {
117 "type": "array",
118 "items": { "type": "string" },
119 "description": "GCP project IDs to scan"
120 },
121 "organization": {
122 "type": "string",
123 "description": "GCP organization ID for org-wide scanning"
124 },
125 "services": {
126 "type": "array",
127 "items": { "type": "string" },
128 "description": "Specific services to scan"
129 },
130 "severityThreshold": {
131 "type": "string",
132 "enum": ["critical", "high", "medium", "low"]
133 },
134 "complianceFrameworks": {
135 "type": "array",
136 "items": {
137 "type": "string",
138 "enum": ["CIS", "PCI-DSS", "HIPAA", "ISO27001", "SOC2", "NIST"]
139 }
140 },
141 "includeSCC": {
142 "type": "boolean",
143 "description": "Include Security Command Center findings"
144 }
145 },
146 "required": ["scanType"]
147}
148```
149
150## Output Schema
151
152```json
153{
154 "type": "object",
155 "properties": {
156 "scanId": {
157 "type": "string"
158 },
159 "scanTimestamp": {
160 "type": "string",
161 "format": "date-time"
162 },
163 "projectsScanned": {
164 "type": "array"
165 },
166 "organizationId": {
167 "type": "string"
168 },
169 "summary": {
170 "type": "object",
171 "properties": {
172 "totalChecks": { "type": "integer" },
173 "passed": { "type": "integer" },
174 "failed": { "type": "integer" },
175 "warnings": { "type": "integer" }
176 }
177 },
178 "findingsBySeverity": {
179 "type": "object",
180 "properties": {
181 "critical": { "type": "integer" },
182 "high": { "type": "integer" },
183 "medium": { "type": "integer" },
184 "low": { "type": "integer" }
185 }
186 },
187 "findings": {
188 "type": "array",
189 "items": {
190 "type": "object",
191 "properties": {
192 "checkId": { "type": "string" },
193 "severity": { "type": "string" },
194 "service": { "type": "string" },
195 "project": { "type": "string" },
196 "resourceName": { "type": "string" },
197 "description": { "type": "string" },
198 "remediation": { "type": "string" },
199 "complianceMapping": { "type": "array" }
200 }
201 }
202 },
203 "sccFindings": {
204 "type": "array"
205 },
206 "organizationPolicyStatus": {
207 "type": "object"
208 },
209 "recommendations": {
210 "type": "array",
211 "items": { "type": "string" }
212 }
213 }
214}
215```
216
217## Usage Example
218
219```javascript
220skill: {
221 name: 'gcp-security-scanner',
222 context: {
223 scanType: 'cis',
224 projects: ['my-project-id'],
225 complianceFrameworks: ['CIS', 'SOC2'],
226 includeSCC: true,
227 severityThreshold: 'medium'
228 }
229}
230```