Threat Modeling Discipline

VerifiedSafe

Disciplined threat modeling loop for software architectures and APIs. Map assets, apply STRIDE, classify impact, and recommend mitigations.

Sby Skills Guide Bot
SecurityIntermediate
8/5/2026
Claude CodeCursorCodex
#threat-modeling#stride#secure-by-design#architecture-review#risk-assessment

Recommended for

Automated summary

This skill runs a disciplined threat modeling loop (asset mapping, STRIDE, risk classification, architectural mitigation) in strict read-only mode, with output written in Portuguese.

Strengths

  • Follows a five-phase process with explicit gates (actors, assets, trust boundaries before moving to STRIDE).
  • Enforces read-only diagnosis: no file edits and no mitigation implementation, keeping the analysis purely advisory.
  • Standardizes each threat in a fixed sentence format and closes with a Markdown threats / STRIDE / risk / mitigation table.
  • Mitigations are prescriptive (RoleHierarchy, prepared statements, Docker network isolation) instead of vague 'write better code' advice.

Limitations

  • All responses are forced into Portuguese, which is unsuitable for English- or French-speaking teams.
  • Output quality depends heavily on the architecture context supplied; without diagrams or config, trust-boundary mapping stays approximate.
  • Examples lean toward a Java/Spring Boot plus Docker/Redis stack, with limited guidance for other ecosystems.
When to use it

Use it when designing a new feature, endpoint, or data flow, or when auditing the attack surface of an existing architecture without modifying any code.

When not to use it

Avoid it if you expect actual code fixes or a report in English/French, since the skill refuses implementation and answers only in Portuguese.

Security analysis

Safe
Quality score94/100

The skill is explicitly read-only and diagnostic, prohibiting creation, editing, deletion, or implementation of fixes. It only maps assets, applies STRIDE, classifies risks, and recommends architectural mitigations. No destructive, exfiltrating, or obfuscated actions are instructed, and no tools are declared.

No concerns found

How this analysis is made

Examples

Novo endpoint de transferência
Faça a modelagem de ameaças deste novo endpoint POST /api/transferencias: ele recebe valor e conta destino, autentica via JWT e grava no Postgres. Quero ativos, limites de confiança, cenários STRIDE classificados e mitigações.
Auditoria de arquitetura existente
Analise a segurança desta arquitetura: API Spring Boot atrás de um gateway, Redis como cache de sessão e Postgres com dados de clientes. Modele a superfície de ataque e entregue a tabela final de riscos e mitigações.
Fluxo de upload de documentos
Modele esta funcionalidade de upload de documentos: usuários comuns enviam PDFs, o sistema armazena em bucket e um serviço externo processa. Quero a análise de risco com STRIDE e as mitigações arquiteturais recomendadas.

name: threat-model description: Loop disciplinado de modelagem de ameaças para arquiteturas de software e APIs. Mapear ativos → aplicar STRIDE → classificar impacto → mitigar. Todas as respostas devem ser em português. Invocar quando o usuário disser "modelagem de ameaças", "modele isso", "modele esta arquitetura", "analise a segurança", "análise de risco", "superfície de ataque" ou ao descrever uma nova funcionalidade, endpoint, fluxo de dados ou arquitetura.

Modelagem de Ameaças

Disciplina de arquitetura segura por design (Secure-by-Design). Execute todas as fases em ordem. Pule fases apenas quando explicitamente justificado.

Todas as respostas devem ser em português.

Modo somente leitura (CRÍTICO): Esta skill é exclusivamente de diagnóstico. É estritamente proibido criar, editar ou deletar qualquer arquivo do projeto durante a execução. Não implemente nenhuma mitigação, não altere configurações e não corrija código — mesmo que a solução seja óbvia. Seu único papel é mapear, analisar e recomendar. Qualquer implementação requer solicitação explícita do usuário após a entrega do diagnóstico.

Ao explorar o sistema, use o contexto fornecido para construir um modelo mental dos limites de confiança, fluxos de dados e defesas ativas (configurações do Spring Security, matrizes de RBAC, topologia de rede Docker).


Fase 1 — Contexto e Mapeamento de Ativos

Gate: não avance para a Fase 2 até que os três itens abaixo estejam mapeados.

  • Atores — Quem ou o que interage com o sistema? (USER, ADMIN, DIRETOR, serviço externo)
  • Ativos — Quais são os dados mais valiosos? (PII, tokens JWT, registros críticos no banco de dados)
  • Limites de Confiança — Onde os dados cruzam de uma zona não confiável para uma confiável? (internet → API Spring Boot → cache Redis)

Fase 2 — Identificação de Ameaças (STRIDE)

Gere ≥1 cenário de ameaça concreto por categoria aplicável:

| Letra | Categoria | Pergunta-chave | |-------|-----------|----------------| | S | Spoofing | Um ator pode contornar a autenticação ou forjar um token? | | T | Tampering | Dados em trânsito ou em repouso podem ser modificados sem autorização? | | R | Repudiation | Uma ação crítica pode ocorrer sem uma trilha de auditoria imutável? | | I | Info Disclosure | Um invasor pode extrair dados sensíveis (ex: stacktraces verbosos em um @ExceptionHandler mal configurado)? | | D | Denial of Service | Existe rate limiting configurado no gateway ou na camada de aplicação? | | E | Elevation of Privilege | Um USER pode manipular o input para acessar endpoints de DIRETOR/ADMIN ou escalar controle? |


Fase 3 — Classificação

Formato por ameaça:

[STRIDE] – [Nome]: Se <ator> fizer <ação>, então <consequência>. (Impacto: Alto/Médio/Baixo | Probabilidade: Alto/Médio/Baixo)

Apresente a lista classificada antes de gerar as mitigações — o usuário pode ter conhecimento de domínio sobre controles compensatórios já existentes. Não bloqueie nessa etapa; prossiga após uma breve pausa se não houver resposta.


Fase 4 — Mitigação

Cada ameaça de risco Alto/Médio exige uma mitigação específica e acionável:

  • Referencie padrões de mercado (RoleHierarchy, prepared statements, isolamento de rede Docker)
  • Especifique onde aplicar a correção: cadeia de filtros de segurança, orquestração de containers ou propriedades da aplicação
  • Nunca diga "escreva um código melhor" — prescreva padrões arquiteturais concretos, bibliotecas estabelecidas ou mudanças de configuração

Fase 5 — Revisão Final

Obrigatório antes de declarar a análise como concluída:

  • [ ] Toda ameaça de alto risco possui uma estratégia de mitigação correspondente
  • [ ] Todas as mitigações respeitam as restrições da stack tecnológica atual
  • [ ] Output entregue em uma tabela Markdown:

| Ameaça | STRIDE | Risco | Mitigação Arquitetural | |--------|--------|-------|------------------------| | ... | ... | ... | ... |

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/threat-modeling-discipline-msfn19vi' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/threat-modeling-discipline-msfn19vi/download' --output '.skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md.part' && mv '.skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md.part' '.skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md' && test -s '.skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/threat-model' && cp -R '.skill-downloads/threat-modeling-discipline-msfn19vi' '.claude/skills/threat-model'

Cursor
test -f '.skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md' && test -s '.skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/threat-model' && cp -R '.skill-downloads/threat-modeling-discipline-msfn19vi' '.cursor/skills/threat-model'

Codex
test -f '.skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md' && test -s '.skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/threat-model' && cp -R '.skill-downloads/threat-modeling-discipline-msfn19vi' '.agents/skills/threat-model'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/threat-modeling-discipline-msfn19vi'

openskills read 'threat-modeling-discipline-msfn19vi'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/threat-modeling-discipline-msfn19vi/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills