performing-gcp-security-assessment-with-forseti
Skill này làm gì
Công cụ này giúp kiểm tra bảo mật tài khoản Google Cloud của bạn. Nó phân tích các thiết lập như ai có quyền truy cập gì, quy tắc mạng và quyền lưu trữ, để đảm bảo mọi thứ an toàn và đáp ứng tiêu chuẩn bảo mật.
Khi nào nên dùng
- ✓Khi thực hiện kiểm tra bảo mật định kỳ cho tài khoản Google Cloud.
- ✓Khi thiết lập dự án mới trên Google Cloud và xây dựng các quy tắc bảo mật ban đầu.
- ✓Khi cần đảm bảo tuân thủ hướng dẫn CIS GCP Foundations Benchmark.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-gcp-security-assessment-with-forseti/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra bảo mật tài khoản Google Cloud của tôi và cho biết có thiết lập truy cập quá rộng hoặc quy tắc mạng nguy hiểm nào không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ dùng các lệnh Google Cloud cụ thể và các công cụ bảo mật khác để thu thập thông tin về cấu hình của bạn. Sau đó nó phân tích dữ liệu này để tìm các vấn đề bảo mật tiềm ẩn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Performing GCP Security Assessment with Forseti
When to Use
- When conducting periodic security assessments of GCP organizations and projects
- When onboarding new GCP projects and establishing security baselines
- When compliance mandates CIS GCP Foundations Benchmark evaluation
- When auditing IAM bindings, firewall rules, and storage ACLs across multiple GCP projects
- When building continuous security monitoring for GCP infrastructure
Do not use as a replacement for GCP Security Command Center Premium for real-time threat detection, for application-level vulnerability scanning (use Web Security Scanner), or for GKE-specific security (use GKE Security Posture).
Prerequisites
- GCP Organization with Organization Admin or Security Admin IAM role
- gcloud CLI authenticated with sufficient permissions (
roles/securitycenter.admin,roles/iam.securityReviewer) - Security Command Center (SCC) enabled at the organization level
- ScoutSuite installed for multi-cloud comparison (
pip install scoutsuite) - Python 3.8+ for custom audit scripts using google-cloud-asset and google-cloud-securitycenter libraries
Workflow
Step 1: Enable Security Command Center and Asset Inventory
Enable SCC and set up Cloud Asset Inventory for comprehensive resource visibility.
# Enable Security Command Center API
gcloud services enable securitycenter.googleapis.com \
--project=PROJECT_ID
# Enable Cloud Asset API
gcloud services enable cloudasset.googleapis.com \
--project=PROJECT_ID
# List all assets in the organization
gcloud asset search-all-resources \
--scope=organizations/ORG_ID \
--asset-types="compute.googleapis.com/Instance,storage.googleapis.com/Bucket,iam.googleapis.com/ServiceAccount" \
--format="table(name, assetType, location, project)"
# Export asset inventory to BigQuery for analysis
gcloud asset export \
--organization=ORG_ID \
--output-bigquery-force \
--output-bigquery-dataset=projects/PROJECT_ID/datasets/asset_inventory \
--output-bigquery-table=resources \
--content-type=resource
Step 2: Audit IAM Policies and Bindings
Review IAM policies across the organization for overly permissive bindings, primitive roles, and service account misuse.
# List all IAM policy bindings at org level
gcloud organizations get-iam-policy ORG_ID \
--format=json > org-iam-policy.json
# Find all users with Owner or Editor roles across projects
gcloud asset search-all-iam-policies \
--scope=organizations/ORG_ID \
--query="policy:roles/owner OR policy:roles/editor" \
--format="table(resource, policy.bindings.role, policy.bindings.members)"
# Identify service accounts with admin roles
gcloud asset search-all-iam-policies \
--scope=organizations/ORG_ID \
--query="policy.bindings.members:serviceAccount AND policy:roles/owner" \
--format=json
# Check for allUsers or allAuthenticatedUsers bindings (public access)
gcloud asset search-all-iam-policies \
--scope=organizations/ORG_ID \
--query="policy:allUsers OR policy:allAuthenticatedUsers" \
--format="table(resource, policy.bindings.role, policy.bindings.members)"
# List service account keys older than 90 days
gcloud iam service-accounts keys list \
--iam-account=SA_EMAIL \
--managed-by=user \
--format="table(name,validAfterTime,validBeforeTime)"
Step 3: Assess Firewall Rules and Network Configuration
Audit VPC firewall rules for overly permissive ingress rules, missing logging, and network exposure.
# List all firewall rules allowing ingress from 0.0.0.0/0
gcloud compute firewall-rules list \
--filter="direction=INGRESS AND sourceRanges=0.0.0.0/0" \
--format="table(name, network, allowed, sourceRanges, targetTags)"
# Find firewall rules allowing all protocols/ports
gcloud compute firewall-rules list \
--filter="direction=INGRESS AND allowed[].IPProtocol=all" \
--format="table(name, network, sourceRanges, targetTags)"
# Check for SSH (22) and RDP (3389) open to internet
gcloud compute firewall-rules list \
--filter="direction=INGRESS AND sourceRanges=0.0.0.0/0 AND (allowed[].ports=22 OR allowed[].ports=3389)" \
--format="table(name, network, allowed, sourceRanges)"
# Audit VPC flow log configuration
gcloud compute networks subnets list \
--format="table(name, region, enableFlowLogs, logConfig.aggregationInterval)"
Step 4: Audit Cloud Storage Bucket Permissions
Check for publicly accessible storage buckets and missing encryption configurations.
…
Câu hỏi thường gặp
Forseti Security là gì?
Forseti Security là công cụ mã nguồn mở giúp kiểm toán và giám sát bảo mật trong môi trường Google Cloud.
Security Command Center (SCC) là gì?
SCC là dịch vụ của Google Cloud giúp quản lý bảo mật và tuân thủ cho tất cả tài nguyên Google Cloud của bạn.
CIS GCP Foundations Benchmark là gì?
Đây là bộ khuyến nghị bảo mật để cấu hình môi trường Google Cloud an toàn, do Center for Internet Security (CIS) xây dựng.
Chi tiết
Mô tả gốc của tác giả
Performing comprehensive security assessments of Google Cloud Platform environments using Forseti Security, Security Command Center, and gcloud CLI to audit IAM policies, firewall rules, storage permissions, and compliance against CIS GCP Foundations Benchmark. '
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #8235
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.