tech-hub-skills 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +250 -0
  3. package/bin/cli.js +241 -0
  4. package/bin/copilot.js +182 -0
  5. package/bin/postinstall.js +42 -0
  6. package/package.json +46 -0
  7. package/tech_hub_skills/roles/ai-engineer/skills/01-prompt-engineering/README.md +252 -0
  8. package/tech_hub_skills/roles/ai-engineer/skills/02-rag-pipeline/README.md +448 -0
  9. package/tech_hub_skills/roles/ai-engineer/skills/03-agent-orchestration/README.md +599 -0
  10. package/tech_hub_skills/roles/ai-engineer/skills/04-llm-guardrails/README.md +735 -0
  11. package/tech_hub_skills/roles/ai-engineer/skills/05-vector-embeddings/README.md +711 -0
  12. package/tech_hub_skills/roles/ai-engineer/skills/06-llm-evaluation/README.md +777 -0
  13. package/tech_hub_skills/roles/azure/skills/01-infrastructure-fundamentals/README.md +264 -0
  14. package/tech_hub_skills/roles/azure/skills/02-data-factory/README.md +264 -0
  15. package/tech_hub_skills/roles/azure/skills/03-synapse-analytics/README.md +264 -0
  16. package/tech_hub_skills/roles/azure/skills/04-databricks/README.md +264 -0
  17. package/tech_hub_skills/roles/azure/skills/05-functions/README.md +264 -0
  18. package/tech_hub_skills/roles/azure/skills/06-kubernetes-service/README.md +264 -0
  19. package/tech_hub_skills/roles/azure/skills/07-openai-service/README.md +264 -0
  20. package/tech_hub_skills/roles/azure/skills/08-machine-learning/README.md +264 -0
  21. package/tech_hub_skills/roles/azure/skills/09-storage-adls/README.md +264 -0
  22. package/tech_hub_skills/roles/azure/skills/10-networking/README.md +264 -0
  23. package/tech_hub_skills/roles/azure/skills/11-sql-cosmos/README.md +264 -0
  24. package/tech_hub_skills/roles/azure/skills/12-event-hubs/README.md +264 -0
  25. package/tech_hub_skills/roles/code-review/skills/01-automated-code-review/README.md +394 -0
  26. package/tech_hub_skills/roles/code-review/skills/02-pr-review-workflow/README.md +427 -0
  27. package/tech_hub_skills/roles/code-review/skills/03-code-quality-gates/README.md +518 -0
  28. package/tech_hub_skills/roles/code-review/skills/04-reviewer-assignment/README.md +504 -0
  29. package/tech_hub_skills/roles/code-review/skills/05-review-analytics/README.md +540 -0
  30. package/tech_hub_skills/roles/data-engineer/skills/01-lakehouse-architecture/README.md +550 -0
  31. package/tech_hub_skills/roles/data-engineer/skills/02-etl-pipeline/README.md +580 -0
  32. package/tech_hub_skills/roles/data-engineer/skills/03-data-quality/README.md +579 -0
  33. package/tech_hub_skills/roles/data-engineer/skills/04-streaming-pipelines/README.md +608 -0
  34. package/tech_hub_skills/roles/data-engineer/skills/05-performance-optimization/README.md +547 -0
  35. package/tech_hub_skills/roles/data-governance/skills/01-data-catalog/README.md +112 -0
  36. package/tech_hub_skills/roles/data-governance/skills/02-data-lineage/README.md +129 -0
  37. package/tech_hub_skills/roles/data-governance/skills/03-data-quality-framework/README.md +182 -0
  38. package/tech_hub_skills/roles/data-governance/skills/04-access-control/README.md +39 -0
  39. package/tech_hub_skills/roles/data-governance/skills/05-master-data-management/README.md +40 -0
  40. package/tech_hub_skills/roles/data-governance/skills/06-compliance-privacy/README.md +46 -0
  41. package/tech_hub_skills/roles/data-scientist/skills/01-eda-automation/README.md +230 -0
  42. package/tech_hub_skills/roles/data-scientist/skills/02-statistical-modeling/README.md +264 -0
  43. package/tech_hub_skills/roles/data-scientist/skills/03-feature-engineering/README.md +264 -0
  44. package/tech_hub_skills/roles/data-scientist/skills/04-predictive-modeling/README.md +264 -0
  45. package/tech_hub_skills/roles/data-scientist/skills/05-customer-analytics/README.md +264 -0
  46. package/tech_hub_skills/roles/data-scientist/skills/06-campaign-analysis/README.md +264 -0
  47. package/tech_hub_skills/roles/data-scientist/skills/07-experimentation/README.md +264 -0
  48. package/tech_hub_skills/roles/data-scientist/skills/08-data-visualization/README.md +264 -0
  49. package/tech_hub_skills/roles/devops/skills/01-cicd-pipeline/README.md +264 -0
  50. package/tech_hub_skills/roles/devops/skills/02-container-orchestration/README.md +264 -0
  51. package/tech_hub_skills/roles/devops/skills/03-infrastructure-as-code/README.md +264 -0
  52. package/tech_hub_skills/roles/devops/skills/04-gitops/README.md +264 -0
  53. package/tech_hub_skills/roles/devops/skills/05-environment-management/README.md +264 -0
  54. package/tech_hub_skills/roles/devops/skills/06-automated-testing/README.md +264 -0
  55. package/tech_hub_skills/roles/devops/skills/07-release-management/README.md +264 -0
  56. package/tech_hub_skills/roles/devops/skills/08-monitoring-alerting/README.md +264 -0
  57. package/tech_hub_skills/roles/devops/skills/09-devsecops/README.md +265 -0
  58. package/tech_hub_skills/roles/finops/skills/01-cost-visibility/README.md +264 -0
  59. package/tech_hub_skills/roles/finops/skills/02-resource-tagging/README.md +264 -0
  60. package/tech_hub_skills/roles/finops/skills/03-budget-management/README.md +264 -0
  61. package/tech_hub_skills/roles/finops/skills/04-reserved-instances/README.md +264 -0
  62. package/tech_hub_skills/roles/finops/skills/05-spot-optimization/README.md +264 -0
  63. package/tech_hub_skills/roles/finops/skills/06-storage-tiering/README.md +264 -0
  64. package/tech_hub_skills/roles/finops/skills/07-compute-rightsizing/README.md +264 -0
  65. package/tech_hub_skills/roles/finops/skills/08-chargeback/README.md +264 -0
  66. package/tech_hub_skills/roles/ml-engineer/skills/01-mlops-pipeline/README.md +566 -0
  67. package/tech_hub_skills/roles/ml-engineer/skills/02-feature-engineering/README.md +655 -0
  68. package/tech_hub_skills/roles/ml-engineer/skills/03-model-training/README.md +704 -0
  69. package/tech_hub_skills/roles/ml-engineer/skills/04-model-serving/README.md +845 -0
  70. package/tech_hub_skills/roles/ml-engineer/skills/05-model-monitoring/README.md +874 -0
  71. package/tech_hub_skills/roles/mlops/skills/01-ml-pipeline-orchestration/README.md +264 -0
  72. package/tech_hub_skills/roles/mlops/skills/02-experiment-tracking/README.md +264 -0
  73. package/tech_hub_skills/roles/mlops/skills/03-model-registry/README.md +264 -0
  74. package/tech_hub_skills/roles/mlops/skills/04-feature-store/README.md +264 -0
  75. package/tech_hub_skills/roles/mlops/skills/05-model-deployment/README.md +264 -0
  76. package/tech_hub_skills/roles/mlops/skills/06-model-observability/README.md +264 -0
  77. package/tech_hub_skills/roles/mlops/skills/07-data-versioning/README.md +264 -0
  78. package/tech_hub_skills/roles/mlops/skills/08-ab-testing/README.md +264 -0
  79. package/tech_hub_skills/roles/mlops/skills/09-automated-retraining/README.md +264 -0
  80. package/tech_hub_skills/roles/platform-engineer/skills/01-internal-developer-platform/README.md +153 -0
  81. package/tech_hub_skills/roles/platform-engineer/skills/02-self-service-infrastructure/README.md +57 -0
  82. package/tech_hub_skills/roles/platform-engineer/skills/03-slo-sli-management/README.md +59 -0
  83. package/tech_hub_skills/roles/platform-engineer/skills/04-developer-experience/README.md +57 -0
  84. package/tech_hub_skills/roles/platform-engineer/skills/05-incident-management/README.md +73 -0
  85. package/tech_hub_skills/roles/platform-engineer/skills/06-capacity-management/README.md +59 -0
  86. package/tech_hub_skills/roles/product-designer/skills/01-requirements-discovery/README.md +407 -0
  87. package/tech_hub_skills/roles/product-designer/skills/02-user-research/README.md +382 -0
  88. package/tech_hub_skills/roles/product-designer/skills/03-brainstorming-ideation/README.md +437 -0
  89. package/tech_hub_skills/roles/product-designer/skills/04-ux-design/README.md +496 -0
  90. package/tech_hub_skills/roles/product-designer/skills/05-product-market-fit/README.md +376 -0
  91. package/tech_hub_skills/roles/product-designer/skills/06-stakeholder-management/README.md +412 -0
  92. package/tech_hub_skills/roles/security-architect/skills/01-pii-detection/README.md +319 -0
  93. package/tech_hub_skills/roles/security-architect/skills/02-threat-modeling/README.md +264 -0
  94. package/tech_hub_skills/roles/security-architect/skills/03-infrastructure-security/README.md +264 -0
  95. package/tech_hub_skills/roles/security-architect/skills/04-iam/README.md +264 -0
  96. package/tech_hub_skills/roles/security-architect/skills/05-application-security/README.md +264 -0
  97. package/tech_hub_skills/roles/security-architect/skills/06-secrets-management/README.md +264 -0
  98. package/tech_hub_skills/roles/security-architect/skills/07-security-monitoring/README.md +264 -0
  99. package/tech_hub_skills/roles/system-design/skills/01-architecture-patterns/README.md +337 -0
  100. package/tech_hub_skills/roles/system-design/skills/02-requirements-engineering/README.md +264 -0
  101. package/tech_hub_skills/roles/system-design/skills/03-scalability/README.md +264 -0
  102. package/tech_hub_skills/roles/system-design/skills/04-high-availability/README.md +264 -0
  103. package/tech_hub_skills/roles/system-design/skills/05-cost-optimization-design/README.md +264 -0
  104. package/tech_hub_skills/roles/system-design/skills/06-api-design/README.md +264 -0
  105. package/tech_hub_skills/roles/system-design/skills/07-observability-architecture/README.md +264 -0
  106. package/tech_hub_skills/roles/system-design/skills/08-process-automation/PROCESS_TEMPLATE.md +336 -0
  107. package/tech_hub_skills/roles/system-design/skills/08-process-automation/README.md +521 -0
  108. package/tech_hub_skills/skills/README.md +336 -0
  109. package/tech_hub_skills/skills/ai-engineer.md +104 -0
  110. package/tech_hub_skills/skills/azure.md +149 -0
  111. package/tech_hub_skills/skills/code-review.md +399 -0
  112. package/tech_hub_skills/skills/compliance-automation.md +747 -0
  113. package/tech_hub_skills/skills/data-engineer.md +113 -0
  114. package/tech_hub_skills/skills/data-governance.md +102 -0
  115. package/tech_hub_skills/skills/data-scientist.md +123 -0
  116. package/tech_hub_skills/skills/devops.md +160 -0
  117. package/tech_hub_skills/skills/docker.md +160 -0
  118. package/tech_hub_skills/skills/enterprise-dashboard.md +613 -0
  119. package/tech_hub_skills/skills/finops.md +184 -0
  120. package/tech_hub_skills/skills/ml-engineer.md +115 -0
  121. package/tech_hub_skills/skills/mlops.md +187 -0
  122. package/tech_hub_skills/skills/optimization-advisor.md +329 -0
  123. package/tech_hub_skills/skills/orchestrator.md +497 -0
  124. package/tech_hub_skills/skills/platform-engineer.md +102 -0
  125. package/tech_hub_skills/skills/process-automation.md +226 -0
  126. package/tech_hub_skills/skills/process-changelog.md +184 -0
  127. package/tech_hub_skills/skills/process-documentation.md +484 -0
  128. package/tech_hub_skills/skills/process-kanban.md +324 -0
  129. package/tech_hub_skills/skills/process-versioning.md +214 -0
  130. package/tech_hub_skills/skills/product-designer.md +104 -0
  131. package/tech_hub_skills/skills/project-starter.md +443 -0
  132. package/tech_hub_skills/skills/security-architect.md +135 -0
  133. package/tech_hub_skills/skills/system-design.md +126 -0
@@ -0,0 +1,319 @@
1
+ # Skill 1: PII Detection & Data Privacy
2
+
3
+ ## 🎯 Overview
4
+ Automated PII detection, masking, and GDPR compliance tools.
5
+
6
+ ## 🔗 Connections
7
+ - **Data Engineer**: PII masking in data pipelines (de-01, de-02, de-03)
8
+ - **AI Engineer**: PII filtering before RAG indexing (ai-02, ai-03)
9
+ - **ML Engineer**: Remove PII before model training (ml-01, ml-02)
10
+ - **Data Scientist**: PII detection in analysis datasets (ds-01)
11
+ - **DevOps**: Automated PII scanning in CI/CD (do-01, do-02)
12
+ - **FinOps**: Track compliance audit costs (fo-01)
13
+ - **All Roles**: GDPR compliance and data protection
14
+
15
+ ## 🛠️ Tools Included
16
+
17
+ ### 1. `pii_detector.py`
18
+ PII detection using Microsoft Presidio and custom patterns.
19
+
20
+ ### 2. `data_anonymizer.py`
21
+ Data anonymization with multiple strategies (masking, hashing, generalization).
22
+
23
+ ### 3. `gdpr_compliance_checker.py`
24
+ GDPR compliance validation and audit trails.
25
+
26
+ ### 4. `consent_manager.py`
27
+ User consent tracking and right-to-erasure automation.
28
+
29
+ ### 5. `pii_audit_queries.sql`
30
+ SQL queries for PII inventory and audit logs.
31
+
32
+ ## 📊 PII Types Detected
33
+ - Email addresses
34
+ - Phone numbers
35
+ - Credit cards
36
+ - SSN / National IDs
37
+ - IP addresses
38
+ - Addresses
39
+ - Names
40
+ - Dates of birth
41
+
42
+ ## 🚀 Quick Start
43
+
44
+ ```python
45
+ from pii_detector import PIIDetector
46
+ from data_anonymizer import DataAnonymizer
47
+
48
+ # Detect PII
49
+ detector = PIIDetector()
50
+ pii_findings = detector.analyze_text(
51
+ "Contact John Smith at john.smith@email.com or 555-123-4567"
52
+ )
53
+
54
+ # Anonymize data
55
+ anonymizer = DataAnonymizer()
56
+ anonymized = anonymizer.mask_dataframe(
57
+ df=customer_df,
58
+ pii_columns=["email", "phone", "ssn"]
59
+ )
60
+ ```
61
+
62
+ ## 📚 Best Practices
63
+
64
+ ### Integration with Data Pipelines (Data Engineer)
65
+
66
+ 1. **Bronze Layer PII Scanning**
67
+ - Scan all raw data at ingestion
68
+ - Tag datasets containing PII
69
+ - Block high-risk PII from pipeline
70
+ - Maintain PII inventory
71
+ - Reference: Data Engineer de-01 (Lakehouse Architecture)
72
+
73
+ 2. **Silver Layer PII Masking**
74
+ - Apply masking transformations
75
+ - Implement k-anonymity for aggregations
76
+ - Track masked vs raw data lineage
77
+ - Validate masking effectiveness
78
+ - Reference: Data Engineer de-01, de-03
79
+
80
+ 3. **Gold Layer Compliance**
81
+ - Ensure no PII in analytics layers
82
+ - Implement row-level security
83
+ - Audit PII access logs
84
+ - Enable right-to-erasure automation
85
+ - Reference: Data Engineer de-01
86
+
87
+ ### AI/ML Integration
88
+
89
+ 4. **Pre-Training PII Removal**
90
+ - Scan training data before ML experiments
91
+ - Remove PII from feature engineering
92
+ - Anonymize datasets for model development
93
+ - Track data provenance for compliance
94
+ - Reference: ML Engineer ml-01, ml-02
95
+
96
+ 5. **RAG Knowledge Base Protection**
97
+ - Scan documents before embedding
98
+ - Prevent PII indexing in vector databases
99
+ - Filter PII from LLM context
100
+ - Audit knowledge base for compliance
101
+ - Reference: AI Engineer ai-02 (RAG Pipeline)
102
+
103
+ 6. **LLM Input/Output Filtering**
104
+ - Detect PII in user prompts
105
+ - Redact PII from LLM responses
106
+ - Log PII exposure incidents
107
+ - Implement real-time PII alerts
108
+ - Reference: AI Engineer ai-01, ai-07
109
+
110
+ ### Automation & CI/CD (DevOps Integration)
111
+
112
+ 7. **Automated PII Scanning**
113
+ - Integrate PII detection in CI/CD pipelines
114
+ - Block commits containing PII
115
+ - Scan code, configs, and test data
116
+ - Automate compliance reports
117
+ - Reference: DevOps do-01 (CI/CD), do-02 (Testing)
118
+
119
+ 8. **Continuous Compliance Monitoring**
120
+ - Schedule regular PII scans
121
+ - Alert on new PII discoveries
122
+ - Track remediation progress
123
+ - Generate audit trails
124
+ - Reference: DevOps do-08 (Monitoring)
125
+
126
+ ### Cost Management (FinOps Integration)
127
+
128
+ 9. **Optimize PII Scanning Costs**
129
+ - Use sampling for large datasets
130
+ - Cache PII detection results
131
+ - Right-size scanning compute
132
+ - Monitor compliance operation costs
133
+ - Reference: FinOps fo-01, fo-06
134
+
135
+ ### Enterprise Governance
136
+
137
+ 10. **Data Governance Framework**
138
+ - Classify data by sensitivity level
139
+ - Implement data handling policies
140
+ - Track PII across all systems
141
+ - Enable compliance reporting
142
+ - Reference: Security Architect sa-06 (Data Governance)
143
+
144
+ 11. **GDPR Right-to-Erasure**
145
+ - Automate data deletion requests
146
+ - Track PII deletion across systems
147
+ - Verify erasure completeness
148
+ - Maintain deletion audit logs
149
+ - Reference: Security Architect sa-06
150
+
151
+ ## 💰 Cost Optimization Examples
152
+
153
+ ### Efficient PII Scanning
154
+ ```python
155
+ from pii_detector import PIIDetector
156
+ from finops_tracker import ComplianceCostTracker
157
+
158
+ detector = PIIDetector()
159
+ cost_tracker = ComplianceCostTracker()
160
+
161
+ @cost_tracker.track_scan_cost
162
+ def smart_pii_scan(df: pd.DataFrame, sample_size: int = 10000):
163
+ # Sample for initial detection (cost savings)
164
+ if len(df) > sample_size:
165
+ sample_df = df.sample(n=sample_size, random_state=42)
166
+ pii_columns = detector.find_pii_columns(sample_df)
167
+
168
+ # Full scan only on suspected PII columns
169
+ results = {}
170
+ for col in pii_columns:
171
+ results[col] = detector.analyze_column(df[col])
172
+ else:
173
+ results = detector.analyze_dataframe(df)
174
+
175
+ return results
176
+
177
+ # Cost report
178
+ report = cost_tracker.monthly_report()
179
+ print(f"PII scanning costs: ${report.total_cost:.2f}")
180
+ print(f"Datasets scanned: {report.datasets_scanned}")
181
+ ```
182
+
183
+ ## 🚀 Automated PII Protection Pipeline
184
+
185
+ ### CI/CD Integration
186
+ ```yaml
187
+ # .github/workflows/pii-protection.yml
188
+ name: PII Protection
189
+
190
+ on:
191
+ push:
192
+ paths:
193
+ - 'data/**'
194
+ - 'pipelines/**'
195
+ pull_request:
196
+
197
+ jobs:
198
+ pii-scan:
199
+ runs-on: ubuntu-latest
200
+ steps:
201
+ - uses: actions/checkout@v3
202
+
203
+ - name: Scan code for PII patterns
204
+ run: |
205
+ python scripts/scan_code_for_pii.py \
206
+ --fail-on-detection \
207
+ --exclude-patterns .gitignore
208
+
209
+ - name: Scan test data
210
+ run: |
211
+ python scripts/scan_test_data.py \
212
+ --redact-if-found \
213
+ --report-path reports/pii_scan.json
214
+
215
+ - name: Validate data pipelines
216
+ run: |
217
+ python scripts/validate_pii_masking.py \
218
+ --pipeline-config pipelines/config.yaml
219
+
220
+ - name: Generate compliance report
221
+ run: python scripts/generate_compliance_report.py
222
+
223
+ - name: Upload scan results
224
+ uses: actions/upload-artifact@v3
225
+ with:
226
+ name: pii-scan-results
227
+ path: reports/
228
+ ```
229
+
230
+ ### Data Pipeline Integration
231
+ ```python
232
+ from bronze_ingestion import BronzeLoader
233
+ from pii_detector import PIIDetector
234
+ from data_anonymizer import DataAnonymizer
235
+
236
+ detector = PIIDetector()
237
+ anonymizer = DataAnonymizer()
238
+
239
+ def secure_data_pipeline(source_data: str, output_table: str):
240
+ # Bronze: Ingest with PII detection
241
+ bronze = BronzeLoader()
242
+ df = bronze.ingest(source_data)
243
+
244
+ # Detect PII
245
+ pii_findings = detector.analyze_dataframe(df)
246
+
247
+ if pii_findings:
248
+ # Log for compliance
249
+ log_pii_detection(
250
+ dataset=output_table,
251
+ pii_types=[f.type for f in pii_findings],
252
+ timestamp=datetime.now()
253
+ )
254
+
255
+ # Silver: Mask PII
256
+ df_masked = anonymizer.mask_dataframe(
257
+ df,
258
+ pii_columns=[f.column for f in pii_findings],
259
+ strategy="hash" # Deterministic for joins
260
+ )
261
+
262
+ # Store both raw (encrypted) and masked
263
+ bronze.save(df, f"{output_table}_raw_encrypted")
264
+ bronze.save(df_masked, f"{output_table}_masked")
265
+
266
+ # Alert security team
267
+ if any(f.severity == "high" for f in pii_findings):
268
+ send_security_alert(pii_findings)
269
+ else:
270
+ bronze.save(df, output_table)
271
+
272
+ return pii_findings
273
+ ```
274
+
275
+ ## 📊 Enhanced Metrics
276
+
277
+ | Metric | Target | Tool |
278
+ |--------|--------|------|
279
+ | **PII Detection Coverage** | 100% of datasets | Automated scanning |
280
+ | **False Positive Rate** | <5% | Model tuning |
281
+ | **Detection Latency** | <1min per GB | Performance monitoring |
282
+ | **Masking Accuracy** | >99.9% | Validation tests |
283
+ | **Compliance Audit Pass Rate** | 100% | Audit logs |
284
+ | **Mean Time to Remediate** | <24 hours | Incident tracking |
285
+
286
+ ## 🔄 Integration Workflow
287
+
288
+ ### End-to-End PII Protection
289
+ ```
290
+ 1. Data Ingestion (de-01)
291
+
292
+ 2. PII Detection (sa-01) → Log Finding
293
+
294
+ 3. Risk Assessment (High/Medium/Low)
295
+
296
+ 4. Masking/Encryption (sa-01)
297
+
298
+ 5. Quality Validation (de-03)
299
+
300
+ 6. Compliance Audit Log (sa-06)
301
+
302
+ 7. Downstream Processing (ML, Analytics)
303
+ ├── Model Training (ml-01) - PII-free
304
+ ├── RAG Indexing (ai-02) - PII-free
305
+ └── EDA Reports (ds-01) - Masked
306
+
307
+ 8. Continuous Monitoring (do-08)
308
+
309
+ 9. Cost Tracking (fo-01)
310
+ ```
311
+
312
+ ## 🎯 Quick Wins
313
+
314
+ 1. **Integrate PII scanning in CI/CD** - Prevent PII commits
315
+ 2. **Automate Bronze layer scanning** - Detect PII at ingestion
316
+ 3. **Implement PII masking in Silver** - Protect downstream systems
317
+ 4. **Enable LLM input filtering** - Prevent PII in prompts
318
+ 5. **Set up compliance dashboards** - Real-time PII tracking
319
+ 6. **Automate right-to-erasure** - GDPR compliance automation
@@ -0,0 +1,264 @@
1
+ # Skill 02: Threat Modeling & Risk Assessment
2
+
3
+ ## 🎯 Overview
4
+ STRIDE model generator, attack surface analyzer, risk scoring
5
+
6
+ ## 🔗 Connections
7
+ - **Data Engineer**: Data foundation and pipelines (de-01, de-02, de-03)
8
+ - **Security Architect**: Compliance, PII detection, access control (sa-01, sa-02)
9
+ - **ML Engineer**: Model lifecycle and serving (ml-01, ml-04)
10
+ - **AI Engineer**: LLM integration and automation (ai-01, ai-02, ai-07)
11
+ - **MLOps**: Experiment tracking and monitoring (mo-01, mo-03, mo-06)
12
+ - **FinOps**: Cost optimization and tracking (fo-01, fo-07)
13
+ - **DevOps**: CI/CD, containerization, monitoring (do-01, do-03, do-08)
14
+ - **System Design**: Architecture patterns (sd-01)
15
+ - **Dependencies**: sd-01
16
+
17
+ ## 🛠️ Tools Included
18
+
19
+ ### 1. Primary Implementation Script
20
+ Core implementation for threat modeling & risk assessment.
21
+
22
+ ### 2. Configuration Manager
23
+ Manage configuration and settings for threat modeling & risk assessment.
24
+
25
+ ### 3. Integration Connector
26
+ Connect with other Tech Hub skills and external services.
27
+
28
+ ### 4. Monitoring & Metrics
29
+ Track performance, costs, and quality metrics.
30
+
31
+ ### 5. Automation Scripts
32
+ Automate common workflows and tasks.
33
+
34
+ ## 📊 Key Metrics
35
+ - Implementation quality score
36
+ - Performance benchmarks
37
+ - Cost efficiency
38
+ - Security compliance rate
39
+ - Integration test coverage
40
+
41
+ ## 🚀 Quick Start
42
+
43
+ ```python
44
+ # Example implementation for Threat Modeling & Risk Assessment
45
+ from security_architect import 02_threat_modeling
46
+
47
+ # Initialize
48
+ service = 02ThreatModelingService()
49
+
50
+ # Execute
51
+ result = service.execute(
52
+ config={
53
+ "environment": "production",
54
+ "enable_monitoring": True
55
+ }
56
+ )
57
+
58
+ print(f"Status: {result.status}")
59
+ print(f"Metrics: {result.metrics}")
60
+ ```
61
+
62
+ ## 📚 Best Practices
63
+
64
+ ### Cost Optimization (FinOps Integration)
65
+
66
+ 1. **Monitor Resource Costs**
67
+ - Track costs per execution
68
+ - Set budget alerts
69
+ - Optimize resource utilization
70
+ - Reference: FinOps fo-01 (Cost Monitoring)
71
+
72
+ 2. **Right-size Resources**
73
+ - Use appropriate compute sizes
74
+ - Implement auto-scaling
75
+ - Leverage spot/reserved instances where applicable
76
+ - Reference: FinOps fo-06, fo-07
77
+
78
+ ### Security & Privacy (Security Architect Integration)
79
+
80
+ 3. **Implement Access Control**
81
+ - Use least privilege principle
82
+ - Enable Azure AD authentication
83
+ - Audit access logs
84
+ - Reference: Security Architect sa-02 (IAM), sa-04
85
+
86
+ 4. **Data Protection**
87
+ - Encrypt data at rest and in transit
88
+ - Scan for PII before processing
89
+ - Implement data retention policies
90
+ - Reference: Security Architect sa-01 (PII Detection)
91
+
92
+ ### Quality & Governance (Data Engineer Integration)
93
+
94
+ 5. **Ensure Data Quality**
95
+ - Validate inputs and outputs
96
+ - Implement quality gates
97
+ - Monitor data freshness
98
+ - Reference: Data Engineer de-03 (Data Quality)
99
+
100
+ ### Lifecycle Management (MLOps Integration)
101
+
102
+ 6. **Version Control**
103
+ - Version all configurations
104
+ - Track changes over time
105
+ - Enable rollback capability
106
+ - Reference: MLOps mo-03 (Versioning)
107
+
108
+ 7. **Continuous Monitoring**
109
+ - Track performance metrics
110
+ - Set up alerting
111
+ - Monitor for drift
112
+ - Reference: MLOps mo-06 (Monitoring)
113
+
114
+ ### Deployment & Operations (DevOps Integration)
115
+
116
+ 8. **Automate Deployment**
117
+ - Implement CI/CD pipelines
118
+ - Use infrastructure as code
119
+ - Enable blue-green deployments
120
+ - Reference: DevOps do-01 (CI/CD), do-03 (IaC)
121
+
122
+ 9. **Observability**
123
+ - Implement distributed tracing
124
+ - Set up dashboards
125
+ - Enable logging and metrics
126
+ - Reference: DevOps do-08 (Monitoring)
127
+
128
+ ### Azure-Specific Best Practices
129
+
130
+ 10. **Leverage Azure Services**
131
+ - Use managed services where possible
132
+ - Implement Azure Policy for governance
133
+ - Enable Azure Monitor integration
134
+ - Use managed identities for authentication
135
+
136
+ ## 💰 Cost Optimization Examples
137
+
138
+ ### Cost Tracking
139
+ ```python
140
+ from finops_tracker import CostTracker
141
+
142
+ tracker = CostTracker()
143
+
144
+ @tracker.track_costs
145
+ def run_operation(params):
146
+ # Your operation here
147
+ result = execute_operation(params)
148
+ return result
149
+
150
+ # Monthly report
151
+ report = tracker.monthly_report()
152
+ print(f"Total cost: ${report.total_cost:.2f}")
153
+ print(f"Cost per operation: ${report.avg_cost:.4f}")
154
+ ```
155
+
156
+ ## 🔒 Security Best Practices Examples
157
+
158
+ ### Access Control Implementation
159
+ ```python
160
+ from azure.identity import DefaultAzureCredential
161
+ from security_manager import AccessControl
162
+
163
+ credential = DefaultAzureCredential()
164
+ access_control = AccessControl(credential)
165
+
166
+ # Validate access before operation
167
+ @access_control.require_role("operator")
168
+ def sensitive_operation(data):
169
+ # Operation logic
170
+ return process_data(data)
171
+ ```
172
+
173
+ ## 📊 Enhanced Metrics & Monitoring
174
+
175
+ | Metric Category | Metric | Target | Tool |
176
+ |-----------------|--------|--------|------|
177
+ | **Performance** | Execution time (p95) | <5s | Azure Monitor |
178
+ | | Success rate | >99% | Custom metrics |
179
+ | **Cost** | Cost per operation | <$0.05 | FinOps dashboard |
180
+ | | Resource utilization | >75% | Azure Monitor |
181
+ | **Quality** | Error rate | <1% | App Insights |
182
+ | | Data quality score | >95% | Quality tracker |
183
+ | **Security** | Access violations | 0 | Security logs |
184
+ | | Compliance score | 100% | Audit system |
185
+
186
+ ## 🚀 Deployment Pipeline
187
+
188
+ ### CI/CD Example
189
+ ```yaml
190
+ # .github/workflows/deploy-02-threat-modeling.yml
191
+ name: Deploy Threat Modeling & Risk Assessment
192
+
193
+ on:
194
+ push:
195
+ paths:
196
+ - 'security-architect/skills/02-threat-modeling/**'
197
+ branches:
198
+ - main
199
+
200
+ jobs:
201
+ test:
202
+ runs-on: ubuntu-latest
203
+ steps:
204
+ - uses: actions/checkout@v3
205
+ - name: Run tests
206
+ run: pytest tests/ -v
207
+ - name: Security scan
208
+ run: python scripts/security_scan.py
209
+ - name: Cost validation
210
+ run: python scripts/validate_costs.py
211
+
212
+ deploy:
213
+ needs: test
214
+ runs-on: ubuntu-latest
215
+ steps:
216
+ - name: Deploy to Azure
217
+ run: |
218
+ az deployment group create \
219
+ --resource-group rg-security-architect \
220
+ --template-file infra/main.bicep
221
+ - name: Monitor deployment
222
+ run: python scripts/monitor_health.py --duration 10m
223
+ ```
224
+
225
+ ## 🔄 Integration Workflow
226
+
227
+ ### End-to-End Process
228
+ ```
229
+ 1. Input Validation
230
+
231
+ 2. Security Checks (sa-01, sa-02)
232
+
233
+ 3. Main Processing
234
+
235
+ 4. Quality Validation (de-03)
236
+
237
+ 5. Cost Tracking (fo-01)
238
+
239
+ 6. Monitoring & Logging (do-08)
240
+
241
+ 7. Output Delivery
242
+ ```
243
+
244
+ ## 🎯 Quick Wins
245
+
246
+ 1. **Enable cost tracking** - Monitor spending from day one
247
+ 2. **Implement security scanning** - Catch vulnerabilities early
248
+ 3. **Set up monitoring** - Full visibility into operations
249
+ 4. **Automate deployment** - Faster, safer releases
250
+ 5. **Add quality gates** - Prevent bad data from propagating
251
+ 6. **Enable caching** - Reduce redundant operations
252
+ 7. **Implement retries** - Improve reliability
253
+ 8. **Set up alerting** - Know about issues immediately
254
+
255
+ ## 🔗 Related Skills
256
+ - sd-01
257
+
258
+ ---
259
+
260
+ **Skill ID**: `02-threat-modeling`
261
+ **Complexity**: Medium
262
+ **Dependencies**: sd-01
263
+ **Business Value**: High
264
+ **Estimated Implementation Time**: 4-8 hours