Community编程与开发github.com

安全软件工程

在缺陷进入生产环境之前,将安全性融入决策。这是一个预防导向的工作流程,旨在安全地设计、实现和审查软件。

安全软件工程 是什么?

该技能定义了一个结构化的“安全软件工程”工作流程,旨在将安全预防措施嵌入软件开发生命周期的早期阶段。它的核心原则是“左移”,即在需求、设计、实现和审查阶段就考虑安全,而不是在构建完成后才进行。该技能通过一个循环工作流指导用户:首先定义安全需求和威胁模型,然后设计安全的架构(包括认证、授权、数据隔离等),接着在编码过程中实现安全边界,最后通过直接证据进行审查和发布。它提供了丰富的引用文件库,涵盖威胁建模、身份验证、秘密管理、供应链安全、多租户隔离等特定领域,并包含轻量级威胁模型、安全验收标准和安全代码审查清单等实用模板。此技能适用于AI Agent平台,帮助开发者主动解决安全问题,记录假设、证据和残余风险,但明确指出不应将其用于事后的安全评估或漏洞扫描。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mianhtsys/landingMod3/tree/HEAD/MODULO_3_DESARROLLO_AL_LADO_DEL_CLIENTE_Y_SERVIDOR_WEB/architecture-skills-framework/.agents/skills/secure-software-engineering

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

安全软件工程 是做什么的?

在缺陷进入生产环境之前,将安全性融入决策。这是一个预防导向的工作流程,并非声称某个设计或版本是安全的。记录假设、收集的证据、残余风险以及任何已接受例外情况的责任人。

何时使用

使用该技能来回答“我们如何安全地构建此功能?”的问题,适用于新功能、集成、服务、API、租户边界、AI 能力或版本发布。尽早开始,并在架构、数据流、依赖项或威胁发生变化时重新审视受影响的设计决策。

请勿将其用于授权的事后构建评估:应使用 security-audit-methodology。也请勿将其用作现有代码库的漏洞扫描器;请使用授权的扫描工具或专业的安全评估。当任务是将最终需求与阶段门禁进行正式化时,请使用 spec-driven-development;当需要做出有证据支持的完成性声明时,请使用 verification-methodology。

何时不使用

端到端的租户模型、控制面/应用面位置、商业生命周期及 SaaS 运营架构,应使用 multi-tenant-saas-architecture;该技能负责威胁模型和可执行的隔离控制。量化租户需求、配额大小、公平性、负载/浸泡证据和单位成本权衡,应使用 capacity-and-cost-engineering。隐私生命周期和删除验证工件应交由 privacy-engineering 处理。

工作流程

  1. 需求:识别资产、参与者、危害、数据分类、监管或合同约束以及安全成果。在选择控制措施之前,编写可测试的验收标准。
  2. 威胁建模:映射数据流和信任边界;说明假设、滥用案例、缓解措施和残余风险。STRIDE 是可选的词汇表,并非详尽方法。
  3. 设计:选择适合信任模型的控制措施,包括服务端授权、数据隔离、安全失效行为以及 AI 能力边界。说明被拒绝的备选方案。
  4. 实现:使每个边界在代码和配置中可强制执行;保护输入、输出、凭据、依赖项、日志和操作路径。
  5. 审查与发布:通过直接证据验证控制措施,审查变更是否存在绕过行为,保存发布证据,并将事件或未遂事件反馈到需求和测试中。

当证据与假设相矛盾或设计发生变化时,循环到受影响的阶段。当每个实质性决策都有明确的责任人、直接的证据或明确的差距、以及对残余风险的处理时,即可停止。

参考文件

加载时机文件
需要版本锁定的源码及其决策依据references/source-index.md
定义资产、边界、滥用案例或安全标准references/security-requirements-threat-modeling.md
选择身份、会话、权限或服务访问references/authentication-authorization.md
处理请求、文件、URL、序列化数据、输出或 AI 内容references/input-validation-data-handling.md
添加密钥、令牌、凭据或签名材料references/secrets-lifecycle.md
添加、更新、构建或发布依赖项references/dependency-supply-chain.md
设计日志、审计事件、监控或取证证据references/secure-logging-audit.md
跨租户共享基础设施或数据,包括控制面/应用面、租户上下文、支持访问或租户生命周期证明references/multi-tenant-isolation.md
审查变更或定义安全审查门禁references/secure-code-review.md
准备用于发布的工件、例外、回滚或响应references/release-evidence.md;加载 release-engineering 以将这些控制措施和证据贯穿构建、注册、提升和部署门禁
从事件、未遂事件或已逃逸缺陷中学习references/incident-learning.md
设计 LLM、RAG 管道、模型集成或 Agent 工具references/ai-llm-security.md

