SPARTA in Eclipse

If you are developing extensions of SPARTA in Eclipse, these libraries are the most convenient to use as dependencies in your Eclipse plug-in projects. See Eclipse Prerequisites for how to set up Eclipse and make the SPARTA plug-ins available.

Warning

If you want to run SPARTA as part of a standalone Java program, see SPARTA Standalone libraries for more information.

Plug-ins

Note

All plug-in and exported package names below are abbreviated: they all start with be.kuleuven.cs.distrinet.. For example, sparta.core stands for the plug-in be.kuleuven.cs.distrinet.sparta.core, and sparta.core.model for the package be.kuleuven.cs.distrinet.sparta.core.model. All plug-ins have version 2026.3.0 and are compiled for Java 21.

sparta.spartamodel

Contains the SPARTA meta-model and the EMF model code generated from it.

The meta-model covers all modeling concepts in SPARTA: DFD models, security and privacy solutions, data models with personal data, threat type catalogs, attacker profiles, and estimates. It is a single Ecore model, model/spartamodel.ecore, with namespace URI http://distrinet.cs.kuleuven.be/spartamodel and prefix spartamodel; the code is generated from it with EMF, using model/spartamodel.genmodel. The model folder, including spartamodel.ecore, spartamodel.genmodel and the class diagrams in spartamodel.aird, is part of the plug-in. The meta-model is explained in Advanced concepts in SPARTA, and the generated classes in Meta-model.

Exported packages: sparta.spartamodel, sparta.spartamodel.impl, sparta.spartamodel.util

sparta.spartamodel.edit

Provides the EMF.Edit item providers of the meta-model, which tell editors how to present and edit model elements (labels, icons, properties and child elements).

Exported packages: sparta.spartamodel.provider

sparta.spartamodel.editor

Provides the SPARTA Model Editor (tree editor) and the SPARTA Model wizard.

The editor opens files with the extensions .sparta and .spartamodel. The wizard (“Create a new SPARTA model”) is in the wizard category “SPARTA Model Creation Wizards”. How to use the editor and the wizard is explained in SPARTA Interface.

Exported packages: sparta.spartamodel.presentation

sparta.spartamodel.tests, sparta.core.tests, sparta.analysis.tests, sparta.io.tests and sparta.threatanalysis.tests

Contain the JUnit tests of sparta.spartamodel, sparta.core, sparta.analysis, sparta.io and sparta.threatanalysis, which the Maven build runs (see Building SPARTA from source); not part of any feature.

Exported packages: none

sparta.design

Contains the Sirius specification of the graphical DFD editor and of the table editors for attacker profiles and threat type catalogs (see Table editors).

The specification is description/sparta.odesign. It defines the viewpoint DataFlowDiagram with four representations: the “Data Flow Diagram” of a DFD model, the DecompositionDiagram of a single DFD element, and the tables “Attacker Profiles” of an attacker model and “Threat Type Catalog” of a threat type catalog. The tables are Sirius edition tables, which have one row per model element and one column per property; the Sirius table runtime that they need is part of the SPARTA Graphical Modeling Support feature (see Features). The plug-in also contains a Java class sparta.design.Services with Sirius services (Java methods that the specification can call from its expressions), such as coverageLabel() and mitigatedThreatTypeCount() for solutions and countermeasures, but in 2026.3 the specification does not use them.

Exported packages: none

sparta.queries

Contains the built-in VIATRA queries that SPARTA runs on a model: the queries of the legacy key-based threat types, and the queries that collect catalogs, data types and attacker profiles for the analysis. The queries are described in Built-in queries.

Exported packages: sparta.queries

sparta.core

Provides the threat elicitation engine, the calculation of the risk for individual threats, and the classes that represent elicited threats (IThreat and its implementations). The classes are described in Threat elicitation and risk analysis; code to run the threat elicitation from your own plug-in is in Development scenarios.

