sinapse-ai 9.3.0 → 9.4.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 (192) hide show
  1. package/.claude/CLAUDE.md +56 -343
  2. package/.claude/rules/agent-authority.md +6 -0
  3. package/.claude/rules/agent-handoff.md +5 -0
  4. package/.claude/rules/cross-squad-routing.md +5 -0
  5. package/.claude/rules/hook-governance.md +6 -0
  6. package/.claude/rules/mcp-usage.md +3 -1
  7. package/.claude/rules/safe-collaboration.md +10 -0
  8. package/.claude/rules/security-data-protection.md +9 -0
  9. package/.claude/rules/squad-awareness.md +3 -1
  10. package/.claude/rules/tool-examples.md +6 -0
  11. package/.claude/rules/workflow-execution.md +7 -0
  12. package/.codex/agents/analyst.md +253 -72
  13. package/.codex/agents/architect.md +455 -68
  14. package/.codex/agents/data-engineer.md +492 -106
  15. package/.codex/agents/developer.md +560 -0
  16. package/.codex/agents/devops.md +518 -69
  17. package/.codex/agents/product-lead.md +335 -0
  18. package/.codex/agents/project-lead.md +377 -0
  19. package/.codex/agents/quality-gate.md +449 -0
  20. package/.codex/agents/sinapse-orqx.md +9 -7
  21. package/.codex/agents/sprint-lead.md +287 -0
  22. package/.codex/agents/squad-creator.md +344 -0
  23. package/.codex/agents/ux-design-expert.md +495 -0
  24. package/.codex/delegation-matrix.json +756 -44
  25. package/.codex/handoff-packet.schema.json +30 -6
  26. package/.sinapse-ai/data/entity-registry.yaml +175 -363
  27. package/.sinapse-ai/data/registry-update-log.jsonl +16 -0
  28. package/.sinapse-ai/development/agents/analyst.md +90 -0
  29. package/.sinapse-ai/development/agents/architect.md +73 -0
  30. package/.sinapse-ai/development/agents/developer.md +69 -0
  31. package/.sinapse-ai/development/agents/devops.md +117 -0
  32. package/.sinapse-ai/development/agents/quality-gate.md +85 -0
  33. package/.sinapse-ai/development/checklists/agent-quality-gate.md +27 -0
  34. package/.sinapse-ai/development/checklists/brownfield-compatibility-checklist.md +20 -0
  35. package/.sinapse-ai/development/checklists/code-review-checklist.md +106 -0
  36. package/.sinapse-ai/development/checklists/issue-triage-checklist.md +9 -0
  37. package/.sinapse-ai/development/checklists/memory-audit-checklist.md +16 -0
  38. package/.sinapse-ai/development/checklists/pr-quality-checklist.md +72 -0
  39. package/.sinapse-ai/development/checklists/security-deployment-checklist.md +54 -0
  40. package/.sinapse-ai/development/checklists/self-critique-checklist.md +19 -1
  41. package/.sinapse-ai/development/skills/debug.md +57 -0
  42. package/.sinapse-ai/development/skills/fast-review.md +69 -0
  43. package/.sinapse-ai/development/skills/research-synthesis.md +77 -0
  44. package/.sinapse-ai/development/skills/security-scan.md +73 -0
  45. package/.sinapse-ai/development/skills/verify.md +53 -0
  46. package/.sinapse-ai/development/templates/squad/agent-template.md +17 -4
  47. package/.sinapse-ai/development/templates/squad/checklist-template.md +13 -5
  48. package/.sinapse-ai/development/templates/squad/task-template.md +7 -0
  49. package/.sinapse-ai/development/templates/squad/workflow-template.yaml +7 -0
  50. package/.sinapse-ai/development/workflows/fast-track.yaml +87 -0
  51. package/.sinapse-ai/infrastructure/scripts/validate-codex-delegation.js +3 -1
  52. package/.sinapse-ai/install-manifest.yaml +71 -35
  53. package/docs/codex-integration-process.md +22 -0
  54. package/docs/codex-parity-program.md +27 -0
  55. package/docs/ide-integration.md +36 -0
  56. package/package.json +1 -1
  57. package/squads/claude-code-mastery/knowledge-base/claude-code-internals-reference.md +927 -0
  58. package/squads/squad-brand/knowledge-base/archetype-brand-mapping.md +12 -1
  59. package/squads/squad-brand/knowledge-base/brand-activism-cultural-branding.md +216 -0
  60. package/squads/squad-brand/knowledge-base/brand-audit-criteria.md +58 -0
  61. package/squads/squad-brand/knowledge-base/brand-digital-strategy.md +188 -0
  62. package/squads/squad-brand/knowledge-base/brand-legal-ip.md +222 -0
  63. package/squads/squad-brand/knowledge-base/brand-naming-framework.md +163 -0
  64. package/squads/squad-brand/knowledge-base/branding-master-reference.md +1001 -0
  65. package/squads/squad-brand/knowledge-base/color-psychology.md +25 -12
  66. package/squads/squad-brand/knowledge-base/employer-personal-branding.md +206 -0
  67. package/squads/squad-brand/knowledge-base/routing-catalog.md +34 -0
  68. package/squads/squad-brand/knowledge-base/sonic-branding-principles.md +6 -1
  69. package/squads/squad-brand/knowledge-base/typography-personality.md +34 -0
  70. package/squads/squad-claude/knowledge-base/context-window-optimization.md +334 -0
  71. package/squads/squad-claude/knowledge-base/knowledge-architecture-reference.md +403 -0
  72. package/squads/squad-claude/knowledge-base/memory-systems-reference.md +412 -0
  73. package/squads/squad-claude/knowledge-base/obsidian-claude-integration.md +423 -0
  74. package/squads/squad-claude/knowledge-base/retrieval-augmented-generation.md +320 -0
  75. package/squads/squad-claude/knowledge-base/skill-creation-patterns.md +380 -0
  76. package/squads/squad-claude/knowledge-base/swarm-orchestration-patterns.md +411 -0
  77. package/squads/squad-cloning/knowledge-base/clone-quality-assurance.md +211 -0
  78. package/squads/squad-cloning/knowledge-base/confidence-scoring.md +51 -0
  79. package/squads/squad-cloning/knowledge-base/cross-squad-deployment.md +47 -0
  80. package/squads/squad-cloning/knowledge-base/ethical-guidelines.md +237 -0
  81. package/squads/squad-cloning/knowledge-base/knowledge-graph-for-clones.md +295 -0
  82. package/squads/squad-cloning/knowledge-base/memory-architecture-for-clones.md +229 -0
  83. package/squads/squad-cloning/knowledge-base/multi-agent-deployment-patterns.md +320 -0
  84. package/squads/squad-cloning/knowledge-base/skill-standard-for-clones.md +262 -0
  85. package/squads/squad-cloning/knowledge-base/sop-extraction-guide.md +243 -0
  86. package/squads/squad-commercial/knowledge-base/account-based-selling.md +206 -0
  87. package/squads/squad-commercial/knowledge-base/ai-as-competitive-infrastructure.md +14 -0
  88. package/squads/squad-commercial/knowledge-base/ai-in-sales.md +199 -0
  89. package/squads/squad-commercial/knowledge-base/brazilian-sales-context.md +195 -0
  90. package/squads/squad-commercial/knowledge-base/customer-success-operations.md +83 -2
  91. package/squads/squad-commercial/knowledge-base/prospecting-pipeline-generation.md +69 -0
  92. package/squads/squad-commercial/knowledge-base/sales-enablement-playbook.md +260 -0
  93. package/squads/squad-commercial/knowledge-base/sales-methodology-comparison.md +185 -0
  94. package/squads/squad-commercial/knowledge-base/sales-revenue-master-reference.md +1123 -0
  95. package/squads/squad-content/knowledge-base/brazilian-content-context.md +176 -0
  96. package/squads/squad-content/knowledge-base/competitor-analysis-methods.md +40 -1
  97. package/squads/squad-content/knowledge-base/content-architecture-taxonomy.md +206 -0
  98. package/squads/squad-content/knowledge-base/content-formats-encyclopedia.md +58 -1
  99. package/squads/squad-content/knowledge-base/content-references-bibliography.md +130 -0
  100. package/squads/squad-content/knowledge-base/content-strategy-master-reference.md +1097 -0
  101. package/squads/squad-content/knowledge-base/content-tech-stack.md +150 -0
  102. package/squads/squad-content/knowledge-base/copywriting-formulas-library.md +188 -0
  103. package/squads/squad-content/knowledge-base/email-newsletter-strategy.md +161 -0
  104. package/squads/squad-content/knowledge-base/platform-algorithm-intelligence.md +86 -1
  105. package/squads/squad-content/knowledge-base/social-algorithms-master-reference.md +1007 -0
  106. package/squads/squad-content/knowledge-base/video-audio-content-playbook.md +218 -0
  107. package/squads/squad-copy/knowledge-base/ai-copy-production.md +254 -0
  108. package/squads/squad-copy/knowledge-base/brazilian-copywriting-context.md +242 -0
  109. package/squads/squad-copy/knowledge-base/email-copywriting-system.md +299 -0
  110. package/squads/squad-copy/knowledge-base/landing-page-copy-architecture.md +267 -0
  111. package/squads/squad-copy/knowledge-base/power-words-catalog.md +205 -0
  112. package/squads/squad-copy/knowledge-base/seo-copywriting.md +255 -0
  113. package/squads/squad-copy/knowledge-base/video-script-copywriting.md +239 -0
  114. package/squads/squad-council/knowledge-base/brand-strategy-models.md +193 -0
  115. package/squads/squad-council/knowledge-base/growth-strategy-models.md +267 -0
  116. package/squads/squad-council/knowledge-base/innovation-disruption-frameworks.md +193 -0
  117. package/squads/squad-council/knowledge-base/market-analysis-frameworks.md +240 -0
  118. package/squads/squad-council/knowledge-base/organizational-leadership-models.md +212 -0
  119. package/squads/squad-council/knowledge-base/sales-strategy-models.md +215 -0
  120. package/squads/squad-courses/knowledge-base/course-launch-strategy.md +251 -0
  121. package/squads/squad-courses/knowledge-base/domain-advocacia-curriculum.md +385 -0
  122. package/squads/squad-courses/knowledge-base/domain-contabilidade-curriculum.md +266 -0
  123. package/squads/squad-courses/knowledge-base/platform-comparison.md +68 -0
  124. package/squads/squad-courses/knowledge-base/video-production-guide.md +70 -0
  125. package/squads/squad-cybersecurity/knowledge-base/cloud-security-reference.md +363 -0
  126. package/squads/squad-cybersecurity/knowledge-base/compliance-frameworks.md +273 -0
  127. package/squads/squad-cybersecurity/knowledge-base/database-security.md +438 -0
  128. package/squads/squad-cybersecurity/knowledge-base/incident-response-playbook.md +420 -0
  129. package/squads/squad-cybersecurity/knowledge-base/network-security-reference.md +477 -0
  130. package/squads/squad-cybersecurity/knowledge-base/penetration-testing-methodology.md +350 -0
  131. package/squads/squad-cybersecurity/knowledge-base/vulnerability-management.md +349 -0
  132. package/squads/squad-design/knowledge-base/brazilian-design-context.md +223 -0
  133. package/squads/squad-design/knowledge-base/component-api-patterns.md +208 -4
  134. package/squads/squad-design/knowledge-base/design-system-master-reference.md +1302 -0
  135. package/squads/squad-design/knowledge-base/design-systems-frameworks.md +91 -1
  136. package/squads/squad-design/knowledge-base/responsive-modern-css.md +96 -4
  137. package/squads/squad-design/knowledge-base/wcag-aria-reference.md +117 -5
  138. package/squads/squad-design/knowledge-base/web-performance-reference.md +127 -4
  139. package/squads/squad-finance/knowledge-base/brazilian-taxation.md +263 -0
  140. package/squads/squad-finance/knowledge-base/contabilidade-master-reference.md +998 -0
  141. package/squads/squad-finance/knowledge-base/finance-master-reference.md +946 -0
  142. package/squads/squad-finance/knowledge-base/financial-reporting-analysis.md +316 -0
  143. package/squads/squad-finance/knowledge-base/fintech-brazilian-context.md +242 -0
  144. package/squads/squad-finance/knowledge-base/fpa-planning-frameworks.md +286 -0
  145. package/squads/squad-finance/knowledge-base/ma-and-transactions.md +285 -0
  146. package/squads/squad-finance/knowledge-base/risk-management.md +233 -0
  147. package/squads/squad-finance/knowledge-base/startups-venture-capital.md +337 -0
  148. package/squads/squad-growth/knowledge-base/ai-growth-playbook.md +216 -0
  149. package/squads/squad-growth/knowledge-base/attribution-models.md +78 -0
  150. package/squads/squad-growth/knowledge-base/brazilian-growth-context.md +208 -0
  151. package/squads/squad-growth/knowledge-base/community-led-growth.md +175 -0
  152. package/squads/squad-growth/knowledge-base/content-marketing-flywheel.md +190 -0
  153. package/squads/squad-growth/knowledge-base/email-lifecycle-framework.md +192 -0
  154. package/squads/squad-growth/knowledge-base/growth-frameworks-catalog.md +82 -0
  155. package/squads/squad-growth/knowledge-base/growth-master-reference.md +1168 -0
  156. package/squads/squad-growth/knowledge-base/routing-catalog.md +53 -11
  157. package/squads/squad-paidmedia/knowledge-base/audiences-segmentation-deep.md +285 -0
  158. package/squads/squad-paidmedia/knowledge-base/creative-strategy-deep.md +294 -0
  159. package/squads/squad-paidmedia/knowledge-base/google-ads-account-architecture.md +87 -0
  160. package/squads/squad-paidmedia/knowledge-base/meta-ads-campaign-architecture.md +76 -0
  161. package/squads/squad-paidmedia/knowledge-base/paid-media-metrics-reference.md +117 -0
  162. package/squads/squad-paidmedia/knowledge-base/paid-traffic-master-reference.md +1308 -0
  163. package/squads/squad-paidmedia/knowledge-base/routing-catalog.md +95 -18
  164. package/squads/squad-paidmedia/knowledge-base/traffic-masters-frameworks.md +71 -0
  165. package/squads/squad-product/knowledge-base/brazilian-product-context.md +284 -0
  166. package/squads/squad-product/knowledge-base/discovery-methodology-playbook.md +141 -0
  167. package/squads/squad-product/knowledge-base/pm-frameworks-reference.md +125 -9
  168. package/squads/squad-product/knowledge-base/product-analytics-formulas.md +72 -0
  169. package/squads/squad-product/knowledge-base/product-led-growth-reference.md +155 -13
  170. package/squads/squad-product/knowledge-base/product-market-fit-framework.md +222 -0
  171. package/squads/squad-product/knowledge-base/routing-catalog.md +32 -0
  172. package/squads/squad-research/knowledge-base/agentic-second-brain-reference.md +591 -0
  173. package/squads/squad-research/knowledge-base/ai-augmented-research.md +212 -0
  174. package/squads/squad-research/knowledge-base/brazilian-market-research-sources.md +197 -0
  175. package/squads/squad-research/knowledge-base/community-platforms-reference.md +786 -0
  176. package/squads/squad-research/knowledge-base/community-research-methods.md +194 -0
  177. package/squads/squad-research/knowledge-base/mixed-methods-research-design.md +168 -0
  178. package/squads/squad-research/knowledge-base/network-effects-analysis.md +192 -0
  179. package/squads/squad-research/knowledge-base/qualitative-research-deep-methods.md +202 -0
  180. package/squads/squad-research/knowledge-base/quantitative-research-methods.md +208 -0
  181. package/squads/squad-research/knowledge-base/research-frameworks-encyclopedia.md +40 -0
  182. package/squads/squad-research/knowledge-base/research-synthesis-frameworks.md +223 -0
  183. package/squads/squad-storytelling/knowledge-base/brand-mythology-framework.md +236 -0
  184. package/squads/squad-storytelling/knowledge-base/brazilian-storytelling-context.md +237 -0
  185. package/squads/squad-storytelling/knowledge-base/data-storytelling.md +232 -0
  186. package/squads/squad-storytelling/knowledge-base/improv-storytelling.md +226 -0
  187. package/squads/squad-storytelling/knowledge-base/persuasion-narrative-techniques.md +269 -0
  188. package/squads/squad-storytelling/knowledge-base/social-movement-narratives.md +191 -0
  189. package/squads/squad-storytelling/knowledge-base/video-storytelling.md +252 -0
  190. package/squads/claude-code-mastery/data/swarm-orchestration-patterns.yaml +0 -378
  191. package/squads/squad-animations/knowledge-base/framer-motion-complete-reference.md +0 -710
  192. package/squads/squad-animations/knowledge-base/web-animations-api-view-transitions.md +0 -478
