← 返回
安全合规

API credentials hygiene

Audits and hardens API credential handling (env vars, separation, rotation plan, least privilege, auditability). Use when integrating services or preparing production deployments where secrets must be managed safely.
审计并强化 API 凭证处理(环境变量、分离、轮换计划、最小权限、可审计性)。适用于集成服务或准备生产部署时需安全管理密钥的场景。
kowl64
安全合规 clawhub v1.0.0 1 版本 99506.6 Key: 无需
★ 2
Stars
📥 2,985
下载
💾 87
安装
1
版本
#latest

概述

API credentials hygiene: env vars, rotation, least privilege, auditability

PURPOSE

Audits and hardens API credential handling (env vars, separation, rotation plan, least privilege, auditability).

WHEN TO USE

  • TRIGGERS:
  • Harden the credentials setup for this integration and move secrets into env vars.
  • Design a key rotation plan for these APIs with minimal downtime.
  • Audit this service for least-privilege access and document what each key can do.
  • Create an environment variable map and a secure .env template for this project.
  • Set up credential separation for dev versus prod with clear audit trails.
  • DO NOT USE WHEN…
  • You want to obtain keys without authorization or bypass security controls.
  • You need legal/compliance sign-off (this outputs technical documentation, not legal advice).

INPUTS

  • REQUIRED:
  • List of integrations/APIs and where credentials are currently stored/used.
  • Deployment context (local dev, server, container, n8n, etc.).
  • OPTIONAL:
  • Current config files/redacted snippets (.env, compose, systemd, n8n creds list).
  • Org rules (rotation intervals, secret manager preference).
  • EXAMPLES:
  • “Keys are hard-coded in a Node script and an n8n HTTP Request node.”
  • “We have dev and prod n8n instances and need separation.”

OUTPUTS

  • Credential map (service → env vars → scopes/permissions → owner → rotation cadence).
  • Rotation runbook (steps + rollback).
  • Least-privilege checklist and audit log plan.
  • Optional: .env template (placeholders only).

Success = no secrets committed or embedded, permissions minimized, rotation steps documented, and auditability defined.

WORKFLOW

  1. Inventory credentials:
    • where stored, where used, and who owns them.
  2. Define separation:
    • dev vs prod; human vs service accounts; per-integration boundaries.
  3. Move secrets to env vars / secret manager references:
    • create an env var map and update config plan (no raw keys in code/workflows).
  4. Least privilege:
    • for each API, enumerate required actions and reduce scopes/roles accordingly.
  5. Rotation plan:
    • dual-key overlap if supported; steps to rotate with minimal downtime; rollback.
  6. Auditability:
    • define what events are logged (auth failures, token refresh, key use where available).
  7. STOP AND ASK THE USER if:
    • required operations are unknown,
    • secret injection method is unclear,
    • rotation cadence/owners are unspecified.

OUTPUT FORMAT

Credential map template:

CREDENTIAL MAP
- Integration: <name>
  - Env vars:
    - <VAR_NAME>: <purpose> (secret/non-secret)
  - Permissions/scopes: <list>
  - Used by: <service/workflow>
  - Storage: <secret manager/env var>
  - Rotation: <cadence> | <owner> | <procedure>
  - Audit: <what is logged and where>

If providing a template, output assets/dotenv-template.example with placeholders only.

SAFETY & EDGE CASES

  • Never output real secrets, tokens, or private keys. Use placeholders.
  • Read-only by default; propose changes as a plan unless explicitly asked to modify files.
  • Avoid over-broad scopes/roles unless justified by a documented requirement.

EXAMPLES

  • Input: “n8n HTTP nodes contain API keys.”

Output: Env var map + plan to move to n8n credentials/env vars + rotation runbook.

  • Input: “Need dev vs prod separation.”

Output: Two env maps + naming scheme + access boundary checklist.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 12:46 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,583
security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,694
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,210 📥 266,136