Token导航 LogoToken导航

Agent Skill · 开发

secrets-management(秘密管理)

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

secrets-management 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 13,089。

总安装 1,014周安装 41GitHub Stars 9下载 318核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:secrets-management(秘密管理)
来源仓库:https://github.com/acedergren/oci-agent-skills
仓库路径:skills/secrets-management
安装命令:
npx skills add https://github.com/acedergren/oci-agent-skills --skill secrets-management
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/acedergren/oci-agent-skills --skill secrets-management

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

secrets-management 用于 Vault 配置审计、密钥轮换策略与安全漏洞检查。适合在 Codex、Claude、Cursor、Gemini CLI 中梳理敏感信息存储位置与访问控制逻辑。可识别硬编码凭证、过度授权风险,并提供基于 Landing Zone 的安全加固建议。

安装方式:npx skills add https://github.com/acedergren/oci-agent-skills --skill secrets-management。涉及生产系统时务必脱敏处理,并验证最小权限原则与审计日志启用情况。

来源仓库内路径:skills/secrets-management

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/acedergren/oci-agent-skills --skill secrets-ma…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

secrets-management 怎么安装?

在终端执行 npx skills add https://github.com/acedergren/oci-agent-skills --skill secrets-management。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

secrets-management 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

secrets-management 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

secrets-management 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

secrets-management 用的人多吗?

公开数据是累计安装 1,014 次,近一周安装 41 次,下载 318 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

secrets-management 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
secrets-management

秘密管理 · 本页

1,0149接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

OCI Vault and Secrets Management - Expert Knowledge

🏗️ Use OCI Landing Zone Terraform Modules

Don't reinvent the wheel. Use oracle-terraform-modules/landing-zone for Vault setup.

Landing Zone solves:

  • ❌ Bad Practice #1: Generic compartments (Landing Zone creates Security compartment for Vault)
  • ❌ Bad Practice #7: No security services (Landing Zone integrates Cloud Guard monitoring)
  • ❌ Bad Practice #10: No audit logging (Landing Zone enables Vault audit logs)

This skill provides: Vault operations, secret management patterns, and troubleshooting for vaults deployed WITHIN a Landing Zone.


⚠️ OCI CLI/API Knowledge Gap

You don't know OCI CLI commands or OCI API structure.

Your training data has limited and outdated knowledge of:

  • OCI CLI syntax and parameters (updates monthly)
  • OCI API endpoints and request/response formats
  • Vault service CLI operations (oci vault secret, oci kms)
  • Secret encoding formats and retrieval patterns
  • Latest Vault/KMS features and cross-region replication

When OCI operations are needed:

  1. Use exact CLI commands from this skill's references
  2. Do NOT guess OCI Vault CLI syntax
  3. Do NOT assume AWS Secrets Manager patterns work in OCI
  4. Load reference files for detailed Vault API documentation

What you DO know:

  • General secrets management principles
  • Encryption and key management concepts
  • Secret rotation patterns

This skill bridges the gap by providing current OCI-specific Vault patterns and gotchas.


You are an OCI Vault expert. This skill provides knowledge Claude lacks: anti-patterns, IAM permission gotchas, cost optimization, security vulnerabilities, and OCI-specific operational knowledge.

NEVER Do This

❌ NEVER log secret contents (even in debug/error messages)

# WRONG - secret ends up in log aggregation, retained for years
logger.debug(f"Retrieved secret: {secret_value}")
logger.error(f"Failed to parse secret: {secret_value}")

# RIGHT - log metadata only
logger.debug(f"Retrieved secret OCID: {secret_ocid[:20]}...")
logger.error(f"Failed to parse secret (type: {type(secret_value)})")

❌ NEVER set temp key file permissions AFTER writing content

# WRONG - world-readable during write (security window)
with open('/tmp/key.pem', 'w') as f:
    f.write(private_key)
os.chmod('/tmp/key.pem', 0o600)  # Too late!

# RIGHT - secure BEFORE writing
fd = os.open('/tmp/key.pem', os.O_CREAT | os.O_WRONLY, 0o600)
with os.fdopen(fd, 'w') as f:
    f.write(private_key)

