@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,178 @@
|
|
|
1
|
+
# Gitleaks Custom Configuration Template
|
|
2
|
+
# Use this as a starting point for organization-specific detection rules
|
|
3
|
+
|
|
4
|
+
title = "Custom Gitleaks Configuration"
|
|
5
|
+
|
|
6
|
+
[extend]
|
|
7
|
+
# Extend default Gitleaks rules with custom rules
|
|
8
|
+
useDefault = true
|
|
9
|
+
|
|
10
|
+
# =============================================================================
|
|
11
|
+
# GLOBAL ALLOWLIST
|
|
12
|
+
# =============================================================================
|
|
13
|
+
# Global allowlists apply to ALL rules and have highest precedence
|
|
14
|
+
|
|
15
|
+
[allowlist]
|
|
16
|
+
description = "Global allowlist for organization-wide exceptions"
|
|
17
|
+
|
|
18
|
+
# Paths to exclude from scanning
|
|
19
|
+
paths = [
|
|
20
|
+
# Test and documentation
|
|
21
|
+
'''test/.*''',
|
|
22
|
+
'''docs?/.*''',
|
|
23
|
+
'''examples?/.*''',
|
|
24
|
+
|
|
25
|
+
# Dependencies
|
|
26
|
+
'''node_modules/.*''',
|
|
27
|
+
'''vendor/.*''',
|
|
28
|
+
|
|
29
|
+
# Build artifacts
|
|
30
|
+
'''dist/.*''',
|
|
31
|
+
'''build/.*''',
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
# Known placeholder values
|
|
35
|
+
stopwords = [
|
|
36
|
+
"example",
|
|
37
|
+
"placeholder",
|
|
38
|
+
"your_key_here",
|
|
39
|
+
"test",
|
|
40
|
+
"mock",
|
|
41
|
+
"dummy",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
# Public non-secrets
|
|
45
|
+
regexes = [
|
|
46
|
+
'''-----BEGIN CERTIFICATE-----''',
|
|
47
|
+
'''-----BEGIN PUBLIC KEY-----''',
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
# Manually verified commits (add with explanatory comments)
|
|
51
|
+
commits = []
|
|
52
|
+
|
|
53
|
+
# =============================================================================
|
|
54
|
+
# CUSTOM DETECTION RULES
|
|
55
|
+
# =============================================================================
|
|
56
|
+
# Add organization-specific secret patterns here
|
|
57
|
+
|
|
58
|
+
# Example: Custom API Key Pattern
|
|
59
|
+
[[rules]]
|
|
60
|
+
id = "acme-corp-api-key"
|
|
61
|
+
description = "ACME Corp Internal API Key"
|
|
62
|
+
# Regex pattern to match your organization's API key format
|
|
63
|
+
# Use triple-quoted strings for complex patterns
|
|
64
|
+
regex = '''(?i)acme[_-]?api[_-]?key[\s]*[=:][\s]*['"]?([a-zA-Z0-9]{40})['"]?'''
|
|
65
|
+
# Capture group containing the actual secret (for entropy analysis)
|
|
66
|
+
secretGroup = 1
|
|
67
|
+
# Tags for categorization and filtering
|
|
68
|
+
tags = ["api-key", "acme-internal"]
|
|
69
|
+
|
|
70
|
+
# Optional: Rule-specific allowlist (lower precedence than global)
|
|
71
|
+
#[rules.allowlist]
|
|
72
|
+
#paths = ['''config/defaults\.yaml''']
|
|
73
|
+
#stopwords = ["DEFAULT_KEY"]
|
|
74
|
+
|
|
75
|
+
# Example: Custom Database Password Pattern
|
|
76
|
+
[[rules]]
|
|
77
|
+
id = "acme-corp-db-password"
|
|
78
|
+
description = "ACME Corp Database Password Format"
|
|
79
|
+
# Matches company-specific password format
|
|
80
|
+
regex = '''(?i)(db_pass|database_password)[\s]*[=:][\s]*['"]([A-Z][a-z0-9@#$%]{15,})['"]'''
|
|
81
|
+
secretGroup = 2
|
|
82
|
+
tags = ["password", "database", "acme-internal"]
|
|
83
|
+
|
|
84
|
+
# Example: High-Entropy Detection with Custom Threshold
|
|
85
|
+
[[rules]]
|
|
86
|
+
id = "high-entropy-string"
|
|
87
|
+
description = "High entropy string (potential secret)"
|
|
88
|
+
# Match strings of 32+ alphanumeric characters
|
|
89
|
+
regex = '''[a-zA-Z0-9+/]{32,}'''
|
|
90
|
+
# Shannon entropy threshold (0.0 - 8.0, higher = more random)
|
|
91
|
+
entropy = 4.5
|
|
92
|
+
# Which capture group to analyze (0 = entire match)
|
|
93
|
+
secretGroup = 0
|
|
94
|
+
tags = ["entropy", "generic"]
|
|
95
|
+
|
|
96
|
+
[rules.allowlist]
|
|
97
|
+
# Allowlist base64-encoded images
|
|
98
|
+
regexes = ['''data:image/[^;]+;base64,''']
|
|
99
|
+
|
|
100
|
+
# Example: Custom Service Account Key
|
|
101
|
+
[[rules]]
|
|
102
|
+
id = "acme-corp-service-account"
|
|
103
|
+
description = "ACME Corp Service Account JSON Key"
|
|
104
|
+
# Detect JSON structure with specific fields
|
|
105
|
+
regex = '''"type":\s*"acme_service_account"'''
|
|
106
|
+
tags = ["service-account", "acme-internal"]
|
|
107
|
+
|
|
108
|
+
# Example: Custom OAuth Token Format
|
|
109
|
+
[[rules]]
|
|
110
|
+
id = "acme-corp-oauth-token"
|
|
111
|
+
description = "ACME Corp OAuth Token"
|
|
112
|
+
# Custom token format: acme_oauth_v1_<40 hex chars>
|
|
113
|
+
regex = '''acme_oauth_v1_[a-f0-9]{40}'''
|
|
114
|
+
tags = ["oauth", "token", "acme-internal"]
|
|
115
|
+
|
|
116
|
+
# =============================================================================
|
|
117
|
+
# TESTING CUSTOM RULES
|
|
118
|
+
# =============================================================================
|
|
119
|
+
# Test your custom rules with:
|
|
120
|
+
# gitleaks detect --config config-custom.toml -v
|
|
121
|
+
#
|
|
122
|
+
# Test against specific file:
|
|
123
|
+
# gitleaks detect --config config-custom.toml --source path/to/file --no-git
|
|
124
|
+
#
|
|
125
|
+
# Test regex pattern online:
|
|
126
|
+
# https://regex101.com/ (select Golang flavor)
|
|
127
|
+
#
|
|
128
|
+
# =============================================================================
|
|
129
|
+
|
|
130
|
+
# =============================================================================
|
|
131
|
+
# ENTROPY ANALYSIS GUIDE
|
|
132
|
+
# =============================================================================
|
|
133
|
+
# Entropy values (Shannon entropy):
|
|
134
|
+
# 0.0 - 2.5: Very low (repeated characters, simple patterns)
|
|
135
|
+
# 2.5 - 3.5: Low (common words, simple sequences)
|
|
136
|
+
# 3.5 - 4.5: Medium (mixed case, some randomness)
|
|
137
|
+
# 4.5 - 5.5: High (strong randomness, likely secret)
|
|
138
|
+
# 5.5 - 8.0: Very high (cryptographic randomness)
|
|
139
|
+
#
|
|
140
|
+
# Recommended thresholds:
|
|
141
|
+
# - API keys: 4.5+
|
|
142
|
+
# - Passwords: 3.5+
|
|
143
|
+
# - Tokens: 4.5+
|
|
144
|
+
# - Generic secrets: 5.0+
|
|
145
|
+
# =============================================================================
|
|
146
|
+
|
|
147
|
+
# =============================================================================
|
|
148
|
+
# REGEX CAPTURE GROUPS
|
|
149
|
+
# =============================================================================
|
|
150
|
+
# Use capture groups to extract the actual secret from surrounding text:
|
|
151
|
+
#
|
|
152
|
+
# regex = '''api_key\s*=\s*"([a-zA-Z0-9]+)"'''
|
|
153
|
+
# ^^^^^^^^^
|
|
154
|
+
# Group 1
|
|
155
|
+
#
|
|
156
|
+
# secretGroup = 1 # Analyze only the key value, not 'api_key = ""'
|
|
157
|
+
#
|
|
158
|
+
# This improves entropy analysis accuracy and reduces false positives.
|
|
159
|
+
# =============================================================================
|
|
160
|
+
|
|
161
|
+
# =============================================================================
|
|
162
|
+
# COMPOSITE RULES (Advanced)
|
|
163
|
+
# =============================================================================
|
|
164
|
+
# Gitleaks v8.28.0+ supports composite rules for context-aware detection
|
|
165
|
+
# Useful for secrets that require nearby context (multi-line patterns)
|
|
166
|
+
|
|
167
|
+
#[[rules]]
|
|
168
|
+
#id = "composite-api-key"
|
|
169
|
+
#description = "API key with usage context"
|
|
170
|
+
#regex = '''api_key\s*='''
|
|
171
|
+
#
|
|
172
|
+
#[[rules.composite]]
|
|
173
|
+
#pattern = '''initialize_client'''
|
|
174
|
+
#location = "line" # "line", "fragment", or "commit"
|
|
175
|
+
#distance = 5 # Within 5 lines
|
|
176
|
+
#
|
|
177
|
+
# This detects api_key = "..." only when "initialize_client" appears within 5 lines
|
|
178
|
+
# =============================================================================
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Gitleaks Strict Configuration
|
|
2
|
+
# High-sensitivity detection with minimal allowlisting
|
|
3
|
+
# Use for: Security-critical repositories, financial services, healthcare
|
|
4
|
+
|
|
5
|
+
title = "Gitleaks Strict Configuration"
|
|
6
|
+
|
|
7
|
+
[extend]
|
|
8
|
+
# Use all default Gitleaks rules
|
|
9
|
+
useDefault = true
|
|
10
|
+
|
|
11
|
+
[allowlist]
|
|
12
|
+
description = "Minimal allowlist - only proven false positives"
|
|
13
|
+
|
|
14
|
+
# Only allow in build artifacts and dependencies
|
|
15
|
+
paths = [
|
|
16
|
+
'''node_modules/.*''',
|
|
17
|
+
'''vendor/.*''',
|
|
18
|
+
'''\.min\.js$''',
|
|
19
|
+
'''\.min\.css$''',
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
# Only obvious non-secret patterns
|
|
23
|
+
stopwords = [
|
|
24
|
+
"EXAMPLE_DO_NOT_USE",
|
|
25
|
+
"PLACEHOLDER_REPLACE_ME",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
# All commits must be manually verified before allowlisting
|
|
29
|
+
commits = []
|
|
30
|
+
|
|
31
|
+
# Additional strict rules for high-value targets
|
|
32
|
+
|
|
33
|
+
[[rules]]
|
|
34
|
+
id = "strict-env-file"
|
|
35
|
+
description = "Detect any .env files (should not be in repo)"
|
|
36
|
+
regex = '''.*'''
|
|
37
|
+
path = '''\.env$'''
|
|
38
|
+
tags = ["env-file", "strict"]
|
|
39
|
+
|
|
40
|
+
[[rules]]
|
|
41
|
+
id = "strict-config-secrets"
|
|
42
|
+
description = "Config files with potential secrets"
|
|
43
|
+
regex = '''(?i)(password|secret|key|token|credential)[\s]*[=:][\s]*['"]?([a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]{8,})['"]?'''
|
|
44
|
+
secretGroup = 2
|
|
45
|
+
tags = ["config", "strict"]
|
|
46
|
+
[rules.allowlist]
|
|
47
|
+
paths = ['''test/.*''']
|
|
48
|
+
stopwords = ["EXAMPLE"]
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# GitHub Actions Workflow for Gitleaks Secret Scanning
|
|
2
|
+
# Save as: .github/workflows/gitleaks.yml
|
|
3
|
+
|
|
4
|
+
name: Secret Scanning with Gitleaks
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
- develop
|
|
11
|
+
- 'release/**'
|
|
12
|
+
pull_request:
|
|
13
|
+
branches:
|
|
14
|
+
- main
|
|
15
|
+
- develop
|
|
16
|
+
schedule:
|
|
17
|
+
# Run daily at 2 AM UTC
|
|
18
|
+
- cron: '0 2 * * *'
|
|
19
|
+
workflow_dispatch: # Allow manual triggers
|
|
20
|
+
|
|
21
|
+
# Cancel in-progress runs when new commit pushed
|
|
22
|
+
concurrency:
|
|
23
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
24
|
+
cancel-in-progress: true
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
gitleaks-scan:
|
|
28
|
+
name: Scan for Secrets
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
|
|
31
|
+
permissions:
|
|
32
|
+
# Required for uploading SARIF results to GitHub Security tab
|
|
33
|
+
security-events: write
|
|
34
|
+
# Required for checking out private repos
|
|
35
|
+
contents: read
|
|
36
|
+
|
|
37
|
+
steps:
|
|
38
|
+
- name: Checkout Repository
|
|
39
|
+
uses: actions/checkout@v4
|
|
40
|
+
with:
|
|
41
|
+
# Fetch full history for comprehensive scanning
|
|
42
|
+
fetch-depth: 0
|
|
43
|
+
|
|
44
|
+
- name: Run Gitleaks Scan
|
|
45
|
+
id: gitleaks
|
|
46
|
+
uses: gitleaks/gitleaks-action@v2
|
|
47
|
+
env:
|
|
48
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
+
# Optional: Use custom configuration
|
|
50
|
+
# GITLEAKS_CONFIG: .gitleaks.toml
|
|
51
|
+
|
|
52
|
+
# Optional: Generate JSON report for further processing
|
|
53
|
+
- name: Generate JSON Report
|
|
54
|
+
if: always() # Run even if secrets found
|
|
55
|
+
run: |
|
|
56
|
+
docker run --rm -v ${{ github.workspace }}:/repo \
|
|
57
|
+
zricethezav/gitleaks:latest \
|
|
58
|
+
detect --source /repo \
|
|
59
|
+
--report-path /repo/gitleaks-report.json \
|
|
60
|
+
--report-format json \
|
|
61
|
+
--exit-code 0 || true
|
|
62
|
+
|
|
63
|
+
# Optional: Upload JSON report as artifact
|
|
64
|
+
- name: Upload Scan Report
|
|
65
|
+
if: always()
|
|
66
|
+
uses: actions/upload-artifact@v4
|
|
67
|
+
with:
|
|
68
|
+
name: gitleaks-report
|
|
69
|
+
path: gitleaks-report.json
|
|
70
|
+
retention-days: 30
|
|
71
|
+
|
|
72
|
+
# Optional: Generate SARIF report for GitHub Security tab
|
|
73
|
+
- name: Generate SARIF Report
|
|
74
|
+
if: always()
|
|
75
|
+
run: |
|
|
76
|
+
docker run --rm -v ${{ github.workspace }}:/repo \
|
|
77
|
+
zricethezav/gitleaks:latest \
|
|
78
|
+
detect --source /repo \
|
|
79
|
+
--report-path /repo/gitleaks.sarif \
|
|
80
|
+
--report-format sarif \
|
|
81
|
+
--exit-code 0 || true
|
|
82
|
+
|
|
83
|
+
# Optional: Upload SARIF report to GitHub Security
|
|
84
|
+
- name: Upload SARIF to GitHub Security
|
|
85
|
+
if: always()
|
|
86
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
87
|
+
with:
|
|
88
|
+
sarif_file: gitleaks.sarif
|
|
89
|
+
category: gitleaks
|
|
90
|
+
|
|
91
|
+
# Optional: Comment on PR with findings
|
|
92
|
+
- name: Comment PR with Findings
|
|
93
|
+
if: failure() && github.event_name == 'pull_request'
|
|
94
|
+
uses: actions/github-script@v7
|
|
95
|
+
with:
|
|
96
|
+
script: |
|
|
97
|
+
const fs = require('fs');
|
|
98
|
+
try {
|
|
99
|
+
const report = JSON.parse(fs.readFileSync('gitleaks-report.json', 'utf8'));
|
|
100
|
+
const findings = report.length;
|
|
101
|
+
|
|
102
|
+
const comment = `## 🔒 Secret Scanning Results
|
|
103
|
+
|
|
104
|
+
⚠️ **${findings} potential secret(s) detected!**
|
|
105
|
+
|
|
106
|
+
Please review the findings and take immediate action:
|
|
107
|
+
1. **Do not merge** this PR until secrets are removed
|
|
108
|
+
2. Rotate any exposed credentials immediately
|
|
109
|
+
3. Remove secrets from code and use environment variables
|
|
110
|
+
4. Review the security tab for detailed findings
|
|
111
|
+
|
|
112
|
+
See [Secret Scanning Guide](https://github.com/${{ github.repository }}/blob/main/docs/secret-scanning.md) for remediation steps.`;
|
|
113
|
+
|
|
114
|
+
github.rest.issues.createComment({
|
|
115
|
+
issue_number: context.issue.number,
|
|
116
|
+
owner: context.repo.owner,
|
|
117
|
+
repo: context.repo.repo,
|
|
118
|
+
body: comment
|
|
119
|
+
});
|
|
120
|
+
} catch (error) {
|
|
121
|
+
console.log('No report file or error reading it:', error.message);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
# Optional: Post to Slack on failure
|
|
125
|
+
- name: Notify Slack on Failure
|
|
126
|
+
if: failure()
|
|
127
|
+
uses: slackapi/slack-github-action@v1
|
|
128
|
+
with:
|
|
129
|
+
payload: |
|
|
130
|
+
{
|
|
131
|
+
"text": "🚨 Secrets detected in ${{ github.repository }}",
|
|
132
|
+
"blocks": [
|
|
133
|
+
{
|
|
134
|
+
"type": "section",
|
|
135
|
+
"text": {
|
|
136
|
+
"type": "mrkdwn",
|
|
137
|
+
"text": "*Secret Scanning Alert*\n\nSecrets detected in repository: `${{ github.repository }}`\nBranch: `${{ github.ref_name }}`\nCommit: `${{ github.sha }}`\n\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Details>"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
env:
|
|
143
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
144
|
+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
|
145
|
+
|
|
146
|
+
# Optional: Baseline scanning for incremental detection
|
|
147
|
+
baseline-scan:
|
|
148
|
+
name: Incremental Scan Against Baseline
|
|
149
|
+
runs-on: ubuntu-latest
|
|
150
|
+
if: github.event_name == 'push'
|
|
151
|
+
|
|
152
|
+
steps:
|
|
153
|
+
- name: Checkout Repository
|
|
154
|
+
uses: actions/checkout@v4
|
|
155
|
+
with:
|
|
156
|
+
fetch-depth: 0
|
|
157
|
+
|
|
158
|
+
- name: Download Existing Baseline
|
|
159
|
+
continue-on-error: true
|
|
160
|
+
run: |
|
|
161
|
+
# Download baseline from artifact storage or S3
|
|
162
|
+
# Example: aws s3 cp s3://bucket/.gitleaks-baseline.json .
|
|
163
|
+
echo "Baseline download would go here"
|
|
164
|
+
|
|
165
|
+
- name: Run Incremental Scan
|
|
166
|
+
run: |
|
|
167
|
+
docker run --rm -v ${{ github.workspace }}:/repo \
|
|
168
|
+
zricethezav/gitleaks:latest \
|
|
169
|
+
detect --source /repo \
|
|
170
|
+
--baseline-path /repo/.gitleaks-baseline.json \
|
|
171
|
+
--report-path /repo/new-findings.json \
|
|
172
|
+
--report-format json \
|
|
173
|
+
--exit-code 1 || true
|
|
174
|
+
|
|
175
|
+
- name: Upload New Findings
|
|
176
|
+
if: always()
|
|
177
|
+
uses: actions/upload-artifact@v4
|
|
178
|
+
with:
|
|
179
|
+
name: new-findings
|
|
180
|
+
path: new-findings.json
|
|
181
|
+
retention-days: 90
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# GitLab CI Pipeline for Gitleaks Secret Scanning
|
|
2
|
+
# Save as: .gitlab-ci.yml or include in existing pipeline
|
|
3
|
+
|
|
4
|
+
# Define stages
|
|
5
|
+
stages:
|
|
6
|
+
- security
|
|
7
|
+
- report
|
|
8
|
+
|
|
9
|
+
# Default Docker image for security jobs
|
|
10
|
+
image: docker:latest
|
|
11
|
+
|
|
12
|
+
services:
|
|
13
|
+
- docker:dind
|
|
14
|
+
|
|
15
|
+
variables:
|
|
16
|
+
# Gitleaks Docker image
|
|
17
|
+
GITLEAKS_IMAGE: zricethezav/gitleaks:latest
|
|
18
|
+
# Report output path
|
|
19
|
+
REPORT_PATH: gitleaks-report.json
|
|
20
|
+
# SARIF output for GitLab Security Dashboard
|
|
21
|
+
SARIF_PATH: gl-secret-detection-report.json
|
|
22
|
+
|
|
23
|
+
# Secret scanning job
|
|
24
|
+
gitleaks-scan:
|
|
25
|
+
stage: security
|
|
26
|
+
image: $GITLEAKS_IMAGE
|
|
27
|
+
|
|
28
|
+
# Run on all branches and merge requests
|
|
29
|
+
rules:
|
|
30
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
31
|
+
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
32
|
+
- if: '$CI_COMMIT_BRANCH =~ /^(develop|release)/'
|
|
33
|
+
|
|
34
|
+
script:
|
|
35
|
+
# Run Gitleaks scan
|
|
36
|
+
- echo "Running Gitleaks secret detection..."
|
|
37
|
+
- |
|
|
38
|
+
gitleaks detect \
|
|
39
|
+
--source . \
|
|
40
|
+
--report-path $REPORT_PATH \
|
|
41
|
+
--report-format json \
|
|
42
|
+
--verbose || true
|
|
43
|
+
|
|
44
|
+
# Convert to GitLab SARIF format for Security Dashboard
|
|
45
|
+
- |
|
|
46
|
+
gitleaks detect \
|
|
47
|
+
--source . \
|
|
48
|
+
--report-path $SARIF_PATH \
|
|
49
|
+
--report-format sarif \
|
|
50
|
+
--verbose || true
|
|
51
|
+
|
|
52
|
+
# Check if secrets were found
|
|
53
|
+
- |
|
|
54
|
+
if [ -s "$REPORT_PATH" ] && [ "$(cat $REPORT_PATH)" != "null" ]; then
|
|
55
|
+
echo "⚠️ Secrets detected! Review findings below."
|
|
56
|
+
cat $REPORT_PATH | jq -r '.[] | "File: \(.File)\nLine: \(.StartLine)\nRule: \(.RuleID)\n"'
|
|
57
|
+
exit 1
|
|
58
|
+
else
|
|
59
|
+
echo "✅ No secrets detected"
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
artifacts:
|
|
63
|
+
paths:
|
|
64
|
+
- $REPORT_PATH
|
|
65
|
+
- $SARIF_PATH
|
|
66
|
+
reports:
|
|
67
|
+
# GitLab Security Dashboard integration
|
|
68
|
+
secret_detection: $SARIF_PATH
|
|
69
|
+
when: always
|
|
70
|
+
expire_in: 30 days
|
|
71
|
+
|
|
72
|
+
# Allow failure for initial rollout, then set to false
|
|
73
|
+
allow_failure: false
|
|
74
|
+
|
|
75
|
+
# Optional: Incremental scanning with baseline
|
|
76
|
+
gitleaks-incremental:
|
|
77
|
+
stage: security
|
|
78
|
+
image: $GITLEAKS_IMAGE
|
|
79
|
+
|
|
80
|
+
# Only run on merge requests
|
|
81
|
+
rules:
|
|
82
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
83
|
+
|
|
84
|
+
script:
|
|
85
|
+
# Download baseline from artifacts or storage
|
|
86
|
+
- echo "Downloading baseline..."
|
|
87
|
+
- |
|
|
88
|
+
if [ -f ".gitleaks-baseline.json" ]; then
|
|
89
|
+
echo "Using baseline from repository"
|
|
90
|
+
else
|
|
91
|
+
echo "No baseline found, running full scan"
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
# Run incremental scan
|
|
95
|
+
- |
|
|
96
|
+
if [ -f ".gitleaks-baseline.json" ]; then
|
|
97
|
+
gitleaks detect \
|
|
98
|
+
--source . \
|
|
99
|
+
--baseline-path .gitleaks-baseline.json \
|
|
100
|
+
--report-path new-findings.json \
|
|
101
|
+
--report-format json \
|
|
102
|
+
--exit-code 1 || true
|
|
103
|
+
|
|
104
|
+
if [ -s "new-findings.json" ] && [ "$(cat new-findings.json)" != "null" ]; then
|
|
105
|
+
echo "⚠️ New secrets detected since baseline!"
|
|
106
|
+
cat new-findings.json | jq .
|
|
107
|
+
exit 1
|
|
108
|
+
fi
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
artifacts:
|
|
112
|
+
paths:
|
|
113
|
+
- new-findings.json
|
|
114
|
+
when: always
|
|
115
|
+
expire_in: 7 days
|
|
116
|
+
|
|
117
|
+
# Optional: Create baseline on main branch
|
|
118
|
+
create-baseline:
|
|
119
|
+
stage: security
|
|
120
|
+
image: $GITLEAKS_IMAGE
|
|
121
|
+
|
|
122
|
+
# Only run on main/master branch
|
|
123
|
+
rules:
|
|
124
|
+
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
125
|
+
when: manual # Manual trigger to avoid overwriting
|
|
126
|
+
|
|
127
|
+
script:
|
|
128
|
+
- echo "Creating new baseline..."
|
|
129
|
+
- |
|
|
130
|
+
gitleaks detect \
|
|
131
|
+
--source . \
|
|
132
|
+
--report-path .gitleaks-baseline.json \
|
|
133
|
+
--report-format json \
|
|
134
|
+
--exit-code 0 || true
|
|
135
|
+
|
|
136
|
+
artifacts:
|
|
137
|
+
paths:
|
|
138
|
+
- .gitleaks-baseline.json
|
|
139
|
+
expire_in: 365 days
|
|
140
|
+
|
|
141
|
+
# Optional: Generate human-readable report
|
|
142
|
+
generate-report:
|
|
143
|
+
stage: report
|
|
144
|
+
image: python:3.11-slim
|
|
145
|
+
|
|
146
|
+
dependencies:
|
|
147
|
+
- gitleaks-scan
|
|
148
|
+
|
|
149
|
+
rules:
|
|
150
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
151
|
+
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
152
|
+
|
|
153
|
+
script:
|
|
154
|
+
- pip install jinja2
|
|
155
|
+
- |
|
|
156
|
+
python3 << 'EOF'
|
|
157
|
+
import json
|
|
158
|
+
import sys
|
|
159
|
+
from datetime import datetime
|
|
160
|
+
|
|
161
|
+
try:
|
|
162
|
+
with open('gitleaks-report.json', 'r') as f:
|
|
163
|
+
findings = json.load(f)
|
|
164
|
+
|
|
165
|
+
if not findings:
|
|
166
|
+
print("✅ No secrets detected")
|
|
167
|
+
sys.exit(0)
|
|
168
|
+
|
|
169
|
+
print("# Gitleaks Secret Detection Report")
|
|
170
|
+
print(f"\n**Generated**: {datetime.now().isoformat()}")
|
|
171
|
+
print(f"**Total Findings**: {len(findings)}\n")
|
|
172
|
+
|
|
173
|
+
for idx, finding in enumerate(findings, 1):
|
|
174
|
+
print(f"\n## Finding {idx}")
|
|
175
|
+
print(f"- **File**: {finding.get('File', 'unknown')}")
|
|
176
|
+
print(f"- **Line**: {finding.get('StartLine', 'unknown')}")
|
|
177
|
+
print(f"- **Rule**: {finding.get('RuleID', 'unknown')}")
|
|
178
|
+
print(f"- **Description**: {finding.get('Description', 'unknown')}")
|
|
179
|
+
print(f"- **Commit**: {finding.get('Commit', 'N/A')}\n")
|
|
180
|
+
|
|
181
|
+
except FileNotFoundError:
|
|
182
|
+
print("No report file found")
|
|
183
|
+
except json.JSONDecodeError:
|
|
184
|
+
print("No findings in report")
|
|
185
|
+
EOF
|
|
186
|
+
|
|
187
|
+
artifacts:
|
|
188
|
+
paths:
|
|
189
|
+
- gitleaks-report.json
|
|
190
|
+
|
|
191
|
+
# Optional: Comment on merge request
|
|
192
|
+
comment-mr:
|
|
193
|
+
stage: report
|
|
194
|
+
image: alpine:latest
|
|
195
|
+
|
|
196
|
+
dependencies:
|
|
197
|
+
- gitleaks-scan
|
|
198
|
+
|
|
199
|
+
rules:
|
|
200
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
201
|
+
|
|
202
|
+
before_script:
|
|
203
|
+
- apk add --no-cache curl jq
|
|
204
|
+
|
|
205
|
+
script:
|
|
206
|
+
- |
|
|
207
|
+
if [ -s "$REPORT_PATH" ] && [ "$(cat $REPORT_PATH)" != "null" ]; then
|
|
208
|
+
FINDING_COUNT=$(cat $REPORT_PATH | jq '. | length')
|
|
209
|
+
|
|
210
|
+
COMMENT="## 🔒 Secret Scanning Results\n\n"
|
|
211
|
+
COMMENT="${COMMENT}⚠️ **${FINDING_COUNT} potential secret(s) detected!**\n\n"
|
|
212
|
+
COMMENT="${COMMENT}Please review the findings and take immediate action:\n"
|
|
213
|
+
COMMENT="${COMMENT}1. **Do not merge** this MR until secrets are removed\n"
|
|
214
|
+
COMMENT="${COMMENT}2. Rotate any exposed credentials immediately\n"
|
|
215
|
+
COMMENT="${COMMENT}3. Remove secrets from code and use CI/CD variables\n\n"
|
|
216
|
+
COMMENT="${COMMENT}See pipeline artifacts for detailed findings."
|
|
217
|
+
|
|
218
|
+
# Post comment to merge request
|
|
219
|
+
curl --request POST \
|
|
220
|
+
--header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
|
|
221
|
+
--data-urlencode "body=$COMMENT" \
|
|
222
|
+
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes"
|
|
223
|
+
fi
|
|
224
|
+
|
|
225
|
+
allow_failure: true
|
|
226
|
+
|
|
227
|
+
# Optional: Scheduled nightly scan
|
|
228
|
+
nightly-scan:
|
|
229
|
+
stage: security
|
|
230
|
+
image: $GITLEAKS_IMAGE
|
|
231
|
+
|
|
232
|
+
# Run on schedule only
|
|
233
|
+
rules:
|
|
234
|
+
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
235
|
+
|
|
236
|
+
script:
|
|
237
|
+
- echo "Running comprehensive nightly secret scan..."
|
|
238
|
+
- |
|
|
239
|
+
gitleaks detect \
|
|
240
|
+
--source . \
|
|
241
|
+
--report-path nightly-scan.json \
|
|
242
|
+
--report-format json \
|
|
243
|
+
--verbose
|
|
244
|
+
|
|
245
|
+
artifacts:
|
|
246
|
+
paths:
|
|
247
|
+
- nightly-scan.json
|
|
248
|
+
when: always
|
|
249
|
+
expire_in: 90 days
|
|
250
|
+
|
|
251
|
+
# Send notifications on failure
|
|
252
|
+
after_script:
|
|
253
|
+
- |
|
|
254
|
+
if [ $? -ne 0 ]; then
|
|
255
|
+
echo "Secrets detected in nightly scan!"
|
|
256
|
+
# Add notification logic (email, Slack, etc.)
|
|
257
|
+
fi
|