damage-control-dev 0.1.0__py3-none-any.whl
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.
- damage_control/__init__.py +9 -0
- damage_control/__main__.py +7 -0
- damage_control/adapter.py +179 -0
- damage_control/audit.py +432 -0
- damage_control/breakglass.py +155 -0
- damage_control/claude_code.py +148 -0
- damage_control/cli.py +173 -0
- damage_control/engine.py +10656 -0
- damage_control/groups.py +114 -0
- damage_control/harness_config.py +205 -0
- damage_control/hook.py +54 -0
- damage_control/install.py +618 -0
- damage_control/packs.py +219 -0
- damage_control/policy.py +323 -0
- damage_control/profile.py +177 -0
- damage_control/rules/aws.json +85 -0
- damage_control/rules/aws.yaml +76 -0
- damage_control/rules/cloud-hosting.json +162 -0
- damage_control/rules/cloud-hosting.yaml +163 -0
- damage_control/rules/containers.json +67 -0
- damage_control/rules/containers.yaml +69 -0
- damage_control/rules/control-plane.json +7 -0
- damage_control/rules/control-plane.yaml +21 -0
- damage_control/rules/core.json +332 -0
- damage_control/rules/core.yaml +441 -0
- damage_control/rules/databases.json +117 -0
- damage_control/rules/databases.yaml +123 -0
- damage_control/rules/firebase.json +34 -0
- damage_control/rules/firebase.yaml +30 -0
- damage_control/rules/gcp.json +60 -0
- damage_control/rules/gcp.yaml +57 -0
- damage_control/rules/git.json +119 -0
- damage_control/rules/git.yaml +120 -0
- damage_control/rules/infrastructure.json +69 -0
- damage_control/rules/infrastructure.yaml +66 -0
- damage_control/rules/mcp-tools.json +11 -0
- damage_control/rules/mcp-tools.yaml +47 -0
- damage_control/rules/outbound.json +40 -0
- damage_control/rules/outbound.yaml +58 -0
- damage_control/rules/payloads.json +120 -0
- damage_control/rules/payloads.yaml +155 -0
- damage_control/rules/publish.json +46 -0
- damage_control/rules/publish.yaml +46 -0
- damage_control/rules/registry.json +10 -0
- damage_control/rules/registry.yaml +11 -0
- damage_control/rules/remote.json +31 -0
- damage_control/rules/remote.yaml +53 -0
- damage_control/rules/tmux.json +17 -0
- damage_control/rules/tmux.yaml +16 -0
- damage_control/ruleset.py +94 -0
- damage_control/tooldefs/aws.json +140 -0
- damage_control/tooldefs/aws.yaml +119 -0
- damage_control/tooldefs/docker.json +146 -0
- damage_control/tooldefs/docker.yaml +123 -0
- damage_control/tooldefs/gcp.json +186 -0
- damage_control/tooldefs/gcp.yaml +158 -0
- damage_control/tooldefs/gh.json +172 -0
- damage_control/tooldefs/gh.yaml +145 -0
- damage_control/tooldefs/git.json +166 -0
- damage_control/tooldefs/git.yaml +143 -0
- damage_control/tooldefs/kubectl.json +101 -0
- damage_control/tooldefs/kubectl.yaml +85 -0
- damage_control/tooldefs/npm.json +77 -0
- damage_control/tooldefs/npm.yaml +65 -0
- damage_control/tooldefs/terraform.json +68 -0
- damage_control/tooldefs/terraform.yaml +57 -0
- damage_control/tooldefs/uv.json +112 -0
- damage_control/tooldefs/uv.yaml +97 -0
- damage_control_dev-0.1.0.dist-info/METADATA +15 -0
- damage_control_dev-0.1.0.dist-info/RECORD +74 -0
- damage_control_dev-0.1.0.dist-info/WHEEL +4 -0
- damage_control_dev-0.1.0.dist-info/entry_points.txt +2 -0
- damage_control_dev-0.1.0.dist-info/licenses/LICENSE +201 -0
- damage_control_dev-0.1.0.dist-info/licenses/NOTICE +4 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"bashToolPatterns": [
|
|
3
|
+
{
|
|
4
|
+
"id": "containers.docker-system-prune-a-removes-all-unused-data",
|
|
5
|
+
"pattern": "\\bdocker\\s+system\\s+prune\\s+.*-a",
|
|
6
|
+
"reason": "docker system prune -a (removes all unused data)",
|
|
7
|
+
"anchored": true
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "containers.docker-rmi-f-force-removes-images",
|
|
11
|
+
"pattern": "\\bdocker\\s+rmi\\s+.*-f",
|
|
12
|
+
"reason": "docker rmi -f (force removes images)",
|
|
13
|
+
"anchored": true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "containers.docker-volume-rm-data-loss",
|
|
17
|
+
"pattern": "\\bdocker\\s+volume\\s+rm\\b",
|
|
18
|
+
"reason": "docker volume rm (data loss)",
|
|
19
|
+
"anchored": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "containers.docker-volume-prune-removes-unused-volumes",
|
|
23
|
+
"pattern": "\\bdocker\\s+volume\\s+prune\\b",
|
|
24
|
+
"reason": "docker volume prune (removes unused volumes)",
|
|
25
|
+
"anchored": true
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "containers.kubectl-delete-namespace",
|
|
29
|
+
"pattern": "\\bkubectl\\s+delete\\s+namespace\\b",
|
|
30
|
+
"reason": "kubectl delete namespace",
|
|
31
|
+
"anchored": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "containers.kubectl-delete-all-all",
|
|
35
|
+
"pattern": "\\bkubectl\\s+delete\\s+(?=(?:[^;&|]*\\s)?--all(?=[\\s;&|)`]|$))(?=(?:[^;&|]*\\s)?all(?=[\\s;&|)`]|$))",
|
|
36
|
+
"pattern_src": "\\bkubectl\\s+delete\\s+(?=(?:[^;&|]*\\s)?--all(?=[\\s;&|)`]|$))(?=(?:[^;&|]*\\s)?all(?=[\\s;&|)`]|$))",
|
|
37
|
+
"reason": "kubectl delete all --all",
|
|
38
|
+
"anchored": true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "containers.kubectl-delete-across-all-namespaces",
|
|
42
|
+
"pattern": "\\bkubectl\\s+delete\\s+.*--all\\s+--all-namespaces",
|
|
43
|
+
"reason": "kubectl delete across all namespaces",
|
|
44
|
+
"anchored": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "containers.helm-uninstall-removes-release",
|
|
48
|
+
"pattern": "\\bhelm\\s+uninstall\\b",
|
|
49
|
+
"reason": "helm uninstall (removes release)",
|
|
50
|
+
"anchored": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"pattern": "\\bdocker\\s+(compose\\s+)?push\\b",
|
|
54
|
+
"reason": "docker push (publishes an image to a registry)",
|
|
55
|
+
"ask": true,
|
|
56
|
+
"id": "container.docker-push",
|
|
57
|
+
"anchored": true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"pattern": "\\bkubectl\\s+delete\\b",
|
|
61
|
+
"reason": "kubectl delete (removes a Kubernetes resource)",
|
|
62
|
+
"ask": true,
|
|
63
|
+
"id": "container.kubectl-delete",
|
|
64
|
+
"anchored": true
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Container damage control rules
|
|
2
|
+
# Docker and Kubernetes
|
|
3
|
+
|
|
4
|
+
bashToolPatterns:
|
|
5
|
+
# ---------------------------------------------------------------------------
|
|
6
|
+
# DOCKER DESTRUCTIVE OPERATIONS
|
|
7
|
+
# ---------------------------------------------------------------------------
|
|
8
|
+
- id: containers.docker-system-prune-a-removes-all-unused-data
|
|
9
|
+
pattern: '\bdocker\s+system\s+prune\s+.*-a'
|
|
10
|
+
reason: docker system prune -a (removes all unused data)
|
|
11
|
+
anchored: true
|
|
12
|
+
|
|
13
|
+
- id: containers.docker-rmi-f-force-removes-images
|
|
14
|
+
pattern: '\bdocker\s+rmi\s+.*-f'
|
|
15
|
+
reason: docker rmi -f (force removes images)
|
|
16
|
+
anchored: true
|
|
17
|
+
|
|
18
|
+
- id: containers.docker-volume-rm-data-loss
|
|
19
|
+
pattern: '\bdocker\s+volume\s+rm\b'
|
|
20
|
+
reason: docker volume rm (data loss)
|
|
21
|
+
anchored: true
|
|
22
|
+
|
|
23
|
+
- id: containers.docker-volume-prune-removes-unused-volumes
|
|
24
|
+
pattern: '\bdocker\s+volume\s+prune\b'
|
|
25
|
+
reason: docker volume prune (removes unused volumes)
|
|
26
|
+
anchored: true
|
|
27
|
+
|
|
28
|
+
# ---------------------------------------------------------------------------
|
|
29
|
+
# KUBERNETES (kubectl) DESTRUCTIVE OPERATIONS
|
|
30
|
+
# ---------------------------------------------------------------------------
|
|
31
|
+
- id: containers.kubectl-delete-namespace
|
|
32
|
+
pattern: '\bkubectl\s+delete\s+namespace\b'
|
|
33
|
+
reason: kubectl delete namespace
|
|
34
|
+
anchored: true
|
|
35
|
+
|
|
36
|
+
- id: containers.kubectl-delete-all-all
|
|
37
|
+
pattern: '\bkubectl\s+delete\s+(?=(?:[^;&|]*\s)?--all(?=[\s;&|)`]|$))(?=(?:[^;&|]*\s)?all(?=[\s;&|)`]|$))'
|
|
38
|
+
pattern_src: '\bkubectl\s+delete\s+(?=(?:[^;&|]*\s)?--all(?=[\s;&|)`]|$))(?=(?:[^;&|]*\s)?all(?=[\s;&|)`]|$))'
|
|
39
|
+
reason: kubectl delete all --all
|
|
40
|
+
anchored: true
|
|
41
|
+
|
|
42
|
+
- id: containers.kubectl-delete-across-all-namespaces
|
|
43
|
+
pattern: '\bkubectl\s+delete\s+.*--all\s+--all-namespaces'
|
|
44
|
+
reason: kubectl delete across all namespaces
|
|
45
|
+
anchored: true
|
|
46
|
+
|
|
47
|
+
- id: containers.helm-uninstall-removes-release
|
|
48
|
+
pattern: '\bhelm\s+uninstall\b'
|
|
49
|
+
reason: helm uninstall (removes release)
|
|
50
|
+
anchored: true
|
|
51
|
+
|
|
52
|
+
# ---------------------------------------------------------------------------
|
|
53
|
+
# CONTAINER REGISTRY PUBLISH / WORKLOAD DELETE (ask: true)
|
|
54
|
+
# ---------------------------------------------------------------------------
|
|
55
|
+
# `docker push` publishes an image (outward-facing) and a generic
|
|
56
|
+
# `kubectl delete <resource>` removes a workload. Previously `allow`-tier.
|
|
57
|
+
# The catastrophic kubectl deletes above are hard-blocked and listed first, so
|
|
58
|
+
# they still block; this generic ask only catches the narrower deletes.
|
|
59
|
+
- pattern: '\bdocker\s+(compose\s+)?push\b'
|
|
60
|
+
reason: docker push (publishes an image to a registry)
|
|
61
|
+
ask: true
|
|
62
|
+
id: container.docker-push
|
|
63
|
+
anchored: true
|
|
64
|
+
|
|
65
|
+
- pattern: '\bkubectl\s+delete\b'
|
|
66
|
+
reason: kubectl delete (removes a Kubernetes resource)
|
|
67
|
+
ask: true
|
|
68
|
+
id: container.kubectl-delete
|
|
69
|
+
anchored: true
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Damage-control control plane (#466)
|
|
2
|
+
#
|
|
3
|
+
# These are the files that DEFINE damage control — its kill switch, its rules,
|
|
4
|
+
# and its own hook registration. If the policed agent could write them it could
|
|
5
|
+
# disable safety, act, and re-enable, bypassing everything.
|
|
6
|
+
#
|
|
7
|
+
# The REAL guarantee lives in code: ``check_protected_command`` /
|
|
8
|
+
# ``check_protected_path`` in ``agentwire/safety/_core.py`` block writes to
|
|
9
|
+
# these paths BEFORE the ``# allow:`` escape hatch and BEFORE the kill switch,
|
|
10
|
+
# so neither can override them. Only the user's ``allowedPaths`` allowlist (a
|
|
11
|
+
# host-side opt-in) re-permits a path.
|
|
12
|
+
#
|
|
13
|
+
# Listing them here as ``readOnlyPaths`` too is defense-in-depth + visibility
|
|
14
|
+
# (they show up in ``agentwire safety status`` rule counts). The readOnly tier
|
|
15
|
+
# is escape-hatch-bypassable on its own — the code-level check is what makes the
|
|
16
|
+
# protection absolute.
|
|
17
|
+
|
|
18
|
+
readOnlyPaths:
|
|
19
|
+
- "*.damagecontrol.yml"
|
|
20
|
+
- "~/.claude/settings.json"
|
|
21
|
+
- "~/.claude/hooks/*"
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
{
|
|
2
|
+
"bashToolPatterns": [
|
|
3
|
+
{
|
|
4
|
+
"id": "core.rm-with-recursive-or-force-flags",
|
|
5
|
+
"pattern": "\\brm\\s+(?:(?!--(?:\\s|$))[^\\s;&|]+\\s+)*?-(?!-)[a-z]*[rf][a-z]*(?=[\\s;&|)`]|$)",
|
|
6
|
+
"pattern_src": "\\brm\\s+{ARGS}-(?!-)[a-z]*[rf][a-z]*(?=[\\s;&|)`]|$)",
|
|
7
|
+
"reason": "rm with recursive or force flags",
|
|
8
|
+
"anchored": true
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "core.rm-with-recursive-flag",
|
|
12
|
+
"pattern": "\\brm\\s+(?:(?!--(?:\\s|$))[^\\s;&|]+\\s+)*?--recursive",
|
|
13
|
+
"pattern_src": "\\brm\\s+{ARGS}--recursive",
|
|
14
|
+
"reason": "rm with --recursive flag",
|
|
15
|
+
"anchored": true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "core.rm-with-force-flag",
|
|
19
|
+
"pattern": "\\brm\\s+(?:(?!--(?:\\s|$))[^\\s;&|]+\\s+)*?--force",
|
|
20
|
+
"pattern_src": "\\brm\\s+{ARGS}--force",
|
|
21
|
+
"reason": "rm with --force flag",
|
|
22
|
+
"anchored": true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "core.sudo-rm",
|
|
26
|
+
"pattern": "\\bsudo\\s+rm\\b",
|
|
27
|
+
"reason": "sudo rm",
|
|
28
|
+
"anchored": true
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "core.rmdir-use-git-clean-or-manual-cleanup",
|
|
32
|
+
"pattern": "\\brmdir\\b",
|
|
33
|
+
"reason": "rmdir (use git clean or manual cleanup)",
|
|
34
|
+
"bypassable": true,
|
|
35
|
+
"anchored": true
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "core.rm-file-deletion-use-git-clean-or-manual-cleanup",
|
|
39
|
+
"pattern": "\\brm\\s+[^-]",
|
|
40
|
+
"reason": "rm file deletion (use git clean or manual cleanup)",
|
|
41
|
+
"bypassable": true,
|
|
42
|
+
"anchored": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "core.trash-command-moves-files-to-trash-use-git-clean-or-manual-c",
|
|
46
|
+
"pattern": "(?:^|[;&|])\\s*trash\\s+",
|
|
47
|
+
"reason": "trash command (moves files to trash - use git clean or manual cleanup)",
|
|
48
|
+
"bypassable": true,
|
|
49
|
+
"anchored": true
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "core.find-delete-recursive-deletion-use-git-clean-or-manual-clean",
|
|
53
|
+
"pattern": "\\bfind\\b.*\\s-delete\\b",
|
|
54
|
+
"reason": "find -delete (recursive deletion - use git clean or manual cleanup)",
|
|
55
|
+
"bypassable": true,
|
|
56
|
+
"anchored": true
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "core.find-exec-chmod-777-world-writable",
|
|
60
|
+
"pattern": "\\bfind\\b.*-(?:exec|execdir|ok|okdir)\\s+(?:\\S*/)?chmod\\s+(?:-[^\\s;&|]*\\s+)*(?:--\\s+)?0?777\\b",
|
|
61
|
+
"reason": "find -exec chmod 777 (world writable)",
|
|
62
|
+
"anchored": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "core.find-exec-rm-deletion-via-find-use-git-clean-or-manual-clean",
|
|
66
|
+
"pattern": "\\bfind\\b.*-exec\\s+rm\\b",
|
|
67
|
+
"reason": "find -exec rm (deletion via find - use git clean or manual cleanup)",
|
|
68
|
+
"bypassable": true,
|
|
69
|
+
"anchored": true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "core.chmod-777-world-writable",
|
|
73
|
+
"pattern": "\\bchmod\\s+(?:-[^\\s;&|]*\\s+)*(?:--\\s+)?0?777\\b",
|
|
74
|
+
"reason": "chmod 777 (world writable)",
|
|
75
|
+
"anchored": true
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "core.recursive-chmod-777",
|
|
79
|
+
"pattern": "\\bchmod\\s+(?:(?!--(?:\\s|$))[^\\s;&|]+\\s+)*?(?:-(?!-)[a-z]*r[a-z]*|--recursive)(?=[\\s;&|)`]|$).*777",
|
|
80
|
+
"pattern_src": "\\bchmod\\s+{ARGS}(?:-(?!-)[a-z]*r[a-z]*|--recursive)(?=[\\s;&|)`]|$).*777",
|
|
81
|
+
"reason": "recursive chmod 777",
|
|
82
|
+
"anchored": true
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "core.recursive-chown-to-root",
|
|
86
|
+
"pattern": "\\bchown\\s+(?=[^;&|]*\\broot\\b)(?:(?!--(?:\\s|$))[^\\s;&|]+\\s+)*?(?:-(?!-)[a-z]*r[a-z]*|--recursive)(?=[\\s;&|)`]|$)",
|
|
87
|
+
"pattern_src": "\\bchown\\s+(?=[^;&|]*\\broot\\b){ARGS}(?:-(?!-)[a-z]*r[a-z]*|--recursive)(?=[\\s;&|)`]|$)",
|
|
88
|
+
"reason": "recursive chown to root",
|
|
89
|
+
"anchored": true
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "core.filesystem-format-command",
|
|
93
|
+
"pattern": "\\bmkfs\\.",
|
|
94
|
+
"reason": "filesystem format command",
|
|
95
|
+
"anchored": true
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "core.dd-writing-to-device",
|
|
99
|
+
"pattern": "\\bdd\\s+.*of=/dev/",
|
|
100
|
+
"reason": "dd writing to device",
|
|
101
|
+
"anchored": true
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "core.kill-all-processes",
|
|
105
|
+
"pattern": "\\bkill\\s+(?:[^\\s;&|]+\\s+)+-1(?=[\\s;&|)`]|$)",
|
|
106
|
+
"reason": "kill all processes",
|
|
107
|
+
"anchored": true
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "core.kill-all-processes-2",
|
|
111
|
+
"pattern": "\\bkill\\s+-1(?=\\s)[^;&|]*?\\s-[A-Za-z0-9]",
|
|
112
|
+
"reason": "kill all processes",
|
|
113
|
+
"anchored": true
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "core.kill-sigkill",
|
|
117
|
+
"pattern": "\\bkill\\s+(?:(?!--(?:\\s|$))[^\\s;&|]+\\s+)*?(?:-(?:9|KILL|SIGKILL)|-s\\s*(?:9|KILL|SIGKILL)|-n\\s+9|--signal[=\\s]\\s*(?:9|KILL|SIGKILL))(?=[\\s;&|)`]|$)",
|
|
118
|
+
"pattern_src": "\\bkill\\s+{ARGS}(?:-(?:9|KILL|SIGKILL)|-s\\s*(?:9|KILL|SIGKILL)|-n\\s+9|--signal[=\\s]\\s*(?:9|KILL|SIGKILL))(?=[\\s;&|)`]|$)",
|
|
119
|
+
"reason": "kill -9 (SIGKILL, no cleanup; use a plain kill first)",
|
|
120
|
+
"ask": true,
|
|
121
|
+
"anchored": true
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "core.crontab-install",
|
|
125
|
+
"pattern": "(?<![\\w.-])(?<!\\./)crontab(?=[\\s;&|)`]|$)(?![^;&|]*\\s(?:-[A-Za-z]*l[A-Za-z]*|--list|-V|--version)(?=[\\s;&|)`]|$))",
|
|
126
|
+
"reason": "crontab installs or edits scheduled commands",
|
|
127
|
+
"ask": true,
|
|
128
|
+
"anchored": true
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "core.rsync-delete",
|
|
132
|
+
"pattern": "\\brsync\\s+(?:(?!--(?:\\s|$))[^\\s;&|]+\\s+)*?--(?:del|delete[a-z-]*|remove-(?:source|sent)-files)(?=[\\s=;&|)`]|$)",
|
|
133
|
+
"pattern_src": "\\brsync\\s+{ARGS}--(?:del|delete[a-z-]*|remove-(?:source|sent)-files)(?=[\\s=;&|)`]|$)",
|
|
134
|
+
"reason": "rsync deletes files (--delete*, --remove-source-files)",
|
|
135
|
+
"ask": true,
|
|
136
|
+
"anchored": true
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "core.killall-9",
|
|
140
|
+
"pattern": "\\bkillall\\s+(?:(?!--(?:\\s|$))[^\\s;&|]+\\s+)*?-9\\b",
|
|
141
|
+
"pattern_src": "\\bkillall\\s+{ARGS}-9\\b",
|
|
142
|
+
"reason": "killall -9",
|
|
143
|
+
"anchored": true
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "core.pkill-9",
|
|
147
|
+
"pattern": "\\bpkill\\s+(?:(?!--(?:\\s|$))[^\\s;&|]+\\s+)*?-9\\b",
|
|
148
|
+
"pattern_src": "\\bpkill\\s+{ARGS}-9\\b",
|
|
149
|
+
"reason": "pkill -9",
|
|
150
|
+
"anchored": true
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "core.clearing-shell-history",
|
|
154
|
+
"pattern": "\\bhistory\\s+-c\\b",
|
|
155
|
+
"reason": "clearing shell history",
|
|
156
|
+
"anchored": true
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"zeroAccessPaths": [
|
|
160
|
+
".env",
|
|
161
|
+
".env.*",
|
|
162
|
+
".env*.local",
|
|
163
|
+
"*.env",
|
|
164
|
+
"~/.ssh/",
|
|
165
|
+
"~/.gnupg/",
|
|
166
|
+
"~/.aws/",
|
|
167
|
+
"~/.config/gcloud/",
|
|
168
|
+
"*-credentials.json",
|
|
169
|
+
"*serviceAccount*.json",
|
|
170
|
+
"*service-account*.json",
|
|
171
|
+
"~/.azure/",
|
|
172
|
+
"~/.kube/",
|
|
173
|
+
"kubeconfig",
|
|
174
|
+
"*-secret.yaml",
|
|
175
|
+
"secrets.yaml",
|
|
176
|
+
"~/.docker/",
|
|
177
|
+
"*.pem",
|
|
178
|
+
"*.key",
|
|
179
|
+
"*.p12",
|
|
180
|
+
"*.pfx",
|
|
181
|
+
"*.tfstate",
|
|
182
|
+
"*.tfstate.backup",
|
|
183
|
+
".terraform/",
|
|
184
|
+
".vercel/",
|
|
185
|
+
".netlify/",
|
|
186
|
+
"firebase-adminsdk*.json",
|
|
187
|
+
"serviceAccountKey.json",
|
|
188
|
+
".supabase/",
|
|
189
|
+
"~/.netrc",
|
|
190
|
+
"~/.npmrc",
|
|
191
|
+
"~/.pypirc",
|
|
192
|
+
"~/.git-credentials",
|
|
193
|
+
".git-credentials",
|
|
194
|
+
"dump.sql",
|
|
195
|
+
"backup.sql",
|
|
196
|
+
"*.dump"
|
|
197
|
+
],
|
|
198
|
+
"readOnlyPaths": [
|
|
199
|
+
"/etc/",
|
|
200
|
+
"/usr/",
|
|
201
|
+
"/bin/",
|
|
202
|
+
"/sbin/",
|
|
203
|
+
"/boot/",
|
|
204
|
+
"/root/",
|
|
205
|
+
"~/.bash_history",
|
|
206
|
+
"~/.zsh_history",
|
|
207
|
+
"~/.node_repl_history",
|
|
208
|
+
"~/.bashrc",
|
|
209
|
+
"~/.zshrc",
|
|
210
|
+
"~/.profile",
|
|
211
|
+
"~/.bash_profile",
|
|
212
|
+
"package-lock.json",
|
|
213
|
+
"yarn.lock",
|
|
214
|
+
"pnpm-lock.yaml",
|
|
215
|
+
"Gemfile.lock",
|
|
216
|
+
"poetry.lock",
|
|
217
|
+
"Pipfile.lock",
|
|
218
|
+
"composer.lock",
|
|
219
|
+
"Cargo.lock",
|
|
220
|
+
"go.sum",
|
|
221
|
+
"flake.lock",
|
|
222
|
+
"bun.lockb",
|
|
223
|
+
"uv.lock",
|
|
224
|
+
"npm-shrinkwrap.json",
|
|
225
|
+
"*.lock",
|
|
226
|
+
"*.lockb",
|
|
227
|
+
"*.min.js",
|
|
228
|
+
"*.min.css",
|
|
229
|
+
"*.bundle.js",
|
|
230
|
+
"*.chunk.js",
|
|
231
|
+
"dist/",
|
|
232
|
+
"build/",
|
|
233
|
+
"out/",
|
|
234
|
+
".next/",
|
|
235
|
+
".nuxt/",
|
|
236
|
+
".output/",
|
|
237
|
+
"node_modules/",
|
|
238
|
+
"__pycache__/",
|
|
239
|
+
".venv/",
|
|
240
|
+
"venv/",
|
|
241
|
+
"target/"
|
|
242
|
+
],
|
|
243
|
+
"noDeletePaths": [
|
|
244
|
+
"~/.claude/",
|
|
245
|
+
"CLAUDE.md",
|
|
246
|
+
"LICENSE",
|
|
247
|
+
"LICENSE.*",
|
|
248
|
+
"COPYING",
|
|
249
|
+
"COPYING.*",
|
|
250
|
+
"NOTICE",
|
|
251
|
+
"PATENTS",
|
|
252
|
+
"README.md",
|
|
253
|
+
"README.*",
|
|
254
|
+
"CONTRIBUTING.md",
|
|
255
|
+
"CHANGELOG.md",
|
|
256
|
+
"CODE_OF_CONDUCT.md",
|
|
257
|
+
"SECURITY.md",
|
|
258
|
+
".git/",
|
|
259
|
+
".gitignore",
|
|
260
|
+
".gitattributes",
|
|
261
|
+
".gitmodules",
|
|
262
|
+
".github/",
|
|
263
|
+
".gitlab-ci.yml",
|
|
264
|
+
".circleci/",
|
|
265
|
+
"Jenkinsfile",
|
|
266
|
+
".travis.yml",
|
|
267
|
+
"azure-pipelines.yml",
|
|
268
|
+
"Dockerfile",
|
|
269
|
+
"Dockerfile.*",
|
|
270
|
+
"docker-compose.yml",
|
|
271
|
+
"docker-compose.*.yml",
|
|
272
|
+
".dockerignore"
|
|
273
|
+
],
|
|
274
|
+
"allowedPaths": [
|
|
275
|
+
{
|
|
276
|
+
"path": "*/dist/*",
|
|
277
|
+
"allow": "all"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"path": "*/build/*",
|
|
281
|
+
"allow": "all"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"path": "*/out/*",
|
|
285
|
+
"allow": "all"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"path": "*/.next/*",
|
|
289
|
+
"allow": "all"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"path": "*/.nuxt/*",
|
|
293
|
+
"allow": "all"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"path": "*/.output/*",
|
|
297
|
+
"allow": "all"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"path": "*/__pycache__/*",
|
|
301
|
+
"allow": "all"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"path": "*/.eggs/*",
|
|
305
|
+
"allow": "all"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"path": "*.egg-info/*",
|
|
309
|
+
"allow": "all"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"path": "*/.pytest_cache/*",
|
|
313
|
+
"allow": "all"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"path": "*/.mypy_cache/*",
|
|
317
|
+
"allow": "all"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"path": "*/.ruff_cache/*",
|
|
321
|
+
"allow": "all"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"path": "/tmp/*",
|
|
325
|
+
"allow": "all"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"path": "/var/tmp/*",
|
|
329
|
+
"allow": "all"
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
}
|