Agent Skillshellowind777/helloagents › hello-security

hello-security

GitHub

提供安全敏感操作的编码规范,涵盖认证、密钥管理、输入验证、输出防护及权限控制,确保代码符合安全最佳实践。

skills/hello-security/SKILL.md hellowind777/helloagents

Trigger Scenarios

涉及认证或密码处理 需要生成或验证JWT/Token 处理用户输入或文件上传 配置API密钥或环境变量

Install

npx skills add hellowind777/helloagents --skill hello-security -g -y
More Options

Use without installing

npx skills use hellowind777/helloagents@hello-security

指定 Agent (Claude Code)

npx skills add hellowind777/helloagents --skill hello-security -a claude-code -g -y

安装 repo 全部 skill

npx skills add hellowind777/helloagents --all -g -y

预览 repo 内 skill

npx skills add hellowind777/helloagents --list

SKILL.md

Frontmatter
{
    "name": "hello-security",
    "description": "涉及认证、密码、token、JWT、OAuth、session、cookie、加密、密钥、API key、权限、角色、用户输入验证、文件上传等安全敏感操作时使用。"
}

安全相关代码必须遵循以下规范。

编码前

先识别攻击面和信任边界,再写代码。

认证与密钥

  • 密码:bcrypt/argon2 哈希,不可逆存储
  • JWT:设置过期时间,使用 RS256 或 HS256,不在 payload 存敏感数据
  • 密钥/API key:环境变量或密钥管理服务,不硬编码
  • .env 不提交到版本控制(.gitignore)
  • API key 使用最小权限原则

输入验证

  • 所有外部输入(用户、API、文件)必须验证
  • 白名单优于黑名单
  • SQL:参数化查询,不拼接字符串
  • 文件上传:验证类型、大小、内容,不信任文件扩展名

输出防护

  • XSS:输出编码,设置 CSP 头
  • CSRF:token 验证
  • 敏感数据:HTTPS 传输,加密存储,不记录到日志
  • 错误信息:不暴露内部实现细节给用户

权限控制

  • 最小权限原则
  • 检查资源所有权(不能只检查角色)
  • 路径遍历:规范化路径,限制访问范围

交付检查

  • 无硬编码密钥/密码
  • 所有用户输入已验证
  • SQL 使用参数化查询
  • 敏感数据不在日志中
  • 认证 token 有过期时间

Version History

  • 79c0b48 Current 2026-08-20 08:25

Same Skill Collection

skills/commands/auto/SKILL.md
skills/commands/loop/SKILL.md
skills/hello-api/SKILL.md
skills/hello-data/SKILL.md
skills/hello-errors/SKILL.md
skills/hello-perf/SKILL.md
skills/hello-test/SKILL.md
skills/hello-ui/SKILL.md
skills/hello-write/SKILL.md
skills/_meta/SKILL.md
skills/commands/ask/SKILL.md
skills/commands/clean/SKILL.md
skills/commands/commit/SKILL.md
skills/commands/help/SKILL.md
skills/commands/init/SKILL.md
skills/commands/plan/SKILL.md
skills/commands/prd/SKILL.md
skills/commands/qa/SKILL.md
skills/commands/test/SKILL.md
skills/hello-arch/SKILL.md
skills/hello-debug/SKILL.md
skills/hello-reflect/SKILL.md
skills/hello-subagent/SKILL.md
skills/helloagents/SKILL.md
skills/qa-review/SKILL.md

Metadata

Files
0
Version
79c0b48
Hash
39f0b304
Indexed
2026-08-20 08:25

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 08:13
浙ICP备14020137号-1 $방문자$