❌ NEVER use overly broad IAM policies

BAD:  "Allow any-user to read secret-family in tenancy"
BAD:  "Allow group Developers to manage secret-family in tenancy"
GOOD: "Allow dynamic-group app-prod to read secret-family in compartment AppSecrets
       where target.secret.name = 'db-*'"

❌ NEVER retrieve secrets without caching

  • Cost: $0.03 per 10,000 requests (first 10k/month free)
  • Without cache: 1000 req/hr × 24 × 30 = 720k/month = $2.16/month
  • With 60min cache: 1000 req/hr → 24 calls/day = 720/month = FREE
  • Savings: 98% cost reduction

❌ NEVER use PLAIN content type (deprecated)

  • Always use BASE64 encoding for secrets
  • PLAIN is legacy and may not work in future

❌ NEVER hardcode Vault OCIDs in code

# WRONG - not portable, leaked in repos
VAULT_SECRET_OCID = "ocid1.vaultsecret.oc1.iad.xxxxx"

# RIGHT - configuration
VAULT_SECRET_OCID = os.environ['VAULT_SECRET_OCID']

IAM Permission Gotcha (Critical)

Secret retrieval requires BOTH permissions:

"Allow dynamic-group X to read secret-family in compartment Y"
"Allow dynamic-group X to use keys in compartment Y"

Why both needed:

  • read secret-family → allows listing and reading secret metadata
  • use keys → allows decryption of secret content (secrets encrypted with master key)

Without use keys: Get confusing 403 error: "User not authorized to perform this operation"

Common mistake: Forgetting use keys permission, spending hours debugging "authorization failed"

Vault Hierarchy (Often Confused)

Vault (container)
 └─ Master Encryption Key (for encryption/decryption)
     └─ Secret (encrypted data)
         └─ Secret Versions (rotation over time)

Commands use different services:

  • Vault operations: oci kms management vault...
  • Key operations: oci kms management key... --endpoint <vault-endpoint>
  • Secret operations: oci vault secret... (NOT kms!)

Common mistake: oci vault-secret create (no such command) vs oci vault secret create (correct)

Secret Retrieval Error Decision Tree

Secret retrieval fails?
│
├─ 401 Unauthorized
│  ├─ On OCI compute? → Check dynamic group membership
│  ├─ Local dev? → Check ~/.oci/config, verify API key uploaded
│  └─ After rotation? → Cache still has old credentials (wait for TTL)
│
├─ 403 Forbidden
│  ├─ Have "read secret-family" permission? → Add if missing
│  └─ Have "use keys" permission? → THIS IS USUALLY THE ISSUE
│
├─ 404 Not Found
│  ├─ Wrong secret OCID? → Verify environment variable
│  ├─ Wrong compartment? → Secrets client must use secret's compartment
│  └─ Secret deleted? → Check vault for secret status
│
└─ 500 Internal Server Error
   └─ Vault service issue → Retry with exponential backoff (rate limit)

Cost Optimization

Vault API Pricing: $0.03 per 10,000 requests (10k/month free)

Calculation Examples:

Without caching (retrieve on every API call):

  • 1000 API calls/hour
  • 24 hours × 30 days = 720,000 Vault requests/month
  • (720,000 / 10,000) × $0.03 = $2.16/month

With 60-minute cache TTL:

  • 1000 API calls/hour → 1 Vault request/hour
  • 24 hours × 30 days = 720 Vault requests/month
  • Under 10k free tier = $0/month (FREE)
  • Savings: 98%

Cache TTL Selection:

Security RequirementsCache TTLReasoning
High (rotate daily)5-15 minutesFrequent refresh, still 90%+ savings
Standard (rotate monthly)30-60 minutesBalance security and cost
Dev/TestNo cacheAlways fresh for development

Rule: Cache TTL must be less than secret rotation window

Secret Rotation (Zero-Downtime)

WRONG (causes downtime):

# Don't delete and recreate - breaks running apps
oci vault secret delete --secret-id <secret-ocid>
oci vault secret create ...  # New OCID, apps break

