Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

auditing-cloud-cluster-security云集群安全审计

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

384

周安装

16

GitHub Stars

9

下载量

128
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:auditing-cloud-cluster-security(云集群安全审计)
来源仓库:https://github.com/cockroachlabs/cockroachdb-skills
仓库路径:skills/auditing-cloud-cluster-security
安装命令:
npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill auditing-cloud-cluster-security
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill auditing-cloud-cluster-security

简介

用于评估 CockroachDB Cloud 集群的安全态势,涵盖网络访问、身份认证、权限分配等维度。

  • 支持生成结构化审计报告,识别配置风险并关联官方修复文档链接。
  • 适用于合规准备或安全加固场景,提供 PASS/WARN/FAIL 分级结论。
  • 仅执行只读检查,不影响集群运行状态,但需确保具备相应只读权限。
  • auditing-cloud-cluster-security 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Auditing Cloud Cluster Security

Assesses the security posture of a CockroachDB Cloud cluster by examining network access controls, authentication and SSO configuration, user authorization, encryption, audit logging, and backup status. Produces a structured PASS/WARN/FAIL report with remediation links for each finding. Supports both CockroachDB Cloud and self-hosted clusters — checks that don't apply to the deployment model are marked N/A.

Read-only audit: All operations are read-only. No cluster state is modified during the assessment.

When to Use This Skill

  • Preparing for SOC 2, HIPAA, or other compliance reviews
  • Conducting periodic security posture assessments
  • Onboarding a new production cluster and validating security baseline
  • Investigating security configuration gaps after an incident
  • Reviewing cluster security before a major release or customer onboarding

Prerequisites

Tools:

ToolCloudSelf-HostedPurpose
ccloud CLIRequiredN/ACluster metadata, network config, CMEK
cockroach sqlRequiredRequiredSQL security checks
openssl (v3+)RecommendedRecommendedTLS/PQC cipher probing (-starttls postgres)
sslyzeOptionalOptionalComprehensive TLS enumeration (--starttls postgres)

Credentials:

CredentialCloudSelf-Hosted
ccloud auth login sessionRequiredN/A
SQL connection stringRequired (from ccloud cluster sql --url)Required (user provides)
DB username/passwordRequired (admin or VIEWACTIVITY)Required (admin or VIEWACTIVITY)
TLS certificates directoryN/A (managed)Required for cert expiry checks
CA certificate fileN/ARequired for openssl TLS probing

See permissions reference for detailed privilege requirements.

Security Audit Dimensions

DimensionToolChecks
Network SecurityccloudIP allowlists, private endpoints
Authentication & SSOccloud + sqlCloud Console SSO, Database SSO (Cluster SSO), SCIM 2.0 provisioning, auto user provisioning
AuthorizationsqlUsers, roles, admin grants, PUBLIC privileges
Encryptionccloud + sqlCMEK status, TLS settings
Audit LoggingsqlAudit log config, session logging
Backup & Recoveryccloud + sqlManaged backup status, self-managed backup schedules
Cryptographic Posturesql + openssl + sslyzeTLS version, PQC hybrid cipher support, encryption key size
Cluster Contextccloud + user inputDeployment model, environment, compliance, data sensitivity
Cluster ConfigurationccloudVersion, plan, regions

Assessment Workflow

Step 0: Verify Prerequisites

Run the following checks to determine which tools are available. The audit proceeds regardless — missing tools degrade specific checks rather than blocking the audit.

Cloud clusters:

# Verify ccloud authentication
ccloud auth whoami

# Verify cluster access
ccloud cluster list -o json

Both deployment models:

# Verify SQL connectivity
cockroach sql --url "<connection-string>" -e "SELECT current_user();"

# Check openssl version (v3+ recommended for PQC probes)
openssl version

# Check sslyze availability
which sslyze && sslyze --version

Report tool availability before proceeding:

ToolStatusImpact if Missing
ccloudAvailable / MissingNetwork, CMEK, and managed backup checks skipped (Cloud only)
cockroach sqlAvailable / MissingAll SQL-based checks skipped — audit severely limited
openssl (v3+)Available / MissingTLS cipher and PQC probing degraded
sslyzeAvailable / MissingComprehensive TLS enumeration unavailable; falls back to openssl

If cockroach sql is unavailable, warn the user that the audit will be limited to ccloud-only checks and recommend resolving connectivity before continuing. For missing optional tools (openssl, sslyze), note which checks will produce incomplete results and proceed.

