@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,598 @@
|
|
|
1
|
+
# False Positives Management
|
|
2
|
+
|
|
3
|
+
Strategies for managing false positives in Gitleaks secret detection.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Understanding False Positives](#understanding-false-positives)
|
|
8
|
+
- [Allowlist Strategies](#allowlist-strategies)
|
|
9
|
+
- [Common False Positive Patterns](#common-false-positive-patterns)
|
|
10
|
+
- [Configuration Examples](#configuration-examples)
|
|
11
|
+
- [Best Practices](#best-practices)
|
|
12
|
+
|
|
13
|
+
## Understanding False Positives
|
|
14
|
+
|
|
15
|
+
False positives occur when legitimate code patterns match secret detection rules.
|
|
16
|
+
|
|
17
|
+
### Categories of False Positives
|
|
18
|
+
|
|
19
|
+
1. **Example/Placeholder Values**: Documentation and examples using fake credentials
|
|
20
|
+
2. **Test Fixtures**: Test data with credential-like patterns
|
|
21
|
+
3. **Non-Secret Constants**: Configuration values that match patterns but aren't sensitive
|
|
22
|
+
4. **Generated Code**: Auto-generated code with high-entropy strings
|
|
23
|
+
5. **Comments and Documentation**: Explanatory text matching patterns
|
|
24
|
+
|
|
25
|
+
### Impact Assessment
|
|
26
|
+
|
|
27
|
+
Before allowlisting, verify it's truly a false positive:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Extract the flagged value
|
|
31
|
+
echo "api_key_here" | base64 # Check if valid encoding
|
|
32
|
+
curl -H "Authorization: Bearer <token>" https://api.service.com/test # Test if active
|
|
33
|
+
|
|
34
|
+
# Check git history for when added
|
|
35
|
+
git log -p --all -S "flagged_value"
|
|
36
|
+
|
|
37
|
+
# Review context around detection
|
|
38
|
+
git show <commit-sha>:<file-path>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Allowlist Strategies
|
|
42
|
+
|
|
43
|
+
### 1. Path-Based Allowlisting
|
|
44
|
+
|
|
45
|
+
Exclude entire directories or file patterns:
|
|
46
|
+
|
|
47
|
+
```toml
|
|
48
|
+
[allowlist]
|
|
49
|
+
description = "Exclude test and documentation files"
|
|
50
|
+
paths = [
|
|
51
|
+
'''test/.*''', # All test directories
|
|
52
|
+
'''tests/.*''', # Alternative test directory name
|
|
53
|
+
'''.*/fixtures/.*''', # Test fixtures anywhere
|
|
54
|
+
'''examples/.*''', # Example code
|
|
55
|
+
'''docs/.*''', # Documentation
|
|
56
|
+
'''.*\.md$''', # Markdown files
|
|
57
|
+
'''.*\.rst$''', # ReStructuredText files
|
|
58
|
+
'''.*_test\.go$''', # Go test files
|
|
59
|
+
'''.*\.test\.js$''', # JavaScript test files
|
|
60
|
+
'''.*\.spec\.ts$''', # TypeScript spec files
|
|
61
|
+
]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 2. Stopword Allowlisting
|
|
65
|
+
|
|
66
|
+
Filter out known placeholder values:
|
|
67
|
+
|
|
68
|
+
```toml
|
|
69
|
+
[allowlist]
|
|
70
|
+
description = "Common placeholder values"
|
|
71
|
+
stopwords = [
|
|
72
|
+
"example",
|
|
73
|
+
"placeholder",
|
|
74
|
+
"your_api_key_here",
|
|
75
|
+
"your_secret_here",
|
|
76
|
+
"REPLACEME",
|
|
77
|
+
"CHANGEME",
|
|
78
|
+
"xxxxxx",
|
|
79
|
+
"000000",
|
|
80
|
+
"123456",
|
|
81
|
+
"abcdef",
|
|
82
|
+
"sample",
|
|
83
|
+
"dummy",
|
|
84
|
+
"fake",
|
|
85
|
+
"test_key",
|
|
86
|
+
"mock_token",
|
|
87
|
+
]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 3. Commit-Based Allowlisting
|
|
91
|
+
|
|
92
|
+
Allowlist specific commits after manual verification:
|
|
93
|
+
|
|
94
|
+
```toml
|
|
95
|
+
[allowlist]
|
|
96
|
+
description = "Verified false positives"
|
|
97
|
+
commits = [
|
|
98
|
+
"a1b2c3d4e5f6", # Initial test fixtures - verified 2024-01-15
|
|
99
|
+
"f6e5d4c3b2a1", # Documentation examples - verified 2024-01-16
|
|
100
|
+
]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Add comment explaining why each commit is allowlisted.
|
|
104
|
+
|
|
105
|
+
### 4. Regex Allowlisting
|
|
106
|
+
|
|
107
|
+
Allowlist specific patterns:
|
|
108
|
+
|
|
109
|
+
```toml
|
|
110
|
+
[allowlist]
|
|
111
|
+
description = "Pattern-based allowlist"
|
|
112
|
+
regexes = [
|
|
113
|
+
'''example_api_key_[0-9]+''', # Example keys with numeric suffix
|
|
114
|
+
'''key\s*=\s*["']EXAMPLE["']''', # Explicitly marked examples
|
|
115
|
+
'''(?i)test_?password_?[0-9]*''', # Test passwords
|
|
116
|
+
'''(?i)dummy.*secret''', # Dummy secrets
|
|
117
|
+
]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 5. Rule-Specific Allowlisting
|
|
121
|
+
|
|
122
|
+
Create exceptions for specific rules only:
|
|
123
|
+
|
|
124
|
+
```toml
|
|
125
|
+
[[rules]]
|
|
126
|
+
id = "generic-api-key"
|
|
127
|
+
description = "Generic API Key"
|
|
128
|
+
regex = '''(?i)api_key\s*=\s*["']([a-zA-Z0-9]{32})["']'''
|
|
129
|
+
|
|
130
|
+
[rules.allowlist]
|
|
131
|
+
description = "Allow generic API key pattern in specific contexts"
|
|
132
|
+
paths = ['''config/defaults\.yaml''']
|
|
133
|
+
regexes = ['''api_key\s*=\s*["']example''']
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 6. Global vs Rule Allowlists
|
|
137
|
+
|
|
138
|
+
Global allowlists override rule-specific ones:
|
|
139
|
+
|
|
140
|
+
```toml
|
|
141
|
+
# Global allowlist - highest precedence
|
|
142
|
+
[allowlist]
|
|
143
|
+
description = "Organization-wide exceptions"
|
|
144
|
+
paths = ['''vendor/''', '''node_modules/''']
|
|
145
|
+
|
|
146
|
+
# Rule-specific allowlist
|
|
147
|
+
[[rules]]
|
|
148
|
+
id = "custom-secret"
|
|
149
|
+
[rules.allowlist]
|
|
150
|
+
description = "Exceptions only for this rule"
|
|
151
|
+
paths = ['''config/template\.yml''']
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Common False Positive Patterns
|
|
155
|
+
|
|
156
|
+
### 1. Documentation Examples
|
|
157
|
+
|
|
158
|
+
**Problem**: README and documentation contain example credentials.
|
|
159
|
+
|
|
160
|
+
**Solution**:
|
|
161
|
+
```toml
|
|
162
|
+
[allowlist]
|
|
163
|
+
paths = [
|
|
164
|
+
'''README\.md$''',
|
|
165
|
+
'''CONTRIBUTING\.md$''',
|
|
166
|
+
'''docs/.*\.md$''',
|
|
167
|
+
'''.*\.example$''', # .env.example files
|
|
168
|
+
'''.*\.template$''', # Template files
|
|
169
|
+
'''.*\.sample$''', # Sample configurations
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
stopwords = [
|
|
173
|
+
"example.com",
|
|
174
|
+
"user@example.org",
|
|
175
|
+
"YOUR_API_KEY",
|
|
176
|
+
]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### 2. Test Fixtures
|
|
180
|
+
|
|
181
|
+
**Problem**: Test data contains credential-like strings for testing credential handling.
|
|
182
|
+
|
|
183
|
+
**Solution**:
|
|
184
|
+
```toml
|
|
185
|
+
[allowlist]
|
|
186
|
+
paths = [
|
|
187
|
+
'''test/fixtures/.*''',
|
|
188
|
+
'''spec/fixtures/.*''',
|
|
189
|
+
'''.*/testdata/.*''', # Go convention
|
|
190
|
+
'''.*/mocks/.*''',
|
|
191
|
+
'''cypress/fixtures/.*''', # Cypress test data
|
|
192
|
+
]
|
|
193
|
+
|
|
194
|
+
# Or use inline comments in code
|
|
195
|
+
# password = "test_password_123" # gitleaks:allow
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 3. Generated Code
|
|
199
|
+
|
|
200
|
+
**Problem**: Code generators produce high-entropy identifiers.
|
|
201
|
+
|
|
202
|
+
**Solution**:
|
|
203
|
+
```toml
|
|
204
|
+
[allowlist]
|
|
205
|
+
description = "Generated code"
|
|
206
|
+
paths = [
|
|
207
|
+
'''.*\.pb\.go$''', # Protocol buffer generated code
|
|
208
|
+
'''.*_generated\..*''', # Generated file marker
|
|
209
|
+
'''node_modules/.*''', # Dependencies
|
|
210
|
+
'''vendor/.*''', # Vendored dependencies
|
|
211
|
+
'''dist/.*''', # Build output
|
|
212
|
+
'''build/.*''',
|
|
213
|
+
]
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### 4. Configuration Templates
|
|
217
|
+
|
|
218
|
+
**Problem**: Config templates with placeholder values match patterns.
|
|
219
|
+
|
|
220
|
+
**Solution**:
|
|
221
|
+
```toml
|
|
222
|
+
[allowlist]
|
|
223
|
+
paths = [
|
|
224
|
+
'''config/.*\.template''',
|
|
225
|
+
'''templates/.*''',
|
|
226
|
+
'''.*\.tpl$''',
|
|
227
|
+
'''.*\.tmpl$''',
|
|
228
|
+
]
|
|
229
|
+
|
|
230
|
+
stopwords = [
|
|
231
|
+
"REPLACE_WITH_YOUR",
|
|
232
|
+
"CONFIGURE_ME",
|
|
233
|
+
"SET_THIS_VALUE",
|
|
234
|
+
]
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### 5. Base64 Encoded Strings
|
|
238
|
+
|
|
239
|
+
**Problem**: Non-secret base64 data flagged due to high entropy.
|
|
240
|
+
|
|
241
|
+
**Solution**:
|
|
242
|
+
```toml
|
|
243
|
+
# Increase entropy threshold to reduce false positives
|
|
244
|
+
[[rules]]
|
|
245
|
+
id = "high-entropy-base64"
|
|
246
|
+
regex = '''[a-zA-Z0-9+/]{40,}={0,2}'''
|
|
247
|
+
entropy = 5.5 # Increase from default 4.5
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Or allowlist specific patterns:
|
|
251
|
+
```toml
|
|
252
|
+
[allowlist]
|
|
253
|
+
regexes = [
|
|
254
|
+
'''data:image/[^;]+;base64,''', # Base64 encoded images
|
|
255
|
+
'''-----BEGIN CERTIFICATE-----''', # Public certificates (not private keys)
|
|
256
|
+
]
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### 6. Public Keys and Certificates
|
|
260
|
+
|
|
261
|
+
**Problem**: Public keys detected (which are not secrets).
|
|
262
|
+
|
|
263
|
+
**Solution**:
|
|
264
|
+
```toml
|
|
265
|
+
[allowlist]
|
|
266
|
+
regexes = [
|
|
267
|
+
'''-----BEGIN PUBLIC KEY-----''',
|
|
268
|
+
'''-----BEGIN CERTIFICATE-----''',
|
|
269
|
+
'''-----BEGIN X509 CERTIFICATE-----''',
|
|
270
|
+
]
|
|
271
|
+
|
|
272
|
+
# But DO NOT allowlist:
|
|
273
|
+
# -----BEGIN PRIVATE KEY-----
|
|
274
|
+
# -----BEGIN RSA PRIVATE KEY-----
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### 7. UUIDs and Identifiers
|
|
278
|
+
|
|
279
|
+
**Problem**: UUIDs match high-entropy patterns.
|
|
280
|
+
|
|
281
|
+
**Solution**:
|
|
282
|
+
```toml
|
|
283
|
+
[allowlist]
|
|
284
|
+
regexes = [
|
|
285
|
+
'''[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}''', # UUID
|
|
286
|
+
'''[0-9a-f]{24}''', # MongoDB ObjectId
|
|
287
|
+
]
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Or adjust entropy detection:
|
|
291
|
+
```toml
|
|
292
|
+
[[rules]]
|
|
293
|
+
id = "generic-high-entropy"
|
|
294
|
+
entropy = 6.0 # Only flag very high entropy
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
## Configuration Examples
|
|
298
|
+
|
|
299
|
+
### Minimal Configuration
|
|
300
|
+
|
|
301
|
+
Start with broad allowlists, refine over time:
|
|
302
|
+
|
|
303
|
+
```toml
|
|
304
|
+
title = "Minimal Gitleaks Configuration"
|
|
305
|
+
|
|
306
|
+
[extend]
|
|
307
|
+
useDefault = true # Use all built-in rules
|
|
308
|
+
|
|
309
|
+
[allowlist]
|
|
310
|
+
description = "Broad allowlist for initial rollout"
|
|
311
|
+
paths = [
|
|
312
|
+
'''test/.*''',
|
|
313
|
+
'''.*\.md$''',
|
|
314
|
+
'''vendor/.*''',
|
|
315
|
+
'''node_modules/.*''',
|
|
316
|
+
]
|
|
317
|
+
|
|
318
|
+
stopwords = [
|
|
319
|
+
"example",
|
|
320
|
+
"test",
|
|
321
|
+
"mock",
|
|
322
|
+
"dummy",
|
|
323
|
+
]
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Strict Configuration
|
|
327
|
+
|
|
328
|
+
Minimize false positives with targeted allowlists:
|
|
329
|
+
|
|
330
|
+
```toml
|
|
331
|
+
title = "Strict Gitleaks Configuration"
|
|
332
|
+
|
|
333
|
+
[extend]
|
|
334
|
+
useDefault = true
|
|
335
|
+
|
|
336
|
+
[allowlist]
|
|
337
|
+
description = "Minimal allowlist - verify all exceptions"
|
|
338
|
+
|
|
339
|
+
# Only allow specific known false positives
|
|
340
|
+
paths = [
|
|
341
|
+
'''docs/api-examples\.md''', # API documentation with examples
|
|
342
|
+
'''test/fixtures/auth\.json''', # Authentication test fixtures
|
|
343
|
+
]
|
|
344
|
+
|
|
345
|
+
# Specific known placeholder values
|
|
346
|
+
stopwords = [
|
|
347
|
+
"YOUR_API_KEY_HERE",
|
|
348
|
+
"sk_test_example_key_123456789",
|
|
349
|
+
]
|
|
350
|
+
|
|
351
|
+
# Manually verified commits
|
|
352
|
+
commits = [
|
|
353
|
+
"abc123def456", # Test fixtures added - verified 2024-01-15 by security@company.com
|
|
354
|
+
]
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Balanced Configuration
|
|
358
|
+
|
|
359
|
+
Balance detection sensitivity with operational overhead:
|
|
360
|
+
|
|
361
|
+
```toml
|
|
362
|
+
title = "Balanced Gitleaks Configuration"
|
|
363
|
+
|
|
364
|
+
[extend]
|
|
365
|
+
useDefault = true
|
|
366
|
+
|
|
367
|
+
[allowlist]
|
|
368
|
+
description = "Balanced allowlist"
|
|
369
|
+
|
|
370
|
+
# Common non-secret paths
|
|
371
|
+
paths = [
|
|
372
|
+
'''test/fixtures/.*''',
|
|
373
|
+
'''spec/fixtures/.*''',
|
|
374
|
+
'''.*\.md$''',
|
|
375
|
+
'''docs/.*''',
|
|
376
|
+
'''examples/.*''',
|
|
377
|
+
'''vendor/.*''',
|
|
378
|
+
'''node_modules/.*''',
|
|
379
|
+
]
|
|
380
|
+
|
|
381
|
+
# Common placeholders
|
|
382
|
+
stopwords = [
|
|
383
|
+
"example",
|
|
384
|
+
"placeholder",
|
|
385
|
+
"your_key_here",
|
|
386
|
+
"replace_me",
|
|
387
|
+
"changeme",
|
|
388
|
+
"test",
|
|
389
|
+
"dummy",
|
|
390
|
+
"mock",
|
|
391
|
+
]
|
|
392
|
+
|
|
393
|
+
# Public non-secrets
|
|
394
|
+
regexes = [
|
|
395
|
+
'''-----BEGIN CERTIFICATE-----''',
|
|
396
|
+
'''-----BEGIN PUBLIC KEY-----''',
|
|
397
|
+
'''data:image/[^;]+;base64,''',
|
|
398
|
+
]
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
## Best Practices
|
|
402
|
+
|
|
403
|
+
### 1. Document Allowlist Decisions
|
|
404
|
+
|
|
405
|
+
Always add comments explaining why patterns are allowlisted:
|
|
406
|
+
|
|
407
|
+
```toml
|
|
408
|
+
[allowlist]
|
|
409
|
+
description = "Verified false positives - reviewed 2024-01-15"
|
|
410
|
+
|
|
411
|
+
# Test fixtures created during initial test suite development
|
|
412
|
+
# Contains only example credentials for testing credential validation
|
|
413
|
+
paths = ['''test/fixtures/credentials\.json''']
|
|
414
|
+
|
|
415
|
+
# Documentation examples using clearly fake values
|
|
416
|
+
# All examples prefixed with "example_" or "test_"
|
|
417
|
+
stopwords = ["example_", "test_"]
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
### 2. Regular Allowlist Review
|
|
421
|
+
|
|
422
|
+
Schedule periodic reviews:
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
#!/bin/bash
|
|
426
|
+
# review-allowlist.sh
|
|
427
|
+
|
|
428
|
+
echo "Gitleaks Allowlist Review"
|
|
429
|
+
echo "========================="
|
|
430
|
+
echo ""
|
|
431
|
+
|
|
432
|
+
# Show allowlist paths
|
|
433
|
+
echo "Allowlisted paths:"
|
|
434
|
+
grep -A 10 "^\[allowlist\]" .gitleaks.toml | grep "paths = "
|
|
435
|
+
|
|
436
|
+
# Show allowlisted commits
|
|
437
|
+
echo ""
|
|
438
|
+
echo "Allowlisted commits:"
|
|
439
|
+
grep -A 10 "^\[allowlist\]" .gitleaks.toml | grep "commits = "
|
|
440
|
+
|
|
441
|
+
# Check if commits still exist
|
|
442
|
+
# (May have been removed in history rewrite)
|
|
443
|
+
git rev-parse --verify abc123def456 2>/dev/null || echo "WARNING: Commit abc123def456 not found"
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
### 3. Use Inline Annotations Sparingly
|
|
447
|
+
|
|
448
|
+
For one-off false positives, use inline comments:
|
|
449
|
+
|
|
450
|
+
```python
|
|
451
|
+
# This is a test password for unit tests only
|
|
452
|
+
# gitleaks:allow
|
|
453
|
+
TEST_PASSWORD = "test_password_123"
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
**Warning**: Overuse of inline annotations indicates poorly tuned configuration.
|
|
457
|
+
|
|
458
|
+
### 4. Version Control Your Configuration
|
|
459
|
+
|
|
460
|
+
Track changes to `.gitleaks.toml`:
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
git log -p .gitleaks.toml
|
|
464
|
+
|
|
465
|
+
# See who allowlisted what and when
|
|
466
|
+
git blame .gitleaks.toml
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### 5. Test Allowlist Changes
|
|
470
|
+
|
|
471
|
+
Before committing allowlist changes:
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
# Test configuration
|
|
475
|
+
gitleaks detect --config .gitleaks.toml -v
|
|
476
|
+
|
|
477
|
+
# Verify specific file is now allowed
|
|
478
|
+
gitleaks detect --config .gitleaks.toml --source test/fixtures/credentials.json
|
|
479
|
+
|
|
480
|
+
# Verify secret is still caught in production code
|
|
481
|
+
echo 'api_key = "sk_live_actual_key"' > /tmp/test_detection.py
|
|
482
|
+
gitleaks detect --config .gitleaks.toml --source /tmp/test_detection.py --no-git
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### 6. Separate Allowlists by Environment
|
|
486
|
+
|
|
487
|
+
Use different configurations for different contexts:
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
# Strict config for production code
|
|
491
|
+
gitleaks detect --config .gitleaks.strict.toml --source src/
|
|
492
|
+
|
|
493
|
+
# Lenient config for test code
|
|
494
|
+
gitleaks detect --config .gitleaks.lenient.toml --source test/
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
### 7. Monitor False Positive Rate
|
|
498
|
+
|
|
499
|
+
Track metrics over time:
|
|
500
|
+
|
|
501
|
+
```bash
|
|
502
|
+
# Total findings
|
|
503
|
+
TOTAL=$(gitleaks detect --report-format json 2>/dev/null | jq '. | length')
|
|
504
|
+
|
|
505
|
+
# Run with allowlist
|
|
506
|
+
AFTER_FILTER=$(gitleaks detect --config .gitleaks.toml --report-format json 2>/dev/null | jq '. | length')
|
|
507
|
+
|
|
508
|
+
# Calculate reduction
|
|
509
|
+
echo "False positive reduction: $(($TOTAL - $AFTER_FILTER)) / $TOTAL"
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
**Target**: < 10% false positive rate for good developer experience.
|
|
513
|
+
|
|
514
|
+
### 8. Security Review for New Allowlists
|
|
515
|
+
|
|
516
|
+
Require security team approval for:
|
|
517
|
+
- New allowlisted paths in `src/` or production code
|
|
518
|
+
- New allowlisted commits (verify manually first)
|
|
519
|
+
- Changes to rule-specific allowlists
|
|
520
|
+
- New stopwords that could mask real secrets
|
|
521
|
+
|
|
522
|
+
### 9. Avoid Overly Broad Patterns
|
|
523
|
+
|
|
524
|
+
**Bad** (too broad):
|
|
525
|
+
```toml
|
|
526
|
+
[allowlist]
|
|
527
|
+
paths = ['''.*'''] # Disables all detection!
|
|
528
|
+
stopwords = ["key", "secret"] # Matches too many real secrets
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
**Good** (specific):
|
|
532
|
+
```toml
|
|
533
|
+
[allowlist]
|
|
534
|
+
paths = ['''test/unit/.*\.test\.js$'''] # Specific test directory
|
|
535
|
+
stopwords = ["example_key", "test_secret"] # Specific placeholders
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### 10. Escape Special Characters
|
|
539
|
+
|
|
540
|
+
When using regex patterns, escape properly:
|
|
541
|
+
|
|
542
|
+
```toml
|
|
543
|
+
[allowlist]
|
|
544
|
+
regexes = [
|
|
545
|
+
'''api\.example\.com''', # Literal dot
|
|
546
|
+
'''config\[\'key\'\]''', # Literal brackets and quotes
|
|
547
|
+
]
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
## Troubleshooting False Positives
|
|
551
|
+
|
|
552
|
+
### Issue: Can't Identify Source of False Positive
|
|
553
|
+
|
|
554
|
+
```bash
|
|
555
|
+
# Run with verbose output
|
|
556
|
+
gitleaks detect -v | grep "RuleID"
|
|
557
|
+
|
|
558
|
+
# Get detailed finding information
|
|
559
|
+
gitleaks detect --report-format json | jq '.[] | {file: .File, line: .StartLine, rule: .RuleID}'
|
|
560
|
+
|
|
561
|
+
# View context around detection
|
|
562
|
+
gitleaks detect --report-format json | jq -r '.[0] | .File, .StartLine' | xargs -I {} sh -c 'sed -n "{}-5,{}+5p" {}'
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
### Issue: Allowlist Not Working
|
|
566
|
+
|
|
567
|
+
```bash
|
|
568
|
+
# Verify config is loaded
|
|
569
|
+
gitleaks detect --config .gitleaks.toml -v 2>&1 | grep "config"
|
|
570
|
+
|
|
571
|
+
# Check regex syntax
|
|
572
|
+
echo "test_string" | grep -E 'your_regex_pattern'
|
|
573
|
+
|
|
574
|
+
# Test path matching
|
|
575
|
+
echo "test/fixtures/file.json" | grep -E 'test/fixtures/.*'
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
### Issue: Too Many False Positives
|
|
579
|
+
|
|
580
|
+
1. **Export findings**: `gitleaks detect --report-format json > findings.json`
|
|
581
|
+
2. **Analyze patterns**: `jq -r '.[].File' findings.json | sort | uniq -c | sort -rn`
|
|
582
|
+
3. **Group by rule**: `jq -r '.[].RuleID' findings.json | sort | uniq -c | sort -rn`
|
|
583
|
+
4. **Create targeted allowlists** based on analysis
|
|
584
|
+
|
|
585
|
+
## False Positive vs Real Secret
|
|
586
|
+
|
|
587
|
+
When unsure, err on the side of caution:
|
|
588
|
+
|
|
589
|
+
| Indicator | False Positive | Real Secret |
|
|
590
|
+
|-----------|----------------|-------------|
|
|
591
|
+
| Location | Test/docs/examples | Production code |
|
|
592
|
+
| Pattern | "example", "test", "mock" | No such indicators |
|
|
593
|
+
| Entropy | Low/medium | High |
|
|
594
|
+
| Format | Incomplete/truncated | Complete/valid |
|
|
595
|
+
| Context | Educational comments | Functional code |
|
|
596
|
+
| Git history | Added in test commits | Added furtively |
|
|
597
|
+
|
|
598
|
+
**When in doubt**: Treat as real secret and investigate.
|