Application Threat Model Sheet
Identify attack vectors, trust boundaries, STRIDE threats, and cryptographic mitigations in local Markdown.
Template Overview
Security cannot be bolted on at the conclusion of a software release; it must be designed into architectural trust boundaries from the first commit. Using Microsoft’s proven STRIDE methodology and DREAD risk scoring, the Application Threat Model Sheet enables security architects, engineers, and developers to map data flows, identify attack surfaces, anticipate adversary tactics, and implement verifiable cryptographic mitigations.
Markdown Template Structure
Copy the block below or click Download .md File to add this template directly to your personal vault:
---
title: "Threat Model: [Application / Feature Name]"
date: [YYYY-MM-DD]
security_architect: "[[Lead Security Architect]]"
engineering_owner: "[[Principal Software Engineer]]"
system_trust_boundaries: ["macOS Sandbox", "Local Filesystem", "Microphone IPC Socket"]
compliance_frameworks: ["SOC 2 Type II", "HIPAA Security Rule", "GDPR Art 32"]
tags: [security, threat-modeling, stride, appsec, cryptography, vulnerabilities]
---
# Application Threat Model Sheet — [Application Name]
## 1. System Architecture & Data Flow Diagram (DFD)
- **Element 1: User Voice Input:** Audio captured via hardware microphone → CoreAudio daemon.
- **Element 2: Inter-Process Communication:** CoreAudio passes PCM audio buffer to Oyma desktop binary via local Unix domain socket.
- **Element 3: On-Device Neural Inference:** Binary passes PCM stream into Apple Neural Engine Core ML runtime.
- **Element 4: Persistence:** Transcription written to local disk Markdown vault (`/Users/username/Vault/Notes/*.md`).
- **Trust Boundary Definition:** Data NEVER crosses any network socket. The network interface is explicitly air-gapped from audio buffers.
## 2. STRIDE Threat Analysis Matrix
| STRIDE Category | Threat Description | Attack Vector / Scenario | Inherent Risk (DREAD) | Mitigating Security Control | Residual Risk |
|---|---|---|---|---|---|
| **S** (Spoofing) | Rogue process impersonates local IPC helper | Attacker injects malicious socket in `/tmp/` | High (8/10) | Enforce macOS Unix domain socket ownership and POSIX 0600 permissions | Low |
| **T** (Tampering) | Malware modifies local Whisper model weights | Altered neural weights to inject adversarial outputs | High (8/10) | SHA-256 cryptographic signature validation prior to model loading | Negligible |
| **R** (Repudiation) | User denies generating confidential audio note | Corporate audit disputes authorship | Low (3/10) | Local append-only integrity log with cryptographic timestamp hash | Low |
| **I** (Information Disclosure) | Audio or transcript leaks to external cloud | Malicious telemetry exfiltrates text | **Critical (10/10)** | Complete elimination of network stack from transcription module; Zero telemetry | **Zero** |
| **D** (Denial of Service) | Corrupt audio input crashes neural engine | Malformed WAV headers cause buffer overflow | Medium (6/10) | Strict fuzz-tested audio parsing with Memory-safe Rust wrappers | Low |
| **E** (Elevation of Privilege) | App escapes macOS sandbox via file picker | Malicious symlink writes to root directories | High (7/10) | Standard macOS App Sandbox with read/write scoped solely to user-selected folder | Low |
## 3. Cryptographic & Data Protection Controls
- **At-Rest Protection:** Local filesystem encryption enforced via macOS FileVault (XTS-AES-128 with 256-bit keys).
- **In-Memory Hygiene:** Audio buffers zeroized in memory immediately following tokenization using `memset_s` or Rust `zeroize`.
- **Zero Network Ingress/Egress:** Network entitlements (`com.apple.security.network.client`) permanently stripped from transcription binary.
## 4. Unmitigated Vulnerabilities & Security Debt
- *Vulnerability 1:* An attacker with root access on the local machine can read memory via kernel debuggers.
- *Assessment:* Accepted threat. Root compromise on local hardware is outside software sandbox scope.
## 5. Security Engineering Sign-Off Checklist
- [ ] Run static application security testing (SAST) and memory sanitizer tools.
- [ ] Verify binary entitlements in release build via `codesign -d --entitlements :-`.
- [ ] Complete third-party red-team penetration test prior to GA rollout.
Filled Real-World Example
Here is a realistic example demonstrating how this template captures actual deliberations:
---
title: "Threat Model: Local Audio Dictation Pipeline"
date: 2026-10-09
security_architect: "[[Dr. Samantha Wei]]"
engineering_owner: "[[Marcus Vance]]"
system_trust_boundaries: ["Microphone Audio Stream", "Core ML Neural Engine", "Local Markdown Vault"]
compliance_frameworks: ["SOC 2 Type II", "HIPAA Security Rule"]
tags: [security, threat-modeling, stride, appsec, cryptography, vulnerabilities]
---
# Application Threat Model Sheet — Local Audio Dictation Pipeline
## 1. System Overview
- High-assurance audio capture for attorneys and healthcare providers.
- Architecture guarantees zero outbound network traffic during audio processing.
## 2. Key STRIDE Finding: Information Disclosure
- Cloud competitors upload raw audio to cloud APIs, introducing severe third-party subpoena and data interception risks.
- Oyma mitigates this entirely: audio never leaves unified memory, eliminating the exfiltration attack surface.
## 3. Mitigations Implemented
- Strip all network entitlements from production binaries.
- Enforce strict SHA-256 hash checks on all local Whisper model files before initialization.
When to Use and When to Avoid
When to Use
- Use during architectural design phases before writing sensitive cryptographic or data-handling code.
- Use to satisfy enterprise SOC 2, HIPAA, and ISO 27001 application security requirements.
- Use prior to major feature deployments to evaluate expanded attack surfaces.
When to Avoid
- Avoid using for pure marketing landing pages with zero user data input or storage.
- Avoid using as a substitute for real automated vulnerability scanning.
On-Device AI Integration
Summarize your recording in Oyma with this local instruction:
Analyze the application threat model worksheet:
1. Examine the STRIDE threat matrix for unaddressed attack vectors across trust boundaries.
2. Evaluate whether the proposed cryptographic controls adequately mitigate information disclosure risks.
3. Formulate three penetration-testing attack scenarios to stress-test the local sandbox.
Output in structured Markdown.
Your data remains securely on your Mac with zero cloud exposure.
Frequently Asked Questions
What is the STRIDE threat modeling methodology?
STRIDE categorizes threats into Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege.
Why document application threat models in Markdown?
Markdown threat models sit directly alongside software code in Git, allowing security architectures to evolve with pull requests.
Can Oyma transcribe security red-team reviews?
Oyma transcribes security reviews locally on Apple Silicon without transmitting sensitive vulnerability discussions to clouds.
Write application threat model sheet in plain Markdown.
Store notes in your local vault, transcribe meetings on-device, and retain 100% data sovereignty.