Step 1: Gather Cluster Metadata and Confirm Audit Context

Cloud clusters:

# List clusters and identify target
ccloud cluster list -o json

# Get cluster details (use cluster name or ID)
ccloud cluster info <cluster-name> -o json

Self-hosted clusters:

# Gather metadata via SQL and cockroach CLI
cockroach node status --certs-dir=<certs-dir> --host=<host>
cockroach sql --url "<connection-string>" -e "SELECT version();"

Record: cluster ID, plan type (Basic/Standard/Advanced or self-hosted), cloud provider, regions, CockroachDB version. See ccloud commands reference for Cloud CLI syntax.

Confirm audit context: Present auto-detected metadata (cluster name, version, provider, regions, plan) and ask the user to confirm and provide:

  1. Deployment model: CockroachDB Cloud / self-hosted
  2. Environment: production / staging / development / sandbox
  3. Compliance frameworks: SOC 2, HIPAA, PCI DSS, ISO 27001, GDPR, or none
  4. Data sensitivity: PII/PHI, financial/payment, internal business, public/non-sensitive

Defaults (if user confirms without changes): Cloud, production, no compliance, internal business data. Deployment model determines check applicability (below). Environment and compliance calibrate severity (see Severity Adjustments).

Check Applicability by Deployment Model

CheckCloudSelf-Hosted
IP allowlists (ccloud)Yes (all tiers)N/A — managed externally via firewall/VPC
Ingress Private Endpoints (ccloud)Yes (Standard+, Advanced)N/A
Egress Private Endpoints (ccloud)Yes (Advanced)N/A
HBA configuration (SQL)YesYes — primary network-level auth control
Cloud Console SSOYesN/A
SCIM 2.0YesN/A
Database SSO (OIDC)YesYes
Database SSO (LDAP/AD)YesYes
Users & Roles (SQL)YesYes
Privileges (SQL)YesYes
CMEK (ccloud)YesN/A — check Enterprise Encryption instead
Enterprise EncryptionN/AYes — verify encryption-at-rest via store config
TLSAlways PASS (enforced)Check — verify certs, expiry, config
TLS 1.3 / PQC / Key SizeYes (INFO)Yes (INFO)
Audit Logging (SQL)YesYes
Managed Backups (ccloud)Yes (automatic)N/A
Self-Managed Backups (SQL)Optional (if managed backups present)Yes — verify backup schedules exist and are running

Skip N/A checks for the detected deployment model and mark them as [N/A] in the report rather than PASS/FAIL.

Step 2: Assess Network Security

Cloud clusters: Check all three layers based on cluster tier:

# IP allowlists (all tiers)
ccloud cluster networking allowlist list <cluster-id> -o json

# Ingress private endpoints (Standard+, Advanced) — via Cloud Console or API
# Cloud Console: Networking > Private endpoint tab
# API: GET /api/v1/clusters/{cluster_id}/networking/private-endpoint-connections

# Egress private endpoints (Advanced only) — via Cloud Console or API
# Cloud Console: Networking > Egress tab
# API: GET /api/v1/clusters/{cluster_id}/networking/egress-endpoints
-- HBA configuration (all tiers)
SHOW CLUSTER SETTING server.host_based_authentication.configuration;

Evaluate (Cloud):

  • FAIL if 0.0.0.0/0 is in the IP allowlist (open to all traffic)
  • WARN if allowlist contains broad CIDR ranges (e.g., /8 or /16)
  • WARN if no private endpoints configured on Advanced plan
  • INFO if private endpoints not available on current tier
  • PASS if allowlist contains only specific, narrow CIDR ranges or private endpoints are configured

Self-hosted clusters: Check HBA configuration as the primary network-level auth control:

SHOW CLUSTER SETTING server.host_based_authentication.configuration;

Evaluate (self-hosted):

  • WARN if HBA configuration is empty or default — network security may be managed externally (firewalls, security groups, VPCs), so this is WARN not FAIL
  • PASS if HBA rules restrict connections by IP, subnet, or auth method

Step 3: Check SSO and SCIM Configuration

For self-hosted clusters, skip Cloud Console SSO and SCIM checks (N/A). Database SSO checks still apply — check OIDC and/or LDAP/AD configuration.

Cloud Console SSO (Cloud Console UI > Organization Settings > Authentication — not via ccloud CLI):

  • FAIL if SSO is not configured
  • PASS if SAML or OIDC SSO is enabled and enforced

Database SSO (Cluster SSO) — OIDC:

-- Check if Cluster SSO is enabled for SQL authentication
SHOW CLUSTER SETTING server.oidc_authentication.enabled;
SHOW CLUSTER SETTING server.oidc_authentication.provider_url;
  • FAIL if server.oidc_authentication.enabled is false
  • PASS if enabled with a valid provider URL

Database SSO — LDAP/AD (Cloud and self-hosted):

-- Check if LDAP authentication is configured via HBA
SHOW CLUSTER SETTING server.host_based_authentication.configuration;
-- Look for ldap auth method entries in the HBA configuration
  • PASS if HBA contains entries with ldap auth method
  • INFO if LDAP is not configured (OIDC may be used instead)

SCIM 2.0 (Cloud Console UI > Organization Settings > Authentication > SCIM):

  • FAIL if SCIM endpoint is not enabled; PASS if enabled and connected to an IdP

Auto user provisioning on Database:

-- Check if SQL users are automatically provisioned from SSO identities
SHOW CLUSTER SETTING server.identity_map.configuration;
  • FAIL if identity mapping is not configured
  • PASS if identity mapping routes IdP identities to SQL users

Step 4: Audit Users and Roles

-- List all users and their roles
SELECT
  username,
  options,
  member_of
FROM [SHOW USERS]
ORDER BY username;

See SQL queries reference for additional role audit queries.

Step 5: Check Privileges

-- Count admin role members
SELECT COUNT(*) AS admin_count
FROM [SHOW GRANTS ON ROLE admin];

-- Check PUBLIC role privileges on the current database
-- Note: SHOW GRANTS FOR public is scoped to the current database.
-- Run this query from each application database to get full coverage.
SELECT
  database_name,
  schema_name,
  object_name,
  object_type,
  privilege_type
FROM [SHOW GRANTS FOR public]
WHERE privilege_type NOT IN ('USAGE')
  AND schema_name = 'public'
ORDER BY database_name, object_name;

Important: SHOW GRANTS FOR public is scoped to the current database. Run SHOW DATABASES; and repeat the query from each database for full coverage.

Evaluate:

  • FAIL if more than 5 users have admin role
  • FAIL if PUBLIC has SELECT, INSERT, UPDATE, or DELETE on application tables
  • WARN if admin count is between 3 and 5
  • PASS if admin count is 1-2 and PUBLIC has minimal grants

Step 6: Verify Encryption

CMEK status (Cloud clusters):

# Check CMEK configuration (Advanced plan with Advanced Security Add-on)
ccloud cluster info <cluster-name> -o json
# Look for cmek_config in the output

Evaluate by plan type (Cloud):

  • Standard plan: INFO — "Upgrade to Advanced plan with Advanced Security Add-on to enable CMEK"
  • Advanced plan without Advanced Security Add-on: INFO — "Add Advanced Security Add-on to enable CMEK"
  • Advanced plan with Advanced Security Add-on, CMEK not enabled: FAIL — CMEK not enabled despite plan supporting it
  • Advanced plan with Advanced Security Add-on, CMEK enabled: PASS

Enterprise Encryption (self-hosted — skip CMEK, check this instead):

# Enterprise Encryption is configured via --enterprise-encryption flag at node startup
cockroach node status --certs-dir=<certs-dir> --host=<host> --format=records
SHOW CLUSTER SETTING enterprise.encryption.type;
  • FAIL if not enabled and cluster stores sensitive data
  • WARN if encryption status cannot be determined
  • PASS if enabled with AES-256

TLS (Cloud): Always PASS — enforced on all connections.

TLS (self-hosted): Verify certificate validity and expiry (NOT auto-PASS):

cockroach cert list --certs-dir=<certs-dir>
openssl x509 -in <certs-dir>/node.crt -noout -enddate
  • FAIL if any certificate expires within 30 days
  • WARN if any certificate expires within 90 days
  • PASS if all certificates valid with 90+ days remaining

Remediation (self-hosted): managing-tls-certificates

Cryptographic posture (both Cloud and self-hosted — informational only):

# Primary: sslyze with STARTTLS postgres (if available)
sslyze <host>:26257 --starttls postgres

# Supplementary: openssl with STARTTLS postgres
openssl s_client -connect <host>:26257 -starttls postgres -showcerts -tlsextdebug 2>&1

# PQC probe: offer ML-KEM hybrid, check if server accepts
openssl s_client -connect <host>:26257 -starttls postgres -groups X25519MLKEM768:x25519 2>&1
  • INFO — TLS version (should be TLS 1.3; note if TLS 1.2 only)
  • INFO — PQC hybrid cipher support (e.g., X25519MLKEM768) — emerging, not yet a FAIL condition
  • INFO — Encryption key size (check for AES-256; note if AES-128)
Note: CockroachDB uses PostgreSQL wire protocol, so openssl s_client requires -starttls postgres to negotiate TLS correctly. Without this flag, the connection will fail. sslyze similarly requires --starttls postgres.

Step 7: Check Audit Logging

-- Check audit log configuration
SHOW CLUSTER SETTING sql.log.user_audit;

-- Check admin audit logging
SHOW CLUSTER SETTING sql.log.admin_audit.enabled;

Evaluate:

  • FAIL if sql.log.user_audit is empty and sql.log.admin_audit.enabled is false
  • WARN if only admin audit is enabled but user audit is not configured
  • PASS if both user and admin audit logging are configured

Step 8: Assess Backup Status

Cloud clusters: Managed backups are automatic — always PASS. Optionally check for self-managed schedules:

ccloud cluster info <cluster-name> -o json  # Look for backup_config
SHOW SCHEDULES;  -- Check for additional self-managed backup schedules

Self-hosted clusters: No managed backups — verify self-managed backup schedules:

SHOW SCHEDULES;
SELECT id, label, schedule_status, next_run, created
FROM [SHOW SCHEDULES]
WHERE label ILIKE '%backup%' OR command @> '{"backup":{}}';
  • FAIL if no backup schedules exist
  • WARN if schedules exist but show errors or haven't run recently
  • PASS if schedules are active and running

Remediation (self-hosted):

CREATE SCHEDULE 'nightly-full-backup'
  FOR BACKUP INTO 'gs://bucket/backups'
  RECURRING '@daily'
  WITH SCHEDULE OPTIONS first_run = 'now';

Pass/Warn/Fail Criteria

CheckPASSWARNFAIL
IP AllowlistSpecific CIDRs onlyBroad ranges (/8, /16)0.0.0.0/0 present
Cloud Console SSOSSO enabled + enforcedSSO enabled, not enforcedNot configured
Database SSOCluster SSO enabledNot configured
SCIM 2.0SCIM enabled + connectedNot enabled
DB Auto User ProvisioningIdentity mapping configuredNot configured
Admin Users1-2 admins3-5 admins6+ admins
PUBLIC PrivilegesNo data grantsUSAGE-only grantsSELECT/INSERT/UPDATE/DELETE
CMEK (Standard)N/A— (INFO: upgrade path)
CMEK (Advanced + Security Add-on)CMEK enabledNot enabled
Enterprise Encryption (self-hosted)AES-256 enabledCannot determineNot enabled (sensitive data)
TLS (self-hosted)Certs valid 90+ daysCerts expire in 30-90 daysCerts expire within 30 days
TLS 1.3 / PQC / Key Size— (INFO only)
HBA (self-hosted)Restrictive rulesEmpty/default
Audit LoggingUser + admin audit onAdmin audit onlyDisabled
Password Policymin length >= 12min length 8-11min length < 8
Backups (Cloud)N/A— (INFO: managed)
Backups (self-hosted)Schedules activeSchedules have errorsNo schedules exist

Severity Adjustments by Environment

Severity is calibrated for production by default. Non-production environments downgrade some findings. Compliance requirements override downgrades.

CheckProductionStagingDevelopmentSandbox
IP allowlist 0.0.0.0/0 (Cloud)FAILFAILWARNWARN
No private endpoints on Advanced (Cloud)WARNWARNINFOINFO
Empty HBA conf (self-hosted)WARNWARNINFOINFO
SSO not configuredFAILFAILINFOINFO
SCIM not enabledFAILFAILINFOINFO
Database SSO disabledFAILFAILINFOINFO
Admin count 6+FAILFAILWARNWARN
CMEK not enabled (Cloud)FAILFAILWARNWARN
Enterprise Encryption not enabled (self-hosted)FAILFAILWARNWARN
Audit logging disabledFAILFAILWARNINFO
No backup schedules (self-hosted)FAILFAILWARNINFO

Compliance overrides — these checks cannot be downgraded when a compliance framework is specified (compliance takes precedence over environment):

FrameworkNon-Downgradable Checks
SOC 2SSO, audit logging, admin users, password policy
HIPAASSO, CMEK/Enterprise Encryption, audit logging, encryption, password policy, backups
PCI DSSIP allowlist/HBA, CMEK/Enterprise Encryption, audit logging, admin users, password policy, backups
ISO 27001SSO, audit logging, admin users
GDPRAudit logging, encryption

Annotations: *(downgraded from FAIL — development cluster)* or *(PCI DSS compliance — cannot downgrade)*

Report Format

Save each audit report to reports/security-audit-<cluster-name>-<YYYY-MM-DD>-<sequence>.md (gitignored, local-only). The reports/ directory is not committed to version control — it serves as a local log for historical comparison and remediation tracking.

Generate a markdown report with the following structure:

# Security Audit Report — <Cluster Name>

**Date:** YYYY-MM-DD
**Cluster ID:** <cluster-id>
**Plan:** Standard | Advanced | Self-hosted
**CockroachDB Version:** vXX.X.X
**Regions:** us-east-1, us-west-2
**Deployment:** CockroachDB Cloud | Self-hosted
**Environment:** production | staging | development | sandbox
**Compliance:** SOC 2, PCI DSS | (none specified)
**Data Sensitivity:** PII/PHI | financial | internal | public

## Summary

| Status | Count |
|--------|-------|
| PASS   | X     |
| WARN   | X     |
| FAIL   | X     |
| INFO   | X     |
| N/A    | X     |

## Findings

### Network Security
- [PASS|WARN|FAIL|N/A] IP allowlist: <details>
- [PASS|WARN|INFO|N/A] Private endpoints: <details>
- [PASS|WARN|N/A] HBA configuration: <details>

### Authentication & SSO
- [PASS|FAIL|N/A] Cloud Console SSO: <details>
- [PASS|FAIL] Database SSO (OIDC): <details>
- [PASS|INFO] Database SSO (LDAP/AD): <details>
- [PASS|FAIL|N/A] SCIM 2.0 provisioning: <details>
- [PASS|FAIL] Auto user provisioning: <details>

### Authorization
- [PASS|WARN|FAIL] Admin user count: X users with admin role
- [PASS|FAIL] PUBLIC role privileges: <details>

### Encryption
- [PASS|FAIL|INFO|N/A] CMEK: <details>
- [PASS|FAIL|WARN|N/A] Enterprise Encryption: <details>
- [PASS|FAIL|N/A] TLS: <details>
- [INFO] Cryptographic posture: TLS version, PQC support, key size

### Audit Logging
- [PASS|WARN|FAIL] Audit log configuration: <details>

### Backup & Recovery
- [PASS|INFO|N/A] Managed backups: <details>
- [PASS|WARN|FAIL|N/A] Self-managed backups: <details>

### Cluster Configuration
- [INFO] Version: vXX.X.X
- [INFO] Plan: Standard | Advanced | Self-hosted
- [INFO] Regions: <list>

Status markers: [PASS], [WARN], [FAIL], [INFO], [N/A]. Use [N/A] for checks that don't apply to the deployment model. Append severity adjustment annotations when applicable (see Severity Adjustments).

Remediation

For each finding, the corresponding remediation skill can be used independently:

FindingRemediation Skill
Open IP allowlistconfiguring-ip-allowlists
SSO not configured / SCIM not enabledconfiguring-sso-and-scim
CMEK not enabledenabling-cmek-encryption
Audit logging disabledconfiguring-audit-logging
Excessive admin privilegeshardening-user-privileges
Weak password policyenforcing-password-policies
TLS/certificate issuesmanaging-tls-certificates
No private connectivityconfiguring-private-connectivity
Log export not configuredconfiguring-log-export
Compliance gapspreparing-compliance-documentation

For each FAIL finding, offer: "Explain how to fix this" (step-by-step guidance) or "Help me fix this now" (interactive remediation).

Safety Considerations

  • All operations are read-only. No cluster settings, users, roles, or network configurations are modified during the audit.
  • SQL queries use SHOW and SELECT only. No DDL or DML statements are executed.
  • ccloud commands are read-only. Only list, info, and auth subcommands are used.
  • No secrets are logged. Connection strings and tokens are not included in the report output.
  • Privilege check: The audit may produce incomplete results if the executing user lacks admin or VIEWACTIVITY privilege. The report notes any permission gaps.

References

Skill references:

Remediation skills:

Official CockroachDB Documentation:

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.43%
按下载量换算45

Claude

28.85%
按下载量换算37

Cursor

19.31%
按下载量换算25

Gemini CLI

8.55%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills