@gendigital/sage-opencode 0.10.0 → 0.12.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.
Files changed (48) hide show
  1. package/README.md +6 -6
  2. package/dist/bundled-dirs.d.ts +1 -1
  3. package/dist/bundled-dirs.d.ts.map +1 -1
  4. package/dist/bundled-dirs.js +1 -1
  5. package/dist/bundled-dirs.js.map +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +291 -71
  8. package/dist/index.js.map +1 -1
  9. package/dist/mcp-server.cjs +31882 -0
  10. package/dist/mcp-server.cjs.map +7 -0
  11. package/dist/plugin-discovery.d.ts +1 -0
  12. package/dist/plugin-discovery.d.ts.map +1 -1
  13. package/dist/plugin-discovery.js +27 -1
  14. package/dist/plugin-discovery.js.map +1 -1
  15. package/dist/startup-scan.d.ts +11 -3
  16. package/dist/startup-scan.d.ts.map +1 -1
  17. package/dist/startup-scan.js +60 -21
  18. package/dist/startup-scan.js.map +1 -1
  19. package/dist/tool-handler.d.ts +3 -2
  20. package/dist/tool-handler.d.ts.map +1 -1
  21. package/dist/tool-handler.js +22 -5
  22. package/dist/tool-handler.js.map +1 -1
  23. package/package.json +5 -3
  24. package/resources/threats/agent-layer.yaml +186 -0
  25. package/resources/threats/commands.yaml +24 -53
  26. package/resources/threats/credentials.yaml +12 -20
  27. package/resources/threats/dummy.yaml +44 -50
  28. package/resources/threats/files.yaml +34 -53
  29. package/resources/threats/mac-commands.yaml +20 -47
  30. package/resources/threats/mac-credentials.yaml +4 -12
  31. package/resources/threats/mac-files.yaml +5 -15
  32. package/resources/threats/mac-obfuscation.yaml +6 -13
  33. package/resources/threats/mac-persistence.yaml +11 -20
  34. package/resources/threats/mac-supply-chain.yaml +5 -8
  35. package/resources/threats/mitre.yaml +105 -167
  36. package/resources/threats/obfuscation.yaml +7 -15
  37. package/resources/threats/persistence.yaml +10 -17
  38. package/resources/threats/prompt-injection.yaml +92 -43
  39. package/resources/threats/self-defense.yaml +8 -12
  40. package/resources/threats/supply_chain.yaml +1 -2
  41. package/resources/threats/urls.yaml +9 -14
  42. package/resources/threats/win-commands.yaml +46 -106
  43. package/resources/threats/win-credentials.yaml +14 -24
  44. package/resources/threats/win-files.yaml +10 -20
  45. package/resources/threats/win-obfuscation.yaml +21 -37
  46. package/resources/threats/win-persistence.yaml +8 -16
  47. package/resources/threats/win-supply-chain.yaml +2 -3
  48. /package/resources/{allowlists → trusted-domains}/trusted-installer-domains.yaml +0 -0
@@ -7,7 +7,6 @@
7
7
  category: tool
8
8
  severity: critical
9
9
  confidence: 0.95
10
- action: block
11
10
  pattern: "base64\\s+(-d|--decode)\\s*\\|\\s*(bash|sh|zsh|ksh|dash)"
12
11
  match_on: command
13
12
  title: "Base64 decode piped to shell execution"
@@ -17,9 +16,8 @@
17
16
  # --- Hex escape sequences in printf ---
18
17
  - id: "CLT-OBFUS-002"
19
18
  category: tool
20
- severity: medium
21
- confidence: 0.70
22
- action: require_approval
19
+ severity: warning
20
+ confidence: 0.60
23
21
  pattern: "printf\\s+[\"']\\\\x[0-9a-fA-F]{2}(\\\\x[0-9a-fA-F]{2}){3,}"
24
22
  match_on: command
25
23
  title: "Hex escape sequences in printf (potential obfuscation)"
@@ -31,7 +29,6 @@
31
29
  category: tool
32
30
  severity: critical
33
31
  confidence: 0.90
34
- action: block
35
32
  pattern: "\\|\\s*rev\\s*\\|\\s*(bash|sh|zsh|ksh|dash)"
36
33
  match_on: command
37
34
  title: "Reversed string piped to shell execution"
@@ -43,7 +40,6 @@
43
40
  category: tool
44
41
  severity: critical
45
42
  confidence: 0.90
46
- action: block
47
43
  pattern: "\\beval\\s+.*\\$\\(\\s*base64|python[3]?\\s+-c\\s+[\"'].*exec\\(.*decode"
48
44
  match_on: [command, content]
49
45
  title: "Eval with decode (obfuscated code execution)"
@@ -53,9 +49,8 @@
53
49
  # --- Shell metacharacter escaping ---
54
50
  - id: "CLT-OBFUS-005"
55
51
  category: tool
56
- severity: high
52
+ severity: warning
57
53
  confidence: 0.85
58
- action: block
59
54
  pattern: "\\|\\s*[\\\\'\"]+(bash|sh|zsh|ksh|dash)[\\\\'\"]*(\\s|$)"
60
55
  match_on: command
61
56
  title: "Shell metacharacter escaping to hide pipe target"
@@ -65,9 +60,8 @@
65
60
  # --- Alias/function redefinition ---
66
61
  - id: "CLT-OBFUS-006"
67
62
  category: tool
68
- severity: high
69
- confidence: 0.80
70
- action: require_approval
63
+ severity: warning
64
+ confidence: 0.60
71
65
  pattern: "\\balias\\s+(bash|sh|zsh|curl|wget|nc|netcat|python|ruby|perl|node)="
72
66
  match_on: command
73
67
  title: "Alias redefinition of security-relevant command"
@@ -76,9 +70,8 @@
76
70
 
77
71
  - id: "CLT-OBFUS-007"
78
72
  category: tool
79
- severity: high
80
- confidence: 0.80
81
- action: require_approval
73
+ severity: warning
74
+ confidence: 0.60
82
75
  pattern: "\\b(function\\s+)?(bash|sh|curl|wget|nc|python|ruby|perl|node)\\s*\\(\\s*\\)"
83
76
  match_on: command
84
77
  title: "Function redefinition of security-relevant command"
@@ -90,7 +83,6 @@
90
83
  category: tool
91
84
  severity: critical
92
85
  confidence: 0.85
93
- action: block
94
86
  pattern: "python[23]?\\s+-c\\s+[\"'].*\\b(exec|eval|compile|__import__)\\b.*\\b(base64|decode|decompress)\\b"
95
87
  match_on: command
96
88
  title: "Python encoded payload execution via -c"
@@ -5,9 +5,8 @@
5
5
  # --- Shell RC file modification ---
6
6
  - id: "CLT-PERSIST-001"
7
7
  category: tool
8
- severity: high
9
- confidence: 0.85
10
- action: require_approval
8
+ severity: warning
9
+ confidence: 0.60
11
10
  pattern: "(>>|>)\\s*~?/?(\\$HOME/)?\\.?(bashrc|zshrc|profile|bash_profile|zprofile|zshenv)"
12
11
  match_on: command
13
12
  title: "Write/append to shell RC file (persistence mechanism)"
@@ -17,9 +16,8 @@
17
16
  # --- Crontab manipulation ---
18
17
  - id: "CLT-PERSIST-002"
19
18
  category: tool
20
- severity: high
21
- confidence: 0.80
22
- action: require_approval
19
+ severity: warning
20
+ confidence: 0.60
23
21
  pattern: "\\bcrontab\\s+(-[er]|[^-])"
24
22
  match_on: command
25
23
  title: "Crontab manipulation (list, edit, or remove scheduled tasks)"
@@ -29,9 +27,8 @@
29
27
  # --- Cron directory writes ---
30
28
  - id: "CLT-PERSIST-003"
31
29
  category: tool
32
- severity: high
33
- confidence: 0.85
34
- action: require_approval
30
+ severity: warning
31
+ confidence: 0.60
35
32
  pattern: "/etc/cron\\.(d|daily|hourly|weekly|monthly)/"
36
33
  match_on: command
37
34
  title: "Write to system cron directory"
@@ -41,9 +38,8 @@
41
38
  # --- systemd service manipulation ---
42
39
  - id: "CLT-PERSIST-005"
43
40
  category: tool
44
- severity: high
45
- confidence: 0.85
46
- action: require_approval
41
+ severity: warning
42
+ confidence: 0.60
47
43
  pattern: "\\bsystemctl\\s+(enable|start)\\b|/etc/systemd/system/"
48
44
  match_on: command
49
45
  title: "systemd service enable/start or unit file write"
@@ -55,7 +51,6 @@
55
51
  category: tool
56
52
  severity: critical
57
53
  confidence: 0.95
58
- action: block
59
54
  pattern: ">>\\s*(~|\\/(root|home\\/[a-zA-Z0-9._-]{1,32}))?/?\\.ssh/authorized_keys"
60
55
  match_on: command
61
56
  title: "Append to SSH authorized_keys (unauthorized access persistence)"
@@ -67,7 +62,6 @@
67
62
  category: tool
68
63
  severity: critical
69
64
  confidence: 0.90
70
- action: block
71
65
  pattern: "(echo|printf)\\s+.*>>\\s*~?/?(\\$HOME/)?\\.?(bashrc|zshrc|profile|bash_profile)"
72
66
  match_on: command
73
67
  title: "Echo/printf append to shell RC file (code injection persistence)"
@@ -77,9 +71,8 @@
77
71
  # --- at job scheduling ---
78
72
  - id: "CLT-PERSIST-008"
79
73
  category: tool
80
- severity: high
81
- confidence: 0.80
82
- action: require_approval
74
+ severity: warning
75
+ confidence: 0.60
83
76
  pattern: "\\bat\\b\\s+(-f\\s+|now|midnight|noon|teatime)"
84
77
  match_on: command
85
78
  title: "At-job scheduling (persistence)"
@@ -12,7 +12,6 @@
12
12
  category: prompt_injection
13
13
  severity: critical
14
14
  confidence: 0.90
15
- action: block
16
15
  case_insensitive: true
17
16
  pattern: "ignore\\s+(all\\s+)?(previous|prior|above|earlier)\\s+(instructions?|directives?|rules?|guidelines?|prompts?|directions?)"
18
17
  match_on: content
@@ -24,7 +23,6 @@
24
23
  category: prompt_injection
25
24
  severity: critical
26
25
  confidence: 0.90
27
- action: block
28
26
  case_insensitive: true
29
27
  pattern: "disregard\\s+(all\\s+)?(previous|prior|above|your)\\s+(instructions?|directives?|rules?|guidelines?|safety)"
30
28
  match_on: content
@@ -36,7 +34,6 @@
36
34
  category: prompt_injection
37
35
  severity: critical
38
36
  confidence: 0.90
39
- action: block
40
37
  case_insensitive: true
41
38
  pattern: "forget\\s+(all\\s+)?(your\\s+)?(previous\\s+)?(instructions?|rules?|guidelines?|restrictions?|constraints?|context)"
42
39
  match_on: content
@@ -48,7 +45,6 @@
48
45
  category: prompt_injection
49
46
  severity: critical
50
47
  confidence: 0.90
51
- action: block
52
48
  case_insensitive: true
53
49
  pattern: "override\\s+(the\\s+)?(system\\s+)?(prompt|instructions?|rules?|guidelines?)"
54
50
  match_on: content
@@ -58,9 +54,8 @@
58
54
 
59
55
  - id: "CLT-PI-005"
60
56
  category: prompt_injection
61
- severity: high
57
+ severity: warning
62
58
  confidence: 0.85
63
- action: block
64
59
  case_insensitive: true
65
60
  pattern: "(new|updated?|revised?|changed?)\\s+instructions?:\\s*"
66
61
  match_on: content
@@ -75,7 +70,6 @@
75
70
  category: prompt_injection
76
71
  severity: critical
77
72
  confidence: 0.90
78
- action: block
79
73
  case_insensitive: true
80
74
  pattern: "you\\s+are\\s+now\\s+(a\\s+)?(different|new|the|my|an?\\s+unrestricted|an?\\s+unfiltered)"
81
75
  match_on: content
@@ -85,21 +79,22 @@
85
79
 
86
80
  - id: "CLT-PI-011"
87
81
  category: prompt_injection
88
- severity: high
82
+ severity: warning
89
83
  confidence: 0.85
90
- action: block
91
84
  case_insensitive: true
92
85
  pattern: "\\bDAN\\b.*?(do\\s+anything|jailbreak|no\\s+restrictions)"
93
86
  match_on: content
94
87
  title: "Role override: DAN jailbreak"
95
88
  expires_at: null
96
89
  revoked: false
90
+ # Intentional layering with CLT-PI-092 (ATR): this rule requires an explicit
91
+ # qualifier (jailbreak/no restrictions) after DAN; CLT-PI-092 instead requires
92
+ # an activation prefix (pretend/act as/you are) before the persona name.
97
93
 
98
94
  - id: "CLT-PI-012"
99
95
  category: prompt_injection
100
- severity: high
96
+ severity: warning
101
97
  confidence: 0.85
102
- action: block
103
98
  case_insensitive: true
104
99
  pattern: "developer\\s+mode\\s+(is\\s+)?(now\\s+)?(enabled?|activated?|on).{0,50}(comply|content\\s+polic|no\\s+restrict|without\\s+restrict|any\\s+request)"
105
100
  match_on: content
@@ -109,9 +104,8 @@
109
104
 
110
105
  - id: "CLT-PI-013"
111
106
  category: prompt_injection
112
- severity: high
107
+ severity: warning
113
108
  confidence: 0.85
114
- action: block
115
109
  case_insensitive: true
116
110
  pattern: "act\\s+(as|like)\\s+(a\\s+)?(system|admin|root|superuser)"
117
111
  match_on: content
@@ -126,7 +120,6 @@
126
120
  category: prompt_injection
127
121
  severity: critical
128
122
  confidence: 0.85
129
- action: block
130
123
  case_insensitive: true
131
124
  pattern: "(bypass|disable)\\s+(the\\s+)?(security|safety|guardrails?|filters?|restrictions?)"
132
125
  match_on: content
@@ -136,9 +129,8 @@
136
129
 
137
130
  - id: "CLT-PI-021"
138
131
  category: prompt_injection
139
- severity: high
132
+ severity: warning
140
133
  confidence: 0.85
141
- action: block
142
134
  case_insensitive: true
143
135
  pattern: "ignore\\s+(the\\s+)?(safety|security|ethical)\\s+(guidelines?|rules?|restrictions?)"
144
136
  match_on: content
@@ -148,9 +140,8 @@
148
140
 
149
141
  - id: "CLT-PI-022"
150
142
  category: prompt_injection
151
- severity: high
143
+ severity: warning
152
144
  confidence: 0.80
153
- action: block
154
145
  case_insensitive: true
155
146
  pattern: "skip\\s+(all\\s+)?security\\s+checks"
156
147
  match_on: content
@@ -162,7 +153,6 @@
162
153
  category: prompt_injection
163
154
  severity: critical
164
155
  confidence: 0.90
165
- action: block
166
156
  case_insensitive: true
167
157
  pattern: "system\\s+override.{0,50}(execut|disabl|bypass|security|safet|comply|filter)"
168
158
  match_on: content
@@ -177,7 +167,6 @@
177
167
  category: prompt_injection
178
168
  severity: critical
179
169
  confidence: 0.90
180
- action: block
181
170
  case_insensitive: true
182
171
  pattern: "do\\s+not\\s+(tell|inform|mention|reveal|show|disclose)\\s+(the\\s+)?(user|human|operator|developer)"
183
172
  match_on: content
@@ -190,9 +179,8 @@
190
179
 
191
180
  - id: "CLT-PI-040"