Exported packages: sparta.core, sparta.core.analysis, sparta.core.analysis.risk, sparta.core.model, sparta.core.patterns

sparta.threatanalysis

Provides support for aggregated risk analyses over collections of threats, such as the total risk, the risk per threat type, and the risk per element type, based on the risk values that sparta.core calculates for individual threats. The classes are described in Aggregated risk analyses.

Exported packages: sparta.analysis

sparta.io

Exports threats to CSV, JSON, XLSX and text files, and to a LaTeX report with the data flow diagram of the model. The classes are described in Exporting results.

Exported packages: sparta.io, sparta.io.convert, sparta.io.diagram, sparta.io.templates, sparta.io.util

sparta.analysis

Provides the Eclipse user interface to run the threat analysis: the ThreatAnalysis and PatternSupport views, the SPARTA menu and toolbar with the analysis and export commands, and the context menu command Edit VQL Pattern…, which opens a dialog with syntax highlighting in which you edit the VQL text of a threat pattern.

The ThreatAnalysis view shows the threats with their risk (see Analysis results and exports), and the PatternSupport view shows problems found while parsing the patterns of threat type catalogs (see SPARTA Interface and Writing threat type patterns). The plug-in only exports the helper classes of its views; to run the analysis programmatically, use the Engine of sparta.core (see Threat elicitation and risk analysis). It also exports the package sparta.analysis.service, but only to its test plug-in (x-friends).

Exported packages: sparta.analysis.util

sparta.rcp

Customizes the packaged SPARTA Eclipse Application; it contains no functionality for developers. The product is described in RCP product.

Exported packages: none

sparta.welcome

Contains the welcome screen of the SPARTA product, the example projects and the guided tutorial; it contains no Java code.

The welcome screen (intro be.kuleuven.cs.distrinet.sparta.welcome.intro) is only bound to the SPARTA product, so an Eclipse IDE with the SPARTA features keeps its own welcome screen. The example wizards in the category SPARTA of File ‣ New ‣ Example… create the example projects contoso, socialnetwork and webrtc and the starter project sparta-tutorial of the guided tutorial; the projects are zip files in the examples folder of the plug-in. The guided tutorial is the cheat sheet “Create and analyze your first model”, in the category SPARTA of Help ‣ Cheat Sheets….

Exported packages: none

Changed in version 2026.3: The plug-in sparta.welcome was added. sparta.io exports the packages sparta.io.diagram and sparta.io.templates and no longer the package sparta.io.json, and sparta.spartamodel.tests no longer exports a package.

Note

Plug-in names and package names do not always match. The aggregated risk analyses are in the package sparta.analysis, but that package belongs to the plug-in sparta.threatanalysis. The plug-in sparta.analysis is the user interface. To use the aggregated risk analyses, your plug-in must depend on sparta.threatanalysis.

Plug-in dependencies

The graph shows the dependencies between the SPARTA plug-ins (the Require-Bundle headers of their manifests). The test plug-ins are not shown; each depends on the plug-in it tests.

        flowchart LR
   analysis --> spartamodel
   analysis --> queries
   analysis --> core
   analysis --> io
   analysis --> mEditor["spartamodel.editor"]
   core --> queries
   core --> spartamodel
   io --> core
   io --> threatanalysis
   io --> spartamodel
   design --> spartamodel
   queries --> spartamodel
   threatanalysis --> core
   threatanalysis --> spartamodel
   mEditor --> mEdit["spartamodel.edit"]
   mEdit --> spartamodel
    

Note

sparta.rcp and sparta.welcome are not shown: they do not require any other SPARTA plug-in. sparta.rcp refers to the SPARTA Model wizard (sparta.spartamodel.editor) in its plugin.xml, and to the ThreatAnalysis and PatternSupport views (sparta.analysis) in its perspective class, by their IDs; sparta.welcome refers to the SPARTA Model wizard by its ID.

Features

The plug-ins are grouped into four Eclipse features. The SPARTA update site lists all four in the category “Threat Modeling”.

SPARTA Threat Modeling

be.kuleuven.cs.distrinet.sparta.feature

The three features below and the plug-ins sparta.rcp and sparta.welcome, so all SPARTA plug-ins except the test plug-ins. This is the feature to install for the complete SPARTA tool.

SPARTA Modeling Support

be.kuleuven.cs.distrinet.sparta.modeling.feature

sparta.spartamodel, sparta.spartamodel.edit and sparta.spartamodel.editor: creating, reading and editing SPARTA models, without graphical modeling support.

SPARTA Graphical Modeling Support

be.kuleuven.cs.distrinet.sparta.graphicalmodeling.feature

sparta.design: the graphical DFD editor and the table editors for attacker profiles and threat type catalogs. Requires Sirius. The feature also contains the plug-ins of the Sirius table runtime (org.eclipse.sirius.table.model, org.eclipse.sirius.table and org.eclipse.sirius.table.ui).

SPARTA Threat Analysis Support

be.kuleuven.cs.distrinet.sparta.threatanalysis.feature

sparta.analysis, sparta.core, sparta.io, sparta.queries and sparta.threatanalysis: threat elicitation, risk analysis, exports, and the ThreatAnalysis and PatternSupport views. Requires the two modeling features, VIATRA, and third-party libraries such as Apache POI, Jackson and Commons Math.

Extension hooks

SPARTA does not define its own Eclipse extension points. You extend SPARTA through the extension mechanisms of EMF, Sirius and VIATRA, and through the Java API of the exported packages.

Meta-model