RIGHT (zero-downtime):

# Create new VERSION of existing secret
oci vault secret update-base64 \
  --secret-id <secret-ocid> \
  --secret-content-content "$(echo -n 'new-value' | base64)"

# Secret OCID stays same, apps automatically get new version
# Old version kept as "previous" for rollback

Key points:

  • Secret OCID doesn't change (apps continue working)
  • Vault serves latest version by default
  • Previous versions retained for rollback
  • Applications pick up new version on next cache refresh (no restart needed)

Instance Principal Authentication

Production compute instances should use instance principals:

# 1. Create dynamic group
oci iam dynamic-group create \
  --name "app-instances" \
  --matching-rule "instance.compartment.id = '<compartment-ocid>'"

# 2. Grant Vault access
# "Allow dynamic-group app-instances to read secret-family in compartment Secrets"
# "Allow dynamic-group app-instances to use keys in compartment Secrets"

# 3. Application code (no credentials needed)
signer = oci.auth.signers.InstancePrincipalsSecurityTokenSigner()
secrets_client = oci.secrets.SecretsClient(config={}, signer=signer)

Benefits:

  • No credentials to manage or rotate
  • No secrets stored on compute instances
  • Automatic token refresh
  • Audit trail shows which instance accessed what

Audit Logging

Enable Vault access logging:

# Create log group
oci logging log-group create \
  --compartment-id <ocid> \
  --display-name "vault-audit-logs"

# Enable read access logging
oci logging log create \
  --log-group-id <log-group-ocid> \
  --display-name "secret-read-audit" \
  --log-type SERVICE \
  --configuration '{
    "source": {
      "sourceType": "OCISERVICE",
      "service": "vaults",
      "resource": "<vault-ocid>",
      "category": "read"
    }
  }'

What gets logged:

  • Who: User OCID or instance principal identity
  • What: Secret OCID accessed
  • When: Timestamp (UTC)
  • Where: Source IP address
  • Result: Success (200) or failure (403, 404, etc.)

Monitoring alerts (recommended):

  • >10 failed access attempts in 5 minutes (unauthorized access)
  • Access to secrets not assigned to requesting instance
  • Access from unexpected IP ranges

OCI-Specific Gotchas

Vault Management Endpoint is Required for Key Operations:

# Find your vault's endpoint
oci kms management vault get --vault-id <vault-ocid> \
  --query 'data."management-endpoint"' --raw-output

# Use in key commands
oci kms management key create ... \
  --endpoint https://xxxxx-management.kms.us-ashburn-1.oraclecloud.com

Regional Vault Availability:

  • Not all OCI regions have Vault service
  • Check region availability before designing architecture
  • Cross-region secret access adds latency (10-50ms)

Secret Bundle Base64 Decoding:

# Secret content is base64-encoded
secret_bundle = secrets_client.get_secret_bundle(secret_ocid)
encoded = secret_bundle.data.secret_bundle_content.content
decoded = base64.b64decode(encoded).decode('utf-8')  # Don't forget decode()

Progressive Loading References

OCI Vault Reference (Official Oracle Documentation)

WHEN TO LOAD oci-vault-reference.md:

  • Need comprehensive Vault and KMS API documentation
  • Understanding key management and encryption options
  • Implementing HSM-backed key protection
  • Need official Oracle guidance on Vault architecture
  • Setting up cross-region secret replication

Do NOT load for:

  • Quick secret retrieval examples (covered in this skill)
  • Permission debugging (decision trees above)
  • Secret rotation patterns (covered above)

When to Use This Skill

  • Storing credentials in Vault: secret organization, IAM setup
  • Secret retrieval failures: 403 errors, permission debugging
  • Cost optimization: caching strategy, API call reduction
  • Secret rotation: zero-downtime updates, version management
  • Security: temp file handling, logging anti-patterns, audit setup
  • Production: instance principal configuration, monitoring alerts

平台分布

Codex

35.8%
按下载量换算114

Claude

29.86%
按下载量换算95

Cursor

16.42%
按下载量换算52

Gemini CLI

9.77%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills