Security Threat Modeling logo

Security Threat Modeling

Organization
devcodex-labs
security-threat-modeling

安全威胁建模专家 Owner — 当任务涉及权限、认证、授权、输入输出信任边界、密钥策略、审计、攻击面、Webhook/OAuth、敏感操作或用户要求安全专家视角时使用;要求识别滥用路径并绑定缓解验证。

Overview

Publisherdevcodex-labs
Repositorydevcodex
Skill namesecurity-threat-modeling
Stars
433
Forks
44
Bundled files
1
LicenseAGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by devcodex-labs on GitHub. Read the source before you install it.

Installation

Install the Security Threat Modeling AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/devcodex-labs/devcodex/tree/main/content/skills/security-threat-modeling
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/devcodex-labs/devcodex.git /tmp/devcodex
mkdir -p .claude/skills
cp -r /tmp/devcodex/content/skills/security-threat-modeling .claude/skills/security-threat-modeling
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Security Threat Modeling in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Security Threat Modeling on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Security Threat Modeling is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Security Threat Modeling Skill

定位

本 Skill 负责安全威胁建模 Owner 视角。它不默认改变 S02 用户策略,而是把信任边界、滥用路径、权限、审计和缓解验证说清楚。

触发条件

场景是否触发
认证、授权、权限、敏感操作、输入输出信任边界、审计、密钥策略必须
OAuth、Webhook、外部集成、admin、脚本执行、文件系统、数据库写入、发布凭据必须
复审发现权限绕过、越权、注入、重放、审计缺失或风险误判必须
纯文案或无安全边界变化N/A + skipReason

核心门禁

Gate要求证据
SecurityThreatModelingGate信任边界、威胁场景、权限滥用、密钥策略、审计和缓解验证必须成矩阵trustBoundary、threatScenario
TrustBoundaryGate输入、输出、调用方、外部系统和持久化边界必须明确trustBoundary
PermissionAbuseCaseGate权限滥用、越权、绕过和敏感操作必须有负向样例permissionAbuseCase
SecretPolicyRespectGate必须遵循 S02 用户 / 项目策略,不得自行加严secretPolicy
AuditMitigationGate缓解措施必须有日志、审计或测试证据auditLogging、mitigationVerification
AuthorizedLocalSecurityAuditPresentationGate用户自有/明确授权的本地安全审查也要分离“真实本地探针”与“用户可见呈现”;明确防御目标、最小必要证据和中断恢复,不得宣称绕过宿主安全控制authorizationContext、visibleEvidenceBudget、safetyInterruptionCard

AuthorizedLocalSecurityAuditPresentationGate

当安全审查目标是用户自有仓库、本地环境或已明确授权系统时,先记录 authorizationContext(所有权/授权、目标范围、允许动作、排除动作)与 defensiveObjective(识别、预防、修复、验证或恢复)。授权不能替代平台安全控制,也不能扩大用户未授权的外部目标。

  • 用户可见回复和报告只保留结论、影响、脱敏或最小必要证据、修复/验证路线;非必要利用细节、完整可执行载荷和敏感输入留在授权范围内的隔离本地探针,且探针输出最小化。
  • 若宿主显示内容不可用或触发额外安全检查,保存 SafetyInterruptionCard:exact message、surface/model、date/time/timezone、requestId(若有)、redacted task summary、workspace/org、last accepted checkpoint、resume evidence。
  • 恢复时从 audit-state、review checklist、报告和文件真相源重建;必要时提供官方反馈信息或评估 Trusted Access。不得通过同义改写、拆分载荷或其他方式承诺规避/绕过安全控制,也不得保证以后不会触发检查。
  • 本 Gate 只规范审查证据呈现和连续性,不改变 S02 的项目/用户明文策略;凭据、认证码等是否回显仍按用户/项目明确策略和外部平台要求处理。

执行步骤

  1. 画出信任边界和资产:用户、系统、外部 provider、数据、密钥、文件。
  2. 枚举威胁场景:越权、重放、注入、伪造、泄漏、误操作、审计缺失。
  3. 设计权限和输入输出校验边界,不重复框架已承担的能力。
  4. 按 S02 判断密钥和明文策略,不主动引入 env/secretRef。
  5. 为每项缓解绑定测试、日志、审计或人工证据。
  6. 授权本地安全审查执行可见层/隔离探针分离;发生安全提示时写 SafetyInterruptionCard 并从最近有效检查点恢复。

输出字段

markdown
## SecurityThreatModelingGate

| 字段 | 内容 |
|------|------|
| trustBoundary | 用户/系统/外部/数据/密钥边界 |
| threatScenario | 威胁场景、攻击面、失败路径 |
| permissionAbuseCase | 越权、绕过、滥用、敏感操作 |
| secretPolicy | S02 用户/项目策略、明文/硬编码/env 边界 |
| auditLogging | 审计、日志、追踪、证据保留 |
| mitigationVerification | 缓解措施和负向验证 |
| authorizationContext | 本地所有权/授权、允许与排除范围;N/A 时写 skipReason |
| defensiveObjective | 防御目标 |
| visibleEvidenceBudget | 用户可见证据边界与隔离探针位置 |
| safetyInterruptionCard | 提示上下文、最近检查点与恢复/反馈路线;未触发时写 N/A |
| evidenceMatrix | 判断 -> 代码 / policy / tests / logs / docs |

反模式

反模式修正
一看到密钥就默认改 env先执行 S02 策略判断
权限只测 happy path补 permissionAbuseCase 负向样例
安全建议无验证补 mitigationVerification
把框架已有鉴权重复写进业务层先查框架/项目原生能力
为避免内容提示而改写/拆分攻击载荷聚焦防御结果和最小证据;不得绕过平台控制
把“无法显示”直接判为违规或直接丢弃进度保留 SafetyInterruptionCard,从文件真相和审查状态恢复

与其他 Skill 的关系

  • external-integration-architecture:OAuth/Webhook/签名需要联合审查。
  • backend-domain-architecture:权限模型和领域不变量需要一致。
  • audit-project:安全 finding 进入工程审查和测试路线。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Security Threat Modeling AI skill do?

安全威胁建模专家 Owner — 当任务涉及权限、认证、授权、输入输出信任边界、密钥策略、审计、攻击面、Webhook/OAuth、敏感操作或用户要求安全专家视角时使用;要求识别滥用路径并绑定缓解验证。

Why use Security Threat Modeling on TypingMind?

Because you install it once and use it with any model. Security Threat Modeling is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Security Threat Modeling in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/devcodex-labs/devcodex/tree/main/content/skills/security-threat-modeling. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Security Threat Modeling?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Security Threat Modeling?

As many as you like. As long as a model supports skills, you can use Security Threat Modeling with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Security Threat Modeling AI skill free?

Yes. It is published on GitHub by devcodex-labs under the AGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