技能 secrets-management
🔐

secrets-management

安全 🌐 網路存取⚙️ 外部命令🔑 環境變數

跨管線安全 CI/CD 密鑰

CI/CD 管線常透過硬編碼值和日誌洩漏密鑰。本技能指南引導您使用熱門平台安全地儲存、輪換和使用密鑰。

支援: Claude Codex Code(CC)
📊 69 充足
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「secrets-management」。 Show a safe way to pull an API key into GitLab CI from Vault.

預期結果:

  • Use the Vault CLI in the job to fetch the key field
  • Export the key to a masked environment variable
  • Avoid printing the secret in logs
  • Rotate the key and update the Vault entry regularly

正在使用「secrets-management」。 How do I set up automatic secret rotation for my database credentials?

預期結果:

  • Configure AWS Secrets Manager with automatic rotation enabled
  • Create a Lambda function that generates a new password
  • Update both the database and the secret in the store
  • Test the rotation before deploying to production

正在使用「secrets-management」。 What are the risks of hardcoding secrets in CI pipelines?

預期結果:

  • Secrets appear in build logs and artifacts
  • Secrets get committed to version control accidentally
  • Secrets are exposed to anyone with repository access
  • Rotating secrets requires code changes and deployments

安全審計

安全
v4 • 1/17/2026

Documentation-only skill providing CI/CD secrets management guidance. Static findings triggered on legitimate tool references (Vault, AWS), environment variable examples, and shell script documentation - all expected content for a secrets management educational resource. No executable code or malicious patterns detected.

2
已掃描檔案
524
分析行數
3
發現項
4
審計總數
審計者: claude 查看審計歷史 →

品質評分

38
架構
100
可維護性
85
內容
20
社群
100
安全
91
規範符合性

你能建構什麼

強化 CI 密鑰

在不使用硬編碼值的情況下,為建置和部署階段設定安全的密鑰擷取。

定義輪換流程

為團隊建立一致的密鑰輪換流程和日誌指引。

Kubernetes 密鑰同步

為叢集工作負載建立 External Secrets Operator 使用模型。

試試這些提示

基本密鑰儲存
說明如何在 CI 中不使用硬編碼的情況下儲存和使用資料庫密碼,請使用本技能中的一個平台。
GitHub Actions 中的 Vault
草擬 GitHub Actions 步驟,從 Vault 讀取兩個密鑰並將它們公開為環境變數。
AWS Secrets Manager 流程
概述在 CI 工作中建立密鑰並擷取它的步驟,包括隱藏輸出。
輪換設計
為資料庫設計密鑰輪換工作流程,包括更新步驟和驗證檢查點。

最佳實務

  • 為每個環境使用不同的密鑰
  • 在日誌和輸出中隱藏密鑰
  • 啟用審計日誌和輪換

避免

  • 將密鑰提交到版本控制
  • 在測試管線中重複使用生產密鑰
  • 為除錯將密鑰回顯到日誌

常見問題

支援哪些 CI 平台?
範例涵蓋 GitHub Actions 和 GitLab CI,以及其他平台的一般步驟。
這個技能的限制是什麼?
它提供指導和範例,而非自動化配置或策略強制執行。
可以與 Vault 或 AWS Secrets Manager 整合嗎?
是的,它包含 Vault 和 AWS Secrets Manager 使用的範例步驟。
它會存取我的密鑰或傳送資料出去嗎?
不,它不會執行程碼或存取您的環境。
如果範例中的命令失敗怎麼辦?
檢查工具安裝、憑證和端點 URL,然後使用最少的輸出重試。
這與使用純 CI 密鑰相比如何?
與基本的 CI 變數相比,它增加了更強的輪換和集中式控制。

開發者詳情

檔案結構

📄 SKILL.md