@@ -141,3 +141,71 @@ For a $497 course, 100 sales ($49,700 revenue):
141
141
  | Teachable (Pro) | ~$1,200/yr plan | ~$48,500 |
142
142
  | Udemy | ~$18,000–$30,000 (37–63%) | ~$19,700–$31,700 |
143
143
  | Thinkific | ~$800/yr plan | ~$48,900 |
144
+
145
+ ---
146
+
147
+ ## Brazilian Platform Deep Dive
148
+
149
+ ### Kiwify
150
+
151
+ Fast-growing Brazilian alternative to Hotmart. Founded 2020.
152
+
153
+ | Feature | Detail |
154
+ |---------|--------|
155
+ | Transaction fee | 7,99% |
156
+ | Payment | PIX, credit card (up to 12x), boleto |
157
+ | Payouts | D+2 for PIX, D+30 for card |
158
+ | Affiliate system | Yes, built-in |
159
+ | Community | Not native — integrate externally |
160
+ | Checkout | Modern, high-converting, 1-click upsell |
161
+
162
+ **Pros:** Lower fees than Hotmart, faster payouts, cleaner UI, strong checkout conversion
163
+ **Cons:** Smaller affiliate network, less brand recognition internationally
164
+
165
+ **Best for:** Creators optimizing for fees and UX; anyone starting a new launch in Brazil
166
+
167
+ ### Eduzz
168
+
169
+ One of the original Brazilian infoproduct platforms.
170
+
171
+ | Feature | Detail |
172
+ |---------|--------|
173
+ | Transaction fee | 7,9% + platform plans |
174
+ | Unique feature | "Membro.club" for community |
175
+ | Integration | Native email marketing (Eduzz Flow) |
176
+ | Analytics | Funnel analytics built-in |
177
+
178
+ **Best for:** Creators wanting an all-Brazilian stack with built-in email
179
+
180
+ ### Platform Selection by Audience and Goal
181
+
182
+ | Situation | Platform |
183
+ |-----------|---------|
184
+ | First course, Brazilian audience | Kiwify (simplicity, lower fees) |
185
+ | Building affiliate army in Brazil | Hotmart (ecosystem) |
186
+ | Premium English market | Kajabi |
187
+ | Cheap testing with no audience | Udemy |
188
+ | Corporate/B2B training | Thinkific |
189
+ | All-in-one without monthly fee | Hotmart or Kiwify |
190
+ | Cohort-based + community | Kajabi or Circle + Hotmart |
191
+
192
+ ---
193
+
194
+ ## LMS vs. Course Platform vs. Community Tool
195
+
196
+ These three serve different purposes and are often confused:
197
+
198
+ | Tool Type | Purpose | Examples |
199
+ |-----------|---------|---------|
200
+ | **Course Platform** | Sell and host video courses | Hotmart, Kiwify, Teachable |
201
+ | **LMS (Learning Management System)** | Manage learners, track progress, certifications | Moodle, TalentLMS, 360Learning |
202
+ | **Community Platform** | Async community, discussion, live events | Circle, Discord, Slack, Telegram |
203
+
204
+ **When to use each:**
205
+ - Solo creator, 1–2 courses: Course Platform only
206
+ - 5+ courses or B2B: Course Platform + LMS
207
+ - High-engagement product: Course Platform + Community Platform
208
+ - Enterprise/corporate training: LMS (often standalone)
209
+
210
+ **Stack example for a professional certification course:**
211
+ - Kiwify (payments + video hosting) + Circle (community) + Notion (resources)
@@ -131,3 +131,73 @@ Standards for producing professional course video content.
131
131
  - [ ] Script or outline reviewed
