Threat Model Forge for VS CodeView threat-model diagrams, review security findings, and edit model files without leaving VS Code. Get Started
For offline installation, download the VSIX from the GitHub release and run Extensions: Install from VSIX... in the Command Palette. Reload the window after updating. Use Threat Model Forge: Open Studio or Reopen Editor With to switch a model from the text editor to Studio. Review FindingsVS Code's Problems panel updates when you open or save a model. Choose Analyze in Studio to review threats, select affected elements, and record triage on the current model. After editing, save the file to refresh findings. To check unsaved changes, run Threat Model Forge: Analyze Model from the Command Palette or choose Analyze in Studio. Findings are attached to the model file rather than specific source lines. Rule and element IDs help you identify the affected parts of the model. Edit Model FilesStudio supports stencil-based drawing, connections, properties, multiple pages, layout, analysis, threat triage, comparison, and reports. See the Studio guide for the editing controls. Use VS Code's normal Save, Save As, Undo, and Redo commands. Canvas edits mark the document as unsaved; opening or analyzing it does not change the file. Open source switches to text editing. Source edits and changes in another editor update the canvas. Invalid source pauses visual editing until the XML or JSON is corrected. Open File opens Native TM7 FilesEditing a Opening a native file or saving without changes leaves its bytes unchanged. Edited saves may change
XML formatting. Exporting a native Native line trust boundaries are retained but are not drawn on the Studio canvas. Models containing them show a warning because canvas analysis may omit their crossings. Deleting a page removes its hidden objects as well. JSON EditingJSON completion and structural validation are available for:
Version 2 rule packs have full schema validation; older rule-only files have basic structural hints. These editing hints do not run custom rules or apply suppressions to a model. Supported WorkflowsUse desktop VS Code in a trusted workspace, including remote development workspaces. Browser-only VS Code and virtual workspaces are not supported. Studio analysis uses tmforge's built-in rules and respects the model's disabled-rule selections. In Studio, Analysis Rules can load a custom JSON rule pack for the current document session. Reload that pack after restarting VS Code; packs are not automatically read from the workspace. A model that expects an unavailable pack reports an error. Suppression files are not applied by the extension; use the tmforge CLI for suppression workflows. Models can contain up to 32 pages, 1,024 elements, and 2,048 diagram lines, with a maximum file size of 8 MiB. More complex models may exceed processing limits. Analysis requests time out after 30 seconds; choose Analyze to retry. PrivacyAnalysis runs on your computer or, when using remote development, on your remote host. The extension does not send model contents to a separate analysis service. SupportReport problems or request improvements in GitHub Issues. Include the extension version, VS Code version, operating system, and the error message. Use a minimal, sanitized model when a reproduction is needed; do not attach confidential architecture or credentials. |