secrets-rotation by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill secrets-rotation实现针对凭据、API 密钥、证书和加密密钥的自动化轮换策略,支持零停机部署并提供全面的审计日志。
最小工作示例:
// secrets-manager.js
const AWS = require("aws-sdk");
const crypto = require("crypto");
class SecretsManager {
constructor() {
this.secretsManager = new AWS.SecretsManager({
region: process.env.AWS_REGION,
});
this.rotationSchedule = new Map();
}
/**
* 生成新的密钥值
*/
generateSecret(type = "api_key", length = 32) {
switch (type) {
case "api_key":
return crypto.randomBytes(length).toString("hex");
case "password":
// 生成强密码
const chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*";
// ... (完整实现请参阅参考指南)
目录下的详细实现:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/| 指南 | 内容 |
|---|---|
| Node.js Secrets Manager with Rotation | 带轮换功能的 Node.js 密钥管理器 |
| Python Secrets Rotation with Vault | 使用 Vault 的 Python 密钥轮换 |
| Kubernetes Secrets Rotation | Kubernetes 密钥轮换 |
每周安装量
101
代码仓库
GitHub 星标数
116
首次出现
2026年1月21日
安全审计
安装于
opencode84
gemini-cli82
codex81
claude-code79
cursor76
github-copilot68
Implement automated secrets rotation strategy for credentials, API keys, certificates, and encryption keys with zero-downtime deployment and comprehensive audit logging.
Minimal working example:
// secrets-manager.js
const AWS = require("aws-sdk");
const crypto = require("crypto");
class SecretsManager {
constructor() {
this.secretsManager = new AWS.SecretsManager({
region: process.env.AWS_REGION,
});
this.rotationSchedule = new Map();
}
/**
* Generate new secret value
*/
generateSecret(type = "api_key", length = 32) {
switch (type) {
case "api_key":
return crypto.randomBytes(length).toString("hex");
case "password":
// Generate strong password
const chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*";
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Node.js Secrets Manager with Rotation | Node.js Secrets Manager with Rotation |
| Python Secrets Rotation with Vault | Python Secrets Rotation with Vault |
| Kubernetes Secrets Rotation | Kubernetes Secrets Rotation |
Weekly Installs
101
Repository
GitHub Stars
116
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode84
gemini-cli82
codex81
claude-code79
cursor76
github-copilot68
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
130,600 周安装