Token导航 LogoToken导航TokenDH.com
研究检索external-serviceclawhub未标认证来源可访问clear审计通过

gcp-networking-auditGCP 网络审核

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

6,309

周安装

271

GitHub Stars

公开资料未说明

下载量

2,211
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gcp-networking-audit(GCP 网络审核)
来源仓库:https://github.com/vahagn-madatyan/gcp-networking-audit
安装命令:
openclaw skills install gcp-networking-audit
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install gcp-networking-audit

简介

gcp-networking-audit 对 VPC 网络架构进行全面审计,包括防火墙策略与互连分析。

  • 适合多云或混合云环境下的网络安全合规检查。
  • 通过 clawhub 安装,需指定目标项目与网络范围。
  • 审计结果应结合业务需求评估风险等级。gcp-networking-audit 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 敏感配置变更前建议导出基线用于对比验证。

SKILL.md

name
gcp-networking-audit
description
>-
license
Apache-2.0
metadata
safety
read-only
author
network-security-skills-suite
version
1.0.0
openclaw
{"emoji":"☁️","safetyTier":"read-only","requires":{"bins":["gcloud"],"env":[]},"tags":["gcp","vpc","cloud"],"mcpDependencies":[],"egressEndpoints":["compute.googleapis.com:443"]}

GCP VPC Network Security Audit

Cloud resource audit for Google Cloud Platform VPC Network architecture, firewall posture, and connectivity. This skill evaluates provider-specific GCP networking constructs — global VPC Network design, firewall rule priority evaluation, hierarchical firewall policies, Cloud NAT egress control, Cloud Interconnect VLAN attachments, Shared VPC host/service project topology, and Cloud Router BGP sessions — not generic cloud networking advice.

Scope: auto-mode versus custom-mode VPC Networks, subnet IP ranges, firewall rules with target tags and service accounts, Cloud NAT port allocation, Cloud Interconnect and Cloud VPN connectivity, Shared VPC cross-project networking, Cloud Router dynamic routing. Out of scope: Cloud CDN, Cloud Armor WAF, load balancer URL maps, Cloud DNS. Reference references/cli-reference.md for read-only gcloud commands and references/vpc-architecture.md for the GCP global VPC model and firewall rule evaluation order.

When to Use

  • VPC Network architecture review — evaluating auto-mode versus custom-mode selection, subnet IP ranges, and Private Google Access configuration
  • Post-migration audit — verifying firewall rules, Cloud NAT egress, and Cloud Router routes after workload migration
  • Security assessment — identifying permissive firewall rules using target tags, missing hierarchical firewall policies, or disabled VPC Flow Logs
  • Connectivity troubleshooting — diagnosing Cloud Interconnect VLAN attachment failures, Cloud VPN tunnel errors, or Shared VPC permission issues
  • Compliance preparation — documenting VPC Network segmentation, firewall rule justification, and VPC Flow Log retention
  • Cost optimization — identifying unused external IPs, over-provisioned Cloud NAT gateways, and idle Cloud Interconnect attachments

Prerequisites

  • gcloud CLI authenticated (gcloud auth list shows active account)
  • IAM permissions — Viewer role on target project, or granular read: compute.networks.get, compute.firewalls.list, compute.routers.get, compute.interconnects.get, compute.subnetworks.list, compute.addresses.list. Shared VPC: Viewer on host and service projects. Hierarchical firewall policies: compute.firewallPolicies.get at org/folder level
  • Target scope — project ID, organization ID (for hierarchical firewall policies), Shared VPC host project if applicable
  • VPC Flow Logs — Step 1 checks subnet-level enablement. If no subnets have VPC Flow Logs, document as Critical

Procedure

Follow these six steps sequentially. Each builds on prior findings, moving from inventory through security analysis to optimization.

Step 1: VPC Network Inventory and Design Assessment

Enumerate all VPC Networks in the target project and assess design.

gcloud compute networks list --project <project-id>
gcloud compute networks describe <network-name> --project <project-id>
gcloud compute networks subnets list --network <network-name>

For each VPC Network, evaluate:

  • Auto-mode vs custom-mode: Auto-mode VPC Networks create one subnet per region with predetermined /20 ranges from 10.128.0.0/9. Custom-mode requires explicit subnet creation. Production environments should use custom-mode. Auto-mode in production is a High finding.
  • Global scope: GCP VPC Networks are global — subnets are regional but the network spans all regions. Unlike AWS/Azure, a single VPC Network hosts subnets in every region without peering. Verify subnet distribution matches workload regions.
  • Subnet IP ranges: Primary ranges for VMs, secondary ranges for GKE Pod and Service CIDRs (alias IP ranges). Check for overlapping ranges and sufficient growth space.
  • Private Google Access: Enables VMs without external IPs to reach Google APIs. Disabled Private Google Access on internal-only subnets is a Medium finding.
  • VPC Flow Logs: Per-subnet enablement in GCP (not VPC-level like AWS). Subnets without VPC Flow Logs lack traffic visibility — flag as High for production.