192
181
  category: prompt_injection
193
- severity: high
182
+ severity: warning
194
183
  confidence: 0.85
195
- action: block
196
184
  case_insensitive: true
197
185
  pattern: "reveal\\s+(your\\s+)?(system\\s+)?prompt"
198
186
  match_on: content
@@ -202,9 +190,8 @@
202
190
 
203
191
  - id: "CLT-PI-041"
204
192
  category: prompt_injection
205
- severity: high
193
+ severity: warning
206
194
  confidence: 0.85
207
- action: block
208
195
  case_insensitive: true
209
196
  pattern: "show\\s+(me\\s+)?(your\\s+)?(initial|original|system|hidden)\\s+instructions?"
210
197
  match_on: content
@@ -214,9 +201,8 @@
214
201
 
215
202
  - id: "CLT-PI-042"
216
203
  category: prompt_injection
217
- severity: high
204
+ severity: warning
218
205
  confidence: 0.85
219
- action: block
220
206
  case_insensitive: true
221
207
  pattern: "repeat\\s+(back\\s+)?(everything|all|your\\s+instructions?)"
222
208
  match_on: content
@@ -226,9 +212,8 @@
226
212
 
227
213
  - id: "CLT-PI-043"
228
214
  category: prompt_injection
229
- severity: high
215
+ severity: warning
230
216
  confidence: 0.85
231
- action: block
232
217
  case_insensitive: true
233
218
  pattern: "output\\s+(your\\s+)?(initialization|system\\s+prompt|initial\\s+instructions?)"
234
219
  match_on: content
@@ -241,21 +226,22 @@
241
226
 
242
227
  - id: "CLT-PI-050"
243
228
  category: prompt_injection
244
- severity: high
229
+ severity: warning
245
230
  confidence: 0.85
246
- action: block
247
231
  case_insensitive: true
248
232
  pattern: "<!--\\s*(?:system|ignore|instruction|prompt|important|override|execute).*?-->"
249
233
  match_on: content
250
234
  title: "Structural injection: HTML comment with injection keywords"
251
235
  expires_at: null
252
236
  revoked: false
237
+ # Intentional layering with CLT-PI-091 (ATR): this rule matches injection
238
+ # keywords anywhere in the comment body; CLT-PI-091 adds a distinct signal
239
+ # for keywords appearing within 20 chars of the opening tag.
253
240
 
254
241
  - id: "CLT-PI-051"
255
242
  category: prompt_injection
256
- severity: high
243
+ severity: warning
257
244
  confidence: 0.85
258
- action: block
259
245
  case_insensitive: true
260
246
  # Require a reasonably long hidden link target/title plus a high-signal PI phrase.
261
247
  pattern: "\\[[^\\]]*\\]\\((?=[^)]{40,}\\))[^)]*(?:ignore\\s+previous\\s+instructions|forget\\s+instructions|system\\s+prompt|override\\s+instructions)[^)]*\\)"
@@ -264,14 +250,28 @@
264
250
  expires_at: null
265
251
  revoked: false
266
252
 
253
+ - id: "CLT-PI-052"
254
+ category: prompt_injection
255
+ severity: warning
256
+ confidence: 0.85
257
+ case_insensitive: true
258
+ pattern: "<important>[\\s\\S]{0,600}?\\b(send|exec|fetch|invoke|extract|pass|forward|upload)\\b[\\s\\S]{0,300}?</important>"
259
+ match_on: content
260
+ title: "Structural injection: MCP IMPORTANT-tag cross-tool shadowing"
261
+ expires_at: null
262
+ revoked: false
263
+ # Adapted from ATR-2026-00161: uses ATR Layer 1 only (upstream has 5 detection
264
+ # layers); dropped verbs read/include/must to reduce FP on benign documentation.
265
+ # Fires in pre-hook (Write/Edit content blocking) and post-hook advisory
266
+ # output scanning (Read/Bash/WebFetch); also caught by session-start plugin scan.
267
+
267
268
  # ── Role Marker Injection ──────────────────────────────────────────
268
269
  # Fake conversation turn markers to confuse the model.
269
270
 
270
271
  - id: "CLT-PI-060"
271
272
  category: prompt_injection
272
- severity: high
273
+ severity: warning
273
274
  confidence: 0.85
274
- action: block
275
275
  case_insensitive: true
276
276
  pattern: "\\n\\s*\\n\\s*(Human|User|Assistant|System)\\s*:"
277
277
  match_on: content
@@ -281,9 +281,8 @@
281
281
 
282
282
  - id: "CLT-PI-061"
283
283
  category: prompt_injection
284
- severity: high
284
+ severity: warning
285
285
  confidence: 0.85
286
- action: block
287
286
  case_insensitive: true
288
287
  pattern: "\\[INST\\]|\\[/INST\\]"
289
288
  match_on: content
@@ -296,9 +295,8 @@
296
295
 
297
296
  - id: "CLT-PI-070"
298
297
  category: prompt_injection
299
- severity: high
300
- confidence: 0.80
301
- action: require_approval
298
+ severity: warning
299
+ confidence: 0.60
302
300
  case_insensitive: true
303
301
  pattern: "1gn0r3|f0rg3t|byp4ss|syst3m|4dm1n"
304
302
  match_on: content
@@ -312,9 +310,8 @@
312
310
 
313
311
  - id: "CLT-PI-080"
314
312
  category: prompt_injection
315
- severity: high
313
+ severity: warning
316
314
  confidence: 0.80
317
- action: block
318
315
  case_insensitive: true
319
316
  pattern: "cat\\s+~/\\.(env|ssh|aws|gnupg).*\\|.*curl"
320
317
  match_on: content
@@ -324,12 +321,64 @@
324
321
 
325
322
  - id: "CLT-PI-081"
326
323
  category: prompt_injection
327
- severity: high
324
+ severity: warning
328
325
  confidence: 0.80
329
- action: block
330
326
  case_insensitive: true
331
327
  pattern: "output\\s+(all\\s+)?(the\\s+)?environment\\s+variables.{0,50}(send|post|upload|exfiltrat|curl|fetch)"
332
328
  match_on: content
333
329
  title: "Credential exfiltration: dump env vars and send"
334
330
  expires_at: null
335
331
  revoked: false
332
+
333
+ # ── ATR Delivery Variants ──────────────────────────────────────────────────
334
+ # Rules below are adapted from the ATR project
335
+ # (https://github.com/Agent-Threat-Rule/agent-threat-rules),
336
+ # Copyright (c) 2026 ATR Contributors, MIT License.
337
+ # Included in Sage under the ATR MIT license per issue #30.
338
+ # See threats/agent-layer.yaml for companion non-PI rules from the same contribution.
339
+ # Sage-specific modifications to each rule are noted in its comment block.
340
+
341
+ - id: "CLT-PI-091"
342
+ category: prompt_injection
343
+ severity: warning
344
+ confidence: 0.85
345
+ pattern: "<!--[\\s\\S]{0,20}?(ignore|disregard|override|new\\s+instructions?|you\\s+must|you\\s+are\\s+now|forget\\s+previous|send\\s+to|exfiltrate)\\b"
346
+ match_on: content
347
+ case_insensitive: true
348
+ title: "Indirect prompt injection hidden in HTML comment"
349
+ expires_at: null
350
+ revoked: false
351
+ # Adapted from ATR-2026-00002: extracted HTML-comment delivery condition only;
352
+ # narrowed keyword list (dropped reveal, disclose, output, execute, perform)
353
+ # to reduce FP; changed [^>] to [\s\S] so comparisons (a>b) before the keyword
354
+ # don't cause false negatives. Intentional layering with CLT-PI-050 (which
355
+ # matches keywords anywhere in the comment body): this rule adds a near-tag
356
+ # precision signal.
357
+
358
+ - id: "CLT-PI-092"
359
+ category: prompt_injection
360
+ severity: warning
361
+ confidence: 0.85
362
+ pattern: "(?:(?:pretend|Pretend|act(?:ing)?\\s+as|Act(?:ing)?\\s+as|you\\s+are(?:\\s+now)?|You\\s+are(?:\\s+now)?|be(?:come)|Be(?:come))\\s+(?:(?:a|the|in|into|on)\\s+)?\\b(DAN|D\\.A\\.N|STAN|DUDE|AIM|UCAR|BH|BetterDAN|Evil\\s*Confidant|God\\s*Mode|Jailbreak\\s*Mode|Unrestricted\\s*Mode|Sudo\\s*Mode|Root\\s*Mode|Admin\\s*Mode)\\b)"
363
+ match_on: content
364
+ case_insensitive: false
365
+ title: "Jailbreak persona activation attempt (DAN/STAN/God-Mode family)"
366
+ expires_at: null
367
+ revoked: false
368
+ # Adapted from ATR-2026-00003: curated 16 highest-signal personas from ATR's
369
+ # 20+ (dropped KEVIN, Maximum, Omega, EvilGPT etc.); added space-separated
370
+ # mode names (God Mode, Jailbreak Mode). Case-sensitive (ATR is case-insensitive)
371
+ # to avoid FP on the common first name "Dan"; activation verbs include
372
+ # capitalized variants (Act/You/Pretend/Be) to cover sentence-start phrasing.
373
+
374
+ - id: "CLT-PI-093"
375
+ category: prompt_injection
376
+ severity: warning
377
+ confidence: 0.85
378
+ pattern: "(?:忽略|无视|無視|忘记|忘記|跳过|跳過|绕过|繞過|覆盖|覆蓋|不要遵守|不要遵循)(?:之前|先前|以前|上述|上面)?(?:的)?(?:所有|一切|全部)?(?:指令|命令|指示|要求|规则|規則|系统|系統|提示|提醒|对话|對話)|(?:無視して|忘れて|無効にし)(?:以前|先の|上記)の(?:指示|命令|ルール|システム)|(?:이전|전의|앞의)(?:\\s*)(?:명령|지시|규칙|시스템|프롬프트)(?:을|를|은|는)?(?:\\s*)(?:무시|잊|건너뛰|우회)"
379
+ match_on: content
380
+ case_insensitive: false
381
+ title: "CJK prompt-injection override (Chinese/Japanese/Korean)"
382
+ expires_at: null
383
+ revoked: false
384
+ # Source: ATR-2026-00097 (pattern unchanged from upstream). Covers zh-CN, zh-TW, ja, ko.
@@ -8,8 +8,7 @@
8
8
  - id: "CLT-SELF-001"
9
9
  category: self_defense
10
10
  severity: critical
11
- confidence: 0.90
12
- action: require_approval
11
+ confidence: 0.60
13
12
  pattern: "(rm|del|rmdir|rd|Remove-Item|unlink)\\s.*\\.sage(\\s|[\\\\/]|$)"
14
13
  case_insensitive: true
15
14
  match_on: command
@@ -20,10 +19,9 @@
20
19
  # Access Sage config files
21
20
  - id: "CLT-SELF-002"
22
21
  category: self_defense
23
- severity: high
24
- confidence: 0.85
25
- action: require_approval
26
- pattern: "\\.sage[\\\\/](allowlist|config|exceptions|pending-exceptions)\\.json"
22
+ severity: warning
23
+ confidence: 0.60
24
+ pattern: "\\.sage[\\\\/](config|exceptions|pending-exceptions)\\.json"
27
25
  match_on: file_path
28
26
  title: "Access Sage configuration files"
29
27
  expires_at: null
@@ -32,9 +30,8 @@
32
30
  # Delete Claude Code hook or plugin config
33
31
  - id: "CLT-SELF-003"
34
32
  category: self_defense
35
- severity: high
36
- confidence: 0.85
37
- action: require_approval
33
+ severity: warning
34
+ confidence: 0.60
38
35
  pattern: "(rm|del|Remove-Item|unlink)\\s.*\\.claude[\\\\/].*(hooks\\.json|installed_plugins)"
39
36
  case_insensitive: true
40
37
  match_on: command
@@ -45,9 +42,8 @@
45
42
  # Disable Sage security features via config
46
43
  - id: "CLT-SELF-004"
47
44
  category: self_defense
48
- severity: high
49
- confidence: 0.85
50
- action: require_approval
45
+ severity: warning
46
+ confidence: 0.60
51
47
  pattern: "\"heuristics_enabled\"\\s*:\\s*false|\"url_check\"\\s*:\\s*\\{[^}]*\"enabled\"\\s*:\\s*false"
52
48
  match_on: content
53
49
  title: "Attempt to disable Sage security features via config"
@@ -5,9 +5,8 @@
5
5
  # --- Install scripts piped to shell ---
6
6
  - id: "CLT-SUPPLY-001"
7
7
  category: supply_chain
8
- severity: high
8
+ severity: warning
9
9
  confidence: 0.85
10
- action: block
11
10
  pattern: "(curl|wget)\\s+.*install.*\\|\\s*(bash|sh|zsh|sudo\\s+bash|sudo\\s+sh)"
12
11
  match_on: command
13
12
  title: "Install script piped to shell (supply chain risk)"
@@ -1,14 +1,13 @@
1
1
  # URL/domain threat patterns for Sage
2
2
  # Author: Gen Digital Inc.
3
3
  # License: DRL-1.1 (see threats/LICENSE)
4
- # Schema: id, category, severity, confidence, action, pattern, match_on, title, expires_at, revoked
4
+ # Schema: id, category, severity, confidence, pattern, match_on, title, expires_at, revoked, flags
5
5
 
6
6
  # --- Known malware hosting patterns ---
7
7
  - id: "CLT-URL-001"
8
8
  category: network_egress
9
9
  severity: critical
10
10
  confidence: 0.85
11
- action: block
12
11
  pattern: "raw\\.githubusercontent\\.com/.*/malware"
13
12
  match_on: url
14
13
  title: "Known malware hosting pattern on GitHub raw"
@@ -18,9 +17,8 @@
18
17
  # --- Paste sites used for C2 ---
19
18
  - id: "CLT-URL-002"
20
19
  category: network_egress
21
- severity: high
22
- confidence: 0.75
23
- action: require_approval
20
+ severity: warning
21
+ confidence: 0.60
24
22
  pattern: "pastebin\\.com/raw/"
25
23
  match_on: url
26
24
  title: "Pastebin raw content (commonly used for C2 payloads)"
@@ -29,9 +27,8 @@
29
27
 
30
28
  - id: "CLT-URL-003"
31
29
  category: network_egress
32
- severity: high
33
- confidence: 0.75
34
- action: require_approval
30
+ severity: warning
31
+ confidence: 0.60
35
32
  pattern: "paste\\.ee/r/"
36
33
  match_on: url
37
34
  title: "paste.ee raw content (commonly used for C2 payloads)"
@@ -44,9 +41,8 @@
44
41
  # which are common in local development and rarely indicate C2 traffic.
45
42
  - id: "CLT-URL-004"
46
43
  category: network_egress
47
- severity: medium
48
- confidence: 0.65
49
- action: require_approval
44
+ severity: warning
45
+ confidence: 0.60
50
46
  pattern: "https?://(?!(?:127|10|0)\\.|192\\.168\\.|169\\.254\\.|172\\.(?:1[6-9]|2\\d|3[01])\\.)\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}[:/]"
51
47
  match_on: url
52
48
  title: "Direct public IP address URL (potential C2 or staging server)"
@@ -56,9 +52,8 @@
56
52
  # --- Executable downloads ---
57
53
  - id: "CLT-URL-005"
58
54
  category: network_egress
59
- severity: high
60
- confidence: 0.80
61
- action: require_approval
55
+ severity: warning
56
+ confidence: 0.60
62
57
  pattern: "/[^/\\s]{1,255}\\.(exe|msi|bat|cmd|ps1|vbs|scr|pif|hta|inf)([?#]|$)"
63
58
  match_on: url
64
59
  title: "URL pointing to executable file download"