Logo : Threat Model Surface

Threat Model Surface

Organisation
alpha-omega-security
threat-model-surface

Effectuez une analyse approfondie de phase 3.3 d’une surface d’attaque incluse dans le périmètre d’un modèle de menace. À UTILISER lorsque le brief d’orientation est prêt et qu’il faut lire le code pour établir le tableau de confiance par entrée et la matrice des dimensions de contrat (§1.7), l’inventaire des effets secondaires inattendus (§1.5), les préconditions d’accessibilité (§1.4) et la contamination des sorties (§1.8). Examine les points d’entrée publics sous l’angle du contrat plutôt que des défauts, limite le temps consacré à chaque famille de composants et indique les parties de la surface non couvertes comme déduites. Produit une analyse de la surface. Lecture seule. NE PAS UTILISER POUR : rechercher des bugs, effectuer une revue de code, réaliser l’orientation ou rédiger le modèle en prose.

Add to TypingMind

Présentation

Éditeuralpha-omega-security
Dépôtthreat-model
Nom de la compétencethreat-model-surface
Étoiles
60
Forks
10
Fichiers inclus
Instructions uniquement
LicenceMIT
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Tout dans les instructions

    Tout ce dont le modèle a besoin se trouve dans les instructions : aucun fichier supplémentaire à synchroniser.

  • Open source

    Publiée par alpha-omega-security sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Threat Model Surface dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/alpha-omega-security/threat-model/tree/main/skills/threat-model-surface
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alpha-omega-security/threat-model.git /tmp/threat-model
mkdir -p .claude/skills
cp -r /tmp/threat-model/skills/threat-model-surface .claude/skills/threat-model-surface
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Threat Model Surface dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Threat Model Surface dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Threat Model Surface n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Threat Model — Surface (deep pass on the in-scope surface)

Phase 3.3. The orient pass was minutes; this is hours, and that is expected. Three of the output's most valuable artifacts cannot be produced any other way:

  • the per-input-operand trust table (§1.7), which requires reading each in-scope entry point far enough to say which direct parameters and indirect inputs an attacker can reach and what the caller must enforce; and
  • the contract-dimension matrix (§1.7-§1.12), which prevents silence about failure behavior, representational limits, executable collaborators, object topology, and lifecycle edge cases from becoming downstream MODEL-GAP findings; and
  • the no-surprise side-effects inventory (§1.5) — negative claims about what the project does to its host that cannot be established by reading docs.

Read principles.md and the §1.5 / §1.7 / §1.8 specs in output-structure.md first.

Rules for keeping the cost bounded

  • Scope by the recon carve. Read only the entry points of in-model families. Do not read contrib/, examples, or out-of-scope families beyond confirming they are separable.
  • Read for contract, not for bugs. At each entry point the question is "which of these parameters can an attacker control, what kind of control is it, and what contract applies at edge conditions?" — not "is this code correct?" Record whether behavior is guaranteed, disclaimed, or unresolved; do not test whether the implementation satisfies it. The moment the reading turns into review, stop and move on.
  • Timebox per family. If a family's surface is too large to table in budget (e.g., a service with 100+ routes), table the highest-exposure subset, mark the remainder (inferred, QN) with a coverage note, and raise completing the table as an open question / follow-up — do not silently generalize.
  • Record hypotheses as you go, in draft form with provenance tags. Preserve documented provenance for explicit normative public contracts. Code, implementation comments, and tests that merely suggest an unwritten contract remain (inferred, QN) until a maintainer ratifies them.
  • Read code as a behavioural oracle, not just as a second-class doc. Mining comments and headers tells you what the project says; it cannot tell you where a guarantee stops. Every security-critical property needs its off-switches found by reading statements: the API call that relaxes a check, the flag that removes one, the mode that trades it for speed. Cite each as <file>:<line> at the statement that implements it. A comment describing the function does not qualify — the check that matters may have no comment at all, which is exactly why comment-harvesting misses it. These are easy to walk past because they are not input operands: no attacker-controlled parameter appears, so an input-shaped reading of the API sees nothing. They are property switches. Grep for names built on validate, undermine, relax, skip, permit, trust, unsafe, strict, and sane, then read what each one assigns.
  • Search the whole shipped build, not the files you happen to have open. Scope every switch hunt to the source set the supported build compiles — including the build scripts, which is where platform-conditional and default-on options live. A search restricted to the public header and one implementation file will miss a compile-time switch that replaces an entire function, and it will miss it silently.
  • Report a negative as a command plus its result, so the next reader can re-run it in one paste: grep -rn 'PATTERN' <file set> — N hits, all in X. "I searched and found nothing" is not reviewable and has been wrong every time it has been checked.
  • Cite harder before tagging inferred. Before marking a row inferred, check the API docs, header comments, Javadoc/package-info, manpage, and README — a fact stated there is (documented, source), not inferred. Turning a false-inferred into a true-documented row is pure accuracy and directly reduces the escalation count.
  • Disclaim demonstrably-absent guarantees rather than leaving them open. When the reading shows a family makes no thread-safety, resource-bound, or failure-atomicity guarantee, that absence is verifiable — record the matrix row as disclaimed with (documented, source), routing to §1.12, not as unresolved. Reserve unresolved / inferred for dimensions where a guarantee plausibly exists but you could not confirm it. Where you must reason past the verifiable to a clear safe default, tag (assumption, QN) rather than (inferred, QN).

Build the per-input-operand trust table (§1.7)

One row per direct parameter and each security-relevant indirect input of every public entry point:

FunctionInput operandAttacker-controllable?Control kindCaller must enforceProvenance
gzopenpathno — trusted caller stringdata, resource-namepath sanitization(documented, gzopen contract)
gzreadfile contentsyesdata, sizeoutput buffer >= len(inferred, Q4)
gzprintfformatno — trusted literalx-format-stringnever source from input(inferred, Q5)

For a network service, the first column is the route/endpoint or protocol message (POST /v1/configuration, Handshake frame), and rows must cover headers and connection metadata as well as bodies — header-presence checks (X-Forwarded-*, auth tokens) are common false friends. Group rows by component family if the table grows large. Prose is not sufficient: tool/AI findings are reported against specific sinks, and the triager must look up the exact parameter.

Do not collapse all control into a boolean. Use one or more control kinds: data, size/rate, type/class, callback/code, object-graph topology, collaborator implementation, resource-name, serialized state, or a project-specific x- kind. Distinguish an attacker choosing data passed through a trusted callback from an attacker choosing the callback itself.

Also capture size/shape/rate assumptions (bounded? streaming? memory-mapped?), and flag any input whose magnitude drives resource allocation (memory, threads, file handles) — that feeds the §1.11 resource-property threshold.

Build the contract-dimension matrix (§1.7-§1.12)

For every in-scope component family, fill every applicable row. A blank cell is not allowed:

DimensionStatusConditions / boundaryRoutes toProvenance
numeric domain and representational limitsclaimed / disclaimed / N/A / unresolvedmaximum size, overflow behavior, normalization domain§1.11 / §1.12 / §1.18(inferred, QN) or cited documented/maintainer source
failure and exception atomicityclaimed / disclaimed / N/A / unresolvedstate after validation or callback failure§1.11 / §1.12 / §1.18(inferred, QN) or cited source
recursive or cyclic topologyclaimed / disclaimed / N/A / unresolvedself-reference, graph depth, reentrancy§1.11 / §1.12 / §1.18(inferred, QN) or cited source
callback and collaborator executionclaimed / disclaimed / N/A / unresolvedcomparator, predicate, factory, virtual dispatch§1.7 / §1.10 / §1.11 / §1.12 / §1.18(inferred, QN) or cited source
serialization and reconstructionclaimed / disclaimed / N/A / unresolvedrestored types, callbacks, invariant rebuilding§1.3 / §1.7 / §1.10 / §1.11 / §1.12 / §1.18(inferred, QN) or cited source
reference and object lifecycleclaimed / disclaimed / N/A / unresolvedweak/soft references, GC clearing, invalidation§1.5 / §1.11 / §1.12 / §1.18(inferred, QN) or cited source
concurrency and reentrancyclaimed / disclaimed / N/A / unresolvedshared mutation, callback reentry§1.5 / §1.11 / §1.12 / §1.18(inferred, QN) or cited source
resource complexityclaimed / disclaimed / N/A / unresolvedCPU, heap, stack, I/O as a function of input/state§1.7 / §1.11 / §1.12 / §1.18(inferred, QN) or cited source

Add project-type rows when needed, such as Unicode/canonicalization, probabilistic-result semantics, protocol state transitions, clock behavior, or distributed consistency. The matrix is a contract inventory, not a bug list. A demonstrably-absent guarantee is a disclaimed row with documented provenance; only a dimension where a guarantee might exist stays unresolved and becomes a proposed-answer question for the interview. A guarantee "might exist" when the project has historically fixed reports of that class, or when a documented guarantee already implies it — in that case narrow the claimed row rather than disclaiming. Record the disclaimer's conditions and tier (see §1.12): a disclaimer with no boundary is the one that over-closes, and the tier is the worst impact of a report the disclaimer would close.

For stateful APIs, explicitly record the postcondition on failure: unchanged, partially committed, best-effort cleanup, or unspecified. Cover failures from validation, allocation, caller callbacks, and delegated collaborator methods.

Build the no-surprise side-effects inventory (§1.5)

Scan for what the project does to its host, then state the negative claims: does it open sockets? spawn processes? install signal handlers? read environment variables? write to stdout/stderr? touch global locale or FPU state? mutate process-wide state?

Tag these by how good your scan was, not by a default. A negative here says no such behaviour was observed; the project has not promised to keep it that way, so it is a §1.5 inventory row rather than a documented contract:

  • (assumption, QN) when you scanned the shipped sources of the supported build exhaustively and found nothing. Name what you searched.
  • (inferred, QN) when the scan could not be exhaustive — hand-written assembly, generated code, dlopen or another dynamic dispatch, an #ifdef branch you did not read, or a dependency that could do it on the project's behalf. Name the specific hole in the question, so the maintainer knows what you could not see.

Do not pre-label the whole inventory inferred before scanning. A negative you actually verified across the supported build is worth more to a triager than a blanket hedge, and the difference is exactly what the maintainer is being asked to ratify.

Derive reachability preconditions (§1.4) and output taint (§1.8)

  • Per in-model family, state the condition a finding must meet to matter ("a finding in inflate.c is in-model only if reachable from the compressed input bytes"). This is the first test a triager applies to a tool/AI hit.
  • Per output channel, state taint. The default for parsers/decoders/decompressors is one line worth stating verbatim: "Output is exactly as untrusted as the input it derives from; no sanitization, normalization, or encoding is performed." Note any structural invariant the code actually upholds (bounded writes, valid encoding, matching length fields) — each is a candidate §1.11 property.

Output — surface analysis

Hand back: the §1.7 table (with coverage note if partial), the completed contract-dimension matrix, the §1.5 side-effects inventory, per-family §1.4 reachability preconditions, and §1.8 output-taint statements — each tagged with its actual provenance. Mark code-derived contract hypotheses (inferred, QN) and call out unresolved dimensions and wave-1/2 confirmation targets for threat-model-interview.

Foire aux questions

À quoi sert la compétence IA Threat Model Surface ?

Effectuez une analyse approfondie de phase 3.3 d’une surface d’attaque incluse dans le périmètre d’un modèle de menace. À UTILISER lorsque le brief d’orientation est prêt et qu’il faut lire le code pour établir le tableau de confiance par entrée et la matrice des dimensions de contrat (§1.7), l’inventaire des effets secondaires inattendus (§1.5), les préconditions d’accessibilité (§1.4) et la contamination des sorties (§1.8). Examine les points d’entrée publics sous l’angle du contrat plutôt que des défauts, limite le temps consacré à chaque famille de composants et indique les parties de l...

Pourquoi utiliser Threat Model Surface sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Threat Model Surface se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Threat Model Surface dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/alpha-omega-security/threat-model/tree/main/skills/threat-model-surface. TypingMind lit le fichier SKILL.md et l’installe sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Threat Model Surface ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Threat Model Surface ?

Autant que vous le souhaitez. Vous pouvez utiliser Threat Model Surface avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Threat Model Surface est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par alpha-omega-security sous licence MIT. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