@caddis/cli 0.1.0 → 0.2.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 (364) hide show
  1. package/README.md +29 -16
  2. package/bundles/antigravity-plugin-extras/plugin.json +5 -0
  3. package/bundles/antigravity-plugin-extras/skills/_registry.md +154 -0
  4. package/bundles/antigravity-plugin-extras/skills/agent-md-refactor/SKILL.md +356 -0
  5. package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +517 -0
  6. package/bundles/antigravity-plugin-extras/skills/algorithmic-art/SKILL.md +293 -0
  7. package/bundles/antigravity-plugin-extras/skills/anchor-review/SKILL.md +135 -0
  8. package/bundles/antigravity-plugin-extras/skills/api-client-patterns/SKILL.md +367 -0
  9. package/bundles/antigravity-plugin-extras/skills/architecture-design/SKILL.md +244 -0
  10. package/bundles/antigravity-plugin-extras/skills/architecture-diagram/SKILL.md +156 -0
  11. package/bundles/antigravity-plugin-extras/skills/architecture-document/SKILL.md +321 -0
  12. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/LICENSE.txt +202 -0
  13. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/SKILL.md +74 -0
  14. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
  15. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
  16. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  17. package/bundles/antigravity-plugin-extras/skills/ascii-art/SKILL.md +144 -0
  18. package/bundles/antigravity-plugin-extras/skills/asking-questions/SKILL.md +81 -0
  19. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/SKILL.md +118 -0
  20. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/cross-service/credential-management.md +450 -0
  21. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/browser/README.md +363 -0
  22. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/code-interpreter/README.md +232 -0
  23. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/README.md +100 -0
  24. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deploy-template.sh +117 -0
  25. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deployment-strategies.md +416 -0
  26. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/troubleshooting-guide.md +384 -0
  27. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/validate-deployment.sh +186 -0
  28. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/identity/README.md +186 -0
  29. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/memory/README.md +253 -0
  30. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/observability/README.md +517 -0
  31. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/runtime/README.md +215 -0
  32. package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/SKILL.md +279 -0
  33. package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/references/cdk-patterns.md +431 -0
  34. package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/scripts/validate-stack.sh +240 -0
  35. package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/SKILL.md +318 -0
  36. package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/cloudwatch-alarms.md +567 -0
  37. package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/operations-patterns.md +394 -0
  38. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/SKILL.md +758 -0
  39. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/deployment-best-practices.md +830 -0
  40. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/eda-patterns.md +1002 -0
  41. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/observability-best-practices.md +770 -0
  42. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/performance-optimization.md +671 -0
  43. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/security-best-practices.md +625 -0
  44. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/serverless-patterns.md +838 -0
  45. package/bundles/antigravity-plugin-extras/skills/backend-to-frontend-handoff/SKILL.md +139 -0
  46. package/bundles/antigravity-plugin-extras/skills/banner-design/SKILL.md +188 -0
  47. package/bundles/antigravity-plugin-extras/skills/brand-design/SKILL.md +298 -0
  48. package/bundles/antigravity-plugin-extras/skills/brand-guidelines/LICENSE.txt +202 -0
  49. package/bundles/antigravity-plugin-extras/skills/brand-guidelines/SKILL.md +118 -0
  50. package/bundles/antigravity-plugin-extras/skills/brand-voice/SKILL.md +93 -0
  51. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/SKILL.md +392 -0
  52. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/agent-patterns.md +461 -0
  53. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/examples.md +188 -0
  54. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/state-patterns.md +360 -0
  55. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/troubleshooting.md +362 -0
  56. package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/SKILL.md +266 -0
  57. package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/examples.md +115 -0
  58. package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/oauth-setup.md +338 -0
  59. package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/troubleshooting.md +317 -0
  60. package/bundles/antigravity-plugin-extras/skills/caching-patterns/SKILL.md +385 -0
  61. package/bundles/antigravity-plugin-extras/skills/canvas-design/LICENSE.txt +202 -0
  62. package/bundles/antigravity-plugin-extras/skills/canvas-design/SKILL.md +91 -0
  63. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  64. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  65. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  66. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  67. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  68. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  69. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  70. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  71. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  72. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  73. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  74. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  75. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  76. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  77. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  78. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  79. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  80. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  81. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  82. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  83. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  84. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  85. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  86. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  87. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  88. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  89. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  90. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  91. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  92. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  93. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  94. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  95. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  96. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  97. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  98. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  99. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  100. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  101. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  102. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  103. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  104. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  105. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  106. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  107. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  108. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  109. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  110. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  111. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  112. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  113. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  114. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  115. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  116. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  117. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  118. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  119. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  120. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  121. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  122. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  123. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  124. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  125. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  126. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  127. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  128. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  129. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  130. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  131. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  132. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  133. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  134. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  135. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  136. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  137. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  138. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  139. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  140. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  141. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  142. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  143. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  144. package/bundles/antigravity-plugin-extras/skills/changelog-generator/SKILL.md +105 -0
  145. package/bundles/antigravity-plugin-extras/skills/code-explainer/SKILL.md +91 -0
  146. package/bundles/antigravity-plugin-extras/skills/competitive-ads-extractor/SKILL.md +294 -0
  147. package/bundles/antigravity-plugin-extras/skills/component-testing/SKILL.md +310 -0
  148. package/bundles/antigravity-plugin-extras/skills/content-research-writer/SKILL.md +539 -0
  149. package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +51 -0
  150. package/bundles/antigravity-plugin-extras/skills/data-analysis/SKILL.md +111 -0
  151. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/README.md +248 -0
  152. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/SKILL.md +203 -0
  153. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/adapter.py.template +44 -0
  154. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/api-router.py.template +43 -0
  155. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/contract-test.py.template +384 -0
  156. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/display-dto.py.template +39 -0
  157. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-service.ts.template +46 -0
  158. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-types.ts.template +38 -0
  159. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/ingestion-model.py.template +42 -0
  160. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/mapping-doc.md.template +46 -0
  161. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/normalizer.py.template +48 -0
  162. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_requirements.md +36 -0
  163. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_ui_demand.md +35 -0
  164. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/reconcile_mapping.md +66 -0
  165. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/query-catalog.md.template +62 -0
  166. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/consumer-driven-contracts.md +131 -0
  167. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/drift-check-catalog.md +305 -0
  168. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/layer-responsibilities.md +333 -0
  169. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_connections.py +170 -0
  170. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_sources.py +161 -0
  171. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/drift_check.py +171 -0
  172. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/extract_schema.py +1363 -0
  173. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_gap_report.py +81 -0
  174. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_mapping_doc.py +294 -0
  175. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/ts_dto_compare.py +214 -0
  176. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/validate_lineage.py +51 -0
  177. package/bundles/antigravity-plugin-extras/skills/data-loader/SKILL.md +753 -0
  178. package/bundles/antigravity-plugin-extras/skills/data-validation/SKILL.md +220 -0
  179. package/bundles/antigravity-plugin-extras/skills/db-testing/SKILL.md +117 -0
  180. package/bundles/antigravity-plugin-extras/skills/deploy-local/SKILL.md +259 -0
  181. package/bundles/antigravity-plugin-extras/skills/design-md/SKILL.md +167 -0
  182. package/bundles/antigravity-plugin-extras/skills/design-system-tokens/SKILL.md +240 -0
  183. package/bundles/antigravity-plugin-extras/skills/design-system-tokens/references/DESIGN-SYSTEM-TEMPLATE.md +577 -0
  184. package/bundles/antigravity-plugin-extras/skills/developer-growth-analysis/SKILL.md +323 -0
  185. package/bundles/antigravity-plugin-extras/skills/doc-coauthoring/SKILL.md +378 -0
  186. package/bundles/antigravity-plugin-extras/skills/documentation-analyzer/SKILL.md +78 -0
  187. package/bundles/antigravity-plugin-extras/skills/domain-name-brainstormer/SKILL.md +213 -0
  188. package/bundles/antigravity-plugin-extras/skills/enterprise-dashboard-aesthetic-system/SKILL.md +120 -0
  189. package/bundles/antigravity-plugin-extras/skills/excalidraw/SKILL.md +193 -0
  190. package/bundles/antigravity-plugin-extras/skills/excalidraw/references/element-types.md +497 -0
  191. package/bundles/antigravity-plugin-extras/skills/excalidraw/references/excalidraw-schema.md +356 -0
  192. package/bundles/antigravity-plugin-extras/skills/excalidraw/references/reliable-diagrams.md +115 -0
  193. package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/README.md +60 -0
  194. package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-arrow.py +354 -0
  195. package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-icon-to-diagram.py +412 -0
  196. package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/split-excalidraw-library.py +183 -0
  197. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/business-flow-swimlane-template.excalidraw +334 -0
  198. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/class-diagram-template.excalidraw +558 -0
  199. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/data-flow-diagram-template.excalidraw +279 -0
  200. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/er-diagram-template.excalidraw +662 -0
  201. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/flowchart-template.excalidraw +179 -0
  202. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/mindmap-template.excalidraw +244 -0
  203. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/relationship-template.excalidraw +145 -0
  204. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/reliable-flowchart.excalidraw +1 -0
  205. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/sequence-diagram-template.excalidraw +509 -0
  206. package/bundles/antigravity-plugin-extras/skills/file-organizer/SKILL.md +434 -0
  207. package/bundles/antigravity-plugin-extras/skills/game-changing-features/README.md +221 -0
  208. package/bundles/antigravity-plugin-extras/skills/game-changing-features/SKILL.md +265 -0
  209. package/bundles/antigravity-plugin-extras/skills/github-issues/SKILL.md +359 -0
  210. package/bundles/antigravity-plugin-extras/skills/github-issues/references/templates.md +90 -0
  211. package/bundles/antigravity-plugin-extras/skills/golden-nuggets/SKILL.md +192 -0
  212. package/bundles/antigravity-plugin-extras/skills/humanizer/SKILL.md +194 -0
  213. package/bundles/antigravity-plugin-extras/skills/image-enhancer/SKILL.md +100 -0
  214. package/bundles/antigravity-plugin-extras/skills/intent-writer/SKILL.md +201 -0
  215. package/bundles/antigravity-plugin-extras/skills/internal-comms/LICENSE.txt +202 -0
  216. package/bundles/antigravity-plugin-extras/skills/internal-comms/SKILL.md +124 -0
  217. package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/3p-updates.md +47 -0
  218. package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/company-newsletter.md +65 -0
  219. package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/faq-answers.md +30 -0
  220. package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/general-comms.md +16 -0
  221. package/bundles/antigravity-plugin-extras/skills/invoice-organizer/SKILL.md +447 -0
  222. package/bundles/antigravity-plugin-extras/skills/jira-issues/SKILL.md +182 -0
  223. package/bundles/antigravity-plugin-extras/skills/job-application/SKILL.md +188 -0
  224. package/bundles/antigravity-plugin-extras/skills/lead-research-assistant/SKILL.md +200 -0
  225. package/bundles/antigravity-plugin-extras/skills/llm-application-dev/SKILL.md +217 -0
  226. package/bundles/antigravity-plugin-extras/skills/mcp-builder/LICENSE.txt +202 -0
  227. package/bundles/antigravity-plugin-extras/skills/mcp-builder/SKILL.md +100 -0
  228. package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/evaluation.md +602 -0
  229. package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/mcp_best_practices.md +915 -0
  230. package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/node_mcp_server.md +916 -0
  231. package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/python_mcp_server.md +752 -0
  232. package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/connections.py +151 -0
  233. package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/evaluation.py +373 -0
  234. package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  235. package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/requirements.txt +2 -0
  236. package/bundles/antigravity-plugin-extras/skills/meeting-insights-analyzer/SKILL.md +328 -0
  237. package/bundles/antigravity-plugin-extras/skills/monorepo/SKILL.md +267 -0
  238. package/bundles/antigravity-plugin-extras/skills/naming-analyzer/SKILL.md +376 -0
  239. package/bundles/antigravity-plugin-extras/skills/nextjs-app-router/SKILL.md +271 -0
  240. package/bundles/antigravity-plugin-extras/skills/notebooklm/AUTHENTICATION.md +154 -0
  241. package/bundles/antigravity-plugin-extras/skills/notebooklm/SKILL.md +270 -0
  242. package/bundles/antigravity-plugin-extras/skills/notebooklm/references/api_reference.md +309 -0
  243. package/bundles/antigravity-plugin-extras/skills/notebooklm/references/troubleshooting.md +376 -0
  244. package/bundles/antigravity-plugin-extras/skills/notebooklm/references/usage_patterns.md +338 -0
  245. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/__init__.py +81 -0
  246. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/ask_question.py +256 -0
  247. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/auth_manager.py +358 -0
  248. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_session.py +255 -0
  249. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_utils.py +107 -0
  250. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/cleanup_manager.py +302 -0
  251. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/config.py +44 -0
  252. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/notebook_manager.py +410 -0
  253. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/run.py +102 -0
  254. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/setup_environment.py +204 -0
  255. package/bundles/antigravity-plugin-extras/skills/observability/SKILL.md +371 -0
  256. package/bundles/antigravity-plugin-extras/skills/onboard-project/SKILL.md +192 -0
  257. package/bundles/antigravity-plugin-extras/skills/performance-testing/SKILL.md +226 -0
  258. package/bundles/antigravity-plugin-extras/skills/pipeline-state/SKILL.md +208 -0
  259. package/bundles/antigravity-plugin-extras/skills/plantuml/SKILL.md +228 -0
  260. package/bundles/antigravity-plugin-extras/skills/popular-web-designs/SKILL.md +142 -0
  261. package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/linear.app.md +196 -0
  262. package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/stripe.md +214 -0
  263. package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/vercel.md +218 -0
  264. package/bundles/antigravity-plugin-extras/skills/prd-to-code/SKILL.md +127 -0
  265. package/bundles/antigravity-plugin-extras/skills/raffle-winner-picker/SKILL.md +159 -0
  266. package/bundles/antigravity-plugin-extras/skills/react-useeffect/README.md +320 -0
  267. package/bundles/antigravity-plugin-extras/skills/react-useeffect/SKILL.md +53 -0
  268. package/bundles/antigravity-plugin-extras/skills/react-useeffect/alternatives.md +258 -0
  269. package/bundles/antigravity-plugin-extras/skills/react-useeffect/anti-patterns.md +290 -0
  270. package/bundles/antigravity-plugin-extras/skills/receiving-code-review/SKILL.md +213 -0
  271. package/bundles/antigravity-plugin-extras/skills/relay/SKILL.md +246 -0
  272. package/bundles/antigravity-plugin-extras/skills/requesting-code-review/SKILL.md +105 -0
  273. package/bundles/antigravity-plugin-extras/skills/requesting-code-review/code-reviewer.md +146 -0
  274. package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/SKILL.md +350 -0
  275. package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/pwa-checklist.md +226 -0
  276. package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/touch-and-interaction.md +265 -0
  277. package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/transformation-catalogue.md +326 -0
  278. package/bundles/antigravity-plugin-extras/skills/schema-migration/SKILL.md +275 -0
  279. package/bundles/antigravity-plugin-extras/skills/setup-project-ai/SKILL.md +120 -0
  280. package/bundles/antigravity-plugin-extras/skills/shadcn-radix/SKILL.md +330 -0
  281. package/bundles/antigravity-plugin-extras/skills/sketch/SKILL.md +104 -0
  282. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/LICENSE.txt +202 -0
  283. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/SKILL.md +646 -0
  284. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/color_palettes.py +302 -0
  285. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/easing.py +230 -0
  286. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/frame_composer.py +469 -0
  287. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/gif_builder.py +246 -0
  288. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/typography.py +357 -0
  289. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/validators.py +264 -0
  290. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/visual_effects.py +494 -0
  291. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/requirements.txt +4 -0
  292. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/bounce.py +106 -0
  293. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/explode.py +331 -0
  294. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/fade.py +329 -0
  295. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/flip.py +291 -0
  296. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/kaleidoscope.py +211 -0
  297. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/morph.py +329 -0
  298. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/move.py +293 -0
  299. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/pulse.py +268 -0
  300. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/shake.py +127 -0
  301. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/slide.py +291 -0
  302. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/spin.py +269 -0
  303. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/wiggle.py +300 -0
  304. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/zoom.py +312 -0
  305. package/bundles/antigravity-plugin-extras/skills/slides/SKILL.md +38 -0
  306. package/bundles/antigravity-plugin-extras/skills/state-tracking/SKILL.md +131 -0
  307. package/bundles/antigravity-plugin-extras/skills/streamlit-dev/SKILL.md +268 -0
  308. package/bundles/antigravity-plugin-extras/skills/svg-create/SKILL.md +251 -0
  309. package/bundles/antigravity-plugin-extras/skills/theme-factory/LICENSE.txt +202 -0
  310. package/bundles/antigravity-plugin-extras/skills/theme-factory/SKILL.md +59 -0
  311. package/bundles/antigravity-plugin-extras/skills/theme-factory/theme-showcase.pdf +0 -0
  312. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/arctic-frost.md +19 -0
  313. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/botanical-garden.md +19 -0
  314. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/desert-rose.md +19 -0
  315. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/forest-canopy.md +19 -0
  316. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/golden-hour.md +19 -0
  317. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  318. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/modern-minimalist.md +19 -0
  319. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/ocean-depths.md +19 -0
  320. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  321. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/tech-innovation.md +19 -0
  322. package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/LICENSE.txt +202 -0
  323. package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/SKILL.md +320 -0
  324. package/bundles/antigravity-plugin-extras/skills/ui-testing/SKILL.md +660 -0
  325. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/SKILL.md +660 -0
  326. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/_sync_all.py +414 -0
  327. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/app-interface.csv +31 -0
  328. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/charts.csv +26 -0
  329. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/colors.csv +162 -0
  330. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/design.csv +1776 -0
  331. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/draft.csv +1779 -0
  332. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/google-fonts.csv +1924 -0
  333. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/icons.csv +106 -0
  334. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/landing.csv +35 -0
  335. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/products.csv +162 -0
  336. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/react-performance.csv +45 -0
  337. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/styles.csv +85 -0
  338. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/typography.csv +74 -0
  339. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ui-reasoning.csv +162 -0
  340. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ux-guidelines.csv +100 -0
  341. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/core.py +247 -0
  342. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/design_system.py +1067 -0
  343. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/search.py +114 -0
  344. package/bundles/antigravity-plugin-extras/skills/understand-anything/SKILL.md +140 -0
  345. package/bundles/antigravity-plugin-extras/skills/understand-anything/references/commands.md +252 -0
  346. package/bundles/antigravity-plugin-extras/skills/understand-anything/references/graph-schema.md +116 -0
  347. package/bundles/antigravity-plugin-extras/skills/understand-anything/references/pipeline.md +331 -0
  348. package/bundles/antigravity-plugin-extras/skills/update-readme/SKILL.md +74 -0
  349. package/bundles/antigravity-plugin-extras/skills/verification-loop/SKILL.md +209 -0
  350. package/bundles/antigravity-plugin-extras/skills/video-downloader/SKILL.md +107 -0
  351. package/bundles/antigravity-plugin-extras/skills/webapp-development/SKILL.md +288 -0
  352. package/bundles/antigravity-plugin-extras/skills/word-cloud/SKILL.md +339 -0
  353. package/bundles/antigravity-plugin-extras/skills/word-cloud/agents/agent-interface.md +175 -0
  354. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/html.md +384 -0
  355. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/nlp-keywords.md +127 -0
  356. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/palettes.md +149 -0
  357. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/python.md +249 -0
  358. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/react.md +427 -0
  359. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/shapes.md +135 -0
  360. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/stopwords.md +115 -0
  361. package/bundles/antigravity-plugin-extras/skills/youtube-transcript/SKILL.md +416 -0
  362. package/bundles/manifest.json +2 -1
  363. package/dist/cli.js +166 -37
  364. package/package.json +1 -1