模板

使用时机文件
开始对功能或系统进行威胁建模templates/lightweight-threat-model.md
为规范或变更编写安全验收标准templates/security-acceptance-criteria.md
审查与安全相关的代码变更templates/secure-code-review-checklist.md

护栏

  • 将提示词、检索内容、工具输出、Webhook、文件以及客户端提供的身份或租户字段视为不可信,直到边界对其进行验证。
  • 框架、扫描、SBOM、签名、出处证明或检查清单是关于有限声明的证据,不能证明软件是安全的。
  • 不要将某个控制措施普遍化:认证协议取决于信任模型;行级安全只是隔离机制之一;秘密轮换应跟随事件和风险;控制措施需要在其实际部署环境中进行验证。
  • 已完成的威胁模型和安全验收标准在暴露系统边界或弱点时应保密。使用占位符,切勿使用真实凭据或私有部署细节。

可移植性

使用宿主环境的常规机制来创建工件、运行测试和获取批准。不假定特定的供应商、云服务、身份提供者、数据库、CI 系统或部署拓扑。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

mianhtsys/landingMod3

Implement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.

mianhtsys/landingMod3

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

mianhtsys/landingMod3

Diseña y compara alternativas arquitectónicas trazables a RF/RNF sin implementar código.

mianhtsys/landingMod3

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.

mianhtsys/landingMod3

Revisión adversarial de la arquitectura contra RF/RNF, detectando contradicciones, cobertura faltante y complejidad innecesaria.

mianhtsys/landingMod3

Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.

mianhtsys/landingMod3

>- Generate grounded-and-verified, engine-agnostic database documentation that reaches 100% parity with the real schema. Introspects the LIVE database as ground truth and cross-validates it against ORM models, migrations, generated types, seeds, and application queries, then proves completeness by diffing the docs back against the database. Produces ER diagrams (mermaid), per-table data dictionaries, and a machine-readable schema.json. Works with PostgreSQL, MySQL, SQL Server, and SQLite across any ORM (Prisma, TypeORM, Drizzle, Sequelize, Knex, Django, Rails) or raw SQL. Use when asked to document a database, produce an ERD or data dictionary, write db/schema docs, audit schema drift, or refresh existing DB docs.

mianhtsys/landingMod3

Compara estrategias de persistencia y motores de datos según consistencia, concurrencia, volumen, recuperación y operación.

mianhtsys/landingMod3

Design robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint design, and performance optimization. Ensures data integrity, query performance, and maintainable data models.

mianhtsys/landingMod3

Consolida análisis especializados en una recomendación arquitectónica, matriz de decisión, ADR y plan de validación.

mianhtsys/landingMod3

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

mianhtsys/landingMod3

Build and maintain web frontends — component architecture, state management, API integration, responsive layout, client-side performance, and frontend testing patterns. Framework agnostic, focused on web frontend implementation. Do not use for backend service implementation, data engineering, or platform infrastructure work.

mianhtsys/landingMod3

Evalúa despliegue, contenedores, escalado, alta disponibilidad, observabilidad, backup, recuperación y CI/CD de forma proporcional.

mianhtsys/landingMod3

Execute read-only SQL queries against multiple Microsoft SQL Server databases. Use when: (1) querying MSSQL/SQL Server databases, (2) exploring database schemas/tables, (3) running SELECT queries for data analysis, (4) checking database contents. Supports multiple database connections with descriptions for intelligent auto-selection. Blocks all write operations (INSERT, UPDATE, DELETE, DROP, etc.) for safety.

mianhtsys/landingMod3

Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.

mianhtsys/landingMod3

PHP 8.0+ development — XAMPP, RESTful APIs, PDO/MySQL/MariaDB, and authentication. Use when building PHP backends, creating API endpoints, configuring XAMPP, or integrating PHP with databases.

mianhtsys/landingMod3

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features

mianhtsys/landingMod3

Analiza requisitos funcionales y no funcionales, reglas, restricciones, capacidad y ambigüedades antes de seleccionar tecnologías.

mianhtsys/landingMod3

Implement modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first breakpoint strategies. Use when building adaptive interfaces, implementing fluid layouts, or creating component-level responsive behavior.

mianhtsys/landingMod3

Revisa seguridad arquitectónica, identidad, autorización, secretos, APIs, auditoría, fraude y resiliencia antes de implementar.

相关技能