Step 2: Firewall Rule Audit

Audit VPC Network firewall rules using GCP's priority-based evaluation and hierarchical firewall policies.

gcloud compute firewall-rules list --filter="network:<network-name>"
gcloud compute firewall-rules describe <rule-name>
  • Implied rules: Every VPC Network has implied deny-all-ingress and allow-all-egress at priority 65535. Not visible in gcloud compute firewall-rules list but active. Custom rules at 0–65534 override them.
  • Priority conflicts: An allow at priority 1000 overrides a deny at 2000. Verify deny rules have lower priority numbers than conflicting allows.
  • Target tags vs service accounts: Target tags are mutable labels — any project editor can change VM tags to bypass firewall rules. Service account targets are IAM-controlled and more secure. Flag tag-based rules on sensitive workloads as Medium.
  • Source ranges: Rules permitting ingress from 0.0.0.0/0. SSH/RDP from 0.0.0.0/0 is Critical. Verify broad ranges are justified.
  • Disabled rules: GCP firewall rules can be disabled without deletion. A disabled deny rule leaves a security gap.
  • Default network rules: The default VPC Network includes pre-created rules allowing ICMP, SSH, RDP, and internal traffic. Audit these permissive rules.

Hierarchical firewall policies:

gcloud compute firewall-policies list --organization <org-id>
gcloud compute firewall-policies describe <policy-name>
gcloud compute firewall-policies rules list --firewall-policy <policy-name>

Hierarchical firewall policies apply at organization or folder level and evaluate before VPC Network firewall rules. A deny in a hierarchical policy blocks traffic regardless of VPC-level allows. A goto_next action delegates to VPC-level rules. Verify hierarchical policies enforce org-wide baselines (e.g., block SSH from internet).

Step 3: Cloud NAT and Egress Analysis

Audit Cloud NAT gateways for egress capacity, port allocation, and logging.

gcloud compute routers nats list --router <router-name> --region <region>
gcloud compute routers nats describe <nat-name> --router <router-name> --region <region>

Cloud NAT provides outbound internet access for VMs without external IPs, configured on a Cloud Router.

  • IP allocation method: Automatic (GCP assigns IPs) or manual (reserved IPs). Manual provides predictable egress IPs for third-party allowlisting.
  • Port allocation: Default 64 minimum ports per VM. Port exhaustion drops connections. Check minPortsPerVm/maxPortsPerVm. High-connection workloads need increased allocations. Enable Dynamic Port Allocation for bursty workloads.
  • Endpoint-Independent Mapping: When enabled, Cloud NAT uses consistent IP:port mappings, improving protocol compatibility. Disabled by default.
  • Cloud NAT logging: Verify logConfig.enable. Options: ERRORS_ONLY, TRANSLATIONS_AND_ERRORS (recommended), ALL. Missing NAT logging reduces egress visibility.
  • Subnet coverage: Cloud NAT applies to all subnets or specific subnets. Verify production subnets are covered.

Step 4: Connectivity Analysis

Evaluate hybrid and cross-project connectivity via Cloud Interconnect, Cloud VPN, and Shared VPC.

Cloud Interconnect:

gcloud compute interconnects list
gcloud compute interconnects describe <interconnect-name>
gcloud compute interconnects attachments list --region <region>
gcloud compute interconnects attachments describe <attachment-name> --region <region>
  • VLAN attachment state: Verify state: ACTIVE and operationalStatus: OS_ACTIVE. UNPROVISIONED_ATTACHMENT means partner provisioning incomplete. OS_LACP_DOWN indicates link aggregation failure.
  • BGP session health: Each VLAN attachment peers with a Cloud Router via BGP. UP is healthy, DOWN indicates ASN mismatch, authentication failure, or network issue. Verify primary and redundant sessions.
  • MED values: Multi-Exit Discriminator influences route preference across multiple Cloud Interconnect attachments. Lower MED preferred. Verify values match active/standby design.
  • Redundancy: Production requires connections in two edge availability domains. Single-connection topology is a High finding.

Cloud VPN:

gcloud compute vpn-tunnels list
gcloud compute vpn-tunnels describe <tunnel-name> --region <region>
gcloud compute vpn-gateways list
  • Tunnel status: Should show status: ESTABLISHED. FIRST_HANDSHAKE indicates IKE negotiation in progress. NO_INCOMING_PACKETS suggests on-premises misconfiguration.
  • HA VPN: High Availability VPN provides two tunnels for 99.99% SLA. Use HA VPN for production (Classic VPN offers no redundancy SLA).

Shared VPC:

gcloud compute shared-vpc get-host-project <service-project-id>
gcloud compute shared-vpc list-associated-resources <host-project-id>
gcloud compute networks subnets get-iam-policy <subnet> --region <region> --project <host-project>
  • Host/service project model: Shared VPC lets a host project share VPC Network subnets with service projects. Verify host project designation and service project associations.
  • Subnet-level IAM: Shared VPC permissions granted per subnet via compute.networkUser role. Verify service accounts access only intended subnets.
  • Private Google Access inheritance: Service projects inherit settings from host project subnets. Verify enablement.

Step 5: Cloud Router and Routing Validation

Audit Cloud Router configuration for route advertisements, BGP settings, and dynamic routing mode.

gcloud compute routers list --project <project-id>
gcloud compute routers describe <router-name> --region <region>
gcloud compute routers get-status <router-name> --region <region>
  • Dynamic routing mode: regional or global. Regional: Cloud Routers advertise/learn routes only within their region. Global: routes propagate across all regions. Multi-region workloads accessing on-premises via single-region Cloud Interconnect require global mode.
  • Custom route advertisements: Default: advertise all subnets. Custom mode overrides — verify no subnets are accidentally excluded from advertisements.
  • Graceful restart: Preserves forwarding during Cloud Router updates. Enable for production routers.
  • AS path analysis: Review get-status learned routes and AS paths. Unexpected paths indicate route leaks or suboptimal selection.
  • Route priorities: Custom routes use priority 0–65535 (default 1000). Lower preferred. Verify priorities create intended active/standby or ECMP behavior.
  • Learned route limits: Cloud Router has per-region learned route limits. Approaching limits causes drops — check get-status for count versus limits.

Step 6: Report and Optimization

Compile findings and identify optimization opportunities.

gcloud compute addresses list --filter="status=RESERVED" --project <project-id>
gcloud compute instances list --filter="networkInterfaces[].accessConfigs[].natIP:*"
gcloud compute firewall-rules list --filter="disabled=true"
  • Unused static IPs: Reserved external IPs not associated with resources incur charges. Release unused addresses.
  • Disabled firewall rules: Create audit confusion. Delete or document justification.
  • Over-permissive tag-based rules: Firewall rules targeting broad tags on high-privilege workloads should migrate to service account targets.
  • IP address utilization: GCP reserves 4 addresses per subnet. Subnets with <10% available are exhaustion risks. Over-provisioned subnets waste space in Shared VPC.
  • Cloud NAT consolidation: Multiple gateways per region unnecessary unless subnets need different configs.

Compile the findings report using the Report Template section.

Threshold Tables

Firewall Rule Severity

FindingSeverityRationale
Firewall rule allows SSH (22) from 0.0.0.0/0CriticalShell access from internet
Firewall rule allows RDP (3389) from 0.0.0.0/0CriticalRemote desktop from internet
Firewall rule allows all ports from 0.0.0.0/0CriticalNo port restriction on ingress
Target tag on sensitive workload instead of service accountHighTags mutable by project editors
Hierarchical firewall policy missing at org levelHighNo organization-wide baseline
VPC Flow Logs disabled on production subnetHighNo traffic visibility
Firewall rule with priority 0HighAudit for broad scope
Disabled firewall rule undocumentedMediumAudit confusion risk
Auto-mode VPC Network in productionMediumUncontrolled IP allocation
Firewall rule with >20 source rangesMediumExcessive complexity

Cloud Interconnect Health

MetricSeverityAction
VLAN attachment state not ACTIVECriticalNo traffic flow — engage provider
BGP session DOWNHighCheck ASN, authentication, link
Single edge availability domainHighNo redundancy — add second
Learned route count >80% limitMediumApproaching route capacity

Cloud NAT Port Utilization

Available Ports (%)SeverityAction
<10%CriticalConnection drops — increase allocation
10–25%HighEnable Dynamic Port Allocation
25–50%MediumMonitor trend
>50%LowHealthy

Decision Trees

Is This Firewall Rule Overly Permissive?

Firewall rule under review
├── Source range is 0.0.0.0/0?
│   ├── Yes
│   │   ├── Port = 22 (SSH) or 3389 (RDP)?
│   │   │   ├── Yes → CRITICAL: Use IAP tunnel instead
│   │   │   └── No
│   │   │       ├── Port = 443 on load balancer backend?
│   │   │       │   ├── Yes → Acceptable for public services
│   │   │       │   └── No → HIGH: Review necessity
│   │   │       └── All ports (all protocols)?
│   │   │           └── CRITICAL: Unrestricted ingress
│   │   └── Is rule disabled?
│   │       ├── Yes → LOW: Verify it should remain disabled
│   │       └── No → Classify severity by port scope
│   └── No (specific CIDR or service account source)
│       ├── Target uses service account? → Stronger binding
│       └── Target uses network tag?
│           ├── Tag on sensitive workload? → MEDIUM: Migrate to service account
│           └── Tag on dev/test? → LOW: Acceptable

Is This VPC Network Design Following GCP Best Practices?

VPC Network under review
├── Custom-mode?
│   ├── No (auto-mode) → MEDIUM for production
│   └── Yes
│       ├── Subnets in required regions? → Verify
│       ├── VPC Flow Logs on production subnets?
│       │   ├── No → HIGH: No traffic visibility
│       │   └── Yes → Check aggregation and sampling
│       └── Private Google Access?
│           ├── No → MEDIUM: Internal VMs cannot reach APIs
│           └── Yes → Good
├── Shared VPC?
│   ├── Yes → Audit host designation, subnet IAM, associations
│   └── No → OK for single-project
├── Hierarchical firewall policy?
│   ├── No → HIGH: No org-wide baseline
│   └── Yes → Audit goto_next vs deny
└── Dynamic routing mode?
    ├── Regional + multi-region → Switch to global
    └── Global → Verify cross-region propagation

Report Template

GCP VPC NETWORK AUDIT REPORT
================================
Project: [project-id] ([project-name])
Organization: [org-id or N/A]
VPC Network: [network-name]
Routing Mode: [regional/global]
Network Type: [auto-mode/custom-mode]
Audit Date: [timestamp]
Performed By: [operator/agent]

VPC NETWORK ARCHITECTURE:
Subnets: [total] across [n] regions
Type: [auto-mode/custom-mode]
Private Google Access: [enabled on n/total subnets]
VPC Flow Logs: [enabled on n/total subnets]

FIREWALL RULES:
Total: [n] | With 0.0.0.0/0 ingress: [n] | Disabled: [n]
Target type: tag-based:[n] service-account:[n] all-instances:[n]
Hierarchical policies: [n at org] [n at folder]

CLOUD NAT:
Gateways: [n] | Covered subnets: [n]
IP allocation: [automatic/manual] | Port min: [n]
NAT logging: [enabled/disabled]

CONNECTIVITY:
Cloud Interconnect: [n attachments] | BGP: [UP/DOWN]
Cloud VPN: [n tunnels] | Status: [ESTABLISHED/other]
Shared VPC: [host-project or N/A] | Service projects: [n]

CLOUD ROUTER:
Routers: [n] | Dynamic mode: [regional/global]
Custom advertisements: [yes/no]
Graceful restart: [enabled/disabled]
Learned routes: [n] / [limit]

OPTIMIZATION:
Unused static IPs: [n] | Disabled firewall rules: [n]
Tag-based rules on sensitive workloads: [n]
Cloud NAT port utilization: [assessment]

FINDINGS:
1. [Severity] [Category] — [Description]
   Resource: [resource-name] → Recommendation: [action]

RECOMMENDATIONS: [prioritized by severity]
NEXT AUDIT: [CRITICAL: 30d, HIGH: 90d, clean: 180d]

Troubleshooting

VPC Flow Logs Not Enabled on Subnets

VPC Flow Logs in GCP are subnet-level, not VPC-level. Each subnet must be individually enabled. Enabling is non-disruptive. Missing VPC Flow Logs on production subnets is a High finding.

Firewall Rule Not Applied to Expected VMs

Verify the target: if using a target tag, confirm the tag is on the VM (tags are case-sensitive). If using a service account target, verify the VM runs with that account. Firewall rules with no target apply to all VMs in the VPC Network.

Cloud Interconnect VLAN Attachment Not Active

Check state and operationalStatus. UNPROVISIONED_ATTACHMENT means partner provisioning incomplete. OS_LACP_DOWN indicates Layer 2 failure. Verify Cloud Router BGP session has correct ASN and IP pair.

Shared VPC Service Project Cannot Deploy to Subnet

Verify the deploying service account has compute.networkUser on the specific subnet in the host project. Subnet-level IAM is required even if the service project is associated with the host project.

Cloud Router BGP Session Flapping

Check Cloud Logging with resource.type="gce_router". Common causes: on-premises router exceeding learned route limit, authentication key mismatch, or MTU issues on the Cloud Interconnect link. Enable graceful restart to preserve forwarding during brief flaps.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

95.95%
按下载量换算2,121

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills