@synapta/skills 0.1.1 → 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.
- package/dist/index.js +11 -4
- package/package.json +3 -4
- package/skills/ATTRIBUTION.md +80 -0
- package/skills/accessibility-audit/SKILL.md +325 -0
- package/skills/accessibility-audit/reference/wcag-checklist.md +103 -0
- package/skills/apns-notifier/SKILL.md +86 -0
- package/skills/approval-policy-enforcer/SKILL.md +66 -0
- package/skills/apps-sdk-builder/LICENSE.txt +201 -0
- package/skills/apps-sdk-builder/SKILL.md +328 -0
- package/skills/apps-sdk-builder/agents/openai.yaml +13 -0
- package/skills/apps-sdk-builder/references/app-archetypes.md +132 -0
- package/skills/apps-sdk-builder/references/apps-sdk-docs-workflow.md +135 -0
- package/skills/apps-sdk-builder/references/interactive-state-sync-patterns.md +113 -0
- package/skills/apps-sdk-builder/references/repo-contract-and-validation.md +93 -0
- package/skills/apps-sdk-builder/references/search-fetch-standard.md +67 -0
- package/skills/apps-sdk-builder/references/upstream-example-workflow.md +79 -0
- package/skills/apps-sdk-builder/references/window-openai-patterns.md +79 -0
- package/skills/apps-sdk-builder/scripts/scaffold_node_ext_apps.mjs +606 -0
- package/skills/architecture-selector/SKILL.md +64 -0
- package/skills/backlog-planner/SKILL.md +68 -0
- package/skills/carplay-entitlement-checker/SKILL.md +82 -0
- package/skills/concept-deepener/SKILL.md +86 -0
- package/skills/concept-discovery/SKILL.md +517 -0
- package/skills/concept-discovery/assets/sample-analysis.json +81 -0
- package/skills/concept-discovery/expected_outputs/sample-enum-dictionary.md +25 -0
- package/skills/concept-discovery/expected_outputs/sample-page-user-list.md +83 -0
- package/skills/concept-discovery/expected_outputs/sample-prd-readme.md +43 -0
- package/skills/concept-discovery/references/framework-patterns.md +228 -0
- package/skills/concept-discovery/references/prd-quality-checklist.md +65 -0
- package/skills/concept-discovery/scripts/codebase_analyzer.py +732 -0
- package/skills/concept-discovery/scripts/prd_scaffolder.py +435 -0
- package/skills/dast-zap/SKILL.md +453 -0
- package/skills/dast-zap/assets/.gitkeep +9 -0
- package/skills/dast-zap/assets/github_action.yml +207 -0
- package/skills/dast-zap/assets/gitlab_ci.yml +226 -0
- package/skills/dast-zap/assets/zap_automation.yaml +196 -0
- package/skills/dast-zap/assets/zap_context.xml +192 -0
- package/skills/dast-zap/references/EXAMPLE.md +40 -0
- package/skills/dast-zap/references/api_testing_guide.md +475 -0
- package/skills/dast-zap/references/authentication_guide.md +431 -0
- package/skills/dast-zap/references/false_positive_handling.md +427 -0
- package/skills/dast-zap/references/owasp_mapping.md +255 -0
- package/skills/dep-sbom-scan/SKILL.md +466 -0
- package/skills/deploy-cloudflare/SKILL.md +930 -0
- package/skills/deploy-docker/SKILL.md +55 -0
- package/skills/deploy-fly/SKILL.md +228 -0
- package/skills/deploy-k8s/SKILL.md +108 -0
- package/skills/deploy-k8s/assets/logo.png +0 -0
- package/skills/deploy-k8s/docs/README.md +29 -0
- package/skills/deploy-k8s/docs/SUMMARY.md +56 -0
- package/skills/deploy-k8s/docs/advanced/token-efficiency.md +61 -0
- package/skills/deploy-k8s/docs/architecture/multi-tenancy.md +96 -0
- package/skills/deploy-k8s/docs/architecture/storage-and-state.md +102 -0
- package/skills/deploy-k8s/docs/architecture/workload-patterns.md +87 -0
- package/skills/deploy-k8s/docs/book.json +16 -0
- package/skills/deploy-k8s/docs/community/changelog.md +34 -0
- package/skills/deploy-k8s/docs/community/contributing.md +67 -0
- package/skills/deploy-k8s/docs/core-concepts/failure-modes.md +153 -0
- package/skills/deploy-k8s/docs/core-concepts/philosophy.md +83 -0
- package/skills/deploy-k8s/docs/core-concepts/workflow.md +124 -0
- package/skills/deploy-k8s/docs/examples/bad-patterns.md +47 -0
- package/skills/deploy-k8s/docs/examples/do-dont-checklist.md +37 -0
- package/skills/deploy-k8s/docs/examples/good-patterns.md +49 -0
- package/skills/deploy-k8s/docs/failure-modes/api-drift.md +104 -0
- package/skills/deploy-k8s/docs/failure-modes/fragile-rollouts.md +99 -0
- package/skills/deploy-k8s/docs/failure-modes/insecure-workload-defaults.md +80 -0
- package/skills/deploy-k8s/docs/failure-modes/network-exposure.md +98 -0
- package/skills/deploy-k8s/docs/failure-modes/privilege-sprawl.md +91 -0
- package/skills/deploy-k8s/docs/failure-modes/resource-starvation.md +85 -0
- package/skills/deploy-k8s/docs/getting-started/installation.md +152 -0
- package/skills/deploy-k8s/docs/getting-started/quick-start.md +115 -0
- package/skills/deploy-k8s/docs/guides/helm-patterns.md +71 -0
- package/skills/deploy-k8s/docs/guides/kustomize-patterns.md +65 -0
- package/skills/deploy-k8s/docs/guides/observability.md +67 -0
- package/skills/deploy-k8s/docs/guides/security-hardening.md +59 -0
- package/skills/deploy-k8s/docs/guides/validation-and-policy.md +66 -0
- package/skills/deploy-k8s/docs/integrations/mcp-integration.md +52 -0
- package/skills/deploy-k8s/docs/package-lock.json +2892 -0
- package/skills/deploy-k8s/docs/package.json +13 -0
- package/skills/deploy-k8s/references/api-drift.md +298 -0
- package/skills/deploy-k8s/references/conditional/aks-patterns.md +70 -0
- package/skills/deploy-k8s/references/conditional/eks-patterns.md +79 -0
- package/skills/deploy-k8s/references/conditional/gitops-controllers.md +71 -0
- package/skills/deploy-k8s/references/conditional/gke-patterns.md +74 -0
- package/skills/deploy-k8s/references/conditional/observability-stacks.md +80 -0
- package/skills/deploy-k8s/references/conditional/openshift-patterns.md +67 -0
- package/skills/deploy-k8s/references/daemonset-operator-patterns.md +155 -0
- package/skills/deploy-k8s/references/deployment-patterns.md +146 -0
- package/skills/deploy-k8s/references/do-dont-patterns.md +87 -0
- package/skills/deploy-k8s/references/examples-bad.md +282 -0
- package/skills/deploy-k8s/references/examples-good.md +440 -0
- package/skills/deploy-k8s/references/fragile-rollouts.md +303 -0
- package/skills/deploy-k8s/references/helm-patterns.md +203 -0
- package/skills/deploy-k8s/references/insecure-workload-defaults.md +300 -0
- package/skills/deploy-k8s/references/job-patterns.md +120 -0
- package/skills/deploy-k8s/references/kustomize-patterns.md +239 -0
- package/skills/deploy-k8s/references/multi-tenancy.md +343 -0
- package/skills/deploy-k8s/references/network-exposure.md +481 -0
- package/skills/deploy-k8s/references/observability.md +302 -0
- package/skills/deploy-k8s/references/privilege-sprawl.md +273 -0
- package/skills/deploy-k8s/references/resource-starvation.md +374 -0
- package/skills/deploy-k8s/references/security-hardening.md +209 -0
- package/skills/deploy-k8s/references/stateful-patterns.md +130 -0
- package/skills/deploy-k8s/references/storage-and-state.md +330 -0
- package/skills/deploy-k8s/references/validation-and-policy.md +242 -0
- package/skills/deploy-railway/SKILL.md +235 -0
- package/skills/deploy-railway/references/analyze-db-mongo.md +84 -0
- package/skills/deploy-railway/references/analyze-db-mysql.md +254 -0
- package/skills/deploy-railway/references/analyze-db-postgres.md +479 -0
- package/skills/deploy-railway/references/analyze-db-redis.md +208 -0
- package/skills/deploy-railway/references/analyze-db.md +344 -0
- package/skills/deploy-railway/references/configure.md +309 -0
- package/skills/deploy-railway/references/deploy.md +195 -0
- package/skills/deploy-railway/references/operate.md +214 -0
- package/skills/deploy-railway/references/request.md +248 -0
- package/skills/deploy-railway/references/setup.md +312 -0
- package/skills/deploy-railway/scripts/analyze-mongo.py +1549 -0
- package/skills/deploy-railway/scripts/analyze-mysql.py +1195 -0
- package/skills/deploy-railway/scripts/analyze-postgres.py +3058 -0
- package/skills/deploy-railway/scripts/analyze-redis.py +1090 -0
- package/skills/deploy-railway/scripts/dal.py +671 -0
- package/skills/deploy-railway/scripts/enable-pg-stats.py +170 -0
- package/skills/deploy-railway/scripts/pg-extensions.py +370 -0
- package/skills/deploy-railway/scripts/railway-api.sh +52 -0
- package/skills/deploy-ssh/SKILL.md +91 -0
- package/skills/deploy-vercel/SKILL.md +304 -0
- package/skills/deploy-vercel/resources/deploy-codex.sh +301 -0
- package/skills/deploy-vercel/resources/deploy.sh +301 -0
- package/skills/docs-runbooks/SKILL.md +399 -0
- package/skills/drive-status-renderer/SKILL.md +62 -0
- package/skills/iac-scan/SKILL.md +680 -0
- package/skills/iac-scan/assets/.gitkeep +9 -0
- package/skills/iac-scan/assets/checkov_config.yaml +94 -0
- package/skills/iac-scan/assets/github_actions.yml +199 -0
- package/skills/iac-scan/assets/gitlab_ci.yml +218 -0
- package/skills/iac-scan/assets/pre_commit_config.yaml +92 -0
- package/skills/iac-scan/references/EXAMPLE.md +40 -0
- package/skills/iac-scan/references/compliance_mapping.md +237 -0
- package/skills/iac-scan/references/custom_policies.md +460 -0
- package/skills/iac-scan/references/suppression_guide.md +431 -0
- package/skills/incident-briefing/SKILL.md +66 -0
- package/skills/incident-triage/SKILL.md +481 -0
- package/{LICENSE → skills/mcp-builder/LICENSE.txt} +15 -14
- package/skills/mcp-builder/SKILL.md +244 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/mobile-pairing/SKILL.md +52 -0
- package/skills/ops-sre/SKILL.md +297 -0
- package/skills/playwright-qa/LICENSE.txt +201 -0
- package/skills/playwright-qa/NOTICE.txt +14 -0
- package/skills/playwright-qa/SKILL.md +156 -0
- package/skills/playwright-qa/agents/openai.yaml +6 -0
- package/skills/playwright-qa/assets/playwright-small.svg +3 -0
- package/skills/playwright-qa/assets/playwright.png +0 -0
- package/skills/playwright-qa/references/cli.md +116 -0
- package/skills/playwright-qa/references/workflows.md +95 -0
- package/skills/playwright-qa/scripts/playwright_cli.sh +25 -0
- package/skills/release-publish/SKILL.md +85 -0
- package/skills/repo-bootstrap/SKILL.md +92 -0
- package/skills/repo-bootstrap/assets/example-workflows/validate-agents.yml +89 -0
- package/skills/repo-bootstrap/assets/root-thin.md +141 -0
- package/skills/repo-bootstrap/assets/root-verbose.md +149 -0
- package/skills/repo-bootstrap/assets/scoped/backend-go.md +107 -0
- package/skills/repo-bootstrap/assets/scoped/backend-php.md +94 -0
- package/skills/repo-bootstrap/assets/scoped/backend-python.md +84 -0
- package/skills/repo-bootstrap/assets/scoped/backend-typescript.md +89 -0
- package/skills/repo-bootstrap/assets/scoped/claude-code-skill.md +101 -0
- package/skills/repo-bootstrap/assets/scoped/cli.md +83 -0
- package/skills/repo-bootstrap/assets/scoped/concourse.md +196 -0
- package/skills/repo-bootstrap/assets/scoped/ddev.md +68 -0
- package/skills/repo-bootstrap/assets/scoped/docker.md +160 -0
- package/skills/repo-bootstrap/assets/scoped/documentation.md +98 -0
- package/skills/repo-bootstrap/assets/scoped/examples.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/frontend-typescript.md +88 -0
- package/skills/repo-bootstrap/assets/scoped/github-actions.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/gitlab-ci.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/oro-bundle.md +209 -0
- package/skills/repo-bootstrap/assets/scoped/oro-project.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/python-modern.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/resources.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/skill-repo.md +139 -0
- package/skills/repo-bootstrap/assets/scoped/symfony.md +168 -0
- package/skills/repo-bootstrap/assets/scoped/testing.md +87 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-docs.md +103 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-extension.md +133 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-project.md +137 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-testing.md +80 -0
- package/skills/repo-bootstrap/checkpoints.yaml +279 -0
- package/skills/repo-bootstrap/evals/evals.json +385 -0
- package/skills/repo-bootstrap/references/ai-contribution-guidelines.md +63 -0
- package/skills/repo-bootstrap/references/ai-tool-compatibility.md +223 -0
- package/skills/repo-bootstrap/references/directory-coverage.md +82 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/scripts-AGENTS.md +389 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/.env.example +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/package.json +33 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/pnpm-lock.yaml +3 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/config.ts +28 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/controllers/userController.ts +74 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/index.ts +26 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/errorHandler.ts +45 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/requestLogger.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/health.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/users.ts +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/errors.ts +40 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/logger.ts +14 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/tsconfig.json +24 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/.env.example +19 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/pyproject.toml +88 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/AGENTS.md +85 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/__init__.py +3 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/config.py +49 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/main.py +66 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/__init__.py +13 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/item.py +43 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/user.py +40 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/__init__.py +5 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/health.py +20 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/items.py +61 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/users.py +55 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/__init__.py +6 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/item_service.py +77 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/user_service.py +69 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/uv.lock +4 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/AGENTS.md +86 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/package.json +20 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/src/App.tsx +5 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/cmd/api/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/AGENTS.md +89 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/AGENTS.md +90 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/package.json +17 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/App.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Button.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Footer.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Header.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Sidebar.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package-lock.json +0 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package.json +12 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-AGENTS.md +371 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-web-AGENTS.md +448 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/composer.json +8 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/package.json +15 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/pnpm-lock.yaml +0 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/src/Controller.php +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/package.json +26 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/App.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Button.tsx +10 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Footer.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Header.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/main.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/tsconfig.json +13 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/AGENTS.md +75 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/package.json +7 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/package.json +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/src/index.ts +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-lock.yaml +42 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-workspace.yaml +2 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/examples-AGENTS.md +45 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/Classes-AGENTS.md +392 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/composer.json +8 -0
- package/skills/repo-bootstrap/references/feedback-memory-schema.md +135 -0
- package/skills/repo-bootstrap/references/git-hooks-setup.md +79 -0
- package/skills/repo-bootstrap/references/output-structure.md +124 -0
- package/skills/repo-bootstrap/references/scripts-guide.md +175 -0
- package/skills/repo-bootstrap/references/verification-guide.md +137 -0
- package/skills/repo-bootstrap/scripts/analyze-git-history.sh +315 -0
- package/skills/repo-bootstrap/scripts/check-freshness.sh +230 -0
- package/skills/repo-bootstrap/scripts/detect-golden-samples.sh +161 -0
- package/skills/repo-bootstrap/scripts/detect-heuristics.sh +93 -0
- package/skills/repo-bootstrap/scripts/detect-project.sh +486 -0
- package/skills/repo-bootstrap/scripts/detect-scopes.sh +330 -0
- package/skills/repo-bootstrap/scripts/detect-utilities.sh +133 -0
- package/skills/repo-bootstrap/scripts/extract-adrs.sh +194 -0
- package/skills/repo-bootstrap/scripts/extract-agent-configs.sh +331 -0
- package/skills/repo-bootstrap/scripts/extract-architecture-rules.sh +522 -0
- package/skills/repo-bootstrap/scripts/extract-ci-commands.sh +385 -0
- package/skills/repo-bootstrap/scripts/extract-ci-rules.sh +384 -0
- package/skills/repo-bootstrap/scripts/extract-commands.sh +358 -0
- package/skills/repo-bootstrap/scripts/extract-documentation.sh +308 -0
- package/skills/repo-bootstrap/scripts/extract-github-rulesets.sh +96 -0
- package/skills/repo-bootstrap/scripts/extract-github-settings.sh +88 -0
- package/skills/repo-bootstrap/scripts/extract-ide-settings.sh +228 -0
- package/skills/repo-bootstrap/scripts/extract-platform-files.sh +290 -0
- package/skills/repo-bootstrap/scripts/extract-quality-configs.sh +442 -0
- package/skills/repo-bootstrap/scripts/generate-agents.sh +2424 -0
- package/skills/repo-bootstrap/scripts/generate-file-map.sh +153 -0
- package/skills/repo-bootstrap/scripts/lib/config-root.sh +211 -0
- package/skills/repo-bootstrap/scripts/lib/summary.sh +244 -0
- package/skills/repo-bootstrap/scripts/lib/template.sh +397 -0
- package/skills/repo-bootstrap/scripts/validate-structure.sh +324 -0
- package/skills/repo-bootstrap/scripts/verify-commands.sh +615 -0
- package/skills/repo-bootstrap/scripts/verify-content.sh +302 -0
- package/skills/schema-api-contracts/SKILL.md +56 -0
- package/skills/secret-hygiene/SKILL.md +511 -0
- package/skills/secret-hygiene/assets/.gitkeep +9 -0
- package/skills/secret-hygiene/assets/config-balanced.toml +81 -0
- package/skills/secret-hygiene/assets/config-custom.toml +178 -0
- package/skills/secret-hygiene/assets/config-strict.toml +48 -0
- package/skills/secret-hygiene/assets/github-action.yml +181 -0
- package/skills/secret-hygiene/assets/gitlab-ci.yml +257 -0
- package/skills/secret-hygiene/assets/precommit-config.yaml +70 -0
- package/skills/secret-hygiene/references/EXAMPLE.md +40 -0
- package/skills/secret-hygiene/references/compliance_mapping.md +538 -0
- package/skills/secret-hygiene/references/detection_rules.md +276 -0
- package/skills/secret-hygiene/references/false_positives.md +598 -0
- package/skills/secret-hygiene/references/remediation_guide.md +530 -0
- package/skills/stack-selector/SKILL.md +56 -0
- package/skills/telegram-control/SKILL.md +110 -0
- package/skills/telegram-control/references/architecture.md +184 -0
- package/skills/telegram-control/references/convex.md +173 -0
- package/skills/telegram-control/references/error_handling.md +212 -0
- package/skills/telegram-control/references/initial_setup.md +165 -0
- package/skills/telegram-control/references/telegram_api.md +156 -0
- package/skills/telegram-control/scripts/cancel_message.ts +53 -0
- package/skills/telegram-control/scripts/list_scheduled.ts +103 -0
- package/skills/telegram-control/scripts/logger.ts +121 -0
- package/skills/telegram-control/scripts/proxy-util.ts +11 -0
- package/skills/telegram-control/scripts/schedule_message.ts +216 -0
- package/skills/telegram-control/scripts/send_message.ts +115 -0
- package/skills/telegram-control/scripts/setup.ts +185 -0
- package/skills/telegram-control/scripts/types.ts +75 -0
- package/skills/telegram-control/scripts/view_history.ts +74 -0
- package/skills/test-strategy/SKILL.md +352 -0
- package/skills/threat-model/SKILL.md +303 -0
- package/skills/threat-model/examples/example-output.md +196 -0
- package/skills/threat-model/template.md +96 -0
- package/skills/ts-lint/SKILL.md +80 -0
- package/skills/ui-flow/SKILL.md +668 -0
- package/skills/voice-command-router/SKILL.md +51 -0
- package/skills/widget-live-activity-sync/SKILL.md +66 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
# Resource Starvation
|
|
2
|
+
|
|
3
|
+
**USE THIS GUIDE** when generating any workload manifest, performing capacity planning,
|
|
4
|
+
troubleshooting pod scheduling failures, or reviewing cluster reliability posture.
|
|
5
|
+
Every workload MUST have explicit resource management -- omitting it is a production incident waiting to happen.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Symptoms
|
|
10
|
+
|
|
11
|
+
- **OOMKilled**: container exceeds its memory limit and is terminated by the kernel.
|
|
12
|
+
- **Pending pods**: scheduler cannot find a node with enough allocatable resources.
|
|
13
|
+
- **Node pressure evictions**: kubelet evicts BestEffort and Burstable pods under memory/disk pressure.
|
|
14
|
+
- **CPU throttling**: container hits its CPU limit and is throttled by CFS, causing latency spikes.
|
|
15
|
+
- **Noisy neighbors**: one pod without limits starves co-located pods of CPU or memory.
|
|
16
|
+
- **CrashLoopBackOff from OOM**: container repeatedly killed, backoff timer grows exponentially.
|
|
17
|
+
- **HPA flapping**: autoscaler thrashes between replica counts due to poorly tuned thresholds.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Root Causes
|
|
22
|
+
|
|
23
|
+
1. **Missing requests and limits entirely** -- pod gets BestEffort QoS, first to be evicted.
|
|
24
|
+
2. **Arbitrary round numbers** -- `cpu: 1` and `memory: 1Gi` without profiling actual usage.
|
|
25
|
+
3. **No QoS strategy** -- mixing Guaranteed and BestEffort pods on the same node unpredictably.
|
|
26
|
+
4. **Requests set too low** -- scheduler packs too many pods per node; everything degrades under load.
|
|
27
|
+
5. **Limits set too close to requests** -- no room for legitimate burst; constant OOMKills or throttling.
|
|
28
|
+
6. **CPU limits causing latency** -- CFS throttling is invisible and worse than queueing in many cases.
|
|
29
|
+
7. **No LimitRange** -- a single misconfigured pod can consume an entire node.
|
|
30
|
+
8. **No PodDisruptionBudget** -- voluntary disruptions (upgrades, node drain) take down all replicas.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## QoS Classes
|
|
35
|
+
|
|
36
|
+
Kubernetes assigns QoS based on how requests and limits are set:
|
|
37
|
+
|
|
38
|
+
| QoS Class | Condition | Eviction priority | Use when |
|
|
39
|
+
|---------------|--------------------------------------------------|--------------------|---------------------------------|
|
|
40
|
+
| `Guaranteed` | Every container has requests == limits for CPU and memory | Last evicted | Latency-sensitive, databases |
|
|
41
|
+
| `Burstable` | At least one container has requests != limits | Middle | Most application workloads |
|
|
42
|
+
| `BestEffort` | No requests or limits set on any container | First evicted | **Never in production** |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Prevention Rules
|
|
47
|
+
|
|
48
|
+
### Resource Request/Limit Guidelines
|
|
49
|
+
|
|
50
|
+
**Requests** = expected steady-state usage. The scheduler uses this for placement.
|
|
51
|
+
**Limits** = hard ceiling. Exceeding memory limit causes OOMKill; exceeding CPU limit causes throttling.
|
|
52
|
+
|
|
53
|
+
### CPU: Prefer No Limit in Most Cases
|
|
54
|
+
|
|
55
|
+
Setting CPU limits causes CFS throttling, which introduces unpredictable latency spikes.
|
|
56
|
+
Current best practice for most workloads:
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
resources:
|
|
60
|
+
requests:
|
|
61
|
+
cpu: 250m # What the app typically uses
|
|
62
|
+
# No CPU limit -- avoids CFS throttling
|
|
63
|
+
limits:
|
|
64
|
+
memory: 512Mi # Memory limit is always required
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Set CPU limits only when:
|
|
68
|
+
- Running in a multi-tenant cluster where fairness is enforced.
|
|
69
|
+
- The workload is batch/background and must not starve interactive pods.
|
|
70
|
+
- Guaranteed QoS is required (requests must equal limits).
|
|
71
|
+
|
|
72
|
+
### Memory: Always Set a Limit
|
|
73
|
+
|
|
74
|
+
Memory is incompressible. Unlike CPU (which throttles), exceeding memory causes OOMKill.
|
|
75
|
+
Always set a memory limit. Set it 25-50% above observed p99 usage to absorb spikes:
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
resources:
|
|
79
|
+
requests:
|
|
80
|
+
memory: 256Mi # Observed p99 steady-state
|
|
81
|
+
limits:
|
|
82
|
+
memory: 384Mi # 50% headroom for spikes
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### LimitRange: Namespace-Level Defaults and Guardrails
|
|
86
|
+
|
|
87
|
+
Prevents workloads from deploying without resource specs:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
apiVersion: v1
|
|
91
|
+
kind: LimitRange
|
|
92
|
+
metadata:
|
|
93
|
+
name: default-limits
|
|
94
|
+
namespace: production
|
|
95
|
+
spec:
|
|
96
|
+
limits:
|
|
97
|
+
- type: Container
|
|
98
|
+
default: # Applied when limits are missing
|
|
99
|
+
memory: 256Mi
|
|
100
|
+
cpu: 500m
|
|
101
|
+
defaultRequest: # Applied when requests are missing
|
|
102
|
+
memory: 128Mi
|
|
103
|
+
cpu: 100m
|
|
104
|
+
max: # Hard ceiling per container
|
|
105
|
+
memory: 2Gi
|
|
106
|
+
cpu: "2"
|
|
107
|
+
min: # Minimum per container
|
|
108
|
+
memory: 32Mi
|
|
109
|
+
cpu: 10m
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### ResourceQuota: Namespace-Level Aggregate Cap
|
|
113
|
+
|
|
114
|
+
Prevents a single namespace from consuming the entire cluster:
|
|
115
|
+
|
|
116
|
+
```yaml
|
|
117
|
+
apiVersion: v1
|
|
118
|
+
kind: ResourceQuota
|
|
119
|
+
metadata:
|
|
120
|
+
name: compute-quota
|
|
121
|
+
namespace: production
|
|
122
|
+
spec:
|
|
123
|
+
hard:
|
|
124
|
+
requests.cpu: "20"
|
|
125
|
+
requests.memory: 40Gi
|
|
126
|
+
limits.cpu: "40"
|
|
127
|
+
limits.memory: 80Gi
|
|
128
|
+
pods: "100"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### PodDisruptionBudgets
|
|
132
|
+
|
|
133
|
+
Required for any workload with more than one replica. Without a PDB, a node drain can
|
|
134
|
+
terminate all replicas simultaneously.
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
apiVersion: policy/v1
|
|
138
|
+
kind: PodDisruptionBudget
|
|
139
|
+
metadata:
|
|
140
|
+
name: api-server-pdb
|
|
141
|
+
namespace: production
|
|
142
|
+
spec:
|
|
143
|
+
# Use ONE of minAvailable or maxUnavailable, not both.
|
|
144
|
+
minAvailable: 2 # At least 2 replicas must remain during disruption
|
|
145
|
+
# maxUnavailable: 1 # Alternative: at most 1 replica down at a time
|
|
146
|
+
selector:
|
|
147
|
+
matchLabels:
|
|
148
|
+
app: api-server
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- `minAvailable` -- use when you know the minimum replica count for correctness (e.g., quorum).
|
|
152
|
+
- `maxUnavailable` -- use for most stateless services; scales naturally with replica count.
|
|
153
|
+
- Never set `minAvailable` equal to `replicas` -- it blocks all voluntary disruptions including upgrades.
|
|
154
|
+
|
|
155
|
+
### HPA Configuration
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
apiVersion: autoscaling/v2
|
|
159
|
+
kind: HorizontalPodAutoscaler
|
|
160
|
+
metadata:
|
|
161
|
+
name: api-server-hpa
|
|
162
|
+
namespace: production
|
|
163
|
+
spec:
|
|
164
|
+
scaleTargetRef:
|
|
165
|
+
apiVersion: apps/v1
|
|
166
|
+
kind: Deployment
|
|
167
|
+
name: api-server
|
|
168
|
+
minReplicas: 3
|
|
169
|
+
maxReplicas: 20
|
|
170
|
+
metrics:
|
|
171
|
+
- type: Resource
|
|
172
|
+
resource:
|
|
173
|
+
name: cpu
|
|
174
|
+
target:
|
|
175
|
+
type: Utilization
|
|
176
|
+
averageUtilization: 70 # Target 70% of CPU request
|
|
177
|
+
behavior:
|
|
178
|
+
scaleDown:
|
|
179
|
+
stabilizationWindowSeconds: 300 # Prevent flapping on scale-down
|
|
180
|
+
policies:
|
|
181
|
+
- type: Percent
|
|
182
|
+
value: 25
|
|
183
|
+
periodSeconds: 60
|
|
184
|
+
scaleUp:
|
|
185
|
+
stabilizationWindowSeconds: 30
|
|
186
|
+
policies:
|
|
187
|
+
- type: Percent
|
|
188
|
+
value: 100
|
|
189
|
+
periodSeconds: 60
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Topology Spread and Pod Anti-Affinity
|
|
193
|
+
|
|
194
|
+
Distribute replicas across failure domains to survive node and zone failures:
|
|
195
|
+
|
|
196
|
+
```yaml
|
|
197
|
+
spec:
|
|
198
|
+
topologySpreadConstraints:
|
|
199
|
+
- maxSkew: 1
|
|
200
|
+
topologyKey: topology.kubernetes.io/zone
|
|
201
|
+
whenUnsatisfiable: DoNotSchedule
|
|
202
|
+
labelSelector:
|
|
203
|
+
matchLabels:
|
|
204
|
+
app: api-server
|
|
205
|
+
- maxSkew: 1
|
|
206
|
+
topologyKey: kubernetes.io/hostname
|
|
207
|
+
whenUnsatisfiable: ScheduleAnyway # Soft constraint for node spread
|
|
208
|
+
labelSelector:
|
|
209
|
+
matchLabels:
|
|
210
|
+
app: api-server
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Patterns
|
|
216
|
+
|
|
217
|
+
### GOOD: Deployment with Proper Resource Management
|
|
218
|
+
|
|
219
|
+
```yaml
|
|
220
|
+
apiVersion: apps/v1
|
|
221
|
+
kind: Deployment
|
|
222
|
+
metadata:
|
|
223
|
+
name: api-server
|
|
224
|
+
namespace: production
|
|
225
|
+
spec:
|
|
226
|
+
replicas: 3
|
|
227
|
+
selector:
|
|
228
|
+
matchLabels:
|
|
229
|
+
app: api-server
|
|
230
|
+
template:
|
|
231
|
+
metadata:
|
|
232
|
+
labels:
|
|
233
|
+
app: api-server
|
|
234
|
+
spec:
|
|
235
|
+
topologySpreadConstraints:
|
|
236
|
+
- maxSkew: 1
|
|
237
|
+
topologyKey: topology.kubernetes.io/zone
|
|
238
|
+
whenUnsatisfiable: DoNotSchedule
|
|
239
|
+
labelSelector:
|
|
240
|
+
matchLabels:
|
|
241
|
+
app: api-server
|
|
242
|
+
containers:
|
|
243
|
+
- name: api
|
|
244
|
+
image: registry.example.com/api-server:v2.4.1@sha256:abc123...
|
|
245
|
+
ports:
|
|
246
|
+
- containerPort: 8080
|
|
247
|
+
resources:
|
|
248
|
+
requests:
|
|
249
|
+
cpu: 250m
|
|
250
|
+
memory: 256Mi
|
|
251
|
+
limits:
|
|
252
|
+
memory: 384Mi # No CPU limit -- avoid CFS throttling
|
|
253
|
+
readinessProbe:
|
|
254
|
+
httpGet:
|
|
255
|
+
path: /healthz
|
|
256
|
+
port: 8080
|
|
257
|
+
initialDelaySeconds: 5
|
|
258
|
+
periodSeconds: 10
|
|
259
|
+
livenessProbe:
|
|
260
|
+
httpGet:
|
|
261
|
+
path: /healthz
|
|
262
|
+
port: 8080
|
|
263
|
+
initialDelaySeconds: 15
|
|
264
|
+
periodSeconds: 20
|
|
265
|
+
failureThreshold: 3
|
|
266
|
+
---
|
|
267
|
+
apiVersion: policy/v1
|
|
268
|
+
kind: PodDisruptionBudget
|
|
269
|
+
metadata:
|
|
270
|
+
name: api-server-pdb
|
|
271
|
+
namespace: production
|
|
272
|
+
spec:
|
|
273
|
+
maxUnavailable: 1
|
|
274
|
+
selector:
|
|
275
|
+
matchLabels:
|
|
276
|
+
app: api-server
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### BAD: Deployment with No Resource Management
|
|
280
|
+
|
|
281
|
+
```yaml
|
|
282
|
+
# UNRELIABLE - DO NOT USE
|
|
283
|
+
apiVersion: apps/v1
|
|
284
|
+
kind: Deployment
|
|
285
|
+
metadata:
|
|
286
|
+
name: api-server
|
|
287
|
+
spec:
|
|
288
|
+
replicas: 3
|
|
289
|
+
selector:
|
|
290
|
+
matchLabels:
|
|
291
|
+
app: api-server
|
|
292
|
+
template:
|
|
293
|
+
metadata:
|
|
294
|
+
labels:
|
|
295
|
+
app: api-server
|
|
296
|
+
spec:
|
|
297
|
+
containers:
|
|
298
|
+
- name: api
|
|
299
|
+
image: api-server:latest
|
|
300
|
+
ports:
|
|
301
|
+
- containerPort: 8080
|
|
302
|
+
# No resources -- BestEffort QoS, evicted first under pressure
|
|
303
|
+
# No probes -- kubelet cannot detect unhealthy state
|
|
304
|
+
# No topology spread -- all 3 replicas may land on same node
|
|
305
|
+
# No PDB -- node drain kills all replicas simultaneously
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Problems with the bad example:
|
|
309
|
+
1. No `resources` block -- BestEffort QoS, first to be evicted under node pressure.
|
|
310
|
+
2. No readiness probe -- traffic routed before app is ready; errors during startup.
|
|
311
|
+
3. No liveness probe -- hung process never restarted.
|
|
312
|
+
4. No topology spread -- all replicas may schedule to the same node or zone.
|
|
313
|
+
5. No PDB -- voluntary disruptions can take down 100% of replicas.
|
|
314
|
+
6. No namespace -- deploys wherever the current context points.
|
|
315
|
+
7. Mutable `:latest` tag -- different nodes may pull different versions.
|
|
316
|
+
8. 3 replicas with no anti-affinity is false redundancy.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## LLM Mistake Checklist
|
|
321
|
+
|
|
322
|
+
Before emitting any workload manifest, verify every item:
|
|
323
|
+
|
|
324
|
+
- [ ] **`resources.requests` set on every container** -- never omit; BestEffort is unacceptable.
|
|
325
|
+
- [ ] **`resources.limits.memory` set on every container** -- OOMKill is always worse than throttling.
|
|
326
|
+
- [ ] **CPU limits deliberately chosen or deliberately omitted** -- do not cargo-cult `cpu: 1`.
|
|
327
|
+
- [ ] **Requests reflect measured or estimated usage** -- not round numbers pulled from thin air.
|
|
328
|
+
- [ ] **Memory limit has headroom above request** -- at least 25% margin for GC spikes and bursts.
|
|
329
|
+
- [ ] **Readiness probe defined** -- without it, traffic arrives before the app can serve.
|
|
330
|
+
- [ ] **Liveness probe defined with conservative thresholds** -- avoid aggressive `failureThreshold: 1`.
|
|
331
|
+
- [ ] **PDB exists for any workload with replicas > 1** -- `maxUnavailable: 1` as a sensible default.
|
|
332
|
+
- [ ] **Topology spread or pod anti-affinity configured** -- replicas on one node is not HA.
|
|
333
|
+
- [ ] **LimitRange exists in the target namespace** -- catches pods that slip through without resources.
|
|
334
|
+
- [ ] **HPA `minReplicas` >= PDB `minAvailable`** -- otherwise scale-down can violate the disruption budget.
|
|
335
|
+
- [ ] **HPA target utilization is 60-80%** -- not 90% (no headroom) or 30% (wasteful scaling).
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## Verification Commands
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
# Check QoS class of running pods
|
|
343
|
+
kubectl get pods -n production -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.qosClass}{"\n"}{end}'
|
|
344
|
+
|
|
345
|
+
# Find pods with no resource requests (BestEffort candidates)
|
|
346
|
+
kubectl get pods -A -o json | jq -r '.items[] | select(.spec.containers[].resources.requests == null) | "\(.metadata.namespace)/\(.metadata.name)"'
|
|
347
|
+
|
|
348
|
+
# Check for OOMKilled containers
|
|
349
|
+
kubectl get pods -A -o json | jq -r '.items[].status.containerStatuses[]? | select(.lastState.terminated.reason == "OOMKilled") | "\(.name): OOMKilled"'
|
|
350
|
+
|
|
351
|
+
# View actual resource usage vs requests (requires metrics-server)
|
|
352
|
+
kubectl top pods -n production --containers
|
|
353
|
+
|
|
354
|
+
# Check if PDB exists for a deployment
|
|
355
|
+
kubectl get pdb -n production -o wide
|
|
356
|
+
|
|
357
|
+
# Validate PDB is not blocking all disruptions
|
|
358
|
+
kubectl get pdb -n production -o jsonpath='{range .items[*]}{.metadata.name}{"\t allowed disruptions: "}{.status.disruptionsAllowed}{"\n"}{end}'
|
|
359
|
+
|
|
360
|
+
# Check node resource pressure conditions
|
|
361
|
+
kubectl describe nodes | grep -A5 "Conditions:" | grep -E "MemoryPressure|DiskPressure|PIDPressure"
|
|
362
|
+
|
|
363
|
+
# View HPA status and current metrics
|
|
364
|
+
kubectl get hpa -n production -o wide
|
|
365
|
+
|
|
366
|
+
# Find pods without topology spread constraints
|
|
367
|
+
kubectl get pods -A -o json | jq -r '.items[] | select(.spec.topologySpreadConstraints == null) | "\(.metadata.namespace)/\(.metadata.name)"'
|
|
368
|
+
|
|
369
|
+
# Check LimitRange in namespace
|
|
370
|
+
kubectl get limitrange -n production -o yaml
|
|
371
|
+
|
|
372
|
+
# Check ResourceQuota usage
|
|
373
|
+
kubectl describe resourcequota -n production
|
|
374
|
+
```
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Security Hardening
|
|
2
|
+
|
|
3
|
+
**Directive:** When performing security reviews, hardening existing clusters, or preparing for compliance audits, ALWAYS follow defense-in-depth principles across the full stack: supply chain, admission, runtime, and network. Default security posture is PSS "restricted" profile.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Consult this reference whenever the task involves:
|
|
8
|
+
- Hardening an existing Kubernetes cluster or namespace
|
|
9
|
+
- Preparing for a security audit or compliance review (SOC 2, PCI-DSS, HIPAA)
|
|
10
|
+
- Reviewing cluster configuration against industry benchmarks
|
|
11
|
+
- Implementing image security, supply chain controls, or runtime protection
|
|
12
|
+
- Configuring encryption at rest, audit logging, or network-level security
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## NSA/CISA Kubernetes Hardening Guide -- Key Controls
|
|
17
|
+
|
|
18
|
+
| Control area | Summary |
|
|
19
|
+
|---|---|
|
|
20
|
+
| Pod security | Use PSS restricted, non-root containers, read-only filesystems, drop all capabilities |
|
|
21
|
+
| Network separation | Default-deny NetworkPolicy per namespace, encrypt traffic with service mesh mTLS |
|
|
22
|
+
| Authentication | Disable anonymous auth, use short-lived tokens, integrate OIDC for human users |
|
|
23
|
+
| Authorization | RBAC with least privilege, no `cluster-admin` for workloads, audit RoleBindings regularly |
|
|
24
|
+
| Audit logging | Enable API server audit logging at Metadata level minimum, ship logs off-cluster |
|
|
25
|
+
| Threat detection | Runtime monitoring (Falco, Tetragon), anomaly detection for syscalls and network |
|
|
26
|
+
| Upgrading | Keep cluster and nodes within one minor version of latest, patch CVEs promptly |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## OWASP Kubernetes Top 10 Mapping
|
|
31
|
+
|
|
32
|
+
| ID | Risk | Covered by |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| K01 | Insecure workload configurations | insecure-workload-defaults.md |
|
|
35
|
+
| K02 | Supply chain vulnerabilities | This file (supply chain section) |
|
|
36
|
+
| K03 | Overly permissive RBAC | privilege-sprawl.md |
|
|
37
|
+
| K04 | Lack of centralized policy enforcement | This file (admission webhooks) |
|
|
38
|
+
| K05 | Inadequate logging and monitoring | observability.md |
|
|
39
|
+
| K06 | Broken authentication mechanisms | This file (API server auth) |
|
|
40
|
+
| K07 | Missing network segmentation | network-exposure.md |
|
|
41
|
+
| K08 | Secrets management failures | This file (etcd encryption) |
|
|
42
|
+
| K09 | Misconfigured cluster components | This file (CIS benchmark) |
|
|
43
|
+
| K10 | Outdated and vulnerable components | This file (image scanning) |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## CIS Kubernetes Benchmark -- Key Sections
|
|
48
|
+
|
|
49
|
+
| Section | Critical checks |
|
|
50
|
+
|---|---|
|
|
51
|
+
| Control plane | API server: `--anonymous-auth=false`, `--authorization-mode=RBAC,Node`, `--audit-log-path` set |
|
|
52
|
+
| etcd | Client cert auth enabled, peer TLS enabled, access limited to API server only |
|
|
53
|
+
| Worker nodes | Kubelet: `--anonymous-auth=false`, `--authorization-mode=Webhook`, `--read-only-port=0` |
|
|
54
|
+
| Policies | PSA enforced, NetworkPolicies present, ResourceQuotas applied |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Pod Security Admission Configuration
|
|
59
|
+
|
|
60
|
+
Label every namespace. Use `enforce` + `audit` + `warn` together to catch violations at different stages:
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
apiVersion: v1
|
|
64
|
+
kind: Namespace
|
|
65
|
+
metadata:
|
|
66
|
+
name: production
|
|
67
|
+
labels:
|
|
68
|
+
pod-security.kubernetes.io/enforce: restricted
|
|
69
|
+
pod-security.kubernetes.io/enforce-version: latest
|
|
70
|
+
pod-security.kubernetes.io/audit: restricted
|
|
71
|
+
pod-security.kubernetes.io/audit-version: latest
|
|
72
|
+
pod-security.kubernetes.io/warn: restricted
|
|
73
|
+
pod-security.kubernetes.io/warn-version: latest
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
For gradual migration, enforce `baseline` while auditing and warning on `restricted`, then promote.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Image Security and Supply Chain
|
|
81
|
+
|
|
82
|
+
### Allowed registries and signing
|
|
83
|
+
|
|
84
|
+
Use an admission webhook (Kyverno or Gatekeeper) to restrict image sources:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
# Kyverno ClusterPolicy: restrict image registries
|
|
88
|
+
apiVersion: kyverno.io/v1
|
|
89
|
+
kind: ClusterPolicy
|
|
90
|
+
metadata:
|
|
91
|
+
name: restrict-image-registries
|
|
92
|
+
spec:
|
|
93
|
+
validationFailureAction: Enforce
|
|
94
|
+
rules:
|
|
95
|
+
- name: validate-registries
|
|
96
|
+
match:
|
|
97
|
+
any:
|
|
98
|
+
- resources:
|
|
99
|
+
kinds: ["Pod"]
|
|
100
|
+
validate:
|
|
101
|
+
message: "Images must come from registry.example.com."
|
|
102
|
+
pattern:
|
|
103
|
+
spec:
|
|
104
|
+
containers:
|
|
105
|
+
- image: "registry.example.com/*"
|
|
106
|
+
initContainers:
|
|
107
|
+
- image: "registry.example.com/*"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Vulnerability scanning in CI
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
# CI pipeline step -- scan with Trivy before push
|
|
114
|
+
- name: scan-image
|
|
115
|
+
run: |
|
|
116
|
+
trivy image --exit-code 1 --severity CRITICAL,HIGH \
|
|
117
|
+
--ignore-unfixed \
|
|
118
|
+
registry.example.com/myapp:${{ github.sha }}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Supply chain attestation
|
|
122
|
+
|
|
123
|
+
- Generate SBOMs with `syft` or `trivy sbom` at build time.
|
|
124
|
+
- Sign images with `cosign sign` and verify in admission with `cosign verify`.
|
|
125
|
+
- Attach SLSA provenance using `slsa-verifier` to prove build origin.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Runtime Security
|
|
130
|
+
|
|
131
|
+
### Falco rule example -- detect shell in container
|
|
132
|
+
|
|
133
|
+
Falco watches syscalls at the kernel level. Ship alerts to your SIEM:
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
- rule: Terminal shell in container
|
|
137
|
+
desc: A shell was spawned in a container
|
|
138
|
+
condition: >
|
|
139
|
+
spawned_process and container and
|
|
140
|
+
proc.name in (bash, sh, zsh, dash)
|
|
141
|
+
output: >
|
|
142
|
+
Shell spawned in container
|
|
143
|
+
(user=%user.name container=%container.name image=%container.image.repository)
|
|
144
|
+
priority: WARNING
|
|
145
|
+
tags: [container, shell]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### API server audit policy
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
apiVersion: audit.k8s.io/v1
|
|
152
|
+
kind: Policy
|
|
153
|
+
rules:
|
|
154
|
+
- level: Metadata
|
|
155
|
+
resources:
|
|
156
|
+
- group: ""
|
|
157
|
+
resources: ["secrets", "configmaps"]
|
|
158
|
+
- level: RequestResponse
|
|
159
|
+
resources:
|
|
160
|
+
- group: ""
|
|
161
|
+
resources: ["pods/exec", "pods/attach"]
|
|
162
|
+
- level: Metadata
|
|
163
|
+
omitStages: ["RequestReceived"]
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## etcd Encryption at Rest
|
|
169
|
+
|
|
170
|
+
```yaml
|
|
171
|
+
apiVersion: apiserver.config.k8s.io/v1
|
|
172
|
+
kind: EncryptionConfiguration
|
|
173
|
+
resources:
|
|
174
|
+
- resources:
|
|
175
|
+
- secrets
|
|
176
|
+
providers:
|
|
177
|
+
- aescbc:
|
|
178
|
+
keys:
|
|
179
|
+
- name: key-2024
|
|
180
|
+
secret: <base64-encoded-32-byte-key>
|
|
181
|
+
- identity: {} # fallback for reading unencrypted data during migration
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Pass `--encryption-provider-config` to the API server. After applying, re-encrypt existing Secrets: `kubectl get secrets -A -o json | kubectl replace -f -`.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Network-Level Controls Beyond NetworkPolicy
|
|
189
|
+
|
|
190
|
+
- **Service mesh mTLS** (Istio, Linkerd): encrypts all pod-to-pod traffic and provides identity-based authz. NetworkPolicy alone does not encrypt traffic.
|
|
191
|
+
- **DNS policies**: restrict external DNS resolution to prevent data exfiltration.
|
|
192
|
+
- **Egress gateways**: force all outbound traffic through a controlled proxy for inspection and allowlisting.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## LLM Mistake Checklist
|
|
197
|
+
|
|
198
|
+
Before finalizing any security-related manifest or configuration, verify each item:
|
|
199
|
+
|
|
200
|
+
- [ ] **Pod Security Admission labels** are set on every namespace, not just the workload namespace.
|
|
201
|
+
- [ ] **All three PSA modes** (`enforce`, `audit`, `warn`) are configured -- not just `enforce` alone.
|
|
202
|
+
- [ ] **Image registry restrictions** are enforced via admission webhook, not just documented as policy.
|
|
203
|
+
- [ ] **etcd encryption** uses `aescbc` or `secretbox`, not `identity` (which is plaintext).
|
|
204
|
+
- [ ] **Audit logging** is enabled with at least `Metadata` level for secrets and exec operations.
|
|
205
|
+
- [ ] **RBAC bindings** are namespace-scoped (`RoleBinding`) not cluster-scoped unless required.
|
|
206
|
+
- [ ] **Service account tokens** are not auto-mounted (`automountServiceAccountToken: false` on pods that do not need API access).
|
|
207
|
+
- [ ] **No wildcard verbs or resources** in Roles (e.g., `verbs: ["*"]`, `resources: ["*"]`).
|
|
208
|
+
- [ ] **Image tags** are immutable (digest or semver), not `:latest`, and images are scanned for CVEs.
|
|
209
|
+
- [ ] **Network encryption** is addressed -- NetworkPolicy provides segmentation but not encryption; mTLS or a service mesh is needed for in-transit encryption.
|