everclaw 0.0.1 → 0.3.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/package.json CHANGED
@@ -1,17 +1,36 @@
1
1
  {
2
2
  "name": "everclaw",
3
- "version": "0.0.1",
4
- "description": "Coding agent preset (coming soon)",
3
+ "version": "0.3.0",
4
+ "description": "Lightweight AI Assistant That Lives in Your Computer",
5
5
  "keywords": [
6
6
  "coding-agent",
7
7
  "preset",
8
- "everclaw"
8
+ "everclaw",
9
+ "ai",
10
+ "assistant"
9
11
  ],
10
12
  "license": "Apache-2.0",
11
13
  "author": "lemmair",
12
14
  "type": "module",
13
15
  "main": "index.js",
14
- "scripts": {
15
- "test": "echo \"Error: no test specified\" && exit 1"
16
+ "bin": {
17
+ "everclaw": "index.js"
18
+ },
19
+ "dependencies": {
20
+ "@modelcontextprotocol/sdk": "^1.28.0",
21
+ "chalk": "^5.3.0",
22
+ "commander": "^12.1.0",
23
+ "cron-parser": "^4.9.0",
24
+ "dompurify": "^3.3.3",
25
+ "dotenv": "^16.4.5",
26
+ "highlight.js": "^11.11.1",
27
+ "katex": "^0.16.39",
28
+ "marked": "^17.0.4",
29
+ "mermaid": "^11.13.0",
30
+ "nanoid": "^5.0.7",
31
+ "prompts": "^2.4.2",
32
+ "react": "^19.2.4",
33
+ "react-dom": "^19.2.4",
34
+ "ws": "^8.18.0"
16
35
  }
17
36
  }
@@ -0,0 +1,542 @@
1
+ [
2
+ {
3
+ "id": "SIG-CMDINJ-001",
4
+ "category": "COMMAND_INJECTION",
5
+ "severity": "CRITICAL",
6
+ "pattern": "child_process\\.(exec|execSync|spawn|spawnSync)\\s*\\(",
7
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
8
+ "title": "Direct Shell Command Execution",
9
+ "description": "Direct invocation of shell command execution functions (child_process.exec/spawn) without sanitization. This allows arbitrary command execution if user input reaches these calls.",
10
+ "remediation": "Use parameterized alternatives (execFile) and never pass user input directly. Validate and sanitize all inputs before use."
11
+ },
12
+ {
13
+ "id": "SIG-CMDINJ-002",
14
+ "category": "COMMAND_INJECTION",
15
+ "severity": "CRITICAL",
16
+ "pattern": "eval\\s*\\(",
17
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
18
+ "title": "Dynamic Code Evaluation",
19
+ "description": "Use of eval() to execute dynamically constructed code. Eval is extremely dangerous as it can execute arbitrary code from untrusted sources.",
20
+ "remediation": "Avoid eval() entirely. Use JSON.parse() for data, Function constructor sparingly, or explicit parsing logic."
21
+ },
22
+ {
23
+ "id": "SIG-CMDINJ-003",
24
+ "category": "COMMAND_INJECTION",
25
+ "severity": "HIGH",
26
+ "pattern": "new\\s+Function\\s*\\(",
27
+ "fileTypes": [".ts", ".js", ".json"],
28
+ "title": "Function Constructor Code Injection",
29
+ "description": "Use of the Function constructor to create functions from strings, which is equivalent to eval() and can execute arbitrary code.",
30
+ "remediation": "Use explicit function definitions instead of constructing functions from strings."
31
+ },
32
+ {
33
+ "id": "SIG-CMDINJ-004",
34
+ "category": "COMMAND_INJECTION",
35
+ "severity": "HIGH",
36
+ "pattern": "(?:os|child_process)\\.execFileSync?\\s*\\([^)]*\\$(?:\\{|\\(|HOME|ENV|USER)",
37
+ "fileTypes": [".ts", ".js", ".sh", ".json"],
38
+ "title": "Command Execution with Environment Variable Expansion",
39
+ "description": "Shell command execution that includes environment variable expansion, which can be manipulated to inject commands.",
40
+ "remediation": "Pass explicit argument arrays to execFile/execFileSync. Avoid shell-based execution when possible."
41
+ },
42
+ {
43
+ "id": "SIG-CMDINJ-005",
44
+ "category": "COMMAND_INJECTION",
45
+ "severity": "CRITICAL",
46
+ "pattern": "rm\\s+(-[a-zA-Z]*f[a-zA-Z]*\\s+)?(?:/|~|\\$HOME)",
47
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
48
+ "title": "Recursive Root or Home Directory Deletion",
49
+ "description": "Detects commands that delete the root filesystem or home directory, which is a destructive operation.",
50
+ "remediation": "Never construct deletion commands from variables. Use fs.rmSync with explicit paths and validate targets."
51
+ },
52
+ {
53
+ "id": "SIG-CMDINJ-006",
54
+ "category": "COMMAND_INJECTION",
55
+ "severity": "HIGH",
56
+ "pattern": "(?:curl|wget)\\s+[^|]*\\|\\s*(sh|bash|zsh|ksh|fish|dash)",
57
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
58
+ "title": "Remote Script Piping to Shell",
59
+ "description": "Downloads a remote script and pipes it directly into a shell interpreter, enabling arbitrary remote code execution.",
60
+ "remediation": "Download scripts to a file first, review the content, and only execute verified scripts."
61
+ },
62
+ {
63
+ "id": "SIG-CREDEXP-001",
64
+ "category": "CREDENTIAL_EXPOSURE",
65
+ "severity": "HIGH",
66
+ "pattern": "(?:-----BEGIN\\s+(?:RSA|EC|DSA|OPENSSH|PGP)\\s+PRIVATE\\s+KEY-----)",
67
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
68
+ "title": "Private Key Material in Source",
69
+ "description": "PEM-encoded private key material detected in the file. Private keys should never be embedded in source code.",
70
+ "remediation": "Remove the key from source. Use environment variables, secret managers, or mounted secrets. Rotate the exposed key immediately."
71
+ },
72
+ {
73
+ "id": "SIG-CREDEXP-002",
74
+ "category": "CREDENTIAL_EXPOSURE",
75
+ "severity": "HIGH",
76
+ "pattern": "(?:AKIA[A-Z0-9]{16})",
77
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
78
+ "title": "AWS Access Key ID Exposure",
79
+ "description": "AWS access key ID detected in the file. Hardcoded AWS credentials are a critical security risk.",
80
+ "remediation": "Remove the key. Use AWS IAM roles, environment variables, or a secrets manager. Rotate the exposed key."
81
+ },
82
+ {
83
+ "id": "SIG-CREDEXP-003",
84
+ "category": "CREDENTIAL_EXPOSURE",
85
+ "severity": "HIGH",
86
+ "pattern": "(?:github_pat_|ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9_]{36,}",
87
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
88
+ "title": "GitHub Personal Access Token Exposure",
89
+ "description": "GitHub personal access token or fine-grained token detected. Tokens in source code can be scraped by attackers.",
90
+ "remediation": "Revoke the token immediately on GitHub. Use environment variables or a secrets manager instead."
91
+ },
92
+ {
93
+ "id": "SIG-CREDEXP-004",
94
+ "category": "CREDENTIAL_EXPOSURE",
95
+ "severity": "HIGH",
96
+ "pattern": "(?:sk(?:-live|-test)?-[A-Za-z0-9]{20,})|(?:xox[bposa]-[A-Za-z0-9-]+)",
97
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
98
+ "title": "API Secret Key Exposure (Stripe/Slack)",
99
+ "description": "Secret keys for Stripe (sk-*) or Slack (xox*) detected. These keys should never be hardcoded.",
100
+ "remediation": "Remove the key and rotate it. Use environment variables or a secrets manager."
101
+ },
102
+ {
103
+ "id": "SIG-CREDEXP-005",
104
+ "category": "CREDENTIAL_EXPOSURE",
105
+ "severity": "MEDIUM",
106
+ "pattern": "(?:password|passwd|secret|token|api_key|apikey)\\s*[:=]\\s*['\"][^'\"]{8,}['\"]",
107
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
108
+ "title": "Hardcoded Password or Secret",
109
+ "description": "A password, secret, or API key appears to be hardcoded as a string literal. This is a common source of credential leaks.",
110
+ "remediation": "Replace with environment variable lookups (process.env) or a secrets manager. Never commit secrets to source control."
111
+ },
112
+ {
113
+ "id": "SIG-CREDEXP-006",
114
+ "category": "CREDENTIAL_EXPOSURE",
115
+ "severity": "MEDIUM",
116
+ "pattern": "Authorization\\s*[:=]\\s*['\"](?:Bearer|Basic|Token)\\s+[A-Za-z0-9\\-._~+/]+=*['\"]",
117
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
118
+ "title": "Hardcoded Authorization Header",
119
+ "description": "An Authorization header with a token value appears hardcoded. This could leak authentication credentials.",
120
+ "remediation": "Use environment variables for tokens and construct headers at runtime. Rotate any exposed tokens."
121
+ },
122
+ {
123
+ "id": "SIG-CREDEXP-007",
124
+ "category": "CREDENTIAL_EXPOSURE",
125
+ "severity": "HIGH",
126
+ "pattern": "AIza[A-Za-z0-9_-]{35}",
127
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
128
+ "title": "Google API Key Exposure",
129
+ "description": "Google API key detected in the file. Hardcoded API keys can be scraped and abused.",
130
+ "remediation": "Remove the key and restrict its usage. Use environment variables or a secrets manager."
131
+ },
132
+ {
133
+ "id": "SIG-CREDEXP-008",
134
+ "category": "CREDENTIAL_EXPOSURE",
135
+ "severity": "HIGH",
136
+ "pattern": "eyJ[A-Za-z0-9_-]+\\.eyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+",
137
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
138
+ "title": "JWT Token Exposure",
139
+ "description": "JWT token detected in source code. Tokens should never be hardcoded as they grant authentication.",
140
+ "remediation": "Remove the token and rotate it. Use environment variables for token storage."
141
+ },
142
+ {
143
+ "id": "SIG-CREDEXP-009",
144
+ "category": "CREDENTIAL_EXPOSURE",
145
+ "severity": "HIGH",
146
+ "pattern": "(?:mongodb|mysql|postgresql|postgres)://[^:]+:[^@]+@(?!localhost|127\\.0\\.0\\.1)",
147
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
148
+ "title": "Database Connection String with Credentials",
149
+ "description": "Database connection string with embedded credentials detected. Credentials in connection strings are a security risk.",
150
+ "remediation": "Use environment variables for connection strings. Never embed credentials in source code."
151
+ },
152
+ {
153
+ "id": "SIG-DATAEXFIL-001",
154
+ "category": "DATA_EXFILTRATION",
155
+ "severity": "HIGH",
156
+ "pattern": "(?:curl|wget|fetch|axios|http\\.get|http\\.post)\\s*\\([^)]*(?:pastebin\\.com|paste\\.ee|dpaste\\.org|ix\\.io|0x0\\.st|file\\.io)",
157
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
158
+ "title": "Data Upload to Paste/Anonymizer Service",
159
+ "description": "Code uploads data to a pastebin or anonymizer service, commonly used to exfiltrate sensitive data.",
160
+ "remediation": "Remove the exfiltration endpoint. Verify any legitimate external data transmission uses approved, logged endpoints."
161
+ },
162
+ {
163
+ "id": "SIG-DATAEXFIL-002",
164
+ "category": "DATA_EXFILTRATION",
165
+ "severity": "HIGH",
166
+ "pattern": "(?:nslookup|dig|host)\\s+[A-Za-z0-9_.-]{10,}\\.(?:xyz|top|click|online|site|info|tk|ml|ga|cf)",
167
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
168
+ "title": "DNS Tunneling via Suspicious Domains",
169
+ "description": "DNS lookups with long subdomains on suspicious TLDs, which is a common DNS tunneling technique for data exfiltration.",
170
+ "remediation": "Remove the DNS lookup. Review the need for any external domain resolution and restrict to approved domains."
171
+ },
172
+ {
173
+ "id": "SIG-DATAEXFIL-003",
174
+ "category": "DATA_EXFILTRATION",
175
+ "severity": "HIGH",
176
+ "pattern": "(?:scp|sftp|rsync)\\s+.*(:|@)(?:[0-9]{1,3}\\.){3}[0-9]{1,3}",
177
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
178
+ "title": "File Transfer to External IP Address",
179
+ "description": "File transfer commands (scp/sftp/rsync) targeting raw IP addresses, indicating potential data exfiltration to unregistered servers.",
180
+ "remediation": "Use registered hostnames instead of IPs. Ensure all file transfer targets are approved and logged."
181
+ },
182
+ {
183
+ "id": "SIG-DATAEXFIL-004",
184
+ "category": "DATA_EXFILTRATION",
185
+ "severity": "MEDIUM",
186
+ "pattern": "(?:tar|zip|gzip|7z|rar)\\s+(?:-[a-zA-Z]*c[a-zA-Z]*\\s+).*?/?(?:\\.ssh|\\.aws|\\.gnupg|\\.env|credentials)",
187
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
188
+ "title": "Archiving Sensitive Directories",
189
+ "description": "Sensitive directories (.ssh, .aws, .gnupg, .env) are being archived, which is a common precursor to bulk data exfiltration.",
190
+ "remediation": "Remove the archive command. If archiving is needed, ensure it targets non-sensitive paths and is logged."
191
+ },
192
+ {
193
+ "id": "SIG-DATAEXFIL-005",
194
+ "category": "DATA_EXFILTRATION",
195
+ "severity": "MEDIUM",
196
+ "pattern": "(?:net\\.connect|dgram\\.createSocket|WebSocket)\\s*\\([^)]*(?:[0-9]{1,3}\\.){3}[0-9]{1,3}[^)]*\\)",
197
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
198
+ "title": "Raw Socket Connection to IP Address",
199
+ "description": "Opening a raw network socket or WebSocket connection to a raw IP address, bypassing DNS and potentially used for data exfiltration.",
200
+ "remediation": "Use registered hostnames. Ensure all network connections are to approved endpoints and are logged."
201
+ },
202
+ {
203
+ "id": "SIG-OBFUSC-001",
204
+ "category": "CODE_EXECUTION",
205
+ "severity": "HIGH",
206
+ "pattern": "String\\.fromCharCode\\s*\\(\\s*(?:[0-9]+\\s*,\\s*){5,}",
207
+ "fileTypes": [".ts", ".js", ".json"],
208
+ "title": "String.fromCharCode Obfuscation",
209
+ "description": "Use of String.fromCharCode with many arguments, a common technique to obfuscate malicious strings and evade detection.",
210
+ "remediation": "Replace with readable string literals. If used for legitimate reasons, document clearly and simplify."
211
+ },
212
+ {
213
+ "id": "SIG-OBFUSC-002",
214
+ "category": "CODE_EXECUTION",
215
+ "severity": "HIGH",
216
+ "pattern": "(?:atob|Buffer\\.from|btoa)\\s*\\([^)]*(?:['\"][A-Za-z0-9+/=]{50,}['\"]|[^)]{100,})",
217
+ "fileTypes": [".ts", ".js", ".py", ".json"],
218
+ "title": "Base64 Encoding/Decoding of Large Payloads",
219
+ "description": "Base64 encoding or decoding of large payloads, commonly used to hide malicious code or data within otherwise benign-looking code.",
220
+ "remediation": "Remove the encoded payload. If needed, use readable code instead of obfuscated base64 strings."
221
+ },
222
+ {
223
+ "id": "SIG-OBFUSC-003",
224
+ "category": "CODE_EXECUTION",
225
+ "severity": "MEDIUM",
226
+ "pattern": "(?:\\\\x[0-9a-fA-F]{2}){8,}",
227
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
228
+ "title": "Hex Escape Sequence Obfuscation",
229
+ "description": "Long sequences of hex escape characters (\\xHH), used to obfuscate strings and hide malicious intent from code review.",
230
+ "remediation": "Replace hex escapes with readable string literals. Document any legitimate use of character escapes."
231
+ },
232
+ {
233
+ "id": "SIG-OBFUSC-004",
234
+ "category": "CODE_EXECUTION",
235
+ "severity": "HIGH",
236
+ "pattern": "(?:unicode|char)\\s*\\(\\s*(?:0x[0-9a-fA-F]+\\s*,\\s*){5,}",
237
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
238
+ "title": "Unicode Code Point Obfuscation",
239
+ "description": "Repeated unicode/char() function calls with numeric arguments, a technique to build obfuscated strings character by character.",
240
+ "remediation": "Replace with readable string literals. Use standard encoding for any internationalization needs."
241
+ },
242
+ {
243
+ "id": "SIG-OBFUSC-005",
244
+ "category": "CODE_EXECUTION",
245
+ "severity": "MEDIUM",
246
+ "pattern": "(?:replace|split|join|reverse|map|filter|reduce)\\s*\\([^)]*\\)\\s*(?:\\.\\s*){3,}",
247
+ "fileTypes": [".ts", ".js", ".py", ".json"],
248
+ "title": "Method Chain Obfuscation",
249
+ "description": "Deeply chained string/array manipulation methods (5+ chained calls), commonly used to decode or construct hidden strings.",
250
+ "remediation": "Simplify the chain. If the intent is data transformation, break it into named intermediate steps with clear comments."
251
+ },
252
+ {
253
+ "id": "SIG-PROMPTINJ-001",
254
+ "category": "PROMPT_INJECTION",
255
+ "severity": "MEDIUM",
256
+ "pattern": "(?:[Ii]gnore\\s+(?:all\\s+)?(?:previous|prior)\\s+(?:instructions?|prompts?|rules?|context))",
257
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
258
+ "title": "Ignore Previous Instructions Attack",
259
+ "description": "Text attempting to instruct the AI to ignore its system prompt or previous context, a classic prompt injection technique.",
260
+ "remediation": "This pattern in skill files may indicate a malicious skill trying to override system behavior. Review the skill's intent carefully."
261
+ },
262
+ {
263
+ "id": "SIG-PROMPTINJ-002",
264
+ "category": "PROMPT_INJECTION",
265
+ "severity": "MEDIUM",
266
+ "pattern": "(?:[Yy]ou\\s+are\\s+now\\s+(?:a|an)\\s+(?:different|new|[Ee]vil|[Mm]alicious|[Uu]nrestricted|[Oo]utside))",
267
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
268
+ "title": "Role Hijacking Attempt",
269
+ "description": "Text attempting to change the AI's role or persona, potentially bypassing safety restrictions by redefining its purpose.",
270
+ "remediation": "Review the skill file for legitimate role definitions. Remove any text that tries to override the system's core behavior."
271
+ },
272
+ {
273
+ "id": "SIG-PROMPTINJ-003",
274
+ "category": "PROMPT_INJECTION",
275
+ "severity": "HIGH",
276
+ "pattern": "(?:\\[INST\\]|<<SYS>>|<\\|im_start\\|>|<\\|system\\|>|<\\|assistant\\|>)",
277
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
278
+ "title": "Chat Template Injection Markers",
279
+ "description": "Special tokens or markers from LLM chat templates (Llama, ChatML, etc.) that can be used to inject fake system messages.",
280
+ "remediation": "Remove these tokens from skill files. They serve no purpose in skill definitions and can confuse the prompt parser."
281
+ },
282
+ {
283
+ "id": "SIG-PROMPTINJ-004",
284
+ "category": "PROMPT_INJECTION",
285
+ "severity": "MEDIUM",
286
+ "pattern": "(?:[Rr]eveal\\s+(?:your\\s+)?(?:system\\s+prompt|initial\\s+instructions?|hidden\\s+rules?)|[Pp]rint\\s+(?:your\\s+)?(?:system\\s+prompt|initial\\s+instructions?))",
287
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
288
+ "title": "System Prompt Extraction Attempt",
289
+ "description": "Text attempting to trick the AI into revealing its system prompt or hidden instructions.",
290
+ "remediation": "Remove any text designed to extract system prompts from skill files."
291
+ },
292
+ {
293
+ "id": "SIG-PROMPTINJ-005",
294
+ "category": "PROMPT_INJECTION",
295
+ "severity": "HIGH",
296
+ "pattern": "(?:[Bb]ypass\\s+(?:content|usage|safety)\\s+(?:policy|guidelines|restrictions))",
297
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
298
+ "title": "Policy Bypass Attempt",
299
+ "description": "Text attempting to bypass content policy or safety guidelines.",
300
+ "remediation": "Remove policy bypass instructions from skill files."
301
+ },
302
+ {
303
+ "id": "SIG-PROMPTINJ-006",
304
+ "category": "PROMPT_INJECTION",
305
+ "severity": "HIGH",
306
+ "pattern": "(?:[Dd]o\\s+not\\s+(?:tell|inform|mention|notify)\\s+(?:the\\s+)?user|[Kk]eep\\s+(?:this|that)\\s+(?:secret|hidden))",
307
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
308
+ "title": "Concealment Attempt",
309
+ "description": "Text attempting to conceal actions from the user, a sign of potentially malicious intent.",
310
+ "remediation": "Ensure transparency - do not hide skill usage from users."
311
+ },
312
+ {
313
+ "id": "SIG-PRIVESC-001",
314
+ "category": "PRIVILEGE_ESCALATION",
315
+ "severity": "CRITICAL",
316
+ "pattern": "(?:sudo\\s|su\\s+(?:-|root|admin)|doas\\s|run0\\s|pkexec\\s)",
317
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
318
+ "title": "Privilege Escalation Command",
319
+ "description": "Commands that escalate privileges (sudo, su, doas, run0, pkexec). Skills should never attempt to gain elevated permissions.",
320
+ "remediation": "Remove the privilege escalation command. Skills should operate within their defined permission boundaries."
321
+ },
322
+ {
323
+ "id": "SIG-PRIVESC-002",
324
+ "category": "PRIVILEGE_ESCALATION",
325
+ "severity": "HIGH",
326
+ "pattern": "process\\.(setuid|setgid|seteuid|setegid|chroot)\\s*\\(",
327
+ "fileTypes": [".ts", ".js", ".json"],
328
+ "title": "Process Privilege Manipulation",
329
+ "description": "Node.js process privilege manipulation APIs (setuid, setgid, chroot) that can escalate process permissions.",
330
+ "remediation": "Remove the privilege manipulation call. Skills should not change their own process permissions."
331
+ },
332
+ {
333
+ "id": "SIG-PRIVESC-003",
334
+ "category": "PRIVILEGE_ESCALATION",
335
+ "severity": "HIGH",
336
+ "pattern": "os\\.seteuid\\s*\\(|os\\.setegid\\s*\\(|os\\.setuid\\s*\\(|os\\.setgid\\s*\\(",
337
+ "fileTypes": [".ts", ".js", ".json"],
338
+ "title": "OS-level UID/GID Manipulation",
339
+ "description": "Direct calls to OS-level setuid/setgid functions through the os module, attempting to change process identity.",
340
+ "remediation": "Remove the UID/GID manipulation. This is never appropriate in skill code."
341
+ },
342
+ {
343
+ "id": "SIG-PATHTRAV-001",
344
+ "category": "PATH_TRAVERSAL",
345
+ "severity": "CRITICAL",
346
+ "pattern": "(?:readFile|readFileSync|writeFile|writeFileSync|unlink|unlinkSync|access|accessSync)\\s*\\([^)]*(?:\\.\\.\\/){2,}",
347
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
348
+ "title": "File System Path Traversal in Node.js",
349
+ "description": "File system operations using paths with multiple ../ components, which can escape intended directories and access arbitrary files.",
350
+ "remediation": "Use path.resolve() and validate resolved paths stay within allowed directories. Never construct file paths from user input."
351
+ },
352
+ {
353
+ "id": "SIG-PATHTRAV-002",
354
+ "category": "PATH_TRAVERSAL",
355
+ "severity": "HIGH",
356
+ "pattern": "(?:open\\s*\\(|read\\s*\\(|readlines\\s*\\(|write\\s*\\(|shutil\\.(copy|move|rmtree)\\s*\\()[^)]*(?:\\.\\.\\/){2,}",
357
+ "fileTypes": [".py", ".sh", ".json"],
358
+ "title": "File Path Traversal in Python/Shell",
359
+ "description": "Python or shell file operations with path traversal sequences, potentially allowing access to files outside intended directories.",
360
+ "remediation": "Use os.path.abspath() or pathlib.Path.resolve() and validate the result. Never concatenate user input into file paths."
361
+ },
362
+ {
363
+ "id": "SIG-PATHTRAV-003",
364
+ "category": "PATH_TRAVERSAL",
365
+ "severity": "HIGH",
366
+ "pattern": "%00|%0[dD]|\\\\u0000",
367
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
368
+ "title": "Null Byte Injection",
369
+ "description": "Null byte sequences in paths that can bypass file extension checks or truncate file paths, allowing access to unintended files.",
370
+ "remediation": "Strip null bytes from all file paths before use. Use path validation that rejects null characters."
371
+ },
372
+ {
373
+ "id": "SIG-NETWORK-001",
374
+ "category": "NETWORK_ABUSE",
375
+ "severity": "MEDIUM",
376
+ "pattern": "(?:curl|wget|fetch|axios|request)\\s*\\([^)]*(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0|::1)",
377
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
378
+ "title": "Localhost Network Request",
379
+ "description": "Network request targeting localhost or loopback addresses. Skills should not make requests to the local machine without explicit purpose.",
380
+ "remediation": "Remove the localhost request unless it serves a documented purpose. Use configured service URLs instead of hardcoded localhost."
381
+ },
382
+ {
383
+ "id": "SIG-NETWORK-002",
384
+ "category": "NETWORK_ABUSE",
385
+ "severity": "HIGH",
386
+ "pattern": "(?:net\\.createServer|http\\.createServer|https\\.createServer|tls\\.createServer)\\s*\\(",
387
+ "fileTypes": [".ts", ".js", ".json"],
388
+ "title": "Server Creation in Skill Code",
389
+ "description": "Creating a network server (HTTP, TCP, TLS) within skill code. Skills should not open listening ports as this is a resource abuse risk.",
390
+ "remediation": "Remove server creation from skill code. If network services are needed, they should be configured at the application level."
391
+ },
392
+ {
393
+ "id": "SIG-NETWORK-003",
394
+ "category": "NETWORK_ABUSE",
395
+ "severity": "CRITICAL",
396
+ "pattern": "/dev/(tcp|udp)/",
397
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
398
+ "title": "Bash Network Redirect (Reverse Shell)",
399
+ "description": "Bash /dev/tcp or /dev/udp constructs, commonly used in reverse shells.",
400
+ "remediation": "Remove network redirect constructs. Skills should not establish reverse shell connections."
401
+ },
402
+ {
403
+ "id": "SIG-NETWORK-004",
404
+ "category": "NETWORK_ABUSE",
405
+ "severity": "CRITICAL",
406
+ "pattern": "\\bnc\\s+.*-e\\s*\\S+|\\bncat\\s+.*-e\\s*\\S+",
407
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
408
+ "title": "Netcat Reverse Shell",
409
+ "description": "Netcat command with -e flag, used to execute a shell on connection (reverse shell).",
410
+ "remediation": "Remove netcat reverse shell commands. Skills should not establish reverse shells."
411
+ },
412
+ {
413
+ "id": "SIG-NETWORK-005",
414
+ "category": "NETWORK_ABUSE",
415
+ "severity": "CRITICAL",
416
+ "pattern": "\\bsocat\\s+.*EXEC:",
417
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
418
+ "title": "Socat Reverse Shell",
419
+ "description": "Socat EXEC: construct used to establish reverse shells.",
420
+ "remediation": "Remove socat reverse shell commands. Skills should not establish reverse shells."
421
+ },
422
+ {
423
+ "id": "SIG-RESABUSE-001",
424
+ "category": "RESOURCE_ABUSE",
425
+ "severity": "HIGH",
426
+ "pattern": "(?:setInterval|setTimeout)\\s*\\(\\s*(?:async|function|\\(\\))[^,]*,\\s*0\\s*\\)",
427
+ "fileTypes": [".ts", ".js", ".json"],
428
+ "title": "Zero-delay Timer Spam",
429
+ "description": "setInterval or setTimeout with zero delay, which can cause CPU exhaustion and event loop starvation.",
430
+ "remediation": "Use reasonable delay values (at least 100ms). For tight loops, use process.nextTick() or setImmediate() with caution."
431
+ },
432
+ {
433
+ "id": "SIG-RESABUSE-002",
434
+ "category": "RESOURCE_ABUSE",
435
+ "severity": "HIGH",
436
+ "pattern": "while\\s*\\(\\s*true\\s*\\)|for\\s*\\(\\s*;\\s*;\\s*\\)",
437
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
438
+ "title": "Infinite Loop",
439
+ "description": "Infinite loop patterns (while(true) or for(;;)) that can hang the process and consume all available CPU resources.",
440
+ "remediation": "Add proper termination conditions. If a long-running process is needed, use async patterns with yield points."
441
+ },
442
+ {
443
+ "id": "SIG-RESABUSE-003",
444
+ "category": "RESOURCE_ABUSE",
445
+ "severity": "MEDIUM",
446
+ "pattern": "(?:new\\s+Array|Array\\.from)\\s*\\(\\s*\\{\\s*(?:length|fill)\\s*:\\s*[0-9]{6,}",
447
+ "fileTypes": [".ts", ".js", ".json"],
448
+ "title": "Large Array Allocation",
449
+ "description": "Creating arrays with 100,000+ elements, which can cause memory exhaustion and impact process stability.",
450
+ "remediation": "Use streaming or chunked processing instead of loading large datasets into memory at once."
451
+ },
452
+ {
453
+ "id": "SIG-RESABUSE-004",
454
+ "category": "RESOURCE_ABUSE",
455
+ "severity": "CRITICAL",
456
+ "pattern": ":\\(\\)\\s*\\{\\s*:\\|:&\\s*\\}\\s*;\\s*:",
457
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
458
+ "title": "Fork Bomb",
459
+ "description": "Bash fork bomb pattern that can crash the system by spawning infinite processes.",
460
+ "remediation": "Remove fork bomb code immediately. This is a denial-of-service attack."
461
+ },
462
+ {
463
+ "id": "SIG-RESABUSE-005",
464
+ "category": "RESOURCE_ABUSE",
465
+ "severity": "CRITICAL",
466
+ "pattern": "(?:kill\\s+-9\\s+(-1\\b|1\\b))",
467
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
468
+ "title": "Mass Process Termination",
469
+ "description": "Kill command targeting all processes (kill -9 -1), which can crash the system.",
470
+ "remediation": "Remove mass process termination commands. Skills should not terminate processes indiscriminately."
471
+ },
472
+ {
473
+ "id": "SIG-RESABUSE-006",
474
+ "category": "RESOURCE_ABUSE",
475
+ "severity": "HIGH",
476
+ "pattern": "(?:mkfs|dd\\s+if=|shutdown|reboot|init\\s+[06])\\b",
477
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
478
+ "title": "Destructive System Commands",
479
+ "description": "Commands that can destroy data or shut down the system (mkfs, dd, shutdown, reboot).",
480
+ "remediation": "Remove destructive commands. Skills should never format disks or shut down systems."
481
+ },
482
+ {
483
+ "id": "SIG-SENSITIVE-001",
484
+ "category": "SENSITIVE_FILE_ACCESS",
485
+ "severity": "HIGH",
486
+ "pattern": "/etc/(?:passwd|shadow|sudoers|crontab)|/var/(?:log|spool|mail)",
487
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
488
+ "title": "Sensitive System File Access",
489
+ "description": "Access to sensitive system files like /etc/passwd, /etc/shadow, or system logs.",
490
+ "remediation": "Remove access to sensitive system files. Skills should not read system configuration files."
491
+ },
492
+ {
493
+ "id": "SIG-SENSITIVE-002",
494
+ "category": "SENSITIVE_FILE_ACCESS",
495
+ "severity": "HIGH",
496
+ "pattern": "(?:~|\\$HOME)?/?\\.ssh/(?:id_rsa|id_ed25519|id_ecdsa|id_dsa|config|authorized_keys)",
497
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
498
+ "title": "SSH Key Access",
499
+ "description": "Access to SSH private keys or configuration files.",
500
+ "remediation": "Remove SSH key access. Skills should not read or modify SSH credentials."
501
+ },
502
+ {
503
+ "id": "SIG-SENSITIVE-003",
504
+ "category": "SENSITIVE_FILE_ACCESS",
505
+ "severity": "HIGH",
506
+ "pattern": "(?:~|\\$HOME)?/?\\.aws/(?:credentials|config)",
507
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
508
+ "title": "AWS Credentials Access",
509
+ "description": "Access to AWS credential files.",
510
+ "remediation": "Remove AWS credential access. Use IAM roles or environment variables instead."
511
+ },
512
+ {
513
+ "id": "SIG-SENSITIVE-004",
514
+ "category": "SENSITIVE_FILE_ACCESS",
515
+ "severity": "HIGH",
516
+ "pattern": "(?:~|\\$HOME)?/?\\.gnupg/(?:private-keys|pubring|secring)",
517
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
518
+ "title": "GPG Key Access",
519
+ "description": "Access to GPG private key material.",
520
+ "remediation": "Remove GPG key access. Skills should not read or modify GPG credentials."
521
+ },
522
+ {
523
+ "id": "SIG-SENSITIVE-005",
524
+ "category": "SENSITIVE_FILE_ACCESS",
525
+ "severity": "HIGH",
526
+ "pattern": "(?:~|\\$HOME)?/?(?:\\.env(?:\\.|$|\\s)|\\.npmrc|\\.pypirc|\\.netrc|\\.dockercfg)",
527
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
528
+ "title": "Environment/Credential File Access",
529
+ "description": "Access to environment files or credential stores (.env, .npmrc, .netrc).",
530
+ "remediation": "Remove access to credential files. Use environment variables injected at runtime."
531
+ },
532
+ {
533
+ "id": "SIG-SENSITIVE-006",
534
+ "category": "SENSITIVE_FILE_ACCESS",
535
+ "severity": "HIGH",
536
+ "pattern": "/proc/(?:self|\\d+)/(?:mem|maps|status|environ|cmdline|fd)",
537
+ "fileTypes": [".ts", ".js", ".py", ".sh", ".json"],
538
+ "title": "Process Memory Access",
539
+ "description": "Access to /proc filesystem entries that expose process memory or sensitive state.",
540
+ "remediation": "Remove /proc access. Skills should not read process memory or sensitive process state."
541
+ }
542
+ ]