Token导航 LogoToken导航

Agent Skill · 开发

security-by-design(设计安全)

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

security-by-design 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 18,732。

总安装 318周安装 13GitHub Stars 7下载 102核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:security-by-design(设计安全)
来源仓库:https://github.com/hack23/riksdagsmonitor
仓库路径:skills/security-by-design
安装命令:
npx skills add https://github.com/hack23/riksdagsmonitor --skill security-by-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hack23/riksdagsmonitor --skill security-by-design

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于界面设计与安全体验优化。security-by-design 属于开发类 Skill,可作为该场景下的辅助能力补充。适合检查视觉一致性和交互安全性。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。可生成 UI 方案或组件层级建议。

安装方式:通过 npx 从 GitHub 仓库添加技能。涉及真实页面改动时应通过预览检查表现。

来源仓库内路径:skills/security-by-design

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/hack23/riksdagsmonitor --skill security-by-des…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

security-by-design 怎么安装?

在终端执行 npx skills add https://github.com/hack23/riksdagsmonitor --skill security-by-design。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

security-by-design 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

security-by-design 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

security-by-design 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

security-by-design 用的人多吗?

公开数据是累计安装 318 次,近一周安装 13 次,下载 102 次,GitHub 7 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

security-by-design 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
security-by-design

设计安全 · 本页

3187接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Security by Design Skill

Purpose

Apply security by design principles to ensure security is integrated from the earliest stages of development, not bolted on as an afterthought.

Core Principles

1. Secure by Default

  • Principle: Systems should be secure in their default configuration
  • Application:

- Default to HTTPS, never HTTP - Default to least privilege access - Default to encrypted communications - Default to secure password policies - Disable unnecessary features by default

2. Defense in Depth

  • Principle: Multiple layers of security controls protect against single point of failure
  • Application:

- Network security (TLS, firewalls, DDoS protection) - Application security (input validation, output encoding) - Access control (authentication, authorization, MFA) - Data security (encryption at rest and in transit) - Monitoring and detection (logging, SIEM, alerts)

3. Least Privilege

  • Principle: Grant minimum necessary permissions to users, processes, and systems
  • Application:

- GitHub Actions: minimal required permissions - User roles: grant only needed access - Service accounts: scoped credentials - API tokens: limited scope and expiration - File permissions: restrictive by default

4. Fail Securely

  • Principle: Failures should not compromise security
  • Application:

- Error messages don't leak sensitive info - Failed authentication locks out, doesn't grant access - Exception handling preserves security state - Graceful degradation maintains protection - Logs capture security-relevant failures

5. Don't Trust User Input

  • Principle: All external input is untrusted and must be validated
  • Application:

- Validate all input formats - Sanitize before processing - Use parameterized queries - Encode output appropriately - Whitelist over blacklist

6. Keep Security Simple

  • Principle: Complexity is the enemy of security
  • Application:

- Use well-tested libraries over custom code - Avoid complex cryptographic implementations - Clear, reviewable security logic - Minimize attack surface - Remove unused features and dependencies

7. Separation of Duties

  • Principle: Critical operations require multiple parties
  • Application:

- Code review required before merge - Separate dev/prod environments - Different roles for different functions - No single person can compromise system - Audit trail for accountability

8. Economy of Mechanism

  • Principle: Keep security mechanisms as simple as possible
  • Application:

- Avoid over-engineering security - Use standard protocols (TLS, OAuth) - Leverage platform security features - Document security architecture clearly - Regular security architecture reviews

Static Website Security by Design

Eliminate Server-Side Attack Surface

✅ Benefits of static HTML/CSS:
- No SQL injection (no database)
- No XSS from server-side rendering
- No CSRF tokens needed
- No session management vulnerabilities
- No server-side code execution risks

Transport Layer Security

✅ Always enforce:
- HTTPS-only (TLS 1.3)
- HSTS headers (Strict-Transport-Security)
- Secure cookie flags (if any cookies used)
- Certificate pinning where appropriate

Content Security

✅ Implement CSP headers:
Content-Security-Policy: default-src 'self';
  script-src 'self';
  style-src 'self' 'unsafe-inline' fonts.googleapis.com;
  font-src 'self' fonts.gstatic.com;
  img-src 'self' data:;
  connect-src 'self';

✅ Additional headers:
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin

Dependency Security

✅ Minimize dependencies:
- Avoid JavaScript frameworks (for static sites)
- Use trusted CDNs (Google Fonts, etc.)
- Enable Subresource Integrity (SRI) for CDN assets
- Regular dependency scanning (Dependabot)

CI/CD Security by Design

Workflow Hardening