132
132
  - [ ] Water bottle on desk (off camera)
133
133
  - [ ] First take: always throw away (warm-up take)
134
+
135
+ ---
136
+
137
+ ## Engagement Patterns for Course Video
138
+
139
+ Research on what keeps learners watching (based on MIT/edX studies on 6.9M video sessions):
140
+
141
+ ### Attention and Retention Patterns
142
+
143
+ | Technique | Retention Impact | Implementation |
144
+ |-----------|----------------|----------------|
145
+ | Instructor talking-head | Baseline | — |
146
+ | Instructor + screen recording | +15% retention | Use picture-in-picture |
147
+ | Questions posed mid-video | +22% engagement | "Pause and think: what would you do?" |
148
+ | Visual handwriting/annotation | +18% retention | Whiteboard software, annotation apps |
149
+ | Real examples and case studies | High | "Let me show you a real balance sheet" |
150
+ | Pattern interrupts | High | Change visual, voice, or format every 3–5 min |
151
+
152
+ ### Pacing Guidelines
153
+
154
+ | Content Type | Ideal Pace | Why |
155
+ |-------------|-----------|-----|
156
+ | Conceptual explanation | Slightly slow | Learner needs processing time |
157
+ | Step-by-step demonstration | Normal | Mirror-able pace |
158
+ | Summary/recap | Faster | Already familiar |
159
+ | Complex formula/calculation | Very slow + repeated | High cognitive load |
160
+
161
+ **Rule:** Speak 15–20% slower than you think you should. People watching recorded video always feel the pace is too fast.
162
+
163
+ ### Shot List for a Standard Course Lesson
164
+
165
+ For a 8–12 minute lesson:
166
+
167
+ | Shot | Description | Duration |
168
+ |------|-------------|---------|
169
+ | Opening talking-head | Instructor greets + frames lesson topic | 30–45 sec |
170
+ | Concept slide with VO | Main framework or definition | 1–3 min |
171
+ | Screen demo or example | Showing real tool, document, case | 3–5 min |
172
+ | Talking-head bridge | Instructor comments on example | 1–2 min |
173
+ | Summary slide with VO | Key takeaways, 3 bullets max | 45 sec |
174
+ | Closing talking-head | CTA (exercise, next lesson) | 20–30 sec |
175
+
176
+ **Total shots:** 6 standard shots per lesson. Mix ensures variety and maintains attention.
177
+
178
+ ---
179
+
180
+ ## Post-Production Workflow
181
+
182
+ **Recommended workflow for efficiency:**
183
+
184
+ 1. **Record** — Full lesson in 1–3 takes (don't stop for every mistake; fix in edit)
185
+ 2. **Rough cut** — Remove obvious mistakes, long pauses, repeated sections
186
+ 3. **Captions** — Generate with Descript, CapCut, or Whisper AI; review for accuracy
187
+ 4. **B-roll insert** — Add screen recordings, slides, animations every 60–90 sec
188
+ 5. **Color/audio correction** — Match color across sessions; normalize audio to -14 LUFS
189
+ 6. **Export** — H.264, 1080p, 30fps, ~10 Mbps for upload quality
190
+ 7. **Upload** — Platform hosting compresses further; source file always at full quality
191
+
192
+ **Time estimates per hour of finished video:**
193
+
194
+ | Production Stage | Hours |
195
+ |-----------------|-------|
196
+ | Scripting/outlining | 1–2h |
197
+ | Recording | 1–2h (2x real-time with retakes) |
198
+ | Editing (talking-head) | 2–4h per hour of video |
199
+ | Editing (with B-roll) | 4–6h per hour of video |
200
+ | Captions | 0.5–1h (with AI tools) |
201
+ | Total | 8–15h per finished hour |
202
+
203
+ **Shortcut:** Use Descript for transcript-based editing. Cut words in the transcript, not the timeline. Cuts editing time by ~50% for talking-head content.
@@ -0,0 +1,363 @@
1
+ # Cloud Security Reference
2
+
3
+ ## Purpose
4
+
5
+ Reference for cloud security across AWS, Azure, and GCP — shared responsibility model, IAM security, CSPM, container security, and Cloudflare-specific controls. Used by Nimbus (cloud-security-engineer).
6
+
7
+ ---
8
+
9
+ ## Shared Responsibility Model
10
+
11
+ The fundamental principle of cloud security. Understanding the boundary between provider and customer responsibility prevents the most common cloud security failures.
12
+
13
+ ### AWS Shared Responsibility
14
+
15
+ | Layer | AWS Responsibility | Customer Responsibility |
16
+ |-------|-------------------|------------------------|
17
+ | Physical infrastructure | Data centers, hardware, networking | Nothing |
18
+ | Hypervisor | Virtualization layer | Nothing |
19
+ | Compute (EC2) | Physical host, hypervisor | OS, applications, data, networking within VPC |
20
+ | Managed Services (RDS, S3) | Service availability, underlying infra | Configuration, access controls, encryption settings |
21
+ | Serverless (Lambda) | Runtime, infrastructure | Function code, IAM permissions, data |
22
+ | SaaS (WorkMail) | Everything | Data, user management |
23
+
24
+ **The most common mistake:** Customers assume "it's in AWS so it's secure." Wrong — misconfigured S3 buckets, open security groups, and over-privileged IAM roles are all customer responsibility.
25
+
26
+ ### Azure and GCP
27
+
28
+ Same model applies. Google Cloud's shared responsibility documentation explicitly states that security misconfiguration is the #1 cause of cloud incidents, and it falls under customer responsibility.
29
+
30
+ ---
31
+
32
+ ## IAM Security — The Highest-ROI Control
33
+
34
+ ### Core IAM Principles
35
+
36
+ **Least Privilege:** Every identity (user, role, service account) should have only the minimum permissions required to perform its function.
37
+
38
+ **No wildcards in production:**
39
+ ```json
40
+ // FORBIDDEN: wildcard permissions
41
+ {
42
+ "Effect": "Allow",
43
+ "Action": "*",
44
+ "Resource": "*"
45
+ }
46
+
47
+ // REQUIRED: specific permissions
48
+ {
49
+ "Effect": "Allow",
50
+ "Action": [
51
+ "s3:GetObject",
52
+ "s3:PutObject"
53
+ ],
54
+ "Resource": "arn:aws:s3:::my-bucket/*"
55
+ }
56
+ ```
57
+
58
+ ### AWS IAM Best Practices
59
+
60
+ ```bash
61
+ # Identify overprivileged IAM entities
62
+ # Use AWS IAM Access Analyzer
63
+ aws accessanalyzer create-analyzer --analyzer-name org-analyzer --type ORGANIZATION
64
+
65
+ # Generate least privilege policy from access logs
66
+ aws iam generate-service-last-accessed-details --arn arn:aws:iam::123456789012:role/my-role
67
+
68
+ # Check for admin policies attached to users (should use roles, not users)
69
+ aws iam list-users --query 'Users[*].UserName' --output text | \
70
+ xargs -I{} aws iam list-attached-user-policies --user-name {}
71
+
72
+ # Ensure MFA is enabled for root account
73
+ aws iam get-account-summary --query 'SummaryMap.AccountMFAEnabled'
74
+
75
+ # Check for access keys older than 90 days (rotation policy)
76
+ aws iam list-users --query 'Users[*].UserName' --output text | \
77
+ xargs -I{} aws iam list-access-keys --user-name {} \
78
+ --query 'AccessKeyMetadata[?CreateDate<=`2025-01-01`]'
79
+ ```
80
+
81
+ ### Service-to-Service Authentication
82
+
83
+ **Never use static credentials for service-to-service auth:**
84
+
85
+ ```javascript
86
+ // WRONG: Static credentials in code or environment
87
+ const awsConfig = {
88
+ accessKeyId: 'AKIA...', // Never hardcode or store in env as permanent credentials
89
+ secretAccessKey: '...' // Use IAM roles instead
90
+ }
91
+
92
+ // RIGHT: IAM role attached to EC2/Lambda/ECS task
93
+ // No credentials needed -- SDK discovers them automatically via instance metadata
94
+ const { S3Client } = require('@aws-sdk/client-s3')
95
+ const client = new S3Client({ region: 'us-east-1' })
96
+ // SDK automatically uses IAM role credentials
97
+ ```
98
+
99
+ **GitHub Actions to AWS (OIDC federation -- no static keys):**
100
+ ```yaml
101
+ # .github/workflows/deploy.yml
102
+ permissions:
103
+ id-token: write # Required for OIDC
104
+ contents: read
105
+
106
+ jobs:
107
+ deploy:
108
+ runs-on: ubuntu-latest
109
+ steps:
110
+ - name: Configure AWS credentials via OIDC
111
+ uses: aws-actions/configure-aws-credentials@v4
112
+ with:
113
+ role-to-assume: arn:aws:iam::123456789012:role/github-actions-role
114
+ aws-region: us-east-1
115
+ # No access keys needed -- OIDC token exchanges for temporary credentials
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Cloud Security Posture Management (CSPM)
121
+
122
+ ### What CSPM Does
123
+
124
+ CSPM tools continuously scan cloud environments for misconfigurations against security benchmarks (CIS, NIST, PCI DSS, HIPAA, LGPD-aligned).
125
+
126
+ ### Open Source CSPM Tools
127
+
128
+ | Tool | Clouds | Focus |
129
+ |------|--------|-------|
130
+ | **Prowler** | AWS, Azure, GCP, Kubernetes | 300+ checks, CIS benchmarks, compliance |
131
+ | **ScoutSuite** | AWS, Azure, GCP | GUI report, baseline audit |
132
+ | **Checkov** | IaC (Terraform, CloudFormation, ARM) | Shift-left — scan before deploy |
133
+ | **tfsec** | Terraform | Security analysis of Terraform code |
134
+ | **KICS** | Multi-IaC | Queries for misconfig in code |
135
+
136
+ ```bash
137
+ # Prowler AWS assessment
138
+ prowler aws --profile myprofile --compliance cis_level2_aws_1.4
139
+
140
+ # Checkov on Terraform code
141
+ checkov -d ./terraform --framework terraform --compact
142
+
143
+ # Scout Suite
144
+ python scout.py aws --profile myprofile --services iam s3 ec2 rds
145
+ ```
146
+
147
+ ### CIS Benchmark Critical Checks
148
+
149
+ **AWS (CIS Level 1):**
150
+ ```
151
+ IAM
152
+ [ ] Root account has no active access keys
153
+ [ ] MFA enabled for root account
154
+ [ ] MFA enabled for all IAM users with console access
155
+ [ ] Password policy meets requirements (min 14 chars, complexity)
156
+ [ ] Access keys rotated within 90 days
157
+ [ ] No user with AdministratorAccess policy (use roles)
158
+
159
+ Networking
160
+ [ ] No security groups allow unrestricted inbound SSH (0.0.0.0/0:22)
161
+ [ ] No security groups allow unrestricted inbound RDP (0.0.0.0/0:3389)
162
+ [ ] VPC flow logs enabled on all VPCs
163
+ [ ] Default VPC security group has no inbound/outbound rules
164
+
165
+ Logging
166
+ [ ] CloudTrail enabled in all regions
167
+ [ ] CloudTrail log file validation enabled
168
+ [ ] CloudTrail logs sent to S3 with MFA delete
169
+ [ ] CloudWatch alarms on root account usage
170
+ [ ] Config service enabled in all regions
171
+
172
+ Storage
173
+ [ ] S3 Block Public Access enabled at account level
174
+ [ ] S3 bucket versioning enabled for critical buckets
175
+ [ ] S3 server-side encryption enabled
176
+
177
+ Database
178
+ [ ] RDS instances not publicly accessible
179
+ [ ] RDS snapshots not publicly accessible
180
+ [ ] RDS encryption at rest enabled
181
+ ```
182
+
183
+ ---
184
+
185
+ ## Container Security
186
+
187
+ ### Image Security
188
+
189
+ ```bash
190
+ # Scan container images for vulnerabilities before pushing
191
+ # Trivy (recommended -- fast, accurate)
192
+ trivy image --severity HIGH,CRITICAL myapp:latest
193
+
194
+ # Exit non-zero if high/critical vulnerabilities found (for CI gate)
195
+ trivy image --exit-code 1 --severity HIGH,CRITICAL myapp:latest
196
+
197
+ # Grype (alternative)
198
+ grype myapp:latest --fail-on high
199
+
200
+ # In GitHub Actions
201
+ - name: Container Security Scan
202
+ uses: aquasecurity/trivy-action@master
203
+ with:
204
+ image-ref: 'myapp:latest'
205
+ format: 'sarif'
206
+ exit-code: '1'
207
+ severity: 'HIGH,CRITICAL'
208
+ ```
209
+
210
+ ### Dockerfile Security
211
+
212
+ ```dockerfile
213
+ # Use specific version tags -- never :latest in production
214
+ FROM node:20.18-alpine3.20
215
+
216
+ # Run as non-root user
217
+ RUN addgroup -g 1001 -S nodejs && \
218
+ adduser -S nextjs -u 1001
219
+
220
+ # Copy files as root, then switch
221
+ COPY --chown=nextjs:nodejs . .
222
+
223
+ # Switch to non-root
224
+ USER nextjs
225
+
226
+ # Read-only filesystem when possible
227
+ # Run with: docker run --read-only --tmpfs /tmp myapp
228
+ ```
229
+
230
+ ### Kubernetes Security Context
231
+
232
+ ```yaml
233
+ # Pod Security Context -- harden pods
234
+ apiVersion: v1
235
+ kind: Pod
236
+ spec:
237
+ securityContext:
238
+ runAsNonRoot: true # Prevent running as root
239
+ runAsUser: 1001 # Non-root UID
240
+ fsGroup: 1001 # File system group
241
+ seccompProfile:
242
+ type: RuntimeDefault # Enable seccomp filtering
243
+ containers:
244
+ - name: myapp
245
+ securityContext:
246
+ allowPrivilegeEscalation: false # Prevent sudo/setuid
247
+ readOnlyRootFilesystem: true # Immutable filesystem
248
+ capabilities:
249
+ drop: [ALL] # Drop all Linux capabilities
250
+ add: [NET_BIND_SERVICE] # Add only what's needed
251
+ ```
252
+
253
+ ### Kubernetes RBAC Audit
254
+
255
+ ```bash
256
+ # Find service accounts with cluster-admin (over-privileged)
257
+ kubectl get clusterrolebindings -o json | \
258
+ jq '.items[] | select(.roleRef.name=="cluster-admin") | .subjects'
259
+
260
+ # Find pods with hostPath volumes (potential container escape)
261
+ kubectl get pods -A -o json | \
262
+ jq '.items[] | select(.spec.volumes[]?.hostPath != null) | {name:.metadata.name, ns:.metadata.namespace}'
263
+
264
+ # Find privileged containers
265
+ kubectl get pods -A -o json | \
266
+ jq '.items[] | select(.spec.containers[].securityContext.privileged == true) | .metadata'
267
+
268
+ # Network policies coverage
269
+ kubectl get networkpolicies -A
270
+ # Any namespace without NetworkPolicy = no network isolation
271
+ ```
272
+
273
+ ---
274
+
275
+ ## AWS Security Services Reference
276
+
277
+ | Service | Purpose | When to Use |
278
+ |---------|---------|-------------|
279
+ | **IAM Access Analyzer** | Detect external access and unused permissions | Continuous — enable organization-wide |
280
+ | **AWS GuardDuty** | Threat detection (ML-based, CloudTrail/VPC flow/DNS analysis) | Always-on in production |
281
+ | **AWS Security Hub** | Centralized security findings + compliance checks | Enable CIS/PCI/NIST benchmarks |
282
+ | **AWS Config** | Track configuration changes, compliance rules | Audit trail, compliance |
283
+ | **AWS Inspector** | Vulnerability assessment for EC2, Lambda, ECR | Continuous scanning |
284
+ | **AWS Macie** | PII discovery in S3 | LGPD/privacy compliance |
285
+ | **AWS WAF** | Web application firewall | All public-facing applications |
286
+ | **AWS Shield** | DDoS protection | Standard: free; Advanced: $3K/month |
287
+ | **AWS KMS** | Key management | Encrypt all data at rest |
288
+ | **AWS Secrets Manager** | Secrets rotation | All credentials, API keys, database passwords |
289
+
290
+ ---
291
+
292
+ ## Cloudflare Security Controls
293
+
294
+ Cloudflare provides security controls that protect at the edge before traffic reaches origin servers:
295
+
296
+ ### WAF (Web Application Firewall)
297
+
298
+ ```
299
+ Managed Rules:
300
+ - OWASP Core Rule Set: blocks SQLi, XSS, path traversal
301
+ - Cloudflare Managed: updated automatically for emerging threats
302
+ - Custom Rules: write your own for application-specific patterns
303
+
304
+ Custom Rule Examples:
305
+ - Block requests from specific countries
306
+ - Block requests with suspicious User-Agent strings
307
+ - Rate limit specific endpoints (e.g., /api/auth/login → 5/min per IP)
308
+ - Block requests without valid origin header
309
+ ```
310
+
311
+ ### DDoS Protection
312
+
313
+ ```
314
+ Layer 3/4 (Network DDoS): Always-on, included in all plans
315
+ Layer 7 (Application DDoS): Configurable thresholds
316
+ - HTTP Flood protection
317
+ - Slowloris protection
318
+ - Cache-busting attack protection
319
+
320
+ Enable via Dashboard: Security → DDoS → HTTP DDoS attack protection
321
+ ```
322
+
323
+ ### Zero Trust (Cloudflare Access)
324
+
325
+ ```
326
+ Replace VPN with identity-aware access:
327
+ - Protect internal tools (Kibana, Grafana, Metabase, etc.)
328
+ - Require corporate SSO before reaching origin
329
+ - No open port on origin server needed
330
+ - Audit log of every access request
331
+ ```
332
+
333
+ ---
334
+
335
+ ## LGPD Cloud Compliance
336
+
337
+ For Brazilian personal data, cloud configuration must support LGPD requirements:
338
+
339
+ | LGPD Requirement | Cloud Control |
340
+ |----------------|--------------|
341
+ | Data residency preference | Use Brazilian regions: AWS sa-east-1, Azure Brazil South, GCP southamerica-east1 |
342
+ | International transfers (SCCs since Aug 2025) | Standard Contractual Clauses with cloud provider |
343
+ | Encryption (Art. 46) | Enable encryption at rest (KMS/CMEK) and enforce TLS in transit |
344
+ | Audit logging (Art. 46) | CloudTrail/Activity Log/Cloud Audit Logs enabled and retained |
345
+ | Data subject rights (Art. 18) | Implement deletion capability for personal data in cloud storage |
346
+ | Breach notification (Art. 48) | GuardDuty/Security Center alerts → incident response → ANPD notification |
347
+
348
+ **Brazilian region availability:**
349
+ - AWS: sa-east-1 (Sao Paulo, 3 AZs) — since 2011
350
+ - Azure: Brazil South (Campinas, 3 AZs) — since 2014
351
+ - GCP: southamerica-east1 (Osasco, 3 AZs) — since 2017
352
+ - Cloudflare: POPs in Sao Paulo, Rio de Janeiro, Fortaleza, Porto Alegre, Brasilia
353
+
354
+ ---
355
+
356
+ ## Sources
357
+
358
+ - AWS Well-Architected Security Pillar: https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/
359
+ - CIS AWS Benchmark: https://www.cisecurity.org/benchmark/amazon_web_services
360
+ - NIST SP 800-207 Zero Trust: https://csrc.nist.gov/pubs/sp/800/207/final
361
+ - Prowler: https://github.com/prowler-cloud/prowler
362
+ - Trivy: https://github.com/aquasecurity/trivy
363
+ - Cloudflare Zero Trust: https://developers.cloudflare.com/cloudflare-one/