跳到正文
Skillpedia
部署与云(DevOps)48k · #5692

secrets-management

它能做什么

这个工具可以帮你安全地管理自动化系统所使用的密码和访问密钥,例如软件开发中使用的那些。它确保只有正确的程序才能访问敏感信息。

适用场景

  • ✓在为应用设置安全的数据库访问时。
  • ✓在授权某个自动化系统执行任务时。
  • ✓在规划如何定期更换密码时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/secrets-management/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/secrets-management/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该如何设置安全访问,让我的应用可以使用服务 X 的 API 密钥?”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会选择一个安全的地方来存储密码(例如 Vault 或云服务)。它会定义谁可以访问哪些内容,以及如何在不暴露数据的情况下更新密码。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Secrets Management

When to Use

Design or repair secret retrieval, CI credentials, workload identity, access policies and rotation for an authorized system.

Inputs

Identify secret names and owners, consumers, environments, authentication mechanism and the rotation/recovery policy. Inspect configuration without displaying values.

Procedure

  1. Choose the existing supported backend: Vault, a cloud secret manager or the host's protected secret store. Keep environment boundaries and minimum privileges explicit.
  2. For Vault, read references/vault-setup.md. Development mode and root tokens are not production configuration.
  3. For GitHub Actions, read references/github-secrets.md. Keep pull-request validation separate from privileged jobs. Supply values to the consuming process, never interpolate them into generated shell source or print them for debugging.
  4. Prefer short-lived workload identity when the backend supports it. Check issuer, audience, workload/environment restrictions and denied access before enabling retrieval.
  5. Rotate through prepare, consumer switch, verification and old-credential revocation. Use the backend's supported rotation protocol; retries must not leave the database and secret store on different credentials.
  6. Inspect logs, error paths, artifacts and crash reports with synthetic secret markers. Record metadata such as operation, principal and outcome rather than values.

Example

A deployment needs a database credential. The trusted job retrieves it through the configured identity and passes it only to the migration process. Test missing access and an expired identity in staging. Verify no credential appears in output, and that a failed rotation leaves a recoverable working state.

Verification

  • Authorized retrieval succeeds; a different workload or environment is denied.
  • Missing credentials fail closed without exposing values.
  • Rotation and rollback are exercised with synthetic data.
  • Logs and artifacts contain no secret markers, including on failure.
  • Exposed credentials are revoked or rotated; merely deleting their log entry is insufficient.

Limitations

Masking cannot make logging secrets safe. Secret data can persist in infrastructure state, subprocess environments or backups; review those boundaries explicitly. Do not alter real credentials or deploy secret infrastructure without authorization.

Sources

常见问题

什么是“secrets”?

secrets 指的是需要保护的敏感信息,例如密码、API 密钥或证书。

为什么不能直接把密码写在代码里?

把密码直接写进代码非常危险。一旦代码被未经授权的人看到,密码也会随之泄露,安全性就无法保障了。

什么是“secret rotation”?

就是定期把旧的密码或密钥换成新的。这样即使旧密码泄露,风险也会降低。

详情

作者的原始描述

Secure secrets management practices for CI/CD pipelines using Vault, AWS Secrets Manager, and other tools.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5692
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能