SPARTA Interface
SPARTA is built on the Eclipse workbench. When you start the SPARTA product, it opens the SPARTA perspective, which arranges the workbench in four main areas, as shown in the screenshot below:
The Project Explorer (left)
The editor area (in the middle - empty for now), where the graphical and tree editors open
The Properties view (bottom), stacked with the Problems view, which lists diagram validation results
The ThreatAnalysis view (right)
The SPARTA interface
If you closed or moved views, restores this layout. If you installed the SPARTA plug-ins into your own Eclipse IDE instead (see Installing SPARTA), open the perspective with and select SPARTA. In an Eclipse IDE, the ThreatAnalysis view is also added to the Java perspective.
SPARTA has no menu of its own: the menu bar is the standard Eclipse one, with an additional Diagram menu while a diagram is active and a SpartaModel Editor menu while the tree editor is active. The analysis is started from the toolbar of the ThreatAnalysis view.
Project Explorer
All the modeling and analyses in SPARTA happen in the context of a concrete project. Before any activity is started, a project first will need to be created.
Creating a Project
In order to start creating a model, first a modeling project needs to be created. In the SPARTA perspective, use , or click Create a Modeling project in the empty Project Explorer. The same wizard is also available as and then . Enter a project name in the New Modeling Project wizard and click Finish.
The creation of the modeling project will also create a file representations.aird, which contains the graphical views (diagrams) of the models that can be created in the next steps.
Creating a new modeling project
Creating SPARTA model files
A model is stored in a .sparta file.
Before any modeling activity can be performed, such a file must first be created.
A single modeling project can contain as many .sparta files as needed.
While it is possible to link multiple .sparta files together to create larger models (see Linking resources to a DFD model), this is not necessary, so a .sparta file can also be used for a fully self-contained DFD.
To create a new file, use one of the following:
In the Project Explorer, right-click the project (or a folder in it) and select .
In the SPARTA perspective, select .
Select and pick .
This launches the wizard, which has two pages:
On the SPARTA Model page, select the parent folder and enter the file name. The default name is
model.sparta. The wizard accepts the extensions.spartaand.spartamodel; use.sparta, because only.spartafiles can be shown in a Data Flow Diagram.On the next page, select the Model Object and, if needed, the XML Encoding (default
UTF-8), and click Finish.
The model object is the main element of the .sparta file that contains all the other model elements.
The list offers every model element type, but only a few are useful as the root of a file:
DFD Model: a data flow diagram model, the model you analyze.
Threat Type Catalog: threat types and their threat patterns (see Creating threat type catalogs).
Solution Type Catalog: reusable security and privacy solutions.
Attacker Model: attacker profiles.
Data Model: data types, personal data types and data subject types.
While you can create separate files for every element, the most convenient element is the DFD Model element, so that you can create all the model elements in a single .sparta file.
After Finish, the new file opens in the tree editor (see Tree Editor).
Creating a new model
Linking resources to a DFD model
Catalogs and attacker models are usually kept in their own files, for example the threat type catalogs that you import into your project. A DFD model only uses such a file when the model refers to it, normally through the model’s Resource property. This property is a list and accepts DFD Models, Threat Type Catalogs, Solution Type Catalogs, Threat Specification Catalogs, Attacker Models and Data Models.
Linking is required: when you analyze a model, SPARTA reads the model’s own file plus the files that the model references directly. Threat types, attacker profiles and solution types in files that are not referenced are ignored. Elements that you create inside the DFD Model itself (for example a Threat Type Catalog created as a child of the DFD Model) are always considered during analysis.
To link a file in the tree editor:
Open the DFD model’s
.spartafile in the tree editor.Select (also in the context menu of the tree), click Browse Workspace…, select the
.spartafile to link and click OK. The file now appears as an additional root in the tree editor.Select the DFD Model element, and in the Properties view click the … button of the Resource property.
In the dialog, select the catalog or attacker model, click Add and then OK.
Save the file.
Loading another file into the tree editor
In the graphical editor, linking takes fewer steps, because the dialog of the Resource property also lists the other .sparta files of the modeling project:
Click the diagram background, so that the DFD Model is selected.
On the Main tab of the Properties view, click the … button of the Resource property.
In the dialog, select the catalog or attacker model, click Add and then OK.
Save the diagram.
Tutorials shows these steps for a threat type catalog, an attacker model and a solution catalog.
Graphical Editor
SPARTA provides a graphical modeler based on Eclipse Sirius.
Before being able to graphically model a DFD, a diagram (a Sirius representation) must be created for a DFD model.
The diagrams are stored in representations.aird; the model itself stays in the .sparta file.
Creating a Data Flow Diagram
Create a diagram in one of the following ways:
Right-click the modeling project and select Create Representation. In the wizard, select Data Flow Diagram under the viewpoint DataFlowDiagram and click Next. Then select the DFD Model element of your
.spartafile, click Finish, and confirm the diagram name.Expand the
.spartafile in the Project Explorer, right-click the DFD Model element and select New Representation. For the first diagram of a project, the menu only contains Other…, which opens the same wizard for this DFD Model: select Data Flow Diagram, click Finish, and confirm the diagram name. After that, the menu lists the entrynew DataFlowDiagram <name>directly.
The default diagram name is new DataFlowDiagram <name>, where <name> is the name of the DFD model.
After that, the diagram is opened in the graphical modeler.
To reopen it later, expand the DFD Model element in the Project Explorer and double-click the diagram.
SPARTA interface with an example project imported
The diagram uses the following notation:
External entity: a rectangle with a bold label.
Process: a circle.
Data store: two horizontal lines.
Trust boundary: a red dashed, rounded box. Its label is shown in upper case; the tooltip shows the actual name.
Data flow: a black arrow from sender to recipient, labeled with its name.
Palette
The right-hand side of the diagram editor contains the Palette with the tools to create the model. Select a tool and click in the diagram (or, for a flow, click the sender and then the recipient).
The DFD Elements section contains:
Tool |
Creates |
Default name |
|---|---|---|
createExternalEntity |
an external entity |
|
createProcess |
a process |
|
createDataStore |
a data store |
|
createTrustBoundary |
a trust boundary |
|
createDataFlow |
a data flow |
|
The Security Tools section is used to apply security and privacy solutions to the model (see Concepts used in SPARTA for the concepts). It is only shown while the SecurityView layer is active (see Layers).
- Apply Solution
Click in the diagram to open the dialog Select solution to apply. In the group Available Solutions, select a Solution; the dialog shows its Name and Number of Roles. OK creates a solution named after the solution type, with one role binding for each role of the solution type. The dialog offers the solution types contained in the DFD model and those in the Solution Type Catalogs listed in the DFD Model’s Resource property, so link a solution catalog first. This is the recommended way to apply a solution.
- createSolution
Creates an empty solution. Set its Securitypattern property to the solution type to be instantiated, and add role bindings with createRole.
- createRole
Click a solution to add an empty role binding to it. Set the role binding’s Binds property to the role of the solution type.
- Assign Role
Connects a role binding to a DFD element that plays the role: drag from the small role square on the border of the solution to a process, data store, external entity or data flow. The connection is only allowed when the type of the target is one of the role’s Binding Types. This adds the target to the role binding’s Binds To property, and a gray line connects the role square to the target. To bind several elements to the same role, for example all data flows that are sent over the same secure channel, use Assign Role again from the same role square for each further element.
Changed in version 2026.1: Assign Role on a role binding that is already bound adds the new element, instead of replacing the previous one.
To remove an element from a role binding, select the role square (or the role binding in the tree editor), select the element in the Binds To list of the Properties view, and click the red remove button next to the list. Deleting the gray line in the diagram does not unbind the element.
Editing the diagram
To rename an element, select it and press F2, or click its label.
To move a process, data store, external entity or trust boundary into or out of a trust boundary, drag it to its new place. This also changes the element that contains it in the model.
To change the sender or recipient of a data flow, drag the corresponding end of the arrow to another element.
Layers
The Layers drop-down in the diagram toolbar shows two optional layers, both active by default:
- SecurityView
Shows the solutions as boxes, with their role bindings as small gray squares on the border. A gray line connects a role binding to each element or flow it is bound to. The layer also provides the Security Tools palette section. Disable the layer to hide all solutions from the diagram.
Note
In SPARTA 2026.1, a role binding that is not bound to any element looks the same as a bound one. To find such role bindings, look for role squares without a gray line, or for labels that end in
role to ?in the tree editor (see Tree Editor).- Mark Flows Crossing TrustBoundary
Draws data flows whose sender and recipient are in different containers, for example on different sides of a trust boundary, in dark red and appends
(!)to their label (Flow 1(!)). Disable the layer to draw these flows as normal black arrows.
Decomposition
Processes, data stores and external entities can be refined into a more detailed DFD. In the tree editor, right-click the element and use New Child to add a Data Flow, External Entity, Process, Data Store, Trust Boundary Container, Sender Specification or Recipient Specification.
Once an element contains child elements, the Data Flow Diagram draws it as a rounded container with its children inside. You can then use the palette tools inside it.
A SenderSpecification or RecipientSpecification states which inner element actually sends or receives a data flow that enters or leaves the decomposed element. They are shown as small light-gray dots on the border of the decomposed element.
When you draw a data flow with createDataFlow to or from an element inside a decomposed element, the flow is connected to the outer element, and SPARTA creates the specifications
Recipient specification for <flow>orSender specification for <flow>automatically.
For a decomposed element you can also create a DecompositionDiagram representation (default name <name> decomposition diagram), in the same way as a Data Flow Diagram but on a process, data store or external entity.
It shows the element as a container with its child elements, the elements it communicates with, and the specification dots.
Its palette contains no creation tools; use it to inspect a decomposition.
Validation
To check a diagram for modeling mistakes, right-click the diagram background and select Validate diagram. The results are listed in the Problems view (next to the Properties view). The rules check the following:
Errors:
<Name> is disconnected.: a process, data store or external entity has no data flows.<Sender> cannot directly move data to <Recipient>: a data flow connects two data stores.<Name> is empty.: a trust boundary contains no elements.<name>'s specialization is incomplete.: a decomposed element lacks a sender or recipient specification for one of its data flows.<name> lacks specification of receiving entity.and<name> lacks specification of sending entity.: a data flow to or from a decomposed element has no recipient or sender specification.
Warnings:
<Name> only sends but doesn't receive any data.<Name> is a data sink. Who uses this data?External entity: <Name> is inside the trust boundary.
Information:
Duplicate TrustBoundary: <Name> has no elements inside with the exception of other trust boundaries.In a DecompositionDiagram:
<name> is inside a trustboundary. Refer to the DFD view to see which elements are inside or outside of that trust boundary.
Validation does not affect the threat analysis: you can analyze a model with validation problems.
Tree Editor
SPARTA files can also be opened and edited using a tree editor, the SPARTA Model Editor, by double-clicking the file in the Project Explorer. The tree editor shows every element of the model, including those that have no graphical notation, such as estimates, annotations, catalogs, attacker profiles and data types.
SPARTA interface with tree editor opened
Right-click an element and use New Child or New Sibling to add elements. The menu lists different entries depending on the selected element, for example:
for a DFD Model, among others: Process, Data Store, External Entity, Data Flow, Trust Boundary Container, Solution and the catalog and model types;
for a process, data store, external entity or data flow: Estimate, Threat Type To Estimate Map, Threat Type ID To Estimate Map, Model Element Annotation and KV Model Element Annotation;
for a data type: the same estimate entries;
for a countermeasure: Estimate, which sets its difficulty;
for a Solution: the names of the roles of its solution type that do not have a role binding in the solution yet; each entry creates a role binding for that role.
The SpartaModel Editor menu (and the context menu) also contains Validate, Control…, Load Resource…, Refresh and Show Properties View.
The tabs at the bottom of the editor (Selection, Parent, List, Tree, Table, Tree with Columns) show the same model in different layouts.
Some labels in the tree are composed from several properties, for example <name> (<sender> -> <recipient>) for a data flow.
A role binding is labeled Binds '<role>' role to '<element>' when it is bound to one element, Binds '<role>' role to multiple assets when it is bound to several elements, and Binds '<role>' role to ? when it is not bound yet.
Changed in version 2026.1: The label of a role binding no longer ends in element, and a role binding bound to several elements shows multiple assets.
Data models (data types, personal data types, data subject types) can only be edited in the tree editor; link a data type to a DFD element with the element’s Dfdelementannotation property.
Properties View
When an element is selected in the graphical modeler or the tree editor, the properties of that element are displayed in the Properties view, and they can be manually modified. In the graphical modeler, the model properties are on the Main tab; the other tabs are standard Sirius tabs (for example Semantic, Style and Appearance).
Every element has a Name, a Description and an Id.
The Id should be unique within a file; catalogs use it to identify threat types (for example stride.tampering).
Properties that hold a list of references, such as Resource, have a … button that opens a selection dialog.
See Advanced concepts in SPARTA for the properties of each element type.
Modifying an element’s properties in the graphical model editor.
Modifying an element’s properties in the tree model editor.
ThreatAnalysis View
After constructing a model, it can be automatically analyzed with SPARTA to elicit security or privacy threats and estimate their risk. The ThreatAnalysis view shows a summary of the risk (threat count and total, mitigated and residual annualized risk) above a table with one row per threat. The view provides four buttons at the top-right side of the view; their names appear as tooltips:
Load and Analyze ModelAnalyzes the model of the active editor: for a diagram, its DFD model; for the tree editor, the model of the selected element. In the tree editor, first select an element of the DFD model (not of a loaded catalog). Loading a model replaces the previous analysis.
Clear EngineClears the threat analysis results. The summary above the table keeps its last values.
CSV ExportExports the threats to
threats.csvin the root of the project that contains the analyzed model, overwriting an existing file.
Report ExportExports the threats as a LaTeX report to the folder
reportin the root of that project.
Neither export asks for a file name. SPARTA does not refresh the workspace, so if the files do not appear in the Project Explorer, select the project and press F5. Click a column header to sort the table, and double-click a row to see the details of a threat. Analysis results and exports describes the columns, the summary, the colors and both exports in detail.
If the analysis view is hidden, it can be revealed through and then .
Note
In SPARTA 2026.1, only the list of threats follows your edits of the loaded model; the risk values are not recalculated, so click
Load and Analyze Model again after changes (see Analysis results and exports).
Note
In SPARTA 2026.1, CSV Export and Report Export leave incomplete files when the analysis contains threats without a data flow, for example from the STRIDE-per-element catalog (see Analysis results and exports).
Analysis results for an example project.
PatternSupport View
The PatternSupport view helps you write threat patterns for your own threat type catalogs (see Writing threat type patterns). It lists the problems found while parsing the threat patterns of the catalogs in the analysis, with the columns ThreatType, Pattern and Issue. Each row is one parse error and is shown with a red background; double-click a row to see the full issue text.
The view is not part of the SPARTA perspective.
Open it with , and select PatternSupport in the Other category (or type PatternSupport in the filter field).
The view is filled each time you click
Load and Analyze Model, so open it before you load the model.
Problems in the helper patterns of a catalog are not listed in this view.