SecOpsTM DSL Syntax Reference

July 14, 2026 · View on GitHub

Table of Contents

Overview

A SecOpsTM system model is a Markdown file parsed in three passes:

  1. Pass 0## Context (model-level configuration)
  2. First pass## Boundaries, ## Actors, ## Servers, ## Data (element definitions)
  3. Second pass## Dataflows, ## Protocol Styles, ## Severity Multipliers, ## Custom Mitre Mapping (relationships and overrides)

List item format:

- **Element Name**: key=value, key=value, key="quoted value", key=[list, of, values]
  • Names are case-sensitive for display but case-insensitive for references (e.g., boundary=Internet matches Internet or INTERNET)
  • Multi-line definitions supported: continuation lines indented deeper than - **Name**: line
  • Comments: // to end of line are ignored by parser

Section: Description

⚠️ CRITICAL: model.md must use the following title format:

# System Model: {System Name}

Format requirements:

  • Must start with # System Model: (English colon : + space)
  • System name follows after the space
  • Correct: # System Model: DJI Power Inspection Drone System
  • Incorrect: # DJI Power Inspection Drone System - System Model
  • The legacy # Threat Model: {System Name} form still works (with a deprecation warning) — always write new models with # System Model:.

Impact: Incorrect title format causes SecOpsTM to fail generating report filenames correctly.

## Description
Free text describing the analyzed system.

Plain text paragraphs, no key-value parsing. Appears in generated HTML report header and diagram tooltips.


Section: Context

Configure model-level options, parsed before element creation. Each line formatted as key = value or - key = value or - key: value.

Context Attributes

AttributeTypeDefaultDescription
gdaf_contextstring (path)NoneGDAF context YAML file path, relative to model file directory
bom_directorystring (path)NoneBOM directory path, relative to model file directory
vex_filestring (path)NoneCycloneDX VEX file path, takes precedence over BOM known_cves
vex_directorystring (path)NoneCycloneDX VEX file directory path
gdaf_min_technique_scorefloat 0.0–3.00.8Minimum ScoredTechnique.score for rendering OR-branch in .afb Attack Flow file

Context path resolution priority:

  1. Value specified in ## Context
  2. {model_dir}/context/*.yaml — auto-discovered when directory exists
  3. config/context.yaml — SecOpsTM global default

BOM directory resolution priority:

  1. Value specified in ## Context
  2. {model_dir}/BOM/ — auto-discovered when directory exists
  3. Disabled (no BOM enhancement)

Section: Boundaries

Boundaries represent trust zones, network segments, or logical execution environments, rendered as labeled clusters in diagrams.

Boundary Attributes

AttributeTypeDefaultSTRIDE ImpactGDAF ImpactDescription
isTrustedboolFalseTrust boundary threatsEntry point detectionWhether this zone is trusted. Trusted = green solid border; Untrusted = red dashed border
isFilledboolFalseNoneNoneWhether boundary has background fill in diagram
typestring""NoneContext for path scoringZone type, see accepted values below
colorstring"lightgray"NoneNoneBoundary cluster fill color in diagram, CSS color name or hex (#2e7d32)
line_stylestring"solid"NoneNoneBoundary line style: solid, dashed, dotted
traversal_difficultystring"low"Nonehop_weight bonusDifficulty for attacker to traverse this boundary, see accepted values below
descriptionstring""NoneNoneRequired. Free-text technical description (1-2 sentences, in English)
businessValuestringNoneNoneNoneFree-text business value description (in English)

Accepted Values for type

ValueMeaning
network-on-premOn-premises network segment
network-cloud-providerCloud provider network (AWS VPC, Azure VNet, etc.)
network-cloud-security-groupCloud security group or firewall rule boundary
execution-environmentLogical execution area (data center zone, server room, container namespace)
container-runtimeContainer orchestration boundary (Kubernetes namespace, Docker network)

traversal_difficulty Values

Valuehop_weight BonusMeaningExample
low+0.3Easy to traverse (less control)Public DMZ, open internal segment
medium+0.1Moderate control (firewalls, VLAN segmentation)Standard internal network
high+0.0Strong control (micro-segmentation, strict firewall rules)Finance area, OT/SCADA zone

Nested Boundaries

Boundaries can be nested, with child boundaries indented deeper than parent:

## Boundaries
- **Corporate Network**:
  isTrusted=True, type=network-on-prem, color=lightblue
  - **Finance Zone**:
    isTrusted=True, type=execution-environment, color=lightyellow

Section: Actors

Actors represent people, external systems, or roles interacting with the system, displayed as external entities (rectangles without servers) in diagrams.

Actor Attributes

AttributeTypeDefaultDescription
boundarystringNoneBoundary name the actor belongs to, must match boundary defined in ## Boundaries
authenticitystring"none"Authentication method used by actor, see accepted values below
isTrustedboolFalseWhether to trust this actor. Actors with isTrusted=False in untrusted boundaries are GDAF external attacker entry points
providesAuthenticationboolFalseWhether this actor provides authentication for other elements
colorstringNoneNode fill color in diagram, CSS color name or hex
descriptionstring""Required. Free-text technical description (1-2 sentences, in English)

Accepted Values for authenticity

ValueDescription
noneNo authentication
credentialsUsername and password
two-factorMulti-factor authentication
client-certificateMutual TLS (mTLS)
externalizedExternal IdP (SAML, OAuth)

Section: Servers

Servers represent assets, components, or systems in the system model.

Server Attributes

AttributeTypeDefaultSTRIDE ImpactGDAF ImpactDescription
boundarystringNoneNoneNoneRequired. Boundary name, must match ## Boundaries
typestringdefaultNoneAsset type classificationAsset type, see 31 standard types below
classificationstringUNKNOWNData handling threatsasset_value on nodes (0.0–1.0)Sensitivity classification, see accepted values below
machinestringvirtualDeployment-specific threatsNoneDeployment form, see accepted values below
internet_facingboolFalseInternet exposure threatsEntry point detectionWhether exposed to internet
mfa_enabledboolFalseCredential theft threats+0.2 on hop_weight when FalseWhether multi-factor authentication enabled
credentials_storedboolFalseCredential storage threatsNoneWhether stores credentials
encryptionstringNoneData at rest threatsNoneEncryption method for stored data
redundantboolFalseNoneNoneWhether has redundancy
auth_protocolstringNoneAuth protocol threatsNoneAuthentication protocol, see accepted values below
wafboolFalseWeb attack mitigationNoneWhether has Web Application Firewall
idsboolFalseDetection capabilityNoneWhether has Intrusion Detection System
ipsboolFalsePrevention capabilityNoneWhether has Intrusion Prevention System
patch_levelstringunknownVulnerability exposureNonePatch status, see accepted values below
detection_levelstringnoneDetection capabilityNoneMonitoring/detection level, see accepted values below
CIAstringmediumNoneasset_value boostCombined CIA score, see accepted values below
confidentialitystringmediumConfidentiality threatsasset_value componentConfidentiality importance
integritystringmediumIntegrity threatsasset_value componentIntegrity importance
availabilitystringmediumAvailability threatsasset_value componentAvailability importance
businessValuestringNoneNoneNoneFree-text business value description (in English)
descriptionstring""NoneNoneRequired. Free-text technical description (1-2 sentences, in English)
colorstringNoneNoneNoneNode fill color in diagram
tagslist[]NoneNoneOS version, software identifiers
submodelstringNoneNoneNoneSubsystem model file path (multi-subsystem scenarios)

Accepted Values for type (31 Standard Types)

firewall
domain-controller
auth-server
database
web-server
api-gateway
file-server
mail-server
management-server
workstation
load-balancer
vpn
vpn-gateway
plc
scada
repository
cicd
backup
dns
pki
siem
default
api_server
microservice
secrets_manager
monitoring
message_broker
cache
ingress
service_mesh
container_registry

Accepted Values for machine

ValueDescription
physicalPhysical hardware
virtualVirtual machine
containerContainerized
serverlessServerless function
embeddedEmbedded device
saasSoftware as a Service

Accepted Values for classification

ValueGDAF asset_valueDescription
PUBLIC0.0Non-sensitive, publicly available
INTERNAL0.2Internal use only
RESTRICTED0.4Restricted access
SECRET0.7Sensitive — requires access control
TOP_SECRET1.0Highly sensitive — highest protection
UNKNOWN0.1Classification unknown

Accepted Values for auth_protocol

ValueDescription
noneNo authentication
ldapLDAP authentication
kerberosKerberos authentication
samlSAML authentication
oauthOAuth authentication
oidcOpenID Connect
radiusRADIUS authentication

Accepted Values for patch_level

ValueDescription
unknownPatch status unknown
currentRegularly patched
outdatedKnown vulnerabilities, not patched

Accepted Values for detection_level

ValueDescription
noneNo monitoring
mediumBasic logging
highEDR/SIEM monitoring

Accepted Values for CIA / confidentiality / integrity / availability

ValueDescription
lowLow importance
mediumMedium importance
highHigh importance
criticalCritical importance

Section: Data

Data objects represent information assets flowing through the system.

Data Attributes

AttributeTypeDefaultSTRIDE ImpactGDAF ImpactDescription
classificationstringUNKNOWNData handling threats, sensitivity leveldata_value on edges (0.0–1.0)Sensitivity classification, case-insensitive, see accepted values below
credentialsLifestringUNKNOWNCredential handling threatsNoneCredential lifecycle/storage type, see accepted values below
descriptionstring""NoneNoneFree-text description of the data object (in English)
storage_locationlist[]NoneNoneList of server names storing this data, must match names in ## Servers
isPIIboolFalsePII-specific threatsNoneWhether contains personally identifiable information
isPasswordboolFalsePassword-specific threatsNoneWhether is password data
isCryptographicKeyboolFalseKey-specific threatsNoneWhether is cryptographic key
isConfidentialityCriticalboolFalseConfidentiality threatsNoneWhether confidentiality is critical
isIntegrityCriticalboolFalseIntegrity threatsNoneWhether integrity is critical

Accepted Values for classification

ValueGDAF data_valueDescription
PUBLIC0.0Non-sensitive, publicly available data
UNKNOWN0.1Classification unknown
RESTRICTED0.4Internal use only, not public
SECRET0.7Sensitive — requires access control
TOP_SECRET1.0Highly sensitive — highest protection
SENSITIVE0.6Sensitive data (code extension support)
INTERNAL0.2Internal use (code extension support)

Accepted Values for credentialsLife

ValueSTRIDE ImpactDescription
NONENo credential threatsNo credentials
UNKNOWNLow signalCredential lifecycle unknown
SHORTLow riskShort-term tokens or session credentials
LONGMedium riskLong-term credentials (service accounts)
AUTOLow riskAuto-rotated credentials
MANUALMedium riskManually managed credentials (rotation risk)
HARDCODEDHigh riskHardcoded credentials — triggers pytm hardcoded credential threat

HARDCODED and LONG credential lifecycles act as credential persistence signals, generating additional credential theft and replay attack STRIDE threats.


Section: Dataflows

Dataflows define communication channels between actors and servers (or between servers), representing directed edges in the system diagram and primary units for STRIDE threat generation.

Dataflow Attributes

AttributeTypeDefaultRequiredSTRIDE ImpactGDAF ImpactDescription
fromstringYesDetermines source elementSource node in the graphSource element name (actor or server), must match exactly (case-insensitive)
tostringYesDetermines sink elementSink node in the graphDestination element name (actor or server)
protocolstringNoneNoProtocol-specific STRIDE rulesservices set on both nodes, tactic boostsProtocol name, any string; common values: HTTPS, HTTP, SSH, RDP, SMB, LDAP, Kerberos, SQL, WinRM, RPC, SMTP, IPSEC, Modbus, DNS, FTP, SAP, TCP, UDP
isEncryptedboolFalseNoCleartext data threats+0.3 on hop_weight when FalseWhether channel is encrypted
isAuthenticatedboolFalseNoUnauthenticated access threats+0.4 on hop_weight when FalseWhether channel requires authentication
authenticationstring"none"NoAuthentication-specific STRIDE rulesEdge authentication attributeAuthentication method on this flow, see accepted values below
authorizationstring"none"NoAuthorization threatsNoneAuthorization model, see accepted values below
vpnboolFalseNoVPN-related threat variantsNoneWhether this flow traverses VPN tunnel
bidirectionalboolFalseNoNoneReverse edge added to GDAF graphWhen True, GDAF can traverse this edge in both directions, supporting reverse attack paths
datastringNoneNoData classification threatsdata_value on edge (0.0–1.0 from classification)## Data object name transmitted by this flow, must match defined data object
ipFilteredboolFalseNoIP filtering threat variantsNoneWhether this flow is IP filtered
readOnlyboolFalseNoWrite-access threatsNoneWhether this flow is read-only
usagestringNoneNoNoneNoneUsage category: business, devops, management
colorstringNoneNoNoneNoneArrow color in diagram, when set overrides protocol style color, CSS name or hex

Accepted Values for authentication

ValueDescription
noneNo authentication
credentialsUsername and password
session-idSession token (cookie)
tokenAPI token or bearer token
client-certificateMutual TLS (mTLS)
two-factorMulti-factor authentication
externalizedExternal IdP (SAML, OAuth)
kerberosKerberos tickets

Accepted Values for authorization

ValueDescription
noneNo authorization
technical-userFixed service account authorization
enduser-identity-propagationUser identity propagated to backend (e.g., impersonation, JWT)

GDAF Edge Scoring

Conditionhop_weight Bonus
isAuthenticated=False+0.4
isEncrypted=False+0.3
mfa_enabled=False on sink node+0.2
CIA score of sink node+0 to +0.1
Data value from data classification+0 to +0.3
traversal_difficulty=low on sink boundary+0.3
traversal_difficulty=medium on sink boundary+0.1

Section: Protocol Styles

Define visualization styles for protocols in diagrams.

Protocol Style Attributes

AttributeTypeDefaultDescription
colorstringProtocol-specificLine color in diagram
line_stylestringsolidLine style: solid, dashed, dotted

Example

## Protocol Styles
- **https**: color=darkgreen, line_style=solid
- **http**: color=red, line_style=dashed
- **ssh**: color=blue, line_style=dashed

Section: Severity Multipliers

Define risk calculation multipliers for different asset types or threat categories.

Format

## Severity Multipliers
- **AssetType**: 2.0
- **ThreatCategory**: 1.5

Range: 1.0 - 3.0

Example

## Severity Multipliers
- **CriticalAsset**: 3.0
- **ImportantServer**: 2.0
- **StandardServer**: 1.0

Section: Custom Mitre Mapping

Custom MITRE mapping pins specific ATT&CK tactic and technique IDs to environment-relevant named attack patterns.

Format

## Custom Mitre Mapping
- **Pass-the-Hash**: {"tactics": ["Lateral Movement"], "techniques": [{"id": "T1550.002", "name": "Use Alternate Authentication Material: Pass the Hash"}]}

Value must be valid Python dict literal (parsed internally with ast.literal_eval). Format:

{"tactics": [<list of tactic names>], "techniques": [{"id": "<ATT&CK ID>", "name": "<technique name>"}, ...]}

Tactic names should match ATT&CK tactic display names (e.g., "Lateral Movement", "Credential Access"). Technique IDs follow ATT&CK format: T1234 or T1234.001 (sub-technique).

Example

## Custom Mitre Mapping
- **Drone Hijacking**: {"tactics": ["Execution", "Persistence"], "techniques": [{"id": "T1204", "name": "User Execution"}]}
- **Telemetry Interception**: {"tactics": ["Collection", "Exfiltration"], "techniques": [{"id": "T1041", "name": "Exfiltration Over C2 Channel"}]}

Custom Type and Protocol Extensions

Use config/asset_types_community.yaml and config/protocols_community.yaml to extend the DSL, see custom-asset-types.md.


Complete DSL Template

⚠️ CRITICAL FORMAT REQUIREMENT: SecOpsTM parser requires EXACT DSL syntax. DO NOT use custom Markdown formats like ### Boundary: or **Name**:. Use ONLY the list format shown below.

# System Model: {System English Name}

## Description
{High-level system description in English}

## Context
gdaf_context = context/{project-name}_context.yaml
bom_directory = BOM
gdaf_min_technique_score = 0.75

## Boundaries
- **Internet**: isTrusted=False, type=network-on-prem, traversal_difficulty=low, description="Untrusted public internet — external attack surface", businessValue="External attack surface — no internal trust"
- **DMZ**: isTrusted=False, type=network-on-prem, traversal_difficulty=low, description="Demilitarized zone — internet-facing services", businessValue="Public-facing services — limited internal access"
- **Internal Network**: isTrusted=True, type=network-on-prem, traversal_difficulty=medium, description="Trusted internal corporate network — core business systems", businessValue="Internal corporate network — trusted employees and systems"

## Actors
- **External Attacker**: boundary=Internet, authenticity=none, isTrusted=False, description="Unauthenticated external threat actor with no prior access", businessValue="Primary threat source — targets customer data"
- **System Administrator**: boundary="Internal Network", authenticity=two-factor, isTrusted=True, description="Privileged internal user with domain admin rights", businessValue="Full system access — can modify configurations"

## Servers
- **API Gateway**:
  boundary=DMZ,
  type=api-gateway,
  classification=RESTRICTED,
  machine=container,
  internet_facing=True,
  mfa_enabled=True,
  credentials_stored=False,
  description="API gateway — all external traffic entry point",
  businessValue="Critical entry point — all customer transactions"
- **Database**:
  boundary="Internal Network",
  type=database,
  classification=SECRET,
  encryption=transparent,
  credentials_stored=True,
  description="PostgreSQL database — stores user data",
  businessValue="Core business data — customer records"

## Data
- **User Credentials**: description="User login credentials", classification=SECRET
- **Financial Records**: description="Financial transaction records", classification=TOP_SECRET

## Dataflows
- **UserToAPI**: from="External Attacker", to="API Gateway", protocol=HTTPS, isEncrypted=True, isAuthenticated=True, authentication=token, data="User Credentials"
- **APIToDB**: from="API Gateway", to=Database, protocol=TCP, isEncrypted=True, isAuthenticated=True, data="Financial Records"

## Protocol Styles
- **HTTPS**: color=darkgreen, line_style=solid
- **HTTP**: color=red, line_style=dashed
- **TCP**: color=blue, line_style=solid

## Severity Multipliers
- **API Gateway**: 2.0
- **Database**: 3.0

## Custom Mitre Mapping
- **Technique Name**: {"tactics": ["Initial Access"], "techniques": [{"id": "T1190", "name": "Exploit Public-Facing Application"}]}

DSL Format Rules (MUST FOLLOW)

  1. List format ONLY: Use - **Name**: key=value for Boundaries, Actors, Servers, Data
  2. DO NOT use: ### Boundary:, **Name**:, or other custom Markdown headers
  3. Multi-line attributes: Indent continuation lines deeper than - **Name**:
  4. References: from=, to=, boundary= must match defined names (case-insensitive)
  5. String values: Use double quotes for values with spaces: description="..."
  6. Boolean values: Use True/False (Python syntax)
  7. Enum values: Use only valid DSL enum values (e.g., type=api-gateway)

Validation Rules

Hard Constraints (Must Pass)

  1. ✅ All boundary= references must be defined in ## Boundaries
  2. ✅ All from= and to= references must be defined in ## Actors or ## Servers
  3. ✅ All data= references must be defined in ## Data
  4. ✅ All type= values must be valid enums
  5. ✅ All classification= values must be valid enums
  6. ✅ All protocol= values must be defined in ## Protocol Styles or be standard protocols
  1. ✅ All servers have BOM files
  2. ✅ All data flows are encrypted when crossing untrusted boundaries
  3. ✅ All internet-facing servers have MFA
  4. ✅ All credential-storing servers have encryption
  5. ✅ All critical assets have high availability

Common Errors

ErrorFix
boundary: undefined_boundaryDefine boundary in ## Boundaries
type: custom_typeUse standard type or define in config/
classification: confidentialUse RESTRICTED or other valid enum
from: undefined_serverDefine server in ## Servers
Missing required fieldsAdd all required fields

DSL Format Rules (MUST FOLLOW)

  1. List format ONLY: Use - **Name**: key=value for Boundaries, Actors, Servers, Data
  2. DO NOT use: ### Boundary:, **Name**:, or other custom Markdown headers
  3. Multi-line attributes: Indent continuation lines deeper than - **Name**:
  4. References: from=, to=, boundary= must match defined names (case-insensitive)
  5. String values: Use double quotes for values with spaces: description="..."
  6. Boolean values: Use True/False (Python syntax)
  7. Enum values: Use only valid DSL enum values (e.g., type=api-gateway)