@@ -0,0 +1,625 @@
1
+ # Serverless Security Best Practices
2
+
3
+ Security best practices for serverless applications based on AWS Well-Architected Framework.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Shared Responsibility Model](#shared-responsibility-model)
8
+ - [Identity and Access Management](#identity-and-access-management)
9
+ - [Function Security](#function-security)
10
+ - [API Security](#api-security)
11
+ - [Data Protection](#data-protection)
12
+ - [Network Security](#network-security)
13
+
14
+ ## Shared Responsibility Model
15
+
16
+ ### Serverless Shifts Responsibility to AWS
17
+
18
+ With serverless, AWS takes on more security responsibilities:
19
+
20
+ **AWS Responsibilities**:
21
+ - Compute infrastructure
22
+ - Execution environment
23
+ - Runtime language and patches
24
+ - Networking infrastructure
25
+ - Server software and OS
26
+ - Physical hardware and facilities
27
+ - Automatic security patches (like Log4Shell mitigation)
28
+
29
+ **Customer Responsibilities**:
30
+ - Function code and dependencies
31
+ - Resource configuration
32
+ - Identity and Access Management (IAM)
33
+ - Data encryption (at rest and in transit)
34
+ - Application-level security
35
+ - Secure coding practices
36
+
37
+ ### Benefits of Shifted Responsibility
38
+
39
+ - **Automatic Patching**: AWS applies security patches automatically (e.g., Log4Shell fixed within 3 days)
40
+ - **Infrastructure Security**: No OS patching, server hardening, or vulnerability scanning
41
+ - **Operational Agility**: Quick security response at scale
42
+ - **Focus on Code**: Spend time on business logic, not infrastructure security
43
+
44
+ ## Identity and Access Management
45
+
46
+ ### Least Privilege Principle
47
+
48
+ **Always use least privilege IAM policies**:
49
+
50
+ ```typescript
51
+ // ✅ GOOD - Specific grant
52
+ const table = new dynamodb.Table(this, 'Table', {});
53
+ const function = new lambda.Function(this, 'Function', {});
54
+
55
+ table.grantReadData(function); // Only read access
56
+
57
+ // ❌ BAD - Overly broad
58
+ function.addToRolePolicy(new iam.PolicyStatement({
59
+ actions: ['dynamodb:*'],
60
+ resources: ['*'],
61
+ }));
62
+ ```
63
+
64
+ ### Function Execution Role
65
+
66
+ **Separate roles per function**:
67
+
68
+ ```typescript
69
+ // ✅ GOOD - Each function has its own role
70
+ const readFunction = new NodejsFunction(this, 'ReadFunction', {
71
+ entry: 'src/read.ts',
72
+ // Gets its own execution role
73
+ });
74
+
75
+ const writeFunction = new NodejsFunction(this, 'WriteFunction', {
76
+ entry: 'src/write.ts',
77
+ // Gets its own execution role
78
+ });
79
+
80
+ table.grantReadData(readFunction);
81
+ table.grantReadWriteData(writeFunction);
82
+
83
+ // ❌ BAD - Shared role with excessive permissions
84
+ const sharedRole = new iam.Role(this, 'SharedRole', {
85
+ assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),
86
+ managedPolicies: [
87
+ iam.ManagedPolicy.fromAwsManagedPolicyName('AdministratorAccess'), // Too broad!
88
+ ],
89
+ });
90
+ ```
91
+
92
+ ### Resource-Based Policies
93
+
94
+ Control who can invoke functions:
95
+
96
+ ```typescript
97
+ // Allow API Gateway to invoke function
98
+ myFunction.grantInvoke(new iam.ServicePrincipal('apigateway.amazonaws.com'));
99
+
100
+ // Allow specific account
101
+ myFunction.addPermission('AllowAccountInvoke', {
102
+ principal: new iam.AccountPrincipal('123456789012'),
103
+ action: 'lambda:InvokeFunction',
104
+ });
105
+
106
+ // Conditional invoke (only from specific VPC endpoint)
107
+ myFunction.addPermission('AllowVPCInvoke', {
108
+ principal: new iam.ServicePrincipal('lambda.amazonaws.com'),
109
+ action: 'lambda:InvokeFunction',
110
+ sourceArn: vpcEndpoint.vpcEndpointId,
111
+ });
112
+ ```
113
+
114
+ ### IAM Policies Best Practices
115
+
116
+ 1. **Use grant methods**: Prefer `.grantXxx()` over manual policies
117
+ 2. **Condition keys**: Use IAM conditions for fine-grained control
118
+ 3. **Resource ARNs**: Always specify resource ARNs, avoid wildcards
119
+ 4. **Session policies**: Use for temporary elevated permissions
120
+ 5. **Service Control Policies (SCPs)**: Enforce organization-wide guardrails
121
+
122
+ ## Function Security
123
+
124
+ ### Lambda Isolation Model
125
+
126
+ **Each function runs in isolated sandbox**:
127
+ - Built on Firecracker microVMs
128
+ - Dedicated execution environment per function
129
+ - No shared memory between functions
130
+ - Isolated file system and network namespace
131
+ - Strong workload isolation
132
+
133
+ **Execution Environment Security**:
134
+ - One concurrent invocation per environment
135
+ - Environment may be reused (warm starts)
136
+ - `/tmp` storage persists between invocations
137
+ - Sensitive data in memory may persist
138
+
139
+ ### Secure Coding Practices
140
+
141
+ **Handle sensitive data securely**:
142
+
143
+ ```typescript
144
+ // ✅ GOOD - Clean up sensitive data
145
+ export const handler = async (event: any) => {
146
+ const apiKey = process.env.API_KEY;
147
+
148
+ try {
149
+ const result = await callApi(apiKey);
150
+ return result;
151
+ } finally {
152
+ // Clear sensitive data from memory
153
+ delete process.env.API_KEY;
154
+ }
155
+ };
156
+
157
+ // ✅ GOOD - Use Secrets Manager
158
+ import { SecretsManagerClient, GetSecretValueCommand } from '@aws-sdk/client-secrets-manager';
159
+
160
+ const secretsClient = new SecretsManagerClient({});
161
+
162
+ export const handler = async (event: any) => {
163
+ const secret = await secretsClient.send(
164
+ new GetSecretValueCommand({ SecretId: process.env.SECRET_ARN })
165
+ );
166
+
167
+ const apiKey = secret.SecretString;
168
+ // Use apiKey
169
+ };
170
+ ```
171
+
172
+ ### Dependency Management
173
+
174
+ **Scan dependencies for vulnerabilities**:
175
+
176
+ ```json
177
+ // package.json
178
+ {
179
+ "scripts": {
180
+ "audit": "npm audit",
181
+ "audit:fix": "npm audit fix"
182
+ },
183
+ "devDependencies": {
184
+ "snyk": "^1.0.0"
185
+ }
186
+ }
187
+ ```
188
+
189
+ **Keep dependencies updated**:
190
+ - Run `npm audit` or `pip-audit` regularly
191
+ - Use Dependabot or Snyk for automated scanning
192
+ - Update dependencies promptly when vulnerabilities found
193
+ - Use minimal dependency sets
194
+
195
+ ### Environment Variable Security
196
+
197
+ **Never store secrets in environment variables**:
198
+
199
+ ```typescript
200
+ // ❌ BAD - Secret in environment variable
201
+ new NodejsFunction(this, 'Function', {
202
+ environment: {
203
+ API_KEY: 'sk-1234567890abcdef', // Never do this!
204
+ },
205
+ });
206
+
207
+ // ✅ GOOD - Reference to secret
208
+ new NodejsFunction(this, 'Function', {
209
+ environment: {
210
+ SECRET_ARN: secret.secretArn,
211
+ },
212
+ });
213
+
214
+ secret.grantRead(myFunction);
215
+ ```
216
+
217
+ ## API Security
218
+
219
+ ### API Gateway Security
220
+
221
+ **Authentication and Authorization**:
222
+
223
+ ```typescript
224
+ // Cognito User Pool authorizer
225
+ const authorizer = new apigateway.CognitoUserPoolsAuthorizer(this, 'Authorizer', {
226
+ cognitoUserPools: [userPool],
227
+ });
228
+
229
+ api.root.addMethod('GET', integration, {
230
+ authorizer,
231
+ authorizationType: apigateway.AuthorizationType.COGNITO,
232
+ });
233
+
234
+ // Lambda authorizer for custom auth
235
+ const customAuthorizer = new apigateway.TokenAuthorizer(this, 'CustomAuth', {
236
+ handler: authorizerFunction,
237
+ resultsCacheTtl: Duration.minutes(5),
238
+ });
239
+
240
+ // IAM authorization for service-to-service
241
+ api.root.addMethod('POST', integration, {
242
+ authorizationType: apigateway.AuthorizationType.IAM,
243
+ });
244
+ ```
245
+
246
+ ### Request Validation
247
+
248
+ **Validate requests at API Gateway**:
249
+
250
+ ```typescript
251
+ const validator = new apigateway.RequestValidator(this, 'Validator', {
252
+ api,
253
+ validateRequestBody: true,
254
+ validateRequestParameters: true,
255
+ });
256
+
257
+ const model = api.addModel('Model', {
258
+ schema: {
259
+ type: apigateway.JsonSchemaType.OBJECT,
260
+ required: ['email', 'name'],
261
+ properties: {
262
+ email: {
263
+ type: apigateway.JsonSchemaType.STRING,
264
+ format: 'email',
265
+ },
266
+ name: {
267
+ type: apigateway.JsonSchemaType.STRING,
268
+ minLength: 1,
269
+ maxLength: 100,
270
+ },
271
+ },
272
+ },
273
+ });
274
+
275
+ resource.addMethod('POST', integration, {
276
+ requestValidator: validator,
277
+ requestModels: {
278
+ 'application/json': model,
279
+ },
280
+ });
281
+ ```
282
+
283
+ ### Rate Limiting and Throttling
284
+
285
+ ```typescript
286
+ const api = new apigateway.RestApi(this, 'Api', {
287
+ deployOptions: {
288
+ throttlingRateLimit: 1000, // requests per second
289
+ throttlingBurstLimit: 2000, // burst capacity
290
+ },
291
+ });
292
+
293
+ // Per-method throttling
294
+ resource.addMethod('POST', integration, {
295
+ methodResponses: [{ statusCode: '200' }],
296
+ requestParameters: {
297
+ 'method.request.header.Authorization': true,
298
+ },
299
+ throttling: {
300
+ rateLimit: 100,
301
+ burstLimit: 200,
302
+ },
303
+ });
304
+ ```
305
+
306
+ ### API Keys and Usage Plans
307
+
308
+ ```typescript
309
+ const apiKey = api.addApiKey('ApiKey', {
310
+ apiKeyName: 'customer-key',
311
+ });
312
+
313
+ const plan = api.addUsagePlan('UsagePlan', {
314
+ name: 'Standard',
315
+ throttle: {
316
+ rateLimit: 100,
317
+ burstLimit: 200,
318
+ },
319
+ quota: {
320
+ limit: 10000,
321
+ period: apigateway.Period.MONTH,
322
+ },
323
+ });
324
+
325
+ plan.addApiKey(apiKey);
326
+ plan.addApiStage({
327
+ stage: api.deploymentStage,
328
+ });
329
+ ```
330
+
331
+ ## Data Protection
332
+
333
+ ### Encryption at Rest
334
+
335
+ **DynamoDB encryption**:
336
+
337
+ ```typescript
338
+ // Default: AWS-owned CMK (no additional cost)
339
+ const table = new dynamodb.Table(this, 'Table', {
340
+ encryption: dynamodb.TableEncryption.AWS_MANAGED, // AWS managed CMK
341
+ });
342
+
343
+ // Customer-managed CMK (for compliance)
344
+ const kmsKey = new kms.Key(this, 'Key', {
345
+ enableKeyRotation: true,
346
+ });
347
+
348
+ const table = new dynamodb.Table(this, 'Table', {
349
+ encryption: dynamodb.TableEncryption.CUSTOMER_MANAGED,
350
+ encryptionKey: kmsKey,
351
+ });
352
+ ```
353
+
354
+ **S3 encryption**:
355
+
356
+ ```typescript
357
+ // SSE-S3 (default, no additional cost)
358
+ const bucket = new s3.Bucket(this, 'Bucket', {
359
+ encryption: s3.BucketEncryption.S3_MANAGED,
360
+ });
361
+
362
+ // SSE-KMS (for fine-grained access control)
363
+ const bucket = new s3.Bucket(this, 'Bucket', {
364
+ encryption: s3.BucketEncryption.KMS,
365
+ encryptionKey: kmsKey,
366
+ });
367
+ ```
368
+
369
+ **SQS/SNS encryption**:
370
+
371
+ ```typescript
372
+ const queue = new sqs.Queue(this, 'Queue', {
373
+ encryption: sqs.QueueEncryption.KMS,
374
+ encryptionMasterKey: kmsKey,
375
+ });
376
+
377
+ const topic = new sns.Topic(this, 'Topic', {
378
+ masterKey: kmsKey,
379
+ });
380
+ ```
381
+
382
+ ### Encryption in Transit
383
+
384
+ **All AWS service APIs use TLS**:
385
+ - API Gateway endpoints use HTTPS by default
386
+ - Lambda to AWS service communication encrypted
387
+ - EventBridge, SQS, SNS use TLS
388
+ - Custom domains can use ACM certificates
389
+
390
+ ```typescript
391
+ // API Gateway with custom domain
392
+ const certificate = new acm.Certificate(this, 'Certificate', {
393
+ domainName: 'api.example.com',
394
+ validation: acm.CertificateValidation.fromDns(hostedZone),
395
+ });
396
+
397
+ const api = new apigateway.RestApi(this, 'Api', {
398
+ domainName: {
399
+ domainName: 'api.example.com',
400
+ certificate,
401
+ },
402
+ });
403
+ ```
404
+
405
+ ### Data Sanitization
406
+
407
+ **Validate and sanitize inputs**:
408
+
409
+ ```typescript
410
+ import DOMPurify from 'isomorphic-dompurify';
411
+ import { z } from 'zod';
412
+
413
+ // Schema validation
414
+ const OrderSchema = z.object({
415
+ orderId: z.string().uuid(),
416
+ amount: z.number().positive(),
417
+ email: z.string().email(),
418
+ });
419
+
420
+ export const handler = async (event: any) => {
421
+ const body = JSON.parse(event.body);
422
+
423
+ // Validate schema
424
+ const result = OrderSchema.safeParse(body);
425
+ if (!result.success) {
426
+ return {
427
+ statusCode: 400,
428
+ body: JSON.stringify({ error: result.error }),
429
+ };
430
+ }
431
+
432
+ // Sanitize HTML inputs
433
+ const sanitized = {
434
+ ...result.data,
435
+ description: DOMPurify.sanitize(result.data.description),
436
+ };
437
+
438
+ await processOrder(sanitized);
439
+ };
440
+ ```
441
+
442
+ ## Network Security
443
+
444
+ ### VPC Configuration
445
+
446
+ **Lambda in VPC for private resources**:
447
+
448
+ ```typescript
449
+ const vpc = new ec2.Vpc(this, 'Vpc', {
450
+ maxAzs: 2,
451
+ natGateways: 1,
452
+ });
453
+
454
+ // Lambda in private subnet
455
+ const vpcFunction = new NodejsFunction(this, 'VpcFunction', {
456
+ entry: 'src/handler.ts',
457
+ vpc,
458
+ vpcSubnets: {
459
+ subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
460
+ },
461
+ securityGroups: [securityGroup],
462
+ });
463
+
464
+ // Security group for Lambda
465
+ const securityGroup = new ec2.SecurityGroup(this, 'LambdaSG', {
466
+ vpc,
467
+ description: 'Security group for Lambda function',
468
+ allowAllOutbound: false, // Restrict outbound
469
+ });
470
+
471
+ // Only allow access to RDS
472
+ securityGroup.addEgressRule(
473
+ ec2.Peer.securityGroupId(rdsSecurityGroup.securityGroupId),
474
+ ec2.Port.tcp(3306),
475
+ 'Allow MySQL access'
476
+ );
477
+ ```
478
+
479
+ ### VPC Endpoints
480
+
481
+ **Use VPC endpoints for AWS services**:
482
+
483
+ ```typescript
484
+ // S3 VPC endpoint (gateway endpoint, no cost)
485
+ vpc.addGatewayEndpoint('S3Endpoint', {
486
+ service: ec2.GatewayVpcEndpointAwsService.S3,
487
+ });
488
+
489
+ // DynamoDB VPC endpoint (gateway endpoint, no cost)
490
+ vpc.addGatewayEndpoint('DynamoDBEndpoint', {
491
+ service: ec2.GatewayVpcEndpointAwsService.DYNAMODB,
492
+ });
493
+
494
+ // Secrets Manager VPC endpoint (interface endpoint, cost applies)
495
+ vpc.addInterfaceEndpoint('SecretsManagerEndpoint', {
496
+ service: ec2.InterfaceVpcEndpointAwsService.SECRETS_MANAGER,
497
+ privateDnsEnabled: true,
498
+ });
499
+ ```
500
+
501
+ ### Security Groups
502
+
503
+ **Principle of least privilege for network access**:
504
+
505
+ ```typescript
506
+ // Lambda security group
507
+ const lambdaSG = new ec2.SecurityGroup(this, 'LambdaSG', {
508
+ vpc,
509
+ allowAllOutbound: false,
510
+ });
511
+
512
+ // RDS security group
513
+ const rdsSG = new ec2.SecurityGroup(this, 'RDSSG', {
514
+ vpc,
515
+ allowAllOutbound: false,
516
+ });
517
+
518
+ // Allow Lambda to access RDS only
519
+ rdsSG.addIngressRule(
520
+ ec2.Peer.securityGroupId(lambdaSG.securityGroupId),
521
+ ec2.Port.tcp(3306),
522
+ 'Allow Lambda access'
523
+ );
524
+
525
+ lambdaSG.addEgressRule(
526
+ ec2.Peer.securityGroupId(rdsSG.securityGroupId),
527
+ ec2.Port.tcp(3306),
528
+ 'Allow RDS access'
529
+ );
530
+ ```
531
+
532
+ ## Security Monitoring
533
+
534
+ ### CloudWatch Logs
535
+
536
+ **Enable and encrypt logs**:
537
+
538
+ ```typescript
539
+ new NodejsFunction(this, 'Function', {
540
+ entry: 'src/handler.ts',
541
+ logRetention: logs.RetentionDays.ONE_WEEK,
542
+ logGroup: new logs.LogGroup(this, 'LogGroup', {
543
+ encryptionKey: kmsKey, // Encrypt logs
544
+ retention: logs.RetentionDays.ONE_WEEK,
545
+ }),
546
+ });
547
+ ```
548
+
549
+ ### CloudTrail
550
+
551
+ **Enable CloudTrail for audit**:
552
+
553
+ ```typescript
554
+ const trail = new cloudtrail.Trail(this, 'Trail', {
555
+ isMultiRegionTrail: true,
556
+ includeGlobalServiceEvents: true,
557
+ managementEvents: cloudtrail.ReadWriteType.ALL,
558
+ });
559
+
560
+ // Log Lambda invocations
561
+ trail.addLambdaEventSelector([{
562
+ includeManagementEvents: true,
563
+ readWriteType: cloudtrail.ReadWriteType.ALL,
564
+ }]);
565
+ ```
566
+
567
+ ### GuardDuty
568
+
569
+ **Enable GuardDuty for threat detection**:
570
+ - Analyzes VPC Flow Logs, DNS logs, CloudTrail events
571
+ - Detects unusual API activity
572
+ - Identifies compromised credentials
573
+ - Monitors for cryptocurrency mining
574
+
575
+ ## Security Best Practices Checklist
576
+
577
+ ### Development
578
+
579
+ - [ ] Validate and sanitize all inputs
580
+ - [ ] Scan dependencies for vulnerabilities
581
+ - [ ] Use least privilege IAM permissions
582
+ - [ ] Store secrets in Secrets Manager or Parameter Store
583
+ - [ ] Never log sensitive data
584
+ - [ ] Enable encryption for all data stores
585
+ - [ ] Use environment variables for configuration, not secrets
586
+
587
+ ### Deployment
588
+
589
+ - [ ] Enable CloudTrail in all regions
590
+ - [ ] Configure VPC for sensitive workloads
591
+ - [ ] Use VPC endpoints for AWS service access
592
+ - [ ] Enable GuardDuty for threat detection
593
+ - [ ] Implement resource-based policies
594
+ - [ ] Use AWS WAF for API protection
595
+ - [ ] Enable access logging for API Gateway
596
+
597
+ ### Operations
598
+
599
+ - [ ] Monitor CloudTrail for unusual activity
600
+ - [ ] Set up alarms for security events
601
+ - [ ] Rotate secrets regularly
602
+ - [ ] Review IAM policies periodically
603
+ - [ ] Audit function permissions
604
+ - [ ] Monitor GuardDuty findings
605
+ - [ ] Implement automated security responses
606
+
607
+ ### Testing
608
+
609
+ - [ ] Test with least privilege policies
610
+ - [ ] Validate error handling for security failures
611
+ - [ ] Test input validation and sanitization
612
+ - [ ] Verify encryption configurations
613
+ - [ ] Test with malicious payloads
614
+ - [ ] Audit logs for security events
615
+
616
+ ## Summary
617
+
618
+ - **Shared Responsibility**: AWS handles infrastructure, you handle application security
619
+ - **Least Privilege**: Use IAM grant methods, avoid wildcards
620
+ - **Encryption**: Enable encryption at rest and in transit
621
+ - **Input Validation**: Validate and sanitize all inputs
622
+ - **Dependency Security**: Scan and update dependencies regularly
623
+ - **Monitoring**: Enable CloudTrail, GuardDuty, and CloudWatch
624
+ - **Secrets Management**: Use Secrets Manager, never environment variables
625
+ - **Network Security**: Use VPC, security groups, and VPC endpoints appropriately