sparta.spartamodel registers its EMF package (namespace URI http://distrinet.cs.kuleuven.be/spartamodel, generator model model/spartamodel.genmodel) and its resource factory for .sparta and .securitydfd files. Your own Ecore models can reference the SPARTA meta-model, for example to add subclasses of SPARTA concepts. Development scenarios shows how to extend the meta-model this way.

Item providers and child creation

sparta.spartamodel.edit registers SpartaModelItemProviderAdapterFactory for the SPARTA namespace URI. The SPARTA generator model enables Extensible Provider Factory and Child Creation Extenders, so the edit plug-in of an extension can contribute new child elements (for example, a new kind of data store in a DFD model) to the SPARTA Model Editor (tree editor) and the Properties view. The graphical DFD editor is not extended this way: its palette comes from sparta.odesign, so new element kinds need their own Sirius specification (see Graphical editor below).

Graphical editor

sparta.design registers its Sirius specification through the org.eclipse.sirius.componentization extension point (component be.kuleuven.cs.distrinet.security.secdfd.design). You can provide your own Sirius viewpoint specification for SPARTA models in a separate plug-in.

Queries

sparta.queries registers the query groups be.kuleuven.cs.distrinet.sparta.queries.DFDQueries, DataQueries, AttackerProfileQueries and PatternSupport through the org.eclipse.viatra.query.runtime.queryspecification extension point. You can use the generated query classes in your own code and import their patterns in your own VQL files (see Built-in queries).

Java API

The threat elicitation engine, the risk model, the aggregated risk analyses and the exporters are described in SPARTA Java API. For example, a subclass of Threat can use its own risk model (see Threat elicitation and risk analysis).

User interface

You can refer to the ids of the SPARTA user interface elements, for example in perspective extensions or menu contributions:

Element

Id

ThreatAnalysis view

be.kuleuven.cs.distrinet.sparta.analysis.views.ThreatAnalysis

PatternSupport view

be.kuleuven.cs.distrinet.sparta.analysis.views.PatternSupport

Command “Load and Analyze Model”

be.kuleuven.cs.distrinet.sparta.analysis.loadmodel

Command “Clear Analysis Engine”

be.kuleuven.cs.distrinet.sparta.analysis.clearengine

Command “Export Threats to CSV”

be.kuleuven.cs.distrinet.sparta.analysis.csvexport

Command “Export Threats to XLSX”

be.kuleuven.cs.distrinet.sparta.analysis.xlsxexport

Command “Export Threat Report”

be.kuleuven.cs.distrinet.sparta.analysis.reportExport

Command “Edit VQL Pattern”

be.kuleuven.cs.distrinet.sparta.analysis.editVqlPattern

SPARTA menu

be.kuleuven.cs.distrinet.sparta.analysis.menu

SPARTA toolbar

be.kuleuven.cs.distrinet.sparta.analysis.toolbar

SPARTA Model Editor

be.kuleuven.cs.distrinet.sparta.spartamodel.presentation.SpartaModelEditorID

SPARTA Model wizard

be.kuleuven.cs.distrinet.sparta.spartamodel.presentation.SpartaModelModelWizardID

SPARTA perspective

be.kuleuven.cs.distrinet.sparta.rcp.spartaperspective

Welcome screen (intro)

be.kuleuven.cs.distrinet.sparta.welcome.intro

Example wizards

be.kuleuven.cs.distrinet.sparta.welcome.examples.contoso, be.kuleuven.cs.distrinet.sparta.welcome.examples.socialnetwork, be.kuleuven.cs.distrinet.sparta.welcome.examples.webrtc and be.kuleuven.cs.distrinet.sparta.welcome.examples.tutorial

Cheat sheet “Create and analyze your first model”

be.kuleuven.cs.distrinet.sparta.welcome.cheatsheet.firstmodel

When you install the SPARTA features into an Eclipse IDE, sparta.analysis also adds the ThreatAnalysis view to the Java perspective.

RCP product

The SPARTA product is a packaged Eclipse application with all SPARTA features. Its definition is releng/be.kuleuven.cs.distrinet.sparta.product/be.kuleuven.cs.distrinet.sparta.product in the source repository, and the branding is in the sparta.rcp plug-in.

Product

The product id is be.kuleuven.cs.distrinet.sparta.rcp.product, with the name “Security and Privacy Analysis through Risk-driven Threat Assessment”, the application name “SPARTA”, and version 2026.3.0. It runs the Eclipse IDE workbench application (org.eclipse.ui.ide.workbench), so it behaves like an Eclipse IDE with SPARTA branding. Besides the SPARTA feature, it contains the Eclipse platform, EMF, Sirius, EcoreTools, and the p2 update user interface.

Platforms

The product is built for Windows (x86_64), Linux (gtk, x86_64) and macOS (cocoa, x86_64). Each archive contains the SPARTA launcher and a Java 21 runtime from Eclipse JustJ, so users do not need to install Java. The launcher starts Java with an initial heap of 512 MB and a maximum heap of 2 GB (-Xms512m -Xmx2048m) and with -Dosgi.checkConfiguration=false. See Installing SPARTA for downloading and starting the product.

Workspace

The default workspace is the folder sparta-workspace in the user’s home directory.

Welcome screen

When the product starts with a new workspace, it shows the welcome screen of sparta.welcome; afterward, it is available in Help ‣ Welcome.

Perspective

The default perspective is the “SPARTA” perspective (be.kuleuven.cs.distrinet.sparta.rcp.spartaperspective). It shows the Project Explorer on the left, the ThreatAnalysis and PatternSupport views stacked to the right of the editor area, and the Properties and Problems views below the editors. The class sparta.rcp.SPARTAPerspective defines this layout; the perspective extension in plugin.xml contributes the File ‣ New shortcuts, which are the SPARTA Model wizard and the Sirius Modeling Project wizard. The perspective is described in SPARTA Interface.

Updates

The product checks for updates once a week and reminds the user of available updates every 4 hours; these defaults are set in plugin_customization.ini of sparta.rcp. It is configured with the update sites https://downloads.sparta.distrinet-research.be/updates/2026 and https://download.eclipse.org/releases/2025-06. The launcher passes -Declipse.e4.inject.javax.warning=false to Java, which suppresses the javax.inject deprecation warnings in the log.