搜索

PythonReactSEOPDF
GitHub Skill

securitysecrets

Secrets Management security skill

mgreenly☆ 1 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Secrets Management

API keys and credentials require careful handling throughout their lifecycle.

ikigai Application

API keys (OpenAI, Anthropic, etc.):

  • Store in config file with 0600 permissions
  • Load once at startup, hold in memory
  • Never log, never include in error messages
  • Never embed in source code or commits

Memory handling:

  • Scrub secrets from memory when done: explicit_bzero(key, len)
  • Avoid strdup() for secrets (can't track copies)
  • Keep secret lifetime short and scoped

Config file security:

// Check permissions before reading
struct stat st;
if (stat(path, &st) == 0 && (st.st_mode & 077) != 0) {
    return ERR(ctx, SECURITY, "Config file permissions too open");
}

Never expose:

  • In logs or debug output
  • In error messages shown to user
  • In core dumps (prctl(PR_SET_DUMPABLE, 0))
  • Via environment to child processes

Review red flags: Secrets in printf/logging, strdup on credentials, missing permission checks.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!