senior-security by borghei/claude-skills
npx skills add https://github.com/borghei/claude-skills --skill senior-security用于威胁建模、漏洞分析、安全架构设计和渗透测试的安全工程工具。
使用 STRIDE 方法识别和分析安全威胁。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 类别 | 描述 | 安全属性 | 缓解重点 |
|---|---|---|---|
| 欺骗 | 冒充用户或系统 | 身份验证 | MFA、证书、强身份验证 |
| 篡改 | 修改数据或代码 | 完整性 | 签名、校验和、验证 |
| 抵赖 | 否认操作 | 不可否认性 | 审计日志、数字签名 |
| 信息泄露 | 暴露数据 | 机密性 | 加密、访问控制 |
| 拒绝服务 | 破坏可用性 | 可用性 | 速率限制、冗余 |
| 权限提升 | 获取未授权访问 | 授权 | RBAC、最小权限原则 |
| DFD 元素 | S | T | R | I | D | E |
|---|---|---|---|---|---|---|
| 外部实体 | X | X | ||||
| 处理过程 | X | X | X | X | X | X |
| 数据存储 | X | X | X | X | ||
| 数据流 | X | X | X |
使用纵深防御原则设计安全系统。
Layer 1: PERIMETER
WAF, DDoS mitigation, DNS filtering, rate limiting
Layer 2: NETWORK
Segmentation, IDS/IPS, network monitoring, VPN, mTLS
Layer 3: HOST
Endpoint protection, OS hardening, patching, logging
Layer 4: APPLICATION
Input validation, authentication, secure coding, SAST
Layer 5: DATA
Encryption at rest/transit, access controls, DLP, backup
| 使用场景 | 推荐模式 |
|---|---|
| Web 应用程序 | OAuth 2.0 + PKCE with OIDC |
| API 身份验证 | JWT with short expiration + refresh tokens |
| 服务到服务 | mTLS with certificate rotation |
| CLI/自动化 | API keys with IP allowlisting |
| 高安全性 | FIDO2/WebAuthn hardware keys |
识别并修复应用程序中的安全漏洞。
| 排名 | 漏洞 | 测试方法 |
|---|---|---|
| A01 | 失效的访问控制 | 手动 IDOR 测试、授权检查 |
| A02 | 加密机制失效 | 算法审查、密钥管理审计 |
| A03 | 注入 | SAST + 手动载荷测试 |
| A04 | 不安全的设计 | 威胁建模、架构审查 |
| A05 | 安全配置错误 | 配置审计、CIS 基准 |
| A06 | 易受攻击的组件 | 依赖项扫描、CVE 监控 |
| A07 | 身份验证失效 | 密码策略、会话管理审查 |
| A08 | 软件和数据完整性 | CI/CD 安全、代码签名验证 |
| A09 | 日志记录失败 | 日志审查、SIEM 配置检查 |
| A10 | SSRF | 手动 URL 操纵测试 |
| 影响 / 可利用性 | 容易 | 中等 | 困难 |
|---|---|---|---|
| 严重 | 严重 | 严重 | 高 |
| 高 | 严重 | 高 | 中 |
| 中 | 高 | 中 | 低 |
| 低 | 中 | 低 | 低 |
在部署前审查代码中的安全漏洞。
| 类别 | 检查项 | 风险 |
|---|---|---|
| 输入验证 | 所有用户输入都经过验证和清理 | 注入 |
| 输出编码 | 应用了上下文相关的编码 | XSS |
| 身份验证 | 密码使用 Argon2/bcrypt 哈希 | 凭据窃取 |
| 会话 | 设置了安全的 Cookie 标志(HttpOnly、Secure、SameSite) | 会话劫持 |
| 授权 | 所有端点都有服务器端权限检查 | 权限提升 |
| SQL | 完全使用参数化查询 | SQL 注入 |
| 文件访问 | 拒绝路径遍历序列 | 路径遍历 |
| 密钥 | 没有硬编码的凭据或密钥 | 信息泄露 |
| 依赖项 | 已知易受攻击的包已更新 | 供应链 |
| 日志记录 | 敏感数据未记录 | 信息泄露 |
| 模式 | 问题 | 安全替代方案 |
|---|---|---|
| SQL 字符串格式化 | SQL 注入 | 使用带占位符的参数化查询 |
| Shell 命令构建 | 命令注入 | 使用子进程和参数列表,避免 shell |
| 路径拼接 | 路径遍历 | 验证并规范化路径 |
| 使用 MD5/SHA1 处理密码 | 弱哈希 | 使用 Argon2id 或 bcrypt |
| 使用 Math.random 生成令牌 | 可预测的值 | 使用 crypto.getRandomValues |
响应并遏制安全事件。
| 等级 | 描述 | 响应时间 | 上报对象 |
|---|---|---|---|
| P1 - 严重 | 活跃入侵,数据外泄 | 立即 | CISO、法务、高管 |
| P2 - 高 | 已确认失陷,已遏制 | 1 小时 | 安全负责人、IT 总监 |
| P3 - 中 | 潜在失陷,正在调查 | 4 小时 | 安全团队 |
| P4 - 低 | 可疑活动,影响较小 | 24 小时 | 值班工程师 |
| 阶段 | 行动 |
|---|---|
| 识别 | 验证告警、评估范围、确定严重性 |
| 遏制 | 隔离系统、保存证据、阻止访问 |
| 根除 | 移除威胁、修补漏洞、重置凭据 |
| 恢复 | 恢复服务、验证完整性、加强监控 |
| 经验教训 | 记录时间线、识别差距、更新流程 |
| 类别 | 工具 |
|---|---|
| SAST | Semgrep、CodeQL、Bandit (Python)、ESLint 安全插件 |
| DAST | OWASP ZAP、Burp Suite、Nikto |
| 依赖项扫描 | Snyk、Dependabot、npm audit、pip-audit |
| 密钥检测 | GitLeaks、TruffleHog、detect-secrets |
| 容器安全 | Trivy、Clair、Anchore |
| 基础设施 | Checkov、tfsec、ScoutSuite |
| 网络 | Wireshark、Nmap、Masscan |
| 渗透测试 | Metasploit、sqlmap、Burp Suite Pro |
| 使用场景 | 算法 | 密钥大小 |
|---|---|---|
| 对称加密 | AES-256-GCM | 256 位 |
| 密码哈希 | Argon2id | N/A(使用默认值) |
| 消息认证 | HMAC-SHA256 | 256 位 |
| 数字签名 | Ed25519 | 256 位 |
| 密钥交换 | X25519 | 256 位 |
| TLS | TLS 1.3 | N/A |
| 脚本 | 用途 | 用法 |
|---|---|---|
| threat_modeler.py | 带有风险评分的 STRIDE 威胁分析 | python threat_modeler.py --component "Authentication" |
| secret_scanner.py | 检测硬编码的密钥和凭据 | python secret_scanner.py /path/to/project |
威胁建模器功能:
密钥扫描器功能:
| 文档 | 内容 |
|---|---|
| security-architecture-patterns.md | 零信任、纵深防御、身份验证模式、API 安全 |
| threat-modeling-guide.md | STRIDE 方法论、攻击树、DREAD 评分、DFD 创建 |
| cryptography-implementation.md | AES-GCM、RSA、Ed25519、密码哈希、密钥管理 |
| 框架 | 重点 | 适用对象 |
|---|---|---|
| OWASP ASVS | 应用程序安全 | Web 应用程序 |
| CIS 基准 | 系统加固 | 服务器、容器、云 |
| NIST CSF | 风险管理 | 企业安全计划 |
| PCI-DSS | 支付卡数据 | 支付处理 |
| HIPAA | 医疗数据 | 医疗应用 |
| SOC 2 | 服务组织控制 | SaaS 提供商 |
| 响应头 | 推荐值 |
|---|---|
| Content-Security-Policy | default-src self; script-src self |
| X-Frame-Options | DENY |
| X-Content-Type-Options | nosniff |
| Strict-Transport-Security | max-age=31536000; includeSubDomains |
| Referrer-Policy | strict-origin-when-cross-origin |
| Permissions-Policy | geolocation=(), microphone=(), camera=() |
| 技能 | 集成点 |
|---|---|
| senior-devops | CI/CD 安全、基础设施加固 |
| senior-secops | 安全监控、事件响应 |
| senior-backend | 安全 API 开发 |
| senior-architect | 安全架构决策 |
每周安装次数
66
代码仓库
GitHub 星标数
30
首次出现
Jan 24, 2026
安全审计
安装于
claude-code53
opencode46
gemini-cli43
codex38
cursor38
github-copilot36
Security engineering tools for threat modeling, vulnerability analysis, secure architecture design, and penetration testing.
Identify and analyze security threats using STRIDE methodology.
| Category | Description | Security Property | Mitigation Focus |
|---|---|---|---|
| Spoofing | Impersonating users or systems | Authentication | MFA, certificates, strong auth |
| Tampering | Modifying data or code | Integrity | Signing, checksums, validation |
| Repudiation | Denying actions | Non-repudiation | Audit logs, digital signatures |
| Information Disclosure | Exposing data | Confidentiality | Encryption, access controls |
| Denial of Service | Disrupting availability | Availability | Rate limiting, redundancy |
| Elevation of Privilege | Gaining unauthorized access | Authorization | RBAC, least privilege |
| DFD Element | S | T | R | I | D | E |
|---|---|---|---|---|---|---|
| External Entity | X | X | ||||
| Process | X | X | X | X | X | X |
| Data Store | X | X | X | X | ||
| Data Flow | X | X | X |
See: references/threat-modeling-guide.md
Design secure systems using defense-in-depth principles.
Layer 1: PERIMETER
WAF, DDoS mitigation, DNS filtering, rate limiting
Layer 2: NETWORK
Segmentation, IDS/IPS, network monitoring, VPN, mTLS
Layer 3: HOST
Endpoint protection, OS hardening, patching, logging
Layer 4: APPLICATION
Input validation, authentication, secure coding, SAST
Layer 5: DATA
Encryption at rest/transit, access controls, DLP, backup
| Use Case | Recommended Pattern |
|---|---|
| Web application | OAuth 2.0 + PKCE with OIDC |
| API authentication | JWT with short expiration + refresh tokens |
| Service-to-service | mTLS with certificate rotation |
| CLI/Automation | API keys with IP allowlisting |
| High security | FIDO2/WebAuthn hardware keys |
See: references/security-architecture-patterns.md
Identify and remediate security vulnerabilities in applications.
| Rank | Vulnerability | Testing Approach |
|---|---|---|
| A01 | Broken Access Control | Manual IDOR testing, authorization checks |
| A02 | Cryptographic Failures | Algorithm review, key management audit |
| A03 | Injection | SAST + manual payload testing |
| A04 | Insecure Design | Threat modeling, architecture review |
| A05 | Security Misconfiguration | Configuration audit, CIS benchmarks |
| A06 | Vulnerable Components | Dependency scanning, CVE monitoring |
| A07 | Authentication Failures | Password policy, session management review |
| A08 | Software/Data Integrity | CI/CD security, code signing verification |
| A09 | Logging Failures | Log review, SIEM configuration check |
| Impact / Exploitability | Easy | Moderate | Difficult |
|---|---|---|---|
| Critical | Critical | Critical | High |
| High | Critical | High | Medium |
| Medium | High | Medium | Low |
| Low | Medium | Low | Low |
Review code for security vulnerabilities before deployment.
| Category | Check | Risk |
|---|---|---|
| Input Validation | All user input validated and sanitized | Injection |
| Output Encoding | Context-appropriate encoding applied | XSS |
| Authentication | Passwords hashed with Argon2/bcrypt | Credential theft |
| Session | Secure cookie flags set (HttpOnly, Secure, SameSite) | Session hijacking |
| Authorization | Server-side permission checks on all endpoints | Privilege escalation |
| SQL | Parameterized queries used exclusively | SQL injection |
| File Access | Path traversal sequences rejected | Path traversal |
| Secrets | No hardcoded credentials or keys | Information disclosure |
| Dependencies | Known vulnerable packages updated |
| Pattern | Issue | Secure Alternative |
|---|---|---|
| SQL string formatting | SQL injection | Use parameterized queries with placeholders |
| Shell command building | Command injection | Use subprocess with argument lists, no shell |
| Path concatenation | Path traversal | Validate and canonicalize paths |
| MD5/SHA1 for passwords | Weak hashing | Use Argon2id or bcrypt |
| Math.random for tokens | Predictable values | Use crypto.getRandomValues |
Respond to and contain security incidents.
| Level | Description | Response Time | Escalation |
|---|---|---|---|
| P1 - Critical | Active breach, data exfiltration | Immediate | CISO, Legal, Executive |
| P2 - High | Confirmed compromise, contained | 1 hour | Security Lead, IT Director |
| P3 - Medium | Potential compromise, under investigation | 4 hours | Security Team |
| P4 - Low | Suspicious activity, low impact | 24 hours | On-call engineer |
| Phase | Actions |
|---|---|
| Identification | Validate alert, assess scope, determine severity |
| Containment | Isolate systems, preserve evidence, block access |
| Eradication | Remove threat, patch vulnerabilities, reset credentials |
| Recovery | Restore services, verify integrity, increase monitoring |
| Lessons Learned | Document timeline, identify gaps, update procedures |
| Category | Tools |
|---|---|
| SAST | Semgrep, CodeQL, Bandit (Python), ESLint security plugins |
| DAST | OWASP ZAP, Burp Suite, Nikto |
| Dependency Scanning | Snyk, Dependabot, npm audit, pip-audit |
| Secret Detection | GitLeaks, TruffleHog, detect-secrets |
| Container Security | Trivy, Clair, Anchore |
| Infrastructure | Checkov, tfsec, ScoutSuite |
| Network | Wireshark, Nmap, Masscan |
| Penetration | Metasploit, sqlmap, Burp Suite Pro |
| Use Case | Algorithm | Key Size |
|---|---|---|
| Symmetric encryption | AES-256-GCM | 256 bits |
| Password hashing | Argon2id | N/A (use defaults) |
| Message authentication | HMAC-SHA256 | 256 bits |
| Digital signatures | Ed25519 | 256 bits |
| Key exchange | X25519 | 256 bits |
| TLS | TLS 1.3 | N/A |
See: references/cryptography-implementation.md
| Script | Purpose | Usage |
|---|---|---|
| threat_modeler.py | STRIDE threat analysis with risk scoring | python threat_modeler.py --component "Authentication" |
| secret_scanner.py | Detect hardcoded secrets and credentials | python secret_scanner.py /path/to/project |
Threat Modeler Features:
Secret Scanner Features:
| Document | Content |
|---|---|
| security-architecture-patterns.md | Zero Trust, defense-in-depth, authentication patterns, API security |
| threat-modeling-guide.md | STRIDE methodology, attack trees, DREAD scoring, DFD creation |
| cryptography-implementation.md | AES-GCM, RSA, Ed25519, password hashing, key management |
| Framework | Focus | Applicable To |
|---|---|---|
| OWASP ASVS | Application security | Web applications |
| CIS Benchmarks | System hardening | Servers, containers, cloud |
| NIST CSF | Risk management | Enterprise security programs |
| PCI-DSS | Payment card data | Payment processing |
| HIPAA | Healthcare data | Healthcare applications |
| SOC 2 | Service organization controls | SaaS providers |
| Header | Recommended Value |
|---|---|
| Content-Security-Policy | default-src self; script-src self |
| X-Frame-Options | DENY |
| X-Content-Type-Options | nosniff |
| Strict-Transport-Security | max-age=31536000; includeSubDomains |
| Referrer-Policy | strict-origin-when-cross-origin |
| Permissions-Policy | geolocation=(), microphone=(), camera=() |
| Skill | Integration Point |
|---|---|
| senior-devops | CI/CD security, infrastructure hardening |
| senior-secops | Security monitoring, incident response |
| senior-backend | Secure API development |
| senior-architect | Security architecture decisions |
Weekly Installs
66
Repository
GitHub Stars
30
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code53
opencode46
gemini-cli43
codex38
cursor38
github-copilot36
Lark Mail CLI 使用指南:邮件管理、安全规则与自动化工作流
37,000 周安装
API设计模式最佳实践指南:RESTful原则、错误处理、分页与安全性
102 周安装
Groove Work Plan:AI辅助代码库分析与项目计划生成工具 | 自动化开发流程
119 周安装
Groove Git日志自动化工具 - 自动生成每日Git提交摘要和变更记录
119 周安装
自媒体自动发布工具 - 支持百家号、知乎、公众号等平台一键发布,提升内容分发效率
105 周安装
Outlook自动化指南:通过Rube MCP与Composio工具包实现邮件、日历、联系人管理
83 周安装
WhoDB数据库助手:简化数据库操作,支持SQL查询、模式探索与数据导出
93 周安装
| A10 | SSRF | Manual URL manipulation testing |
| Supply chain |
| Logging | Sensitive data not logged | Information disclosure |