clawsec 0.0.1
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/README.md +560 -0
- package/dist/bin/clawsec.d.ts +7 -0
- package/dist/bin/clawsec.d.ts.map +1 -0
- package/dist/bin/clawsec.js +12 -0
- package/dist/bin/clawsec.js.map +1 -0
- package/dist/src/actions/block.d.ts +22 -0
- package/dist/src/actions/block.d.ts.map +1 -0
- package/dist/src/actions/block.js +83 -0
- package/dist/src/actions/block.js.map +1 -0
- package/dist/src/actions/confirm.d.ts +35 -0
- package/dist/src/actions/confirm.d.ts.map +1 -0
- package/dist/src/actions/confirm.js +156 -0
- package/dist/src/actions/confirm.js.map +1 -0
- package/dist/src/actions/executor.d.ts +64 -0
- package/dist/src/actions/executor.d.ts.map +1 -0
- package/dist/src/actions/executor.js +114 -0
- package/dist/src/actions/executor.js.map +1 -0
- package/dist/src/actions/index.d.ts +13 -0
- package/dist/src/actions/index.d.ts.map +1 -0
- package/dist/src/actions/index.js +15 -0
- package/dist/src/actions/index.js.map +1 -0
- package/dist/src/actions/log.d.ts +19 -0
- package/dist/src/actions/log.d.ts.map +1 -0
- package/dist/src/actions/log.js +63 -0
- package/dist/src/actions/log.js.map +1 -0
- package/dist/src/actions/types.d.ts +85 -0
- package/dist/src/actions/types.d.ts.map +1 -0
- package/dist/src/actions/types.js +78 -0
- package/dist/src/actions/types.js.map +1 -0
- package/dist/src/actions/warn.d.ts +22 -0
- package/dist/src/actions/warn.d.ts.map +1 -0
- package/dist/src/actions/warn.js +84 -0
- package/dist/src/actions/warn.js.map +1 -0
- package/dist/src/approval/agent-confirm.d.ts +104 -0
- package/dist/src/approval/agent-confirm.d.ts.map +1 -0
- package/dist/src/approval/agent-confirm.js +173 -0
- package/dist/src/approval/agent-confirm.js.map +1 -0
- package/dist/src/approval/index.d.ts +14 -0
- package/dist/src/approval/index.d.ts.map +1 -0
- package/dist/src/approval/index.js +9 -0
- package/dist/src/approval/index.js.map +1 -0
- package/dist/src/approval/native.d.ts +56 -0
- package/dist/src/approval/native.d.ts.map +1 -0
- package/dist/src/approval/native.js +196 -0
- package/dist/src/approval/native.js.map +1 -0
- package/dist/src/approval/store.d.ts +88 -0
- package/dist/src/approval/store.d.ts.map +1 -0
- package/dist/src/approval/store.js +192 -0
- package/dist/src/approval/store.js.map +1 -0
- package/dist/src/approval/types.d.ts +119 -0
- package/dist/src/approval/types.d.ts.map +1 -0
- package/dist/src/approval/types.js +6 -0
- package/dist/src/approval/types.js.map +1 -0
- package/dist/src/approval/webhook.d.ts +170 -0
- package/dist/src/approval/webhook.d.ts.map +1 -0
- package/dist/src/approval/webhook.js +362 -0
- package/dist/src/approval/webhook.js.map +1 -0
- package/dist/src/cli/commands/audit.d.ts +43 -0
- package/dist/src/cli/commands/audit.d.ts.map +1 -0
- package/dist/src/cli/commands/audit.js +115 -0
- package/dist/src/cli/commands/audit.js.map +1 -0
- package/dist/src/cli/commands/feedback.d.ts +27 -0
- package/dist/src/cli/commands/feedback.d.ts.map +1 -0
- package/dist/src/cli/commands/feedback.js +228 -0
- package/dist/src/cli/commands/feedback.js.map +1 -0
- package/dist/src/cli/commands/index.d.ts +11 -0
- package/dist/src/cli/commands/index.d.ts.map +1 -0
- package/dist/src/cli/commands/index.js +13 -0
- package/dist/src/cli/commands/index.js.map +1 -0
- package/dist/src/cli/commands/status.d.ts +20 -0
- package/dist/src/cli/commands/status.d.ts.map +1 -0
- package/dist/src/cli/commands/status.js +122 -0
- package/dist/src/cli/commands/status.js.map +1 -0
- package/dist/src/cli/commands/test.d.ts +23 -0
- package/dist/src/cli/commands/test.d.ts.map +1 -0
- package/dist/src/cli/commands/test.js +134 -0
- package/dist/src/cli/commands/test.js.map +1 -0
- package/dist/src/cli/commands/types.d.ts +81 -0
- package/dist/src/cli/commands/types.d.ts.map +1 -0
- package/dist/src/cli/commands/types.js +6 -0
- package/dist/src/cli/commands/types.js.map +1 -0
- package/dist/src/cli/index.d.ts +17 -0
- package/dist/src/cli/index.d.ts.map +1 -0
- package/dist/src/cli/index.js +267 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/config/defaults.d.ts +20 -0
- package/dist/src/config/defaults.d.ts.map +1 -0
- package/dist/src/config/defaults.js +123 -0
- package/dist/src/config/defaults.js.map +1 -0
- package/dist/src/config/index.d.ts +8 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/index.js +41 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/config/loader.d.ts +99 -0
- package/dist/src/config/loader.d.ts.map +1 -0
- package/dist/src/config/loader.js +242 -0
- package/dist/src/config/loader.js.map +1 -0
- package/dist/src/config/schema.d.ts +627 -0
- package/dist/src/config/schema.d.ts.map +1 -0
- package/dist/src/config/schema.js +585 -0
- package/dist/src/config/schema.js.map +1 -0
- package/dist/src/detectors/destructive/cloud-detector.d.ts +51 -0
- package/dist/src/detectors/destructive/cloud-detector.d.ts.map +1 -0
- package/dist/src/detectors/destructive/cloud-detector.js +556 -0
- package/dist/src/detectors/destructive/cloud-detector.js.map +1 -0
- package/dist/src/detectors/destructive/code-detector.d.ts +59 -0
- package/dist/src/detectors/destructive/code-detector.d.ts.map +1 -0
- package/dist/src/detectors/destructive/code-detector.js +558 -0
- package/dist/src/detectors/destructive/code-detector.js.map +1 -0
- package/dist/src/detectors/destructive/index.d.ts +54 -0
- package/dist/src/detectors/destructive/index.d.ts.map +1 -0
- package/dist/src/detectors/destructive/index.js +168 -0
- package/dist/src/detectors/destructive/index.js.map +1 -0
- package/dist/src/detectors/destructive/shell-detector.d.ts +43 -0
- package/dist/src/detectors/destructive/shell-detector.d.ts.map +1 -0
- package/dist/src/detectors/destructive/shell-detector.js +302 -0
- package/dist/src/detectors/destructive/shell-detector.js.map +1 -0
- package/dist/src/detectors/destructive/types.d.ts +143 -0
- package/dist/src/detectors/destructive/types.d.ts.map +1 -0
- package/dist/src/detectors/destructive/types.js +6 -0
- package/dist/src/detectors/destructive/types.js.map +1 -0
- package/dist/src/detectors/exfiltration/cloud-detector.d.ts +51 -0
- package/dist/src/detectors/exfiltration/cloud-detector.d.ts.map +1 -0
- package/dist/src/detectors/exfiltration/cloud-detector.js +427 -0
- package/dist/src/detectors/exfiltration/cloud-detector.js.map +1 -0
- package/dist/src/detectors/exfiltration/http-detector.d.ts +47 -0
- package/dist/src/detectors/exfiltration/http-detector.d.ts.map +1 -0
- package/dist/src/detectors/exfiltration/http-detector.js +429 -0
- package/dist/src/detectors/exfiltration/http-detector.js.map +1 -0
- package/dist/src/detectors/exfiltration/index.d.ts +44 -0
- package/dist/src/detectors/exfiltration/index.d.ts.map +1 -0
- package/dist/src/detectors/exfiltration/index.js +118 -0
- package/dist/src/detectors/exfiltration/index.js.map +1 -0
- package/dist/src/detectors/exfiltration/network-detector.d.ts +55 -0
- package/dist/src/detectors/exfiltration/network-detector.d.ts.map +1 -0
- package/dist/src/detectors/exfiltration/network-detector.js +504 -0
- package/dist/src/detectors/exfiltration/network-detector.js.map +1 -0
- package/dist/src/detectors/exfiltration/types.d.ts +139 -0
- package/dist/src/detectors/exfiltration/types.d.ts.map +1 -0
- package/dist/src/detectors/exfiltration/types.js +6 -0
- package/dist/src/detectors/exfiltration/types.js.map +1 -0
- package/dist/src/detectors/purchase/domain-detector.d.ts +44 -0
- package/dist/src/detectors/purchase/domain-detector.d.ts.map +1 -0
- package/dist/src/detectors/purchase/domain-detector.js +296 -0
- package/dist/src/detectors/purchase/domain-detector.js.map +1 -0
- package/dist/src/detectors/purchase/form-detector.d.ts +27 -0
- package/dist/src/detectors/purchase/form-detector.d.ts.map +1 -0
- package/dist/src/detectors/purchase/form-detector.js +344 -0
- package/dist/src/detectors/purchase/form-detector.js.map +1 -0
- package/dist/src/detectors/purchase/index.d.ts +65 -0
- package/dist/src/detectors/purchase/index.d.ts.map +1 -0
- package/dist/src/detectors/purchase/index.js +216 -0
- package/dist/src/detectors/purchase/index.js.map +1 -0
- package/dist/src/detectors/purchase/spend-tracker.d.ts +132 -0
- package/dist/src/detectors/purchase/spend-tracker.d.ts.map +1 -0
- package/dist/src/detectors/purchase/spend-tracker.js +313 -0
- package/dist/src/detectors/purchase/spend-tracker.js.map +1 -0
- package/dist/src/detectors/purchase/types.d.ts +139 -0
- package/dist/src/detectors/purchase/types.d.ts.map +1 -0
- package/dist/src/detectors/purchase/types.js +6 -0
- package/dist/src/detectors/purchase/types.js.map +1 -0
- package/dist/src/detectors/purchase/url-detector.d.ts +31 -0
- package/dist/src/detectors/purchase/url-detector.d.ts.map +1 -0
- package/dist/src/detectors/purchase/url-detector.js +292 -0
- package/dist/src/detectors/purchase/url-detector.js.map +1 -0
- package/dist/src/detectors/secrets/api-key-detector.d.ts +30 -0
- package/dist/src/detectors/secrets/api-key-detector.d.ts.map +1 -0
- package/dist/src/detectors/secrets/api-key-detector.js +297 -0
- package/dist/src/detectors/secrets/api-key-detector.js.map +1 -0
- package/dist/src/detectors/secrets/index.d.ts +43 -0
- package/dist/src/detectors/secrets/index.d.ts.map +1 -0
- package/dist/src/detectors/secrets/index.js +261 -0
- package/dist/src/detectors/secrets/index.js.map +1 -0
- package/dist/src/detectors/secrets/pii-detector.d.ts +54 -0
- package/dist/src/detectors/secrets/pii-detector.d.ts.map +1 -0
- package/dist/src/detectors/secrets/pii-detector.js +286 -0
- package/dist/src/detectors/secrets/pii-detector.js.map +1 -0
- package/dist/src/detectors/secrets/token-detector.d.ts +51 -0
- package/dist/src/detectors/secrets/token-detector.d.ts.map +1 -0
- package/dist/src/detectors/secrets/token-detector.js +233 -0
- package/dist/src/detectors/secrets/token-detector.js.map +1 -0
- package/dist/src/detectors/secrets/types.d.ts +157 -0
- package/dist/src/detectors/secrets/types.d.ts.map +1 -0
- package/dist/src/detectors/secrets/types.js +6 -0
- package/dist/src/detectors/secrets/types.js.map +1 -0
- package/dist/src/detectors/website/category-detector.d.ts +22 -0
- package/dist/src/detectors/website/category-detector.d.ts.map +1 -0
- package/dist/src/detectors/website/category-detector.js +162 -0
- package/dist/src/detectors/website/category-detector.js.map +1 -0
- package/dist/src/detectors/website/index.d.ts +53 -0
- package/dist/src/detectors/website/index.d.ts.map +1 -0
- package/dist/src/detectors/website/index.js +232 -0
- package/dist/src/detectors/website/index.js.map +1 -0
- package/dist/src/detectors/website/pattern-matcher.d.ts +33 -0
- package/dist/src/detectors/website/pattern-matcher.d.ts.map +1 -0
- package/dist/src/detectors/website/pattern-matcher.js +121 -0
- package/dist/src/detectors/website/pattern-matcher.js.map +1 -0
- package/dist/src/detectors/website/types.d.ts +105 -0
- package/dist/src/detectors/website/types.d.ts.map +1 -0
- package/dist/src/detectors/website/types.js +6 -0
- package/dist/src/detectors/website/types.js.map +1 -0
- package/dist/src/engine/analyzer.d.ts +87 -0
- package/dist/src/engine/analyzer.d.ts.map +1 -0
- package/dist/src/engine/analyzer.js +427 -0
- package/dist/src/engine/analyzer.js.map +1 -0
- package/dist/src/engine/cache.d.ts +80 -0
- package/dist/src/engine/cache.d.ts.map +1 -0
- package/dist/src/engine/cache.js +167 -0
- package/dist/src/engine/cache.js.map +1 -0
- package/dist/src/engine/index.d.ts +11 -0
- package/dist/src/engine/index.d.ts.map +1 -0
- package/dist/src/engine/index.js +11 -0
- package/dist/src/engine/index.js.map +1 -0
- package/dist/src/engine/llm-client.d.ts +210 -0
- package/dist/src/engine/llm-client.d.ts.map +1 -0
- package/dist/src/engine/llm-client.js +506 -0
- package/dist/src/engine/llm-client.js.map +1 -0
- package/dist/src/engine/types.d.ts +163 -0
- package/dist/src/engine/types.d.ts.map +1 -0
- package/dist/src/engine/types.js +21 -0
- package/dist/src/engine/types.js.map +1 -0
- package/dist/src/feedback/index.d.ts +9 -0
- package/dist/src/feedback/index.d.ts.map +1 -0
- package/dist/src/feedback/index.js +8 -0
- package/dist/src/feedback/index.js.map +1 -0
- package/dist/src/feedback/learner.d.ts +222 -0
- package/dist/src/feedback/learner.d.ts.map +1 -0
- package/dist/src/feedback/learner.js +401 -0
- package/dist/src/feedback/learner.js.map +1 -0
- package/dist/src/feedback/store.d.ts +113 -0
- package/dist/src/feedback/store.d.ts.map +1 -0
- package/dist/src/feedback/store.js +228 -0
- package/dist/src/feedback/store.js.map +1 -0
- package/dist/src/feedback/types.d.ts +126 -0
- package/dist/src/feedback/types.d.ts.map +1 -0
- package/dist/src/feedback/types.js +6 -0
- package/dist/src/feedback/types.js.map +1 -0
- package/dist/src/hooks/before-agent-start/handler.d.ts +37 -0
- package/dist/src/hooks/before-agent-start/handler.d.ts.map +1 -0
- package/dist/src/hooks/before-agent-start/handler.js +109 -0
- package/dist/src/hooks/before-agent-start/handler.js.map +1 -0
- package/dist/src/hooks/before-agent-start/index.d.ts +8 -0
- package/dist/src/hooks/before-agent-start/index.d.ts.map +1 -0
- package/dist/src/hooks/before-agent-start/index.js +7 -0
- package/dist/src/hooks/before-agent-start/index.js.map +1 -0
- package/dist/src/hooks/before-agent-start/prompts.d.ts +48 -0
- package/dist/src/hooks/before-agent-start/prompts.d.ts.map +1 -0
- package/dist/src/hooks/before-agent-start/prompts.js +103 -0
- package/dist/src/hooks/before-agent-start/prompts.js.map +1 -0
- package/dist/src/hooks/before-tool-call/handler.d.ts +42 -0
- package/dist/src/hooks/before-tool-call/handler.d.ts.map +1 -0
- package/dist/src/hooks/before-tool-call/handler.js +226 -0
- package/dist/src/hooks/before-tool-call/handler.js.map +1 -0
- package/dist/src/hooks/before-tool-call/index.d.ts +7 -0
- package/dist/src/hooks/before-tool-call/index.d.ts.map +1 -0
- package/dist/src/hooks/before-tool-call/index.js +6 -0
- package/dist/src/hooks/before-tool-call/index.js.map +1 -0
- package/dist/src/hooks/tool-result-persist/filter.d.ts +72 -0
- package/dist/src/hooks/tool-result-persist/filter.d.ts.map +1 -0
- package/dist/src/hooks/tool-result-persist/filter.js +305 -0
- package/dist/src/hooks/tool-result-persist/filter.js.map +1 -0
- package/dist/src/hooks/tool-result-persist/handler.d.ts +49 -0
- package/dist/src/hooks/tool-result-persist/handler.d.ts.map +1 -0
- package/dist/src/hooks/tool-result-persist/handler.js +217 -0
- package/dist/src/hooks/tool-result-persist/handler.js.map +1 -0
- package/dist/src/hooks/tool-result-persist/index.d.ts +11 -0
- package/dist/src/hooks/tool-result-persist/index.d.ts.map +1 -0
- package/dist/src/hooks/tool-result-persist/index.js +11 -0
- package/dist/src/hooks/tool-result-persist/index.js.map +1 -0
- package/dist/src/index.d.ts +256 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +222 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/notifications/discord.d.ts +10 -0
- package/dist/src/notifications/discord.d.ts.map +1 -0
- package/dist/src/notifications/discord.js +218 -0
- package/dist/src/notifications/discord.js.map +1 -0
- package/dist/src/notifications/index.d.ts +37 -0
- package/dist/src/notifications/index.d.ts.map +1 -0
- package/dist/src/notifications/index.js +68 -0
- package/dist/src/notifications/index.js.map +1 -0
- package/dist/src/notifications/slack.d.ts +10 -0
- package/dist/src/notifications/slack.d.ts.map +1 -0
- package/dist/src/notifications/slack.js +218 -0
- package/dist/src/notifications/slack.js.map +1 -0
- package/dist/src/notifications/telegram.d.ts +10 -0
- package/dist/src/notifications/telegram.d.ts.map +1 -0
- package/dist/src/notifications/telegram.js +242 -0
- package/dist/src/notifications/telegram.js.map +1 -0
- package/dist/src/notifications/types.d.ts +119 -0
- package/dist/src/notifications/types.d.ts.map +1 -0
- package/dist/src/notifications/types.js +6 -0
- package/dist/src/notifications/types.js.map +1 -0
- package/dist/src/proxy/index.d.ts +8 -0
- package/dist/src/proxy/index.d.ts.map +1 -0
- package/dist/src/proxy/index.js +9 -0
- package/dist/src/proxy/index.js.map +1 -0
- package/dist/src/proxy/middleware.d.ts +55 -0
- package/dist/src/proxy/middleware.d.ts.map +1 -0
- package/dist/src/proxy/middleware.js +215 -0
- package/dist/src/proxy/middleware.js.map +1 -0
- package/dist/src/proxy/server.d.ts +57 -0
- package/dist/src/proxy/server.d.ts.map +1 -0
- package/dist/src/proxy/server.js +298 -0
- package/dist/src/proxy/server.js.map +1 -0
- package/dist/src/proxy/types.d.ts +136 -0
- package/dist/src/proxy/types.d.ts.map +1 -0
- package/dist/src/proxy/types.js +6 -0
- package/dist/src/proxy/types.js.map +1 -0
- package/dist/src/sanitization/index.d.ts +10 -0
- package/dist/src/sanitization/index.d.ts.map +1 -0
- package/dist/src/sanitization/index.js +9 -0
- package/dist/src/sanitization/index.js.map +1 -0
- package/dist/src/sanitization/patterns.d.ts +51 -0
- package/dist/src/sanitization/patterns.d.ts.map +1 -0
- package/dist/src/sanitization/patterns.js +266 -0
- package/dist/src/sanitization/patterns.js.map +1 -0
- package/dist/src/sanitization/scanner.d.ts +29 -0
- package/dist/src/sanitization/scanner.d.ts.map +1 -0
- package/dist/src/sanitization/scanner.js +328 -0
- package/dist/src/sanitization/scanner.js.map +1 -0
- package/dist/src/sanitization/types.d.ts +57 -0
- package/dist/src/sanitization/types.d.ts.map +1 -0
- package/dist/src/sanitization/types.js +5 -0
- package/dist/src/sanitization/types.js.map +1 -0
- package/openclaw.plugin.json +114 -0
- package/package.json +63 -0
- package/rules/builtin/README.md +139 -0
- package/rules/builtin/ai-services.yaml +70 -0
- package/rules/builtin/api-keys.yaml +64 -0
- package/rules/builtin/authentication.yaml +56 -0
- package/rules/builtin/aws-security.yaml +57 -0
- package/rules/builtin/azure-security.yaml +58 -0
- package/rules/builtin/cicd-security.yaml +64 -0
- package/rules/builtin/cloud-storage.yaml +64 -0
- package/rules/builtin/container-registry.yaml +55 -0
- package/rules/builtin/crypto-wallets.yaml +71 -0
- package/rules/builtin/database-nosql.yaml +58 -0
- package/rules/builtin/database-sql.yaml +62 -0
- package/rules/builtin/development-env.yaml +67 -0
- package/rules/builtin/docker.yaml +57 -0
- package/rules/builtin/filesystem.yaml +71 -0
- package/rules/builtin/financial-pci.yaml +61 -0
- package/rules/builtin/gcp-security.yaml +57 -0
- package/rules/builtin/git-operations.yaml +68 -0
- package/rules/builtin/healthcare-hipaa.yaml +64 -0
- package/rules/builtin/kubernetes.yaml +60 -0
- package/rules/builtin/messaging-services.yaml +53 -0
- package/rules/builtin/minimal.yaml +47 -0
- package/rules/builtin/mobile-development.yaml +61 -0
- package/rules/builtin/monitoring.yaml +63 -0
- package/rules/builtin/network-security.yaml +57 -0
- package/rules/builtin/package-managers.yaml +74 -0
- package/rules/builtin/payment-processing.yaml +66 -0
- package/rules/builtin/pii-protection.yaml +48 -0
- package/rules/builtin/production-strict.yaml +55 -0
- package/rules/builtin/secrets-management.yaml +63 -0
- package/rules/builtin/serverless.yaml +74 -0
- package/rules/builtin/ssh-security.yaml +66 -0
- package/rules/builtin/terraform.yaml +51 -0
- package/rules/builtin/web-security.yaml +62 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Clawsec Built-in Rule Templates
|
|
2
|
+
|
|
3
|
+
This directory contains pre-built security rule templates for common use cases. You can use these as starting points for your own security configurations.
|
|
4
|
+
|
|
5
|
+
## Rule Templates
|
|
6
|
+
|
|
7
|
+
### Cloud Providers
|
|
8
|
+
| File | Description |
|
|
9
|
+
|------|-------------|
|
|
10
|
+
| `aws-security.yaml` | AWS operations protection (EC2, S3, IAM, RDS, etc.) |
|
|
11
|
+
| `gcp-security.yaml` | Google Cloud operations protection |
|
|
12
|
+
| `azure-security.yaml` | Azure operations protection |
|
|
13
|
+
|
|
14
|
+
### Infrastructure
|
|
15
|
+
| File | Description |
|
|
16
|
+
|------|-------------|
|
|
17
|
+
| `kubernetes.yaml` | Kubernetes cluster operations protection |
|
|
18
|
+
| `docker.yaml` | Docker container and image operations |
|
|
19
|
+
| `terraform.yaml` | Terraform/OpenTofu state and destroy operations |
|
|
20
|
+
| `serverless.yaml` | Serverless function deployment protection |
|
|
21
|
+
|
|
22
|
+
### Development
|
|
23
|
+
| File | Description |
|
|
24
|
+
|------|-------------|
|
|
25
|
+
| `git-operations.yaml` | Git force push, reset, and history rewriting |
|
|
26
|
+
| `cicd-security.yaml` | CI/CD pipeline secrets protection |
|
|
27
|
+
| `package-managers.yaml` | NPM, PyPI, Cargo, and other package managers |
|
|
28
|
+
| `mobile-development.yaml` | iOS/Android app signing and deployment |
|
|
29
|
+
|
|
30
|
+
### Data & Databases
|
|
31
|
+
| File | Description |
|
|
32
|
+
|------|-------------|
|
|
33
|
+
| `database-sql.yaml` | SQL database destructive operations |
|
|
34
|
+
| `database-nosql.yaml` | NoSQL (MongoDB, Redis, etc.) operations |
|
|
35
|
+
| `cloud-storage.yaml` | Cloud storage (S3, GCS, Azure Blob) protection |
|
|
36
|
+
|
|
37
|
+
### Secrets & Credentials
|
|
38
|
+
| File | Description |
|
|
39
|
+
|------|-------------|
|
|
40
|
+
| `api-keys.yaml` | Common API key patterns (OpenAI, GitHub, etc.) |
|
|
41
|
+
| `authentication.yaml` | Auth tokens, JWTs, passwords |
|
|
42
|
+
| `secrets-management.yaml` | Vault, AWS Secrets Manager, etc. |
|
|
43
|
+
| `container-registry.yaml` | Docker Hub, ECR, GCR credentials |
|
|
44
|
+
|
|
45
|
+
### Security & Compliance
|
|
46
|
+
| File | Description |
|
|
47
|
+
|------|-------------|
|
|
48
|
+
| `pii-protection.yaml` | Personal identifiable information |
|
|
49
|
+
| `healthcare-hipaa.yaml` | HIPAA-compliant healthcare rules |
|
|
50
|
+
| `financial-pci.yaml` | PCI-DSS compliant financial rules |
|
|
51
|
+
| `crypto-wallets.yaml` | Cryptocurrency wallet and exchange protection |
|
|
52
|
+
|
|
53
|
+
### Network & Web
|
|
54
|
+
| File | Description |
|
|
55
|
+
|------|-------------|
|
|
56
|
+
| `network-security.yaml` | Network-based attacks and exfiltration |
|
|
57
|
+
| `web-security.yaml` | Web application security |
|
|
58
|
+
| `ssh-security.yaml` | SSH credentials and tunneling |
|
|
59
|
+
|
|
60
|
+
### Services
|
|
61
|
+
| File | Description |
|
|
62
|
+
|------|-------------|
|
|
63
|
+
| `payment-processing.yaml` | Stripe, PayPal, payment gateway protection |
|
|
64
|
+
| `messaging-services.yaml` | Slack, Discord, Telegram tokens |
|
|
65
|
+
| `monitoring.yaml` | Datadog, New Relic, Sentry credentials |
|
|
66
|
+
| `ai-services.yaml` | OpenAI, Anthropic, Hugging Face API keys |
|
|
67
|
+
|
|
68
|
+
### Environment Presets
|
|
69
|
+
| File | Description |
|
|
70
|
+
|------|-------------|
|
|
71
|
+
| `minimal.yaml` | Lightweight rules for trusted environments |
|
|
72
|
+
| `development-env.yaml` | Balanced rules for development |
|
|
73
|
+
| `production-strict.yaml` | Maximum security for production |
|
|
74
|
+
| `filesystem.yaml` | Dangerous filesystem operations |
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
### Reference in clawsec.yaml
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
# clawsec.yaml
|
|
82
|
+
version: "1.0"
|
|
83
|
+
|
|
84
|
+
# Extend from a built-in template
|
|
85
|
+
extends:
|
|
86
|
+
- builtin/aws-security
|
|
87
|
+
- builtin/pii-protection
|
|
88
|
+
|
|
89
|
+
# Override specific settings
|
|
90
|
+
rules:
|
|
91
|
+
purchase:
|
|
92
|
+
spendLimits:
|
|
93
|
+
perTransaction: 200
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Copy and Customize
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Copy a template to your project
|
|
100
|
+
cp rules/builtin/production-strict.yaml clawsec.yaml
|
|
101
|
+
|
|
102
|
+
# Edit to customize for your needs
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Creating Custom Rules
|
|
106
|
+
|
|
107
|
+
Use these templates as references when creating your own rules. The structure includes:
|
|
108
|
+
|
|
109
|
+
- `name`: Unique identifier for the rule set
|
|
110
|
+
- `description`: Human-readable description
|
|
111
|
+
- `version`: Template version
|
|
112
|
+
- `rules`: Security rules configuration
|
|
113
|
+
- `destructive`: Dangerous operations (shell, cloud, code)
|
|
114
|
+
- `secrets`: Credential and secret patterns
|
|
115
|
+
- `website`: URL allowlist/blocklist
|
|
116
|
+
- `purchase`: Payment protection
|
|
117
|
+
- `exfiltration`: Data exfiltration patterns
|
|
118
|
+
- `sanitization`: Prompt injection protection
|
|
119
|
+
|
|
120
|
+
## Contributing
|
|
121
|
+
|
|
122
|
+
To add a new rule template:
|
|
123
|
+
|
|
124
|
+
1. Create a YAML file in this directory
|
|
125
|
+
2. Follow the naming convention: `category-subcategory.yaml`
|
|
126
|
+
3. Include `name`, `description`, and `version` fields
|
|
127
|
+
4. Add comprehensive patterns for the use case
|
|
128
|
+
5. Update this README with the new template
|
|
129
|
+
|
|
130
|
+
## Security Levels
|
|
131
|
+
|
|
132
|
+
Templates use these severity and action combinations:
|
|
133
|
+
|
|
134
|
+
| Environment | Severity | Action | Description |
|
|
135
|
+
|-------------|----------|--------|-------------|
|
|
136
|
+
| Production | critical | block | Maximum protection |
|
|
137
|
+
| Staging | high | confirm | Requires approval |
|
|
138
|
+
| Development | medium | warn | Logs warnings |
|
|
139
|
+
| Testing | low | log | Silent audit |
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# AI Services Security Rules
|
|
2
|
+
# Protects AI/ML service credentials
|
|
3
|
+
|
|
4
|
+
name: ai-services
|
|
5
|
+
description: Security rules for AI and ML services
|
|
6
|
+
version: "1.0"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
secrets:
|
|
10
|
+
enabled: true
|
|
11
|
+
severity: critical
|
|
12
|
+
action: block
|
|
13
|
+
patterns:
|
|
14
|
+
# OpenAI
|
|
15
|
+
- "sk-[a-zA-Z0-9]{48}"
|
|
16
|
+
- "sk-proj-[a-zA-Z0-9-_]{48,}"
|
|
17
|
+
- "OPENAI_API_KEY"
|
|
18
|
+
- "OPENAI_ORG_ID"
|
|
19
|
+
|
|
20
|
+
# Anthropic
|
|
21
|
+
- "sk-ant-[a-zA-Z0-9-]{40,}"
|
|
22
|
+
- "ANTHROPIC_API_KEY"
|
|
23
|
+
|
|
24
|
+
# Google AI (Gemini, PaLM)
|
|
25
|
+
- "GOOGLE_AI_API_KEY"
|
|
26
|
+
- "PALM_API_KEY"
|
|
27
|
+
- "GEMINI_API_KEY"
|
|
28
|
+
|
|
29
|
+
# Cohere
|
|
30
|
+
- "COHERE_API_KEY"
|
|
31
|
+
|
|
32
|
+
# Hugging Face
|
|
33
|
+
- "hf_[a-zA-Z0-9]{34}"
|
|
34
|
+
- "HUGGINGFACE_TOKEN"
|
|
35
|
+
- "HF_TOKEN"
|
|
36
|
+
|
|
37
|
+
# Replicate
|
|
38
|
+
- "REPLICATE_API_TOKEN"
|
|
39
|
+
- "r8_[a-zA-Z0-9]{40}"
|
|
40
|
+
|
|
41
|
+
# Stability AI
|
|
42
|
+
- "STABILITY_API_KEY"
|
|
43
|
+
|
|
44
|
+
# Midjourney
|
|
45
|
+
- "MIDJOURNEY_"
|
|
46
|
+
|
|
47
|
+
# ElevenLabs
|
|
48
|
+
- "ELEVENLABS_API_KEY"
|
|
49
|
+
|
|
50
|
+
# AssemblyAI
|
|
51
|
+
- "ASSEMBLYAI_API_KEY"
|
|
52
|
+
|
|
53
|
+
# Deepgram
|
|
54
|
+
- "DEEPGRAM_API_KEY"
|
|
55
|
+
|
|
56
|
+
# AWS Bedrock
|
|
57
|
+
- "bedrock:InvokeModel"
|
|
58
|
+
|
|
59
|
+
# Azure OpenAI
|
|
60
|
+
- "AZURE_OPENAI_API_KEY"
|
|
61
|
+
- "AZURE_OPENAI_ENDPOINT"
|
|
62
|
+
|
|
63
|
+
website:
|
|
64
|
+
enabled: true
|
|
65
|
+
mode: allowlist
|
|
66
|
+
allowlist:
|
|
67
|
+
- "api.openai.com"
|
|
68
|
+
- "api.anthropic.com"
|
|
69
|
+
- "api.cohere.ai"
|
|
70
|
+
- "api-inference.huggingface.co"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# API Keys Security Rules
|
|
2
|
+
# Detects and blocks exposure of various API keys
|
|
3
|
+
|
|
4
|
+
name: api-keys
|
|
5
|
+
description: Prevents exposure of API keys from popular services
|
|
6
|
+
version: "1.0"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
secrets:
|
|
10
|
+
enabled: true
|
|
11
|
+
severity: critical
|
|
12
|
+
action: block
|
|
13
|
+
patterns:
|
|
14
|
+
# OpenAI
|
|
15
|
+
- "sk-[a-zA-Z0-9]{48}"
|
|
16
|
+
- "sk-proj-[a-zA-Z0-9-_]{48,}"
|
|
17
|
+
|
|
18
|
+
# Anthropic
|
|
19
|
+
- "sk-ant-[a-zA-Z0-9-]{40,}"
|
|
20
|
+
|
|
21
|
+
# Google
|
|
22
|
+
- "AIza[0-9A-Za-z_-]{35}"
|
|
23
|
+
- "ya29\\.[0-9A-Za-z_-]+"
|
|
24
|
+
|
|
25
|
+
# GitHub
|
|
26
|
+
- "ghp_[a-zA-Z0-9]{36}"
|
|
27
|
+
- "gho_[a-zA-Z0-9]{36}"
|
|
28
|
+
- "ghu_[a-zA-Z0-9]{36}"
|
|
29
|
+
- "ghs_[a-zA-Z0-9]{36}"
|
|
30
|
+
- "ghr_[a-zA-Z0-9]{36}"
|
|
31
|
+
|
|
32
|
+
# Slack
|
|
33
|
+
- "xox[baprs]-[0-9]{10,}-[0-9]{10,}-[a-zA-Z0-9]{24,}"
|
|
34
|
+
|
|
35
|
+
# Twilio
|
|
36
|
+
- "SK[a-f0-9]{32}"
|
|
37
|
+
- "AC[a-f0-9]{32}"
|
|
38
|
+
|
|
39
|
+
# SendGrid
|
|
40
|
+
- "SG\\.[a-zA-Z0-9_-]{22}\\.[a-zA-Z0-9_-]{43}"
|
|
41
|
+
|
|
42
|
+
# Mailgun
|
|
43
|
+
- "key-[a-zA-Z0-9]{32}"
|
|
44
|
+
|
|
45
|
+
# NPM
|
|
46
|
+
- "npm_[a-zA-Z0-9]{36}"
|
|
47
|
+
|
|
48
|
+
# PyPI
|
|
49
|
+
- "pypi-AgEIcHlwaS5vcmc[a-zA-Z0-9-_]{50,}"
|
|
50
|
+
|
|
51
|
+
# Heroku
|
|
52
|
+
- "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"
|
|
53
|
+
|
|
54
|
+
# Datadog
|
|
55
|
+
- "[a-f0-9]{32}"
|
|
56
|
+
|
|
57
|
+
# New Relic
|
|
58
|
+
- "NRAK-[A-Z0-9]{27}"
|
|
59
|
+
|
|
60
|
+
# Algolia
|
|
61
|
+
- "[a-f0-9]{32}"
|
|
62
|
+
|
|
63
|
+
# Firebase
|
|
64
|
+
- "AAAA[A-Za-z0-9_-]{7}:[A-Za-z0-9_-]{140}"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Authentication Security Rules
|
|
2
|
+
# Protects authentication credentials and tokens
|
|
3
|
+
|
|
4
|
+
name: authentication
|
|
5
|
+
description: Protects authentication credentials and sensitive tokens
|
|
6
|
+
version: "1.0"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
secrets:
|
|
10
|
+
enabled: true
|
|
11
|
+
severity: critical
|
|
12
|
+
action: block
|
|
13
|
+
patterns:
|
|
14
|
+
# JWT Tokens
|
|
15
|
+
- "eyJ[a-zA-Z0-9_-]*\\.eyJ[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]*"
|
|
16
|
+
|
|
17
|
+
# API Keys (generic patterns)
|
|
18
|
+
- "api[_-]?key\\s*[:=]\\s*['\"]?[a-zA-Z0-9_-]{20,}['\"]?"
|
|
19
|
+
- "api[_-]?secret\\s*[:=]\\s*['\"]?[a-zA-Z0-9_-]{20,}['\"]?"
|
|
20
|
+
|
|
21
|
+
# OAuth tokens
|
|
22
|
+
- "access[_-]?token\\s*[:=]\\s*['\"]?[a-zA-Z0-9_-]{20,}['\"]?"
|
|
23
|
+
- "refresh[_-]?token\\s*[:=]\\s*['\"]?[a-zA-Z0-9_-]{20,}['\"]?"
|
|
24
|
+
|
|
25
|
+
# Session tokens
|
|
26
|
+
- "session[_-]?id\\s*[:=]\\s*['\"]?[a-zA-Z0-9_-]{20,}['\"]?"
|
|
27
|
+
- "PHPSESSID"
|
|
28
|
+
- "JSESSIONID"
|
|
29
|
+
- "ASP.NET_SessionId"
|
|
30
|
+
|
|
31
|
+
# Password patterns
|
|
32
|
+
- "password\\s*[:=]\\s*['\"]?[^\\s'\"]{8,}['\"]?"
|
|
33
|
+
- "passwd\\s*[:=]\\s*['\"]?[^\\s'\"]{8,}['\"]?"
|
|
34
|
+
- "pwd\\s*[:=]\\s*['\"]?[^\\s'\"]{8,}['\"]?"
|
|
35
|
+
|
|
36
|
+
# Private keys
|
|
37
|
+
- "-----BEGIN.*PRIVATE KEY-----"
|
|
38
|
+
- "-----BEGIN RSA PRIVATE KEY-----"
|
|
39
|
+
- "-----BEGIN EC PRIVATE KEY-----"
|
|
40
|
+
- "-----BEGIN OPENSSH PRIVATE KEY-----"
|
|
41
|
+
|
|
42
|
+
# SSH keys
|
|
43
|
+
- "ssh-rsa AAAA"
|
|
44
|
+
- "ssh-ed25519 AAAA"
|
|
45
|
+
|
|
46
|
+
# Bearer tokens
|
|
47
|
+
- "Bearer\\s+[a-zA-Z0-9_-]{20,}"
|
|
48
|
+
- "Authorization:\\s*Bearer"
|
|
49
|
+
|
|
50
|
+
exfiltration:
|
|
51
|
+
enabled: true
|
|
52
|
+
severity: high
|
|
53
|
+
action: block
|
|
54
|
+
patterns:
|
|
55
|
+
- "curl.*Authorization"
|
|
56
|
+
- "wget.*--header.*Authorization"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# AWS Security Rules
|
|
2
|
+
# Protects against dangerous AWS operations
|
|
3
|
+
|
|
4
|
+
name: aws-security
|
|
5
|
+
description: Prevents destructive AWS operations like instance termination and data deletion
|
|
6
|
+
version: "1.0"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
destructive:
|
|
10
|
+
enabled: true
|
|
11
|
+
severity: critical
|
|
12
|
+
action: block
|
|
13
|
+
cloud:
|
|
14
|
+
enabled: true
|
|
15
|
+
patterns:
|
|
16
|
+
# EC2 Operations
|
|
17
|
+
- "aws ec2 terminate-instances"
|
|
18
|
+
- "aws ec2 delete-"
|
|
19
|
+
- "aws ec2 modify-instance-attribute --disable-api-termination false"
|
|
20
|
+
|
|
21
|
+
# S3 Operations
|
|
22
|
+
- "aws s3 rb --force"
|
|
23
|
+
- "aws s3 rm --recursive"
|
|
24
|
+
- "aws s3api delete-bucket"
|
|
25
|
+
- "aws s3api delete-objects"
|
|
26
|
+
|
|
27
|
+
# IAM Operations
|
|
28
|
+
- "aws iam delete-user"
|
|
29
|
+
- "aws iam delete-role"
|
|
30
|
+
- "aws iam delete-policy"
|
|
31
|
+
- "aws iam delete-access-key"
|
|
32
|
+
|
|
33
|
+
# RDS Operations
|
|
34
|
+
- "aws rds delete-db-instance"
|
|
35
|
+
- "aws rds delete-db-cluster"
|
|
36
|
+
- "aws rds delete-db-snapshot"
|
|
37
|
+
|
|
38
|
+
# Lambda Operations
|
|
39
|
+
- "aws lambda delete-function"
|
|
40
|
+
- "aws lambda delete-layer-version"
|
|
41
|
+
|
|
42
|
+
# CloudFormation
|
|
43
|
+
- "aws cloudformation delete-stack"
|
|
44
|
+
|
|
45
|
+
# EKS/ECS
|
|
46
|
+
- "aws eks delete-cluster"
|
|
47
|
+
- "aws ecs delete-cluster"
|
|
48
|
+
- "aws ecs delete-service"
|
|
49
|
+
|
|
50
|
+
secrets:
|
|
51
|
+
enabled: true
|
|
52
|
+
severity: critical
|
|
53
|
+
action: block
|
|
54
|
+
patterns:
|
|
55
|
+
- "AKIA[0-9A-Z]{16}" # AWS Access Key ID
|
|
56
|
+
- "aws_secret_access_key"
|
|
57
|
+
- "AWS_SECRET_ACCESS_KEY"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Azure Security Rules
|
|
2
|
+
# Protects against dangerous Azure operations
|
|
3
|
+
|
|
4
|
+
name: azure-security
|
|
5
|
+
description: Prevents destructive Azure operations
|
|
6
|
+
version: "1.0"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
destructive:
|
|
10
|
+
enabled: true
|
|
11
|
+
severity: critical
|
|
12
|
+
action: block
|
|
13
|
+
cloud:
|
|
14
|
+
enabled: true
|
|
15
|
+
patterns:
|
|
16
|
+
# Virtual Machines
|
|
17
|
+
- "az vm delete"
|
|
18
|
+
- "az vm deallocate"
|
|
19
|
+
- "az vmss delete"
|
|
20
|
+
|
|
21
|
+
# Storage
|
|
22
|
+
- "az storage account delete"
|
|
23
|
+
- "az storage container delete"
|
|
24
|
+
- "az storage blob delete"
|
|
25
|
+
- "azcopy remove --recursive"
|
|
26
|
+
|
|
27
|
+
# Resource Groups
|
|
28
|
+
- "az group delete"
|
|
29
|
+
|
|
30
|
+
# Databases
|
|
31
|
+
- "az sql server delete"
|
|
32
|
+
- "az sql db delete"
|
|
33
|
+
- "az cosmosdb delete"
|
|
34
|
+
- "az postgres server delete"
|
|
35
|
+
- "az mysql server delete"
|
|
36
|
+
|
|
37
|
+
# AKS
|
|
38
|
+
- "az aks delete"
|
|
39
|
+
- "az aks nodepool delete"
|
|
40
|
+
|
|
41
|
+
# Functions
|
|
42
|
+
- "az functionapp delete"
|
|
43
|
+
|
|
44
|
+
# App Service
|
|
45
|
+
- "az webapp delete"
|
|
46
|
+
|
|
47
|
+
# Key Vault
|
|
48
|
+
- "az keyvault delete"
|
|
49
|
+
- "az keyvault secret delete"
|
|
50
|
+
|
|
51
|
+
secrets:
|
|
52
|
+
enabled: true
|
|
53
|
+
severity: critical
|
|
54
|
+
action: block
|
|
55
|
+
patterns:
|
|
56
|
+
- "AZURE_CLIENT_SECRET"
|
|
57
|
+
- "AZURE_TENANT_ID"
|
|
58
|
+
- "AZURE_SUBSCRIPTION_ID"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# CI/CD Security Rules
|
|
2
|
+
# Protects CI/CD pipelines and related secrets
|
|
3
|
+
|
|
4
|
+
name: cicd-security
|
|
5
|
+
description: Security rules for CI/CD pipelines and automation
|
|
6
|
+
version: "1.0"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
secrets:
|
|
10
|
+
enabled: true
|
|
11
|
+
severity: critical
|
|
12
|
+
action: block
|
|
13
|
+
patterns:
|
|
14
|
+
# GitHub Actions
|
|
15
|
+
- "GITHUB_TOKEN"
|
|
16
|
+
- "ACTIONS_RUNTIME_TOKEN"
|
|
17
|
+
- "GITHUB_SHA"
|
|
18
|
+
|
|
19
|
+
# GitLab CI
|
|
20
|
+
- "CI_JOB_TOKEN"
|
|
21
|
+
- "CI_REGISTRY_PASSWORD"
|
|
22
|
+
- "GITLAB_TOKEN"
|
|
23
|
+
- "glpat-[a-zA-Z0-9-]{20}"
|
|
24
|
+
|
|
25
|
+
# Jenkins
|
|
26
|
+
- "JENKINS_API_TOKEN"
|
|
27
|
+
- "JENKINS_USER"
|
|
28
|
+
|
|
29
|
+
# CircleCI
|
|
30
|
+
- "CIRCLE_TOKEN"
|
|
31
|
+
- "CIRCLECI_TOKEN"
|
|
32
|
+
|
|
33
|
+
# Travis CI
|
|
34
|
+
- "TRAVIS_TOKEN"
|
|
35
|
+
|
|
36
|
+
# AWS CodeBuild
|
|
37
|
+
- "CODEBUILD_RESOLVED_SOURCE_VERSION"
|
|
38
|
+
|
|
39
|
+
# Azure DevOps
|
|
40
|
+
- "SYSTEM_ACCESSTOKEN"
|
|
41
|
+
- "AZURE_DEVOPS_EXT_PAT"
|
|
42
|
+
|
|
43
|
+
# Bitbucket
|
|
44
|
+
- "BITBUCKET_APP_PASSWORD"
|
|
45
|
+
- "BITBUCKET_CLONE_PASSWORD"
|
|
46
|
+
|
|
47
|
+
# Vercel
|
|
48
|
+
- "VERCEL_TOKEN"
|
|
49
|
+
|
|
50
|
+
# Netlify
|
|
51
|
+
- "NETLIFY_AUTH_TOKEN"
|
|
52
|
+
|
|
53
|
+
# Fly.io
|
|
54
|
+
- "FLY_API_TOKEN"
|
|
55
|
+
|
|
56
|
+
destructive:
|
|
57
|
+
enabled: true
|
|
58
|
+
severity: high
|
|
59
|
+
action: confirm
|
|
60
|
+
patterns:
|
|
61
|
+
- "gh workflow disable"
|
|
62
|
+
- "gh repo delete"
|
|
63
|
+
- "vercel remove"
|
|
64
|
+
- "netlify sites:delete"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Cloud Storage Security Rules
|
|
2
|
+
# Protects cloud storage operations and credentials
|
|
3
|
+
|
|
4
|
+
name: cloud-storage
|
|
5
|
+
description: Security rules for cloud storage services
|
|
6
|
+
version: "1.0"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
secrets:
|
|
10
|
+
enabled: true
|
|
11
|
+
severity: critical
|
|
12
|
+
action: block
|
|
13
|
+
patterns:
|
|
14
|
+
# AWS S3
|
|
15
|
+
- "s3://.*access.*key"
|
|
16
|
+
- "AWS_ACCESS_KEY_ID"
|
|
17
|
+
- "AWS_SECRET_ACCESS_KEY"
|
|
18
|
+
|
|
19
|
+
# Google Cloud Storage
|
|
20
|
+
- "gs://.*credentials"
|
|
21
|
+
- "GOOGLE_CLOUD_KEYFILE"
|
|
22
|
+
|
|
23
|
+
# Azure Blob Storage
|
|
24
|
+
- "DefaultEndpointsProtocol=https;AccountName="
|
|
25
|
+
- "AZURE_STORAGE_CONNECTION_STRING"
|
|
26
|
+
- "AZURE_STORAGE_KEY"
|
|
27
|
+
|
|
28
|
+
# Cloudflare R2
|
|
29
|
+
- "CLOUDFLARE_R2_ACCESS_KEY"
|
|
30
|
+
|
|
31
|
+
# DigitalOcean Spaces
|
|
32
|
+
- "SPACES_ACCESS_KEY"
|
|
33
|
+
- "SPACES_SECRET_KEY"
|
|
34
|
+
|
|
35
|
+
# Backblaze B2
|
|
36
|
+
- "B2_APPLICATION_KEY"
|
|
37
|
+
- "B2_APPLICATION_KEY_ID"
|
|
38
|
+
|
|
39
|
+
# Wasabi
|
|
40
|
+
- "WASABI_ACCESS_KEY"
|
|
41
|
+
|
|
42
|
+
exfiltration:
|
|
43
|
+
enabled: true
|
|
44
|
+
severity: high
|
|
45
|
+
action: block
|
|
46
|
+
patterns:
|
|
47
|
+
# Upload to public buckets
|
|
48
|
+
- "aws s3 cp.*--acl public-read"
|
|
49
|
+
- "gsutil cp.*-a public-read"
|
|
50
|
+
- "aws s3 sync.*--acl public-read"
|
|
51
|
+
|
|
52
|
+
# Data transfer to external storage
|
|
53
|
+
- "rclone copy.*:"
|
|
54
|
+
- "rclone sync.*:"
|
|
55
|
+
|
|
56
|
+
destructive:
|
|
57
|
+
enabled: true
|
|
58
|
+
severity: critical
|
|
59
|
+
action: confirm
|
|
60
|
+
patterns:
|
|
61
|
+
- "aws s3 rm --recursive"
|
|
62
|
+
- "aws s3 rb --force"
|
|
63
|
+
- "gsutil rm -r"
|
|
64
|
+
- "az storage blob delete-batch"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Container Registry Security Rules
|
|
2
|
+
# Protects container registry credentials and operations
|
|
3
|
+
|
|
4
|
+
name: container-registry
|
|
5
|
+
description: Security rules for container registries
|
|
6
|
+
version: "1.0"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
secrets:
|
|
10
|
+
enabled: true
|
|
11
|
+
severity: critical
|
|
12
|
+
action: block
|
|
13
|
+
patterns:
|
|
14
|
+
# Docker Hub
|
|
15
|
+
- "DOCKER_PASSWORD"
|
|
16
|
+
- "DOCKER_AUTH_CONFIG"
|
|
17
|
+
- "DOCKERHUB_TOKEN"
|
|
18
|
+
|
|
19
|
+
# AWS ECR
|
|
20
|
+
- "aws ecr get-login-password"
|
|
21
|
+
- "AWS_ECR_LOGIN_TOKEN"
|
|
22
|
+
|
|
23
|
+
# Google Container Registry
|
|
24
|
+
- "GCR_KEY"
|
|
25
|
+
- "_json_key"
|
|
26
|
+
|
|
27
|
+
# Azure Container Registry
|
|
28
|
+
- "ACR_PASSWORD"
|
|
29
|
+
- "AZURE_CONTAINER_REGISTRY_PASSWORD"
|
|
30
|
+
|
|
31
|
+
# GitHub Container Registry
|
|
32
|
+
- "GHCR_TOKEN"
|
|
33
|
+
|
|
34
|
+
# Quay.io
|
|
35
|
+
- "QUAY_TOKEN"
|
|
36
|
+
- "QUAY_PASSWORD"
|
|
37
|
+
|
|
38
|
+
# Harbor
|
|
39
|
+
- "HARBOR_PASSWORD"
|
|
40
|
+
|
|
41
|
+
# JFrog Artifactory
|
|
42
|
+
- "ARTIFACTORY_API_KEY"
|
|
43
|
+
- "JFROG_PASSWORD"
|
|
44
|
+
|
|
45
|
+
destructive:
|
|
46
|
+
enabled: true
|
|
47
|
+
severity: high
|
|
48
|
+
action: confirm
|
|
49
|
+
patterns:
|
|
50
|
+
# Image deletion
|
|
51
|
+
- "docker rmi.*:latest"
|
|
52
|
+
- "docker push.*:latest"
|
|
53
|
+
- "aws ecr batch-delete-image"
|
|
54
|
+
- "gcloud container images delete"
|
|
55
|
+
- "az acr repository delete"
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Cryptocurrency Wallet Security Rules
|
|
2
|
+
# Protects cryptocurrency wallet credentials and operations
|
|
3
|
+
|
|
4
|
+
name: crypto-wallets
|
|
5
|
+
description: Security rules for cryptocurrency wallets and exchanges
|
|
6
|
+
version: "1.0"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
secrets:
|
|
10
|
+
enabled: true
|
|
11
|
+
severity: critical
|
|
12
|
+
action: block
|
|
13
|
+
patterns:
|
|
14
|
+
# Private keys (Ethereum/Bitcoin hex format)
|
|
15
|
+
- "[0-9a-fA-F]{64}"
|
|
16
|
+
|
|
17
|
+
# Mnemonic seed phrases (12/24 words)
|
|
18
|
+
- "(?i)(abandon|ability|able|about|above).*(?:word|seed|mnemonic)"
|
|
19
|
+
|
|
20
|
+
# Wallet seed/private key mentions
|
|
21
|
+
- "(?i)private[_\\s-]?key\\s*[:=]"
|
|
22
|
+
- "(?i)seed[_\\s-]?phrase\\s*[:=]"
|
|
23
|
+
- "(?i)mnemonic\\s*[:=]"
|
|
24
|
+
- "(?i)secret[_\\s-]?key\\s*[:=]"
|
|
25
|
+
|
|
26
|
+
# Exchange API keys
|
|
27
|
+
# Binance
|
|
28
|
+
- "BINANCE_API_KEY"
|
|
29
|
+
- "BINANCE_SECRET"
|
|
30
|
+
|
|
31
|
+
# Coinbase
|
|
32
|
+
- "COINBASE_API_KEY"
|
|
33
|
+
- "COINBASE_SECRET"
|
|
34
|
+
- "CB_ACCESS_KEY"
|
|
35
|
+
|
|
36
|
+
# Kraken
|
|
37
|
+
- "KRAKEN_API_KEY"
|
|
38
|
+
- "KRAKEN_SECRET"
|
|
39
|
+
|
|
40
|
+
# FTX (historical)
|
|
41
|
+
- "FTX_API_KEY"
|
|
42
|
+
|
|
43
|
+
# Kucoin
|
|
44
|
+
- "KUCOIN_API_KEY"
|
|
45
|
+
|
|
46
|
+
# Metamask
|
|
47
|
+
- "METAMASK_"
|
|
48
|
+
|
|
49
|
+
# WalletConnect
|
|
50
|
+
- "WALLETCONNECT_"
|
|
51
|
+
|
|
52
|
+
# Infura
|
|
53
|
+
- "INFURA_API_KEY"
|
|
54
|
+
- "INFURA_PROJECT_ID"
|
|
55
|
+
|
|
56
|
+
# Alchemy
|
|
57
|
+
- "ALCHEMY_API_KEY"
|
|
58
|
+
|
|
59
|
+
purchase:
|
|
60
|
+
enabled: true
|
|
61
|
+
severity: critical
|
|
62
|
+
action: block
|
|
63
|
+
domains:
|
|
64
|
+
mode: blocklist
|
|
65
|
+
blocklist:
|
|
66
|
+
- "*.binance.com"
|
|
67
|
+
- "*.coinbase.com"
|
|
68
|
+
- "*.kraken.com"
|
|
69
|
+
- "*.kucoin.com"
|
|
70
|
+
- "*.crypto.com"
|
|
71
|
+
- "*.gemini.com"
|