@synapta/skills 0.1.0 → 0.1.2
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-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,300 @@
|
|
|
1
|
+
# Insecure Workload Defaults
|
|
2
|
+
|
|
3
|
+
**USE THIS GUIDE** when generating or reviewing any Kubernetes workload manifest
|
|
4
|
+
(Deployment, StatefulSet, DaemonSet, Job, CronJob, or bare Pod).
|
|
5
|
+
Default security posture: **PSS "restricted" profile** unless the user explicitly
|
|
6
|
+
requests otherwise and provides justification.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Symptoms
|
|
11
|
+
|
|
12
|
+
- Containers running as root (UID 0) inside the cluster.
|
|
13
|
+
- Pods admitted without any `securityContext` at all.
|
|
14
|
+
- Linux capabilities not dropped, leaving `CAP_NET_RAW`, `CAP_SYS_ADMIN`, etc.
|
|
15
|
+
- `hostPath` volumes mounted into workload pods.
|
|
16
|
+
- Privileged containers that can escape to the node.
|
|
17
|
+
- PodSecurity admission webhook rejecting manifests at deploy time.
|
|
18
|
+
- CVE exploitation amplified by overly permissive container runtime settings.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Root Causes
|
|
23
|
+
|
|
24
|
+
1. Upstream example manifests and Helm chart defaults rarely include security contexts.
|
|
25
|
+
2. LLMs train on those same permissive examples and reproduce them verbatim.
|
|
26
|
+
3. `securityContext` has both pod-level and container-level fields; omitting either leaves gaps.
|
|
27
|
+
4. Teams copy "it works in dev" manifests into production without hardening.
|
|
28
|
+
5. Confusion between PSS levels (privileged, baseline, restricted) leads to the wrong choice.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Pod Security Standards Quick Reference
|
|
33
|
+
|
|
34
|
+
| Level | When to use |
|
|
35
|
+
|--------------|--------------------------------------------------------------------|
|
|
36
|
+
| `restricted` | **Default for all workloads.** Enforces non-root, drops caps, etc. |
|
|
37
|
+
| `baseline` | Minimum acceptable floor. Use only when restricted is impossible. |
|
|
38
|
+
| `privileged` | CNI plugins, storage drivers, node-level agents. Never for apps. |
|
|
39
|
+
|
|
40
|
+
Label namespaces to enforce:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
apiVersion: v1
|
|
44
|
+
kind: Namespace
|
|
45
|
+
metadata:
|
|
46
|
+
name: production
|
|
47
|
+
labels:
|
|
48
|
+
pod-security.kubernetes.io/enforce: restricted
|
|
49
|
+
pod-security.kubernetes.io/audit: restricted
|
|
50
|
+
pod-security.kubernetes.io/warn: restricted
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Prevention Rules
|
|
56
|
+
|
|
57
|
+
### Container Security Context Baseline
|
|
58
|
+
|
|
59
|
+
Every container MUST include this block unless a specific, documented deviation is required:
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
securityContext:
|
|
63
|
+
runAsNonRoot: true
|
|
64
|
+
allowPrivilegeEscalation: false
|
|
65
|
+
readOnlyRootFilesystem: true
|
|
66
|
+
capabilities:
|
|
67
|
+
drop:
|
|
68
|
+
- ALL
|
|
69
|
+
seccompProfile:
|
|
70
|
+
type: RuntimeDefault
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Pod-Level vs Container-Level Security Context
|
|
74
|
+
|
|
75
|
+
Pod-level fields apply to ALL containers including init containers:
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
spec:
|
|
79
|
+
securityContext: # Pod-level
|
|
80
|
+
runAsNonRoot: true
|
|
81
|
+
runAsUser: 10000
|
|
82
|
+
runAsGroup: 10000
|
|
83
|
+
fsGroup: 10000
|
|
84
|
+
seccompProfile:
|
|
85
|
+
type: RuntimeDefault
|
|
86
|
+
containers:
|
|
87
|
+
- name: app
|
|
88
|
+
securityContext: # Container-level (overrides/supplements pod-level)
|
|
89
|
+
allowPrivilegeEscalation: false
|
|
90
|
+
readOnlyRootFilesystem: true
|
|
91
|
+
capabilities:
|
|
92
|
+
drop:
|
|
93
|
+
- ALL
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Key distinctions:
|
|
97
|
+
- `runAsUser`, `runAsGroup`, `fsGroup`, `seccompProfile` belong at pod level.
|
|
98
|
+
- `allowPrivilegeEscalation`, `readOnlyRootFilesystem`, `capabilities` belong at container level.
|
|
99
|
+
- `runAsNonRoot` can be set at either level; pod level is preferred for consistency.
|
|
100
|
+
|
|
101
|
+
### When Deviations Are Acceptable
|
|
102
|
+
|
|
103
|
+
Init containers sometimes need narrow capabilities. Always document the reason:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
initContainers:
|
|
107
|
+
- name: fix-permissions
|
|
108
|
+
# DEVIATION: requires CAP_CHOWN to set volume ownership before app starts.
|
|
109
|
+
# Pod-level runAsNonRoot is still true; this container runs as root briefly.
|
|
110
|
+
securityContext:
|
|
111
|
+
runAsNonRoot: false
|
|
112
|
+
runAsUser: 0
|
|
113
|
+
allowPrivilegeEscalation: false
|
|
114
|
+
readOnlyRootFilesystem: true
|
|
115
|
+
capabilities:
|
|
116
|
+
drop:
|
|
117
|
+
- ALL
|
|
118
|
+
add:
|
|
119
|
+
- CHOWN
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Host Namespace Access
|
|
123
|
+
|
|
124
|
+
These fields MUST be `false` (or omitted, since false is the default) for application workloads:
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
spec:
|
|
128
|
+
hostNetwork: false # Exposes pod to node network stack
|
|
129
|
+
hostPID: false # Allows seeing all node processes
|
|
130
|
+
hostIPC: false # Allows shared memory with node processes
|
|
131
|
+
hostUsers: false # Maps to host user namespace (k8s 1.28+)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### AppArmor and Seccomp
|
|
135
|
+
|
|
136
|
+
Seccomp `RuntimeDefault` is mandatory under PSS restricted. For additional confinement:
|
|
137
|
+
|
|
138
|
+
```yaml
|
|
139
|
+
metadata:
|
|
140
|
+
annotations:
|
|
141
|
+
# AppArmor (becomes a first-class field in k8s 1.30+)
|
|
142
|
+
container.apparmor.security.beta.kubernetes.io/app: runtime/default
|
|
143
|
+
spec:
|
|
144
|
+
securityContext:
|
|
145
|
+
seccompProfile:
|
|
146
|
+
type: RuntimeDefault # Or Localhost with a custom profile
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Patterns
|
|
152
|
+
|
|
153
|
+
### GOOD: Production Deployment with Full Security Hardening
|
|
154
|
+
|
|
155
|
+
```yaml
|
|
156
|
+
apiVersion: apps/v1
|
|
157
|
+
kind: Deployment
|
|
158
|
+
metadata:
|
|
159
|
+
name: api-server
|
|
160
|
+
namespace: production
|
|
161
|
+
spec:
|
|
162
|
+
replicas: 3
|
|
163
|
+
selector:
|
|
164
|
+
matchLabels:
|
|
165
|
+
app: api-server
|
|
166
|
+
template:
|
|
167
|
+
metadata:
|
|
168
|
+
labels:
|
|
169
|
+
app: api-server
|
|
170
|
+
spec:
|
|
171
|
+
automountServiceAccountToken: false
|
|
172
|
+
securityContext:
|
|
173
|
+
runAsNonRoot: true
|
|
174
|
+
runAsUser: 10000
|
|
175
|
+
runAsGroup: 10000
|
|
176
|
+
fsGroup: 10000
|
|
177
|
+
seccompProfile:
|
|
178
|
+
type: RuntimeDefault
|
|
179
|
+
containers:
|
|
180
|
+
- name: api
|
|
181
|
+
image: registry.example.com/api-server:v2.4.1@sha256:abc123...
|
|
182
|
+
ports:
|
|
183
|
+
- containerPort: 8080
|
|
184
|
+
protocol: TCP
|
|
185
|
+
securityContext:
|
|
186
|
+
allowPrivilegeEscalation: false
|
|
187
|
+
readOnlyRootFilesystem: true
|
|
188
|
+
capabilities:
|
|
189
|
+
drop:
|
|
190
|
+
- ALL
|
|
191
|
+
volumeMounts:
|
|
192
|
+
- name: tmp
|
|
193
|
+
mountPath: /tmp
|
|
194
|
+
- name: cache
|
|
195
|
+
mountPath: /var/cache/app
|
|
196
|
+
resources:
|
|
197
|
+
requests:
|
|
198
|
+
cpu: 100m
|
|
199
|
+
memory: 128Mi
|
|
200
|
+
limits:
|
|
201
|
+
memory: 256Mi
|
|
202
|
+
serviceAccountName: api-server
|
|
203
|
+
volumes:
|
|
204
|
+
- name: tmp
|
|
205
|
+
emptyDir:
|
|
206
|
+
sizeLimit: 64Mi
|
|
207
|
+
- name: cache
|
|
208
|
+
emptyDir:
|
|
209
|
+
sizeLimit: 128Mi
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### BAD: Typical LLM-Generated Deployment (Missing All Controls)
|
|
213
|
+
|
|
214
|
+
```yaml
|
|
215
|
+
# INSECURE - DO NOT USE
|
|
216
|
+
apiVersion: apps/v1
|
|
217
|
+
kind: Deployment
|
|
218
|
+
metadata:
|
|
219
|
+
name: api-server
|
|
220
|
+
spec:
|
|
221
|
+
replicas: 1
|
|
222
|
+
selector:
|
|
223
|
+
matchLabels:
|
|
224
|
+
app: api-server
|
|
225
|
+
template:
|
|
226
|
+
metadata:
|
|
227
|
+
labels:
|
|
228
|
+
app: api-server
|
|
229
|
+
spec:
|
|
230
|
+
containers:
|
|
231
|
+
- name: api
|
|
232
|
+
image: api-server:latest # No registry, mutable tag, no digest
|
|
233
|
+
ports:
|
|
234
|
+
- containerPort: 8080
|
|
235
|
+
# No securityContext at all
|
|
236
|
+
# No resource requests or limits
|
|
237
|
+
# No readOnlyRootFilesystem
|
|
238
|
+
# Capabilities not dropped
|
|
239
|
+
# automountServiceAccountToken defaults to true
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Problems with the bad example:
|
|
243
|
+
1. No pod-level or container-level `securityContext` -- runs as root.
|
|
244
|
+
2. `image: api-server:latest` -- mutable tag, no registry prefix, no digest pinning.
|
|
245
|
+
3. No `resources` -- becomes BestEffort QoS, first to be evicted.
|
|
246
|
+
4. Default service account token mounted -- unnecessary API access.
|
|
247
|
+
5. Missing `namespace` -- deploys to whatever context is active.
|
|
248
|
+
6. Single replica -- no availability guarantee.
|
|
249
|
+
7. No `readOnlyRootFilesystem` -- writable container filesystem aids attackers.
|
|
250
|
+
8. Capabilities not dropped -- container retains default Linux capabilities.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## LLM Mistake Checklist
|
|
255
|
+
|
|
256
|
+
Before emitting any workload manifest, verify every item:
|
|
257
|
+
|
|
258
|
+
- [ ] **securityContext present at BOTH pod and container level** -- not just one.
|
|
259
|
+
- [ ] **`runAsNonRoot: true`** set at pod level (not just assumed from the image).
|
|
260
|
+
- [ ] **`allowPrivilegeEscalation: false`** on every container including init containers.
|
|
261
|
+
- [ ] **`capabilities.drop: [ALL]`** on every container -- never omitted, never partial.
|
|
262
|
+
- [ ] **`readOnlyRootFilesystem: true`** with `emptyDir` mounts for `/tmp` and write paths.
|
|
263
|
+
- [ ] **`seccompProfile.type: RuntimeDefault`** at pod level.
|
|
264
|
+
- [ ] **`automountServiceAccountToken: false`** unless the workload calls the Kubernetes API.
|
|
265
|
+
- [ ] **Image uses a digest or immutable tag** -- never `:latest` or bare image names.
|
|
266
|
+
- [ ] **No `hostPath` volumes** unless explicitly requested with justification.
|
|
267
|
+
- [ ] **No `hostNetwork`, `hostPID`, `hostIPC`** unless explicitly requested.
|
|
268
|
+
- [ ] **No `privileged: true`** unless explicitly requested for infrastructure components.
|
|
269
|
+
- [ ] **`runAsUser`/`runAsGroup` set to non-zero values** -- do not leave them unset.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Verification Commands
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
# Check if a manifest passes PSS restricted validation (dry-run)
|
|
277
|
+
kubectl apply --dry-run=server -f manifest.yaml
|
|
278
|
+
|
|
279
|
+
# Inspect running pod security contexts
|
|
280
|
+
kubectl get pod <pod> -o jsonpath='{.spec.securityContext}' | jq .
|
|
281
|
+
kubectl get pod <pod> -o jsonpath='{.spec.containers[*].securityContext}' | jq .
|
|
282
|
+
|
|
283
|
+
# Validate manifest schema
|
|
284
|
+
kubeconform -strict -kubernetes-version 1.30.0 manifest.yaml
|
|
285
|
+
|
|
286
|
+
# Scan with kubesec (static analysis)
|
|
287
|
+
kubesec scan manifest.yaml
|
|
288
|
+
|
|
289
|
+
# Check namespace PSS enforcement labels
|
|
290
|
+
kubectl get namespace <ns> -o jsonpath='{.metadata.labels}' | jq .
|
|
291
|
+
|
|
292
|
+
# Audit running workloads for security issues
|
|
293
|
+
kubectl get pods -A -o json | jq '.items[] | select(.spec.containers[].securityContext.runAsNonRoot != true) | .metadata.name'
|
|
294
|
+
|
|
295
|
+
# Check for privileged containers cluster-wide
|
|
296
|
+
kubectl get pods -A -o json | jq '.items[] | select(.spec.containers[].securityContext.privileged == true) | "\(.metadata.namespace)/\(.metadata.name)"'
|
|
297
|
+
|
|
298
|
+
# Verify no hostPath volumes in use
|
|
299
|
+
kubectl get pods -A -o json | jq '.items[] | select(.spec.volumes[]?.hostPath != null) | "\(.metadata.namespace)/\(.metadata.name)"'
|
|
300
|
+
```
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Job and CronJob Patterns -- Batch Processing
|
|
2
|
+
|
|
3
|
+
**Load this reference when generating:** Job, CronJob, or any one-off / scheduled batch workload (migrations, ETL, reports, cleanup).
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
- **Job**: finite work that runs to completion. Database migrations, data exports, ML training, one-time scripts.
|
|
7
|
+
- **CronJob**: recurring scheduled work. Report generation, cache warming, log rotation, periodic health checks.
|
|
8
|
+
- If the workload runs indefinitely, use a Deployment (even for queue workers -- scale with HPA).
|
|
9
|
+
|
|
10
|
+
## Job Configuration
|
|
11
|
+
| Field | Purpose | Guidance |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `completions` | Pods that must succeed | Default 1. Increase for fan-out. |
|
|
14
|
+
| `parallelism` | Max concurrent pods | Default 1. Increase for parallelizable work. |
|
|
15
|
+
| `backoffLimit` | Retries before failure | Default 6. Lower (2-3) for non-transient errors. |
|
|
16
|
+
| `activeDeadlineSeconds` | Hard timeout | **Always set.** Prevents runaway jobs. |
|
|
17
|
+
| `ttlSecondsAfterFinished` | Auto-cleanup delay | **Always set.** 3600 is a safe default. |
|
|
18
|
+
|
|
19
|
+
## Completion Modes
|
|
20
|
+
- **NonIndexed** (default): pods are interchangeable. Job succeeds after `completions` pods succeed.
|
|
21
|
+
- **Indexed**: each pod gets `JOB_COMPLETION_INDEX` env var (0, 1, 2...). Use for partitioned/sharded work.
|
|
22
|
+
|
|
23
|
+
## TTL After Finished
|
|
24
|
+
Without `ttlSecondsAfterFinished`, finished Jobs and their pods accumulate forever. The TTL controller deletes the Job, pods, and logs -- ship logs externally if you need them longer.
|
|
25
|
+
|
|
26
|
+
## CronJob Patterns
|
|
27
|
+
|
|
28
|
+
**Schedule**: standard 5-field cron (`minute hour dom month dow`).
|
|
29
|
+
**Timezone** (1.27+): `timeZone: "America/New_York"` pins to a specific tz instead of controller clock.
|
|
30
|
+
|
|
31
|
+
**Concurrency policies**:
|
|
32
|
+
| Policy | Behavior | Default to |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `Allow` | Overlapping runs permitted | Avoid unless jobs are independent |
|
|
35
|
+
| `Forbid` | Skip if previous still running | **Use this by default** |
|
|
36
|
+
| `Replace` | Cancel running, start new | Only when latest run is all that matters |
|
|
37
|
+
|
|
38
|
+
**startingDeadlineSeconds**: skip the run if more than N seconds late (prevents burst of overdue jobs after controller downtime).
|
|
39
|
+
|
|
40
|
+
## Idempotency
|
|
41
|
+
Jobs may retry (node failure, preemption). Every Job MUST be idempotent:
|
|
42
|
+
- Upserts, not inserts. Check for already-completed work. Write to unique output locations.
|
|
43
|
+
- Assume **at least once** execution, never exactly once.
|
|
44
|
+
|
|
45
|
+
## Pod Failure Policy (1.26+)
|
|
46
|
+
Handle different failures differently -- avoid retrying known-fatal errors:
|
|
47
|
+
```yaml
|
|
48
|
+
spec:
|
|
49
|
+
backoffLimit: 3
|
|
50
|
+
podFailurePolicy:
|
|
51
|
+
rules:
|
|
52
|
+
- action: FailJob
|
|
53
|
+
onExitCodes:
|
|
54
|
+
containerName: worker
|
|
55
|
+
operator: In
|
|
56
|
+
values: [1] # bad config -- no point retrying
|
|
57
|
+
- action: Ignore
|
|
58
|
+
onPodConditions:
|
|
59
|
+
- type: DisruptionTarget # node drain -- retry without counting
|
|
60
|
+
```
|
|
61
|
+
Actions: `FailJob` (fail immediately), `Count` (count toward backoffLimit), `Ignore` (retry free).
|
|
62
|
+
|
|
63
|
+
## Example: Production CronJob
|
|
64
|
+
```yaml
|
|
65
|
+
apiVersion: batch/v1
|
|
66
|
+
kind: CronJob
|
|
67
|
+
metadata:
|
|
68
|
+
name: daily-report
|
|
69
|
+
labels: { app.kubernetes.io/name: daily-report, app.kubernetes.io/component: batch }
|
|
70
|
+
spec:
|
|
71
|
+
schedule: "30 3 * * *"
|
|
72
|
+
timeZone: "UTC"
|
|
73
|
+
concurrencyPolicy: Forbid
|
|
74
|
+
startingDeadlineSeconds: 600
|
|
75
|
+
successfulJobsHistoryLimit: 3
|
|
76
|
+
failedJobsHistoryLimit: 5
|
|
77
|
+
jobTemplate:
|
|
78
|
+
metadata:
|
|
79
|
+
labels: { app.kubernetes.io/name: daily-report, app.kubernetes.io/component: batch }
|
|
80
|
+
spec:
|
|
81
|
+
ttlSecondsAfterFinished: 86400
|
|
82
|
+
activeDeadlineSeconds: 3600
|
|
83
|
+
backoffLimit: 2
|
|
84
|
+
template:
|
|
85
|
+
metadata:
|
|
86
|
+
labels: { app.kubernetes.io/name: daily-report, app.kubernetes.io/component: batch }
|
|
87
|
+
spec:
|
|
88
|
+
restartPolicy: Never
|
|
89
|
+
securityContext:
|
|
90
|
+
runAsNonRoot: true
|
|
91
|
+
runAsUser: 10000
|
|
92
|
+
runAsGroup: 10000
|
|
93
|
+
fsGroup: 10000
|
|
94
|
+
seccompProfile: { type: RuntimeDefault }
|
|
95
|
+
containers:
|
|
96
|
+
- name: report-generator
|
|
97
|
+
image: registry.example.com/daily-report:2.1.0
|
|
98
|
+
args: ["--date", "yesterday", "--output", "s3://reports/daily/"]
|
|
99
|
+
resources:
|
|
100
|
+
requests: { cpu: 500m, memory: 512Mi }
|
|
101
|
+
limits: { cpu: "2", memory: 2Gi }
|
|
102
|
+
securityContext:
|
|
103
|
+
allowPrivilegeEscalation: false
|
|
104
|
+
readOnlyRootFilesystem: true
|
|
105
|
+
capabilities: { drop: ["ALL"] }
|
|
106
|
+
volumeMounts:
|
|
107
|
+
- { name: tmp, mountPath: /tmp }
|
|
108
|
+
volumes:
|
|
109
|
+
- { name: tmp, emptyDir: { sizeLimit: 1Gi } }
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## LLM Mistake Checklist
|
|
113
|
+
1. **Wrong restartPolicy.** Job pods MUST use `Never` or `OnFailure`. The default `Always` is rejected by the API.
|
|
114
|
+
2. **Missing activeDeadlineSeconds.** A stuck Job without a deadline runs forever. Always set an upper bound.
|
|
115
|
+
3. **Omitting ttlSecondsAfterFinished.** Completed Jobs accumulate indefinitely without this. Always set a TTL.
|
|
116
|
+
4. **ConcurrencyPolicy defaulting to Allow.** Most CronJobs should use `Forbid`. Overlapping runs cause resource exhaustion and data corruption.
|
|
117
|
+
5. **Labels missing on nested templates.** CronJobs have three label levels (CronJob, jobTemplate, pod template). All three need consistent labels.
|
|
118
|
+
6. **Indexed Job ignoring JOB_COMPLETION_INDEX.** Setting `completionMode: Indexed` is useless if the container never reads the index env var.
|
|
119
|
+
7. **Non-idempotent retried Jobs.** If `backoffLimit > 0`, the Job will retry. Inserts without upsert logic create duplicates.
|
|
120
|
+
8. **Schedule without timeZone.** Without `timeZone`, the schedule uses the controller's clock (typically UTC). Set it explicitly if you mean a specific timezone.
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Kustomize Patterns
|
|
2
|
+
|
|
3
|
+
> When applying environment-specific customization or overlay-based configuration
|
|
4
|
+
> to Kubernetes manifests, follow these patterns. Default security posture is PSS
|
|
5
|
+
> "restricted" profile.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Directory Structure
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
app/
|
|
13
|
+
base/
|
|
14
|
+
kustomization.yaml
|
|
15
|
+
deployment.yaml
|
|
16
|
+
service.yaml
|
|
17
|
+
namespace.yaml
|
|
18
|
+
overlays/
|
|
19
|
+
dev/
|
|
20
|
+
kustomization.yaml
|
|
21
|
+
replica-patch.yaml
|
|
22
|
+
staging/
|
|
23
|
+
kustomization.yaml
|
|
24
|
+
production/
|
|
25
|
+
kustomization.yaml
|
|
26
|
+
resource-patch.yaml
|
|
27
|
+
hpa.yaml
|
|
28
|
+
components/
|
|
29
|
+
monitoring/
|
|
30
|
+
kustomization.yaml
|
|
31
|
+
servicemonitor.yaml
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## kustomization.yaml Required Fields
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
38
|
+
kind: Kustomization
|
|
39
|
+
|
|
40
|
+
resources:
|
|
41
|
+
- deployment.yaml
|
|
42
|
+
- service.yaml
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Every kustomization.yaml must declare `apiVersion`, `kind`, and `resources` (or `bases` in legacy usage, but prefer `resources`).
|
|
46
|
+
|
|
47
|
+
## Common Transformers
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
# Prefix/suffix all resource names
|
|
51
|
+
namePrefix: prod-
|
|
52
|
+
nameSuffix: -v2
|
|
53
|
+
|
|
54
|
+
# Add labels to all resources and their selectors
|
|
55
|
+
commonLabels:
|
|
56
|
+
app.kubernetes.io/part-of: my-platform
|
|
57
|
+
environment: production
|
|
58
|
+
|
|
59
|
+
# Add annotations to all resources
|
|
60
|
+
commonAnnotations:
|
|
61
|
+
team: platform-eng
|
|
62
|
+
|
|
63
|
+
# Set namespace on all resources
|
|
64
|
+
namespace: production
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Patches
|
|
68
|
+
|
|
69
|
+
### Strategic Merge Patch
|
|
70
|
+
|
|
71
|
+
Use when you want to merge into an existing structure. Good for adding or overriding specific fields.
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
# kustomization.yaml
|
|
75
|
+
patches:
|
|
76
|
+
- path: resource-patch.yaml
|
|
77
|
+
|
|
78
|
+
# resource-patch.yaml
|
|
79
|
+
apiVersion: apps/v1
|
|
80
|
+
kind: Deployment
|
|
81
|
+
metadata:
|
|
82
|
+
name: my-app
|
|
83
|
+
spec:
|
|
84
|
+
replicas: 3
|
|
85
|
+
template:
|
|
86
|
+
spec:
|
|
87
|
+
containers:
|
|
88
|
+
- name: my-app
|
|
89
|
+
resources:
|
|
90
|
+
requests:
|
|
91
|
+
cpu: 500m
|
|
92
|
+
memory: 512Mi
|
|
93
|
+
limits:
|
|
94
|
+
memory: 1Gi
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### JSON Patch
|
|
98
|
+
|
|
99
|
+
Use when you need to add, remove, or replace at a specific path. Required for array element manipulation.
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
# kustomization.yaml
|
|
103
|
+
patches:
|
|
104
|
+
- target:
|
|
105
|
+
kind: Deployment
|
|
106
|
+
name: my-app
|
|
107
|
+
patch: |-
|
|
108
|
+
- op: add
|
|
109
|
+
path: /spec/template/spec/containers/0/env/-
|
|
110
|
+
value:
|
|
111
|
+
name: LOG_LEVEL
|
|
112
|
+
value: "debug"
|
|
113
|
+
- op: replace
|
|
114
|
+
path: /spec/replicas
|
|
115
|
+
value: 5
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## ConfigMap and Secret Generators
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
configMapGenerator:
|
|
122
|
+
- name: app-config
|
|
123
|
+
literals:
|
|
124
|
+
- LOG_LEVEL=info
|
|
125
|
+
- DB_HOST=postgres.default.svc
|
|
126
|
+
- name: app-scripts
|
|
127
|
+
files:
|
|
128
|
+
- scripts/init.sh
|
|
129
|
+
|
|
130
|
+
secretGenerator:
|
|
131
|
+
- name: db-credentials
|
|
132
|
+
literals:
|
|
133
|
+
- username=admin
|
|
134
|
+
- password=changeme
|
|
135
|
+
type: kubernetes.io/basic-auth
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Generators append a content hash to the name automatically, enabling rolling updates on config changes.
|
|
139
|
+
|
|
140
|
+
## Components
|
|
141
|
+
|
|
142
|
+
Reusable cross-cutting features that can be included in any overlay:
|
|
143
|
+
|
|
144
|
+
```yaml
|
|
145
|
+
# components/monitoring/kustomization.yaml
|
|
146
|
+
apiVersion: kustomize.config.k8s.io/v1alpha1
|
|
147
|
+
kind: Component
|
|
148
|
+
|
|
149
|
+
resources:
|
|
150
|
+
- servicemonitor.yaml
|
|
151
|
+
|
|
152
|
+
patches:
|
|
153
|
+
- target:
|
|
154
|
+
kind: Deployment
|
|
155
|
+
patch: |-
|
|
156
|
+
- op: add
|
|
157
|
+
path: /spec/template/metadata/annotations/prometheus.io~1scrape
|
|
158
|
+
value: "true"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Include in an overlay:
|
|
162
|
+
|
|
163
|
+
```yaml
|
|
164
|
+
# overlays/production/kustomization.yaml
|
|
165
|
+
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
166
|
+
kind: Kustomization
|
|
167
|
+
resources:
|
|
168
|
+
- ../../base
|
|
169
|
+
components:
|
|
170
|
+
- ../../components/monitoring
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Image Transformer
|
|
174
|
+
|
|
175
|
+
```yaml
|
|
176
|
+
images:
|
|
177
|
+
- name: my-app
|
|
178
|
+
newName: ghcr.io/org/my-app
|
|
179
|
+
newTag: "v1.4.2"
|
|
180
|
+
- name: sidecar
|
|
181
|
+
newName: ghcr.io/org/sidecar
|
|
182
|
+
digest: sha256:abcdef1234567890
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Prefer `digest` over `newTag` in production for immutable references.
|
|
186
|
+
|
|
187
|
+
## When to Use Kustomize vs Helm
|
|
188
|
+
|
|
189
|
+
| Scenario | Kustomize | Helm |
|
|
190
|
+
|---|---|---|
|
|
191
|
+
| Environment-specific overlays on static manifests | Preferred | Overkill |
|
|
192
|
+
| Complex parameterization with many knobs | Awkward | Preferred |
|
|
193
|
+
| CRDs and operator-managed resources | Good fit | Good fit |
|
|
194
|
+
| Third-party chart consumption | Cannot | Required |
|
|
195
|
+
| Simple internal services with 2-3 envs | Preferred | Acceptable |
|
|
196
|
+
| Shared library of templates | Not supported | Library charts |
|
|
197
|
+
|
|
198
|
+
## Production Overlay Example
|
|
199
|
+
|
|
200
|
+
```yaml
|
|
201
|
+
# overlays/production/kustomization.yaml
|
|
202
|
+
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
203
|
+
kind: Kustomization
|
|
204
|
+
|
|
205
|
+
resources:
|
|
206
|
+
- ../../base
|
|
207
|
+
- hpa.yaml
|
|
208
|
+
|
|
209
|
+
namespace: production
|
|
210
|
+
|
|
211
|
+
commonLabels:
|
|
212
|
+
environment: production
|
|
213
|
+
|
|
214
|
+
patches:
|
|
215
|
+
- path: resource-patch.yaml
|
|
216
|
+
|
|
217
|
+
configMapGenerator:
|
|
218
|
+
- name: app-config
|
|
219
|
+
behavior: merge
|
|
220
|
+
literals:
|
|
221
|
+
- LOG_LEVEL=warn
|
|
222
|
+
- ENABLE_DEBUG=false
|
|
223
|
+
|
|
224
|
+
images:
|
|
225
|
+
- name: my-app
|
|
226
|
+
newName: ghcr.io/org/my-app
|
|
227
|
+
newTag: "v2.1.0"
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## LLM Mistake Checklist
|
|
231
|
+
|
|
232
|
+
1. **Used `bases:` instead of `resources:`** -- `bases` is deprecated; always use `resources` for base references.
|
|
233
|
+
2. **Strategic merge patch missing `name` in metadata** -- Kustomize cannot match the patch to a resource without it.
|
|
234
|
+
3. **commonLabels applied to resources with immutable selectors** -- breaks Deployments on update because `spec.selector.matchLabels` is immutable after creation.
|
|
235
|
+
4. **Forgot content hash in Secret/ConfigMap references** -- hardcoded name in Deployment envFrom does not match generated name with hash suffix.
|
|
236
|
+
5. **JSON patch with wrong array index** -- use `/-` to append, explicit index to target a known position.
|
|
237
|
+
6. **Component declared with wrong apiVersion** -- components use `v1alpha1`, not `v1beta1`.
|
|
238
|
+
7. **Relative path wrong in overlay** -- must point to the directory containing kustomization.yaml, not individual files.
|
|
239
|
+
8. **Missing `behavior: merge` on generator overlay** -- creates a new ConfigMap instead of merging with the base one.
|