# ✅ Security by design in GitHub Actions
permissions:
  contents: read  # Least privilege
  pull-requests: write  # Only if needed

jobs:
  secure-job:
    runs-on: ubuntu-latest

    steps:
      # 1. Harden the runner
      - uses: step-security/harden-runner@SHA
        with:
          egress-policy: audit

      # 2. Pin all actions to SHA
      - uses: actions/checkout@SHA

      # 3. Use secrets securely
      - env:
          TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          # Never echo secrets
          # Use secrets only where needed

Supply Chain Security

✅ Required controls:
- Pin all GitHub Actions to SHA commits
- Enable Dependabot security updates
- Use dependency review action
- Scan with CodeQL or Semgrep
- Enable secret scanning
- Require signed commits (GPG)

Secure Development Lifecycle

Phase 1: Design

  • Threat model (STRIDE analysis)
  • Security requirements defined
  • Compliance requirements identified
  • Security architecture designed
  • Risk assessment documented

Phase 2: Development

  • Secure coding standards followed
  • Input validation implemented
  • Output encoding applied
  • Error handling secure
  • Logging captures security events

Phase 3: Testing

  • SAST scanning (CodeQL)
  • Dependency scanning (Dependabot)
  • Secret scanning enabled
  • Manual security review
  • Penetration testing (if applicable)

Phase 4: Deployment

  • Secure CI/CD pipeline
  • Infrastructure hardening
  • Security monitoring enabled
  • Incident response ready
  • Rollback plan documented

Phase 5: Operations

  • Continuous monitoring
  • Log analysis
  • Vulnerability management
  • Patch management
  • Periodic security reviews

Security Design Patterns

Pattern: Static Site Security

Architecture: Static HTML/CSS on GitHub Pages

Security Controls:
✅ Attack Surface: Minimal (no server-side code)
✅ Transport: TLS 1.3 / HTTPS-only
✅ Headers: CSP, HSTS, X-Frame-Options
✅ Access: GitHub MFA, SSH keys, GPG signing
✅ Monitoring: Dependabot, CodeQL, secret scanning
✅ Recovery: Git rollback, rapid re-deploy

Pattern: Defense in Depth Layers

Layer 1 (Network): TLS 1.3, CDN, DDoS protection
Layer 2 (Application): Static content, no dynamic processing
Layer 3 (Access Control): GitHub auth, MFA, SSH, GPG
Layer 4 (Data): Git encryption at rest, HTTPS in transit
Layer 5 (Monitoring): Logs, alerts, security scanning
Layer 6 (Response): Incident procedures, rollback capability

Pattern: Least Privilege GitHub Actions

permissions:
  # Grant only what's needed
  contents: read
  pull-requests: write  # Only if creating/updating PRs
  issues: write         # Only if managing issues
  # Deny everything else by default

Security Anti-Patterns to Avoid

❌ Security Theater

  • Don't implement controls that look secure but aren't effective
  • Don't use outdated or weak crypto (MD5, SHA1, RC4)
  • Don't rely on obscurity (hiding, not securing)

❌ Bolt-On Security

  • Don't add security as afterthought
  • Don't patch over insecure design
  • Don't bypass security for convenience

❌ Over-Engineering

  • Don't create complex custom security solutions
  • Don't implement crypto yourself
  • Don't ignore well-tested libraries

❌ Incomplete Implementation

  • Don't secure one layer and ignore others
  • Don't validate input but forget output encoding
  • Don't encrypt data in transit but not at rest

Verification Checklist

Before deploying, verify:

  • Threat Model: STRIDE analysis complete
  • Secure Defaults: All defaults are secure
  • Defense in Depth: Multiple security layers
  • Least Privilege: Minimal permissions granted
  • Input Validation: All inputs validated
  • Output Encoding: All outputs properly encoded
  • Error Handling: Fails securely, no info leakage
  • Logging: Security events captured
  • Access Control: Authentication + authorization
  • Encryption: Data protected in transit and at rest
  • Dependencies: Scanned and up to date
  • Testing: Security tests passing
  • Monitoring: Alerts configured
  • Documentation: Security architecture documented
  • Incident Response: Procedures documented and tested

Remember

  • Design First: Security requirements before code
  • Simple is Secure: Complexity breeds vulnerabilities
  • Layers Matter: Defense in depth protects when one layer fails
  • Least Privilege Always: Grant minimum necessary access
  • Fail Securely: Errors should not compromise security
  • Trust Nothing: Validate all external input
  • Document Everything: Security decisions need justification

References

平台分布

Codex

36.45%
按下载量换算37

Claude

29.77%
按下载量换算30

Cursor

18.98%
按下载量换算19

Gemini CLI

9.21%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills