@gendigital/sage-openclaw 0.5.3 → 0.6.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/README.md +3 -3
- package/dist/index.cjs +189 -71
- package/dist/index.cjs.map +4 -4
- package/openclaw.plugin.json +1 -1
- package/package.json +10 -12
- package/resources/threats/commands.yaml +38 -1
- package/resources/threats/credentials.yaml +30 -0
- package/resources/threats/files.yaml +135 -0
- package/resources/threats/mitre.yaml +2 -2
- package/resources/threats/self-defense.yaml +1 -1
- package/resources/threats/win-credentials.yaml +16 -0
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gendigital/sage-openclaw",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Safety for Agents — ADR layer for OpenClaw",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
@@ -13,23 +13,15 @@
|
|
|
13
13
|
"README.md",
|
|
14
14
|
"LICENSE"
|
|
15
15
|
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "pnpm -C ../core build && pnpm run clean && pnpm run sync:assets && node esbuild.config.js",
|
|
18
|
-
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true});require('node:fs').rmSync('resources',{recursive:true,force:true})\"",
|
|
19
|
-
"sync:assets": "node scripts/sync-assets.mjs",
|
|
20
|
-
"test": "vitest run"
|
|
21
|
-
},
|
|
22
16
|
"optionalDependencies": {
|
|
23
17
|
"koffi": "^2.9.0"
|
|
24
18
|
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@sage/core": "workspace:*"
|
|
27
|
-
},
|
|
28
19
|
"devDependencies": {
|
|
29
20
|
"@types/node": "^22.0.0",
|
|
30
21
|
"esbuild": "^0.25.0",
|
|
31
22
|
"typescript": "^5.9.0",
|
|
32
|
-
"vitest": "^4.0.0"
|
|
23
|
+
"vitest": "^4.0.0",
|
|
24
|
+
"@gendigital/sage-core": "0.6.0"
|
|
33
25
|
},
|
|
34
26
|
"openclaw": {
|
|
35
27
|
"extensions": [
|
|
@@ -52,5 +44,11 @@
|
|
|
52
44
|
],
|
|
53
45
|
"publishConfig": {
|
|
54
46
|
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "pnpm -C ../core build && pnpm run clean && pnpm run sync:assets && node esbuild.config.js",
|
|
50
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true});require('node:fs').rmSync('resources',{recursive:true,force:true})\"",
|
|
51
|
+
"sync:assets": "node scripts/sync-assets.mjs",
|
|
52
|
+
"test": "vitest run"
|
|
55
53
|
}
|
|
56
|
-
}
|
|
54
|
+
}
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
severity: high
|
|
251
251
|
confidence: 0.80
|
|
252
252
|
action: block
|
|
253
|
-
pattern: "\\b(while|for)\\b[^;]*;\\s*do[^;]
|
|
253
|
+
pattern: "\\b(while|for)\\b[^;]*;\\s*do[^;]*(\\b(bash|sh)\\s+-c\\b|\\b(curl|wget)\\b[^;]*\\|\\s*(?:sudo\\s+)?(?:env\\s+)?(?:[^\\s\"']*[\\\\/])?(bash|sh|zsh|ksh|dash)\\b|\\b(curl|wget)\\b[^;]*(?:(-d|--data|--data-binary)\\s+['\\\"]?@\\S+|(--upload-file|-T)\\s+['\\\"]?\\S+))"
|
|
254
254
|
match_on: command
|
|
255
255
|
title: "Loop executing shell or download commands"
|
|
256
256
|
expires_at: null
|
|
@@ -305,3 +305,40 @@
|
|
|
305
305
|
title: "Recursive deletion of critical system directory"
|
|
306
306
|
expires_at: null
|
|
307
307
|
revoked: false
|
|
308
|
+
|
|
309
|
+
# --- Deletion of .env files ---
|
|
310
|
+
- id: "CLT-CMD-027"
|
|
311
|
+
category: tool
|
|
312
|
+
severity: high
|
|
313
|
+
confidence: 0.85
|
|
314
|
+
action: require_approval
|
|
315
|
+
pattern: "\\brm\\s+(-{1,2}[\\w-]+(=\\S+)?\\s+)*(\\S+[\\\\/])?\\.env(?!\\S*\\.(example|sample|template|dist)\\b)(\\.(local|production|prod|staging|stage|development|dev|test))?\\b"
|
|
316
|
+
match_on: command
|
|
317
|
+
title: "Deletion of .env file"
|
|
318
|
+
expires_at: null
|
|
319
|
+
revoked: false
|
|
320
|
+
|
|
321
|
+
# --- Deletion of database files ---
|
|
322
|
+
- id: "CLT-CMD-028"
|
|
323
|
+
category: tool
|
|
324
|
+
severity: high
|
|
325
|
+
confidence: 0.85
|
|
326
|
+
action: require_approval
|
|
327
|
+
pattern: "\\brm\\s+(-{1,2}[\\w-]+(=\\S+)?\\s+)*\\S+\\.(db|sqlite|sqlite3)\\b"
|
|
328
|
+
match_on: command
|
|
329
|
+
title: "Deletion of database file"
|
|
330
|
+
expires_at: null
|
|
331
|
+
revoked: false
|
|
332
|
+
|
|
333
|
+
# --- Deletion of .git directory ---
|
|
334
|
+
- id: "CLT-CMD-029"
|
|
335
|
+
category: tool
|
|
336
|
+
severity: high
|
|
337
|
+
confidence: 0.90
|
|
338
|
+
action: require_approval
|
|
339
|
+
pattern: "\\b(rm|del|rmdir|rd|Remove-Item|unlink)\\b.*(\\s|[\\\\/])\\.git(\\s|[\\\\/]|$)"
|
|
340
|
+
case_insensitive: true
|
|
341
|
+
match_on: command
|
|
342
|
+
title: "Deletion of .git directory"
|
|
343
|
+
expires_at: null
|
|
344
|
+
revoked: false
|
|
@@ -73,3 +73,33 @@
|
|
|
73
73
|
title: "Long-form API key pattern detected (GitHub PAT, SendGrid, Stripe)"
|
|
74
74
|
expires_at: null
|
|
75
75
|
revoked: false
|
|
76
|
+
|
|
77
|
+
# --- Copy/move/link secret files ---
|
|
78
|
+
- id: "CLT-CRED-007"
|
|
79
|
+
category: secrets
|
|
80
|
+
severity: high
|
|
81
|
+
confidence: 0.80
|
|
82
|
+
action: require_approval
|
|
83
|
+
# Protected files: .env*, .aws/credentials, .ssh/(id_rsa|id_ed25519|id_ecdsa|id_dsa),
|
|
84
|
+
# .netrc, .pgpass, .npmrc, .pypirc, key.properties, .docker/config.json,
|
|
85
|
+
# kubeconfig, .kube/config, master.key, credentials.yml
|
|
86
|
+
pattern: "\\b(cp|mv|ln|rsync|install|ditto)\\s+.*(?<=[\\\\/\\s])(\\.env(?!\\S*\\.(example|sample|template|dist)\\b)(\\.\\w+)?(?=[\\s\\\\/]|$)|\\.aws/credentials|\\.ssh/(id_rsa|id_ed25519|id_ecdsa|id_dsa)|\\.netrc|\\.pgpass|\\.npmrc|\\.pypirc|key\\.properties|\\.docker/config\\.json|kubeconfig|\\.kube/config|master\\.key|credentials\\.yml)"
|
|
87
|
+
match_on: command
|
|
88
|
+
title: "Copy/move/link of credential or secret file"
|
|
89
|
+
expires_at: null
|
|
90
|
+
revoked: false
|
|
91
|
+
|
|
92
|
+
# --- Archive secret files ---
|
|
93
|
+
- id: "CLT-CRED-008"
|
|
94
|
+
category: secrets
|
|
95
|
+
severity: high
|
|
96
|
+
confidence: 0.80
|
|
97
|
+
action: require_approval
|
|
98
|
+
# Protected files: .env*, .aws/credentials, .ssh/(id_rsa|id_ed25519|id_ecdsa|id_dsa),
|
|
99
|
+
# .netrc, .pgpass, .npmrc, .pypirc, key.properties, .docker/config.json,
|
|
100
|
+
# kubeconfig, .kube/config, master.key, credentials.yml
|
|
101
|
+
pattern: "\\b(tar|zip|7z|rar|gzip)\\s+.*(?<=[\\\\/\\s])(\\.env(?!\\S*\\.(example|sample|template|dist)\\b)(\\.\\w+)?(?=[\\s\\\\/]|$)|\\.aws/credentials|\\.ssh/(id_rsa|id_ed25519|id_ecdsa|id_dsa)|\\.netrc|\\.pgpass|\\.npmrc|\\.pypirc|key\\.properties|\\.docker/config\\.json|kubeconfig|\\.kube/config|master\\.key|credentials\\.yml)"
|
|
102
|
+
match_on: command
|
|
103
|
+
title: "Archiving credential or secret file"
|
|
104
|
+
expires_at: null
|
|
105
|
+
revoked: false
|
|
@@ -102,3 +102,138 @@
|
|
|
102
102
|
title: "Access git hook (potential code execution on git events)"
|
|
103
103
|
expires_at: null
|
|
104
104
|
revoked: false
|
|
105
|
+
|
|
106
|
+
# --- Android signing files ---
|
|
107
|
+
- id: "CLT-FILE-010"
|
|
108
|
+
category: secrets
|
|
109
|
+
severity: high
|
|
110
|
+
confidence: 0.85
|
|
111
|
+
action: require_approval
|
|
112
|
+
pattern: "(key\\.properties|release\\.keystore|\\.jks|\\.keystore)$"
|
|
113
|
+
match_on: file_path
|
|
114
|
+
title: "Access Android signing file"
|
|
115
|
+
expires_at: null
|
|
116
|
+
revoked: false
|
|
117
|
+
|
|
118
|
+
# --- Firebase config files ---
|
|
119
|
+
- id: "CLT-FILE-011"
|
|
120
|
+
category: secrets
|
|
121
|
+
severity: high
|
|
122
|
+
confidence: 0.85
|
|
123
|
+
action: require_approval
|
|
124
|
+
pattern: "(google-services\\.json|GoogleService-Info\\.plist)$"
|
|
125
|
+
match_on: file_path
|
|
126
|
+
title: "Access Firebase configuration file"
|
|
127
|
+
expires_at: null
|
|
128
|
+
revoked: false
|
|
129
|
+
|
|
130
|
+
# --- Cloud provider credential files ---
|
|
131
|
+
- id: "CLT-FILE-012"
|
|
132
|
+
category: secrets
|
|
133
|
+
severity: high
|
|
134
|
+
confidence: 0.85
|
|
135
|
+
action: require_approval
|
|
136
|
+
pattern: "(application_default_credentials\\.json|\\.azure/(accessTokens|msal_token_cache)\\.json|\\.config/doctl/config\\.yaml)$"
|
|
137
|
+
match_on: file_path
|
|
138
|
+
title: "Access cloud provider credential file"
|
|
139
|
+
expires_at: null
|
|
140
|
+
revoked: false
|
|
141
|
+
|
|
142
|
+
# --- Package manager tokens ---
|
|
143
|
+
- id: "CLT-FILE-013"
|
|
144
|
+
category: secrets
|
|
145
|
+
severity: high
|
|
146
|
+
confidence: 0.85
|
|
147
|
+
action: require_approval
|
|
148
|
+
pattern: "(\\.npmrc|\\.pypirc|\\.gem/credentials|\\.cargo/credentials\\.toml|\\.docker/config\\.json)$"
|
|
149
|
+
match_on: file_path
|
|
150
|
+
title: "Access package manager credential file"
|
|
151
|
+
expires_at: null
|
|
152
|
+
revoked: false
|
|
153
|
+
|
|
154
|
+
# --- Terraform state files ---
|
|
155
|
+
- id: "CLT-FILE-014"
|
|
156
|
+
category: secrets
|
|
157
|
+
severity: high
|
|
158
|
+
confidence: 0.85
|
|
159
|
+
action: require_approval
|
|
160
|
+
pattern: "\\.(tfstate(\\.backup)?|tfvars(\\.json)?)$"
|
|
161
|
+
match_on: file_path
|
|
162
|
+
title: "Access Terraform state or variables file"
|
|
163
|
+
expires_at: null
|
|
164
|
+
revoked: false
|
|
165
|
+
|
|
166
|
+
# --- Secrets/vault files ---
|
|
167
|
+
- id: "CLT-FILE-015"
|
|
168
|
+
category: secrets
|
|
169
|
+
severity: high
|
|
170
|
+
confidence: 0.85
|
|
171
|
+
action: require_approval
|
|
172
|
+
pattern: "(master\\.key|credentials\\.yml\\.enc|secrets\\.yml|vault\\.yml|\\.vault-pass|\\.vault-token)$"
|
|
173
|
+
match_on: file_path
|
|
174
|
+
title: "Access secrets or vault file"
|
|
175
|
+
expires_at: null
|
|
176
|
+
revoked: false
|
|
177
|
+
|
|
178
|
+
# --- Private keys and certificates ---
|
|
179
|
+
# NOTE: .pem also matches public cert chains (fullchain.pem, ca-bundle.pem).
|
|
180
|
+
# Accepted trade-off: require_approval keeps noise bounded, and excluding .pem
|
|
181
|
+
# would miss private key exfiltration.
|
|
182
|
+
- id: "CLT-FILE-016"
|
|
183
|
+
category: secrets
|
|
184
|
+
severity: high
|
|
185
|
+
confidence: 0.85
|
|
186
|
+
action: require_approval
|
|
187
|
+
pattern: "\\.(pem|p12|pfx|p8)$"
|
|
188
|
+
match_on: file_path
|
|
189
|
+
title: "Access private key or certificate file"
|
|
190
|
+
expires_at: null
|
|
191
|
+
revoked: false
|
|
192
|
+
|
|
193
|
+
# --- Kubeconfig ---
|
|
194
|
+
- id: "CLT-FILE-017"
|
|
195
|
+
category: secrets
|
|
196
|
+
severity: high
|
|
197
|
+
confidence: 0.85
|
|
198
|
+
action: require_approval
|
|
199
|
+
pattern: "(\\.kube/config|kubeconfig(\\.yaml|\\.yml)?)$"
|
|
200
|
+
match_on: file_path
|
|
201
|
+
title: "Access Kubernetes configuration file"
|
|
202
|
+
expires_at: null
|
|
203
|
+
revoked: false
|
|
204
|
+
|
|
205
|
+
# --- Build system credential files ---
|
|
206
|
+
- id: "CLT-FILE-018"
|
|
207
|
+
category: secrets
|
|
208
|
+
severity: high
|
|
209
|
+
confidence: 0.85
|
|
210
|
+
action: require_approval
|
|
211
|
+
pattern: "(\\.m2/settings\\.xml|gradle\\.properties)$"
|
|
212
|
+
match_on: file_path
|
|
213
|
+
title: "Access build system credential file"
|
|
214
|
+
expires_at: null
|
|
215
|
+
revoked: false
|
|
216
|
+
|
|
217
|
+
# --- Shell/REPL history files ---
|
|
218
|
+
- id: "CLT-FILE-019"
|
|
219
|
+
category: secrets
|
|
220
|
+
severity: high
|
|
221
|
+
confidence: 0.85
|
|
222
|
+
action: require_approval
|
|
223
|
+
pattern: "\\.(bash_history|zsh_history|mysql_history|python_history|node_repl_history|psql_history|irb_history)$"
|
|
224
|
+
match_on: file_path
|
|
225
|
+
title: "Access shell or REPL history file"
|
|
226
|
+
expires_at: null
|
|
227
|
+
revoked: false
|
|
228
|
+
|
|
229
|
+
# --- JetBrains IDE database credentials ---
|
|
230
|
+
- id: "CLT-FILE-020"
|
|
231
|
+
category: secrets
|
|
232
|
+
severity: high
|
|
233
|
+
confidence: 0.85
|
|
234
|
+
action: require_approval
|
|
235
|
+
pattern: "\\.idea/dataSources(\\.xml|/)"
|
|
236
|
+
match_on: file_path
|
|
237
|
+
title: "Access JetBrains IDE database credential file"
|
|
238
|
+
expires_at: null
|
|
239
|
+
revoked: false
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
severity: high
|
|
101
101
|
confidence: 0.80
|
|
102
102
|
action: require_approval
|
|
103
|
-
pattern: "(rar(\\.exe)?.*[afu]
|
|
103
|
+
pattern: "(rar(\\.exe)?.*[afu].*\\s(-dw|-tb|-ta)|7z(\\.exe)?.*[au].*-sdel|Add-Exfiltration\\.ps1|Do-Exfiltration\\.ps1|Invoke-PostExfil\\.ps1)"
|
|
104
104
|
case_insensitive: true
|
|
105
105
|
match_on: command
|
|
106
106
|
title: "MITRE ATT&CK T1020 - Automated Exfiltration"
|
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
severity: high
|
|
738
738
|
confidence: 0.80
|
|
739
739
|
action: require_approval
|
|
740
|
-
pattern: "
|
|
740
|
+
pattern: "(^|\\s|[;&|])(?:\"[^\"]*\\btscon(?:\\.exe)?\\b\"|'[^']*\\btscon(?:\\.exe)?\\b'|(?:[^\\s\"']*[\\\\/])?\\btscon(?:\\.exe)?\\b)\\s+\\S+(\\s+/dest:[^\\s]+)?"
|
|
741
741
|
case_insensitive: true
|
|
742
742
|
match_on: command
|
|
743
743
|
title: "MITRE ATT&CK T1563.002 - RDP Hijacking"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
severity: high
|
|
49
49
|
confidence: 0.85
|
|
50
50
|
action: require_approval
|
|
51
|
-
pattern: "heuristics_enabled
|
|
51
|
+
pattern: "\"heuristics_enabled\"\\s*:\\s*false|\"url_check\"\\s*:\\s*\\{[^}]*\"enabled\"\\s*:\\s*false"
|
|
52
52
|
match_on: content
|
|
53
53
|
title: "Attempt to disable Sage security features via config"
|
|
54
54
|
expires_at: null
|
|
@@ -110,3 +110,19 @@
|
|
|
110
110
|
title: "WLAN password extraction via netsh"
|
|
111
111
|
expires_at: null
|
|
112
112
|
revoked: false
|
|
113
|
+
|
|
114
|
+
# --- Windows copy/move/link of secret files ---
|
|
115
|
+
- id: "CLT-WIN-CRED-010"
|
|
116
|
+
category: secrets
|
|
117
|
+
severity: high
|
|
118
|
+
confidence: 0.80
|
|
119
|
+
action: require_approval
|
|
120
|
+
# Protected files: .env*, .aws\credentials, .ssh\(id_rsa|id_ed25519|id_ecdsa|id_dsa),
|
|
121
|
+
# .netrc, .pgpass, .npmrc, .pypirc, key.properties, .docker\config.json,
|
|
122
|
+
# kubeconfig, .kube\config, master.key, credentials.yml
|
|
123
|
+
pattern: "\\b(copy|xcopy|robocopy|Copy-Item|Move-Item|mklink)\\b.*(?<=[\\\\/\\s])(\\.env(?!\\S*\\.(example|sample|template|dist)\\b)(\\.\\w+)?(?=[\\s\\\\/]|$)|\\.aws[\\\\/]credentials|\\.ssh[\\\\/](id_rsa|id_ed25519|id_ecdsa|id_dsa)|\\.netrc|\\.pgpass|\\.npmrc|\\.pypirc|key\\.properties|\\.docker[\\\\/]config\\.json|kubeconfig|\\.kube[\\\\/]config|master\\.key|credentials\\.yml)"
|
|
124
|
+
case_insensitive: true
|
|
125
|
+
match_on: command
|
|
126
|
+
title: "Windows copy/move of credential or secret file"
|
|
127
|
+
expires_at: null
|
|
128
|
+
revoked: false
|