microsoft/hve-core
Publicmirrored fromhttps://github.com/microsoft/hve-coreAvailable
docs/templates/security-plan-template.md
132lines · modecode
| 1 | --- |
| 2 | title: Security Plan Template |
| 3 | description: 'Template structure for security plan documents generated by the security-plan-creator agent' |
| 4 | author: microsoft/hve-core |
| 5 | ms.date: 2026-01-18 |
| 6 | ms.topic: reference |
| 7 | --- |
| 8 | |
| 9 | This template defines the standard structure for security plan documents. |
| 10 | |
| 11 | ## Template Structure |
| 12 | |
| 13 | ````markdown |
| 14 | # Security Plan - [Blueprint Name] |
| 15 | |
| 16 | ## Preamble |
| 17 | |
| 18 | _Important to note:_ This security analysis cannot certify or attest to the complete security of an architecture or code. This document is intended to help produce security-focused backlog items and document relevant security design decisions. |
| 19 | |
| 20 | ## Overview |
| 21 | |
| 22 | [System description and security approach based on architecture analysis] |
| 23 | |
| 24 | ## Diagrams |
| 25 | |
| 26 | ### Architecture Diagrams |
| 27 | |
| 28 | Generate Mermaid architecture diagram based on blueprint infrastructure analysis: |
| 29 | |
| 30 | * Use graph TD (top-down) or graph LR (left-right) syntax for clarity. |
| 31 | * Include all major components identified from blueprint infrastructure code. |
| 32 | * Show relationships and dependencies between components. |
| 33 | * Use descriptive node names that match the blueprint's resource naming. |
| 34 | * Include security boundaries and trust zones where applicable. |
| 35 | |
| 36 | Component categories to include: |
| 37 | |
| 38 | * Compute resources (VMs, Kubernetes clusters) |
| 39 | * Storage components (storage accounts, databases) |
| 40 | * Networking elements (load balancers, security groups, subnets) |
| 41 | * Identity and access components (service principals, managed identities) |
| 42 | * IoT and edge services (MQTT brokers, device management, data processors) |
| 43 | |
| 44 | Example structure: |
| 45 | |
| 46 | ```mermaid |
| 47 | graph LR |
| 48 | subgraph "Azure Cloud" |
| 49 | subgraph "Resource Group" |
| 50 | KV[Key Vault] |
| 51 | SA[Storage Account] |
| 52 | EH[Event Hub] |
| 53 | ARC[Azure Arc] |
| 54 | end |
| 55 | end |
| 56 | |
| 57 | subgraph "On Premises Edge Environment" |
| 58 | subgraph "Linux VM" |
| 59 | subgraph "K3S" |
| 60 | MQTT[MQTT Broker] |
| 61 | DP[Data Processor] |
| 62 | OPCConnector[OPC UA Connector] |
| 63 | end |
| 64 | end |
| 65 | OPCServer[OPC UA Server] |
| 66 | end |
| 67 | |
| 68 | K3S --> ARC |
| 69 | OPCServer --> OPCConnector |
| 70 | OPCConnector --> MQTT |
| 71 | MQTT --> DP |
| 72 | DP --> EH |
| 73 | ``` |
| 74 | |
| 75 | ### Data Flow Diagrams |
| 76 | |
| 77 | Generate Mermaid sequence diagram representing operational data flows: |
| 78 | |
| 79 | * Focus on how data moves through the system during normal operations. |
| 80 | * Number each interaction/message sequentially. |
| 81 | * Ensure each numbered edge corresponds to a row in Data Flow Attributes table. |
| 82 | * Include all operational components: APIs, databases, storage, monitoring endpoints, message brokers, data processors. |
| 83 | * Use clear, descriptive participant names matching the architecture diagrams. |
| 84 | |
| 85 | ### Data Flow Attributes |
| 86 | |
| 87 | Table mapping each numbered flow to security characteristics: |
| 88 | |
| 89 | | # | Transport Protocol | Data Classification | Authentication | Authorization | Notes | |
| 90 | |---|------------------------|---------------------|----------------|----------------|---------------| |
| 91 | | 1 | [Protocol/TLS version] | [Classification] | [Auth method] | [Authz method] | [Description] | |
| 92 | |
| 93 | ## Secrets Inventory |
| 94 | |
| 95 | Comprehensive catalog of all credentials, keys, and sensitive configuration: |
| 96 | |
| 97 | | Name | Purpose | Storage Location | Generation Method | Rotation Strategy | Distribution Method | Lifespan | Environment | |
| 98 | | ---- | ------- | ---------------- | ----------------- | ----------------- | ------------------- | -------- | ----------- | |
| 99 | |
| 100 | ## Threats and Mitigations |
| 101 | |
| 102 | Risk Legend: |
| 103 | |
| 104 | * 🟢 Mitigated / Low risk |
| 105 | * 🟡 Partially mitigated / Medium risk |
| 106 | * 🔴 Not mitigated / High risk |
| 107 | * ⚪️ Not evaluated |
| 108 | |
| 109 | | Threat # | Principle | Affected Asset | Threat | Status | Risk | |
| 110 | |----------|-------------|----------------|---------------------------------|----------|--------| |
| 111 | | [#] | [Principle] | [Asset] | [Threat description](#threat-X) | [Status] | [Risk] | |
| 112 | |
| 113 | ## Detailed Threats and Mitigations |
| 114 | |
| 115 | For each applicable threat, provide detailed analysis following this format: |
| 116 | |
| 117 | ### Threat #[X] |
| 118 | |
| 119 | **Principle:** [Security Principle] |
| 120 | **Affected Asset:** [Specific system component] |
| 121 | **Threat:** [Detailed threat description] |
| 122 | |
| 123 | **Recommended Mitigations:** |
| 124 | |
| 125 | 1. [Specific, actionable mitigation step] |
| 126 | 2. [Implementation details and configuration] |
| 127 | 3. [Monitoring and validation approaches] |
| 128 | |
| 129 | **Cloud Platform Guidance:** [Provide recommendations specific to the target cloud platform: Azure, AWS, GCP, or multi-cloud considerations] |
| 130 | ```` |
| 131 | |
| 132 | 🤖 *Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.* |
| 133 | |