一键导入
classify
Assign classes to unclassified components, boundaries, data flows, and data items
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Assign classes to unclassified components, boundaries, data flows, and data items
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Auto-discover infrastructure components from codebase using the infrastructure-scout agent
Guided end-to-end threat modeling workflow — scope through validation and sync
Populate security attributes, MITRE ATT&CK references, credentials, and monitoring tools
Quality dashboard with score breakdown, gap analysis, and readiness assessment
Attack surface summary with component breakdown, trust boundary crossings, and control gap analysis
Push local model to platform, pull platform model to local, or check sync status
| name | classify |
| description | Assign classes to unclassified components, boundaries, data flows, and data items |
| agent | security-enricher |
| argument-hint | [--type components|flows|boundaries|data-items] |
Classify elements in a Dethernety threat model using platform module classes.
/dethereal:create first and stopstructure.json, dataflows.json, data-items.json.dethereal/scope.json for crown jewel names (needed for crown jewel tagging).dethereal/state.json to understand current workflow phaseIf $ARGUMENTS contains --type, filter classification to that element type only:
components — classify components onlyflows — classify data flows onlyboundaries — classify boundaries onlydata-items — classify data items onlyIf no arguments, classify all unclassified elements.
Scan model files for elements without classData:
structure.json (recursively through boundary hierarchy)dataflows.jsondata-items.jsonstructure.jsonShow summary: "Found N unclassified elements: X components, Y flows, Z boundaries, W data items."
If all elements are already classified, show:
All elements are classified. Quality: X/100.
[next] /dethereal:enrich (populate security attributes)
activeModules from .dethereal/scope.jsonmoduleIds from activeModules (order matters — see tiebreaking below). If activeModules is absent from scope.json, omit moduleIds from match_classes calls (backward compatibility — searches all installed modules)COMPONENT), boundaries (SECURITY_BOUNDARY), flows (DATA_FLOW), data items (DATA)mcp__plugin_dethereal_dethereal__match_classes(elements: [{name, type?, description?}, ...], classLabel: <label>, moduleIds: [...], topN: 3, fields: ['description', 'category', 'type'])activeModules (user-set priority order). Specialized modules should precede baseline (dethernety-general).dethereal/discovery.json for sources — if pre-classification exists and matches a match_classes candidate, boost confidence to high (IaC). If they differ, present both options in the confirmation tableexact_name matches (high confidence)fuzzy/vector/type matches for confirmationOffline fallback chain:
match_classes(...) as above{ success: false } or an error → fall back to mcp__plugin_dethereal_dethereal__get_classes per module (legacy behavior)get_classes also returns errors → skip Pass 1 entirely, all classification in Pass 2For remaining unclassified elements:
mcp__plugin_dethereal_dethereal__match_classes(elements: [...unclassified...], classLabel: <label>, topN: 3) without moduleIds. The moduleName field on each candidate identifies which module to suggest. If a match is found in an inactive module, flag it: "Element 'X' matched class 'Y' from module 'Z' (not in active modules). Add module 'Z'? (yes / skip)"Match free-text crown jewel names from scope.json to actual components:
scope.json.crown_jewels[], fuzzy-match against component namesdataItemIds) plus the data item itselfCrown jewel mapping:
| Scope Declaration | Matched Component | Type | Confirm? |
|-------------------|-------------------|------|----------|
| "Payment Database" | payment-db | STORE | Y |
| "User PII" | user-service | PROCESS | ? |
crownJewel: true on confirmed components in structure.json. structure.json crownJewel is the single source of truth — the surface report and the control-pass tier-1 sweep read crown-jewel status from this field only. The snake_case crown_jewel that may appear in a component's attribute file is a derived/legacy convenience copy; tagging that lands only in the attribute file leaves the tier sweep seeing zero crown jewels. Always set the structure.json flag./dethereal:add?" An unresolved crown jewel silently drops to Tier 4 in every downstream pass (enrichment priority, surface report, control pass) — do not let the user skip this without an explicit decisionThis is the lightweight Phase 3 tagging. Full asset_criticality enrichment happens during /dethereal:enrich.
Show a single confirmation table for all classification proposals:
## Classification Proposal
| # | Element | Type | Proposed Class | Module | Confidence | Match | Crown Jewel |
|---|---------|------|----------------|--------|------------|-------|-------------|
| 1 | Redis | STORE | Key-Value Store | dethernety-general | high (IaC) | exact | — |
| 2 | PostgreSQL | STORE | Database | Databases | high (IaC) | exact | yes |
| 3 | Auth0 | EXTERNAL_ENTITY | Identity Provider | dethernety-general | medium | fuzzy | — |
| 4 | API Server | PROCESS | Web Application | dethernety-general | medium | vector | — |
| 5 | gRPC Handler | PROCESS | — | — | — | unmatched | — |
Apply all? (yes / modify / skip)
Allow the user to modify individual rows or accept the batch.
After user confirmation, validate classification coverage:
If the gate fails:
Classification gap: 2 STOREs unclassified (payment-cache, session-store).
STOREs must be 100% classified for effective analysis.
Classify now or skip? (classify / skip)
If unclassified elements exist and activeModules is set, check if broadening to additional modules would help: call mcp__plugin_dethereal_dethereal__match_classes(elements: [...unclassified...], classLabel: <label>, topN: 3) without moduleIds. The moduleName field on each candidate identifies which inactive module would resolve the gap. If matches found:
Adding modules [Databases, Azure] would classify 2 more elements. Add? (yes / skip)
If confirmed, update activeModules in scope.json and re-run classification for affected elements.
If the user skips, proceed with a warning but do not block.
classData on elements in their home files — structure.json (components/boundaries), dataflows.json (data flows), data-items.json (data items)classData: null (do not just delete the key — an absent key leaves the platform binding untouched). The next update_model push unassigns the class and the platform deletes its auto-generated exposures, keeping user-authored ones.mcp__plugin_dethereal_dethereal__generate_attribute_stubs(directory_path: '<model-path>') to deterministically write class template attribute stubs for all newly classified elements. The tool auto-scans structure.json, dataflows.json, and data-items.json, deduplicates classes, fetches templates via GraphQL, and merges template fields into existing attribute files (existing values preserved). This replaces manual template fetching — one tool call instead of per-element schema extraction.crownJewel: true onto the confirmed crown jewel components in structure.json (first-class field, not an attribute bag)Classification does NOT change currentState in .dethereal/state.json. The model stays at its current state (DISCOVERED or STRUCTURE_COMPLETE). The quality score's component_classification_rate factor (25% weight) tracks classification progress continuously via mcp__plugin_dethereal_dethereal__validate_model_json.
Call mcp__plugin_dethereal_dethereal__validate_model_json to check structural validity.
[done] Classified N/M elements (X% classified, Y STOREs at 100%). Crown jewels tagged: Z. Quality: X/100.
[next] /dethereal:enrich (populate security attributes) or /dethereal:classify --type flows (classify remaining types)