reskill 1.17.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +13 -0
- package/dist/core/content-scanner.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/scanner.js +13 -0
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -8232,6 +8232,7 @@ const SNIPPET_MAX_LENGTH = 120;
|
|
|
8232
8232
|
}
|
|
8233
8233
|
},
|
|
8234
8234
|
// Rule 3: Content Obfuscation (high) — scans ALL content including safe zones
|
|
8235
|
+
// Zero-width chars and base64 are suspicious everywhere (even inside code blocks).
|
|
8235
8236
|
{
|
|
8236
8237
|
id: 'obfuscation',
|
|
8237
8238
|
level: 'high',
|
|
@@ -8252,6 +8253,18 @@ const SNIPPET_MAX_LENGTH = 120;
|
|
|
8252
8253
|
line: i + 1,
|
|
8253
8254
|
snippet: 'Suspicious base64-encoded block detected'
|
|
8254
8255
|
});
|
|
8256
|
+
return matches;
|
|
8257
|
+
}
|
|
8258
|
+
},
|
|
8259
|
+
// Rule 3b: Large HTML Comments (high) — respects safe zones (code blocks, etc.)
|
|
8260
|
+
// HTML comments inside fenced code blocks are normal code examples, not obfuscation.
|
|
8261
|
+
{
|
|
8262
|
+
id: 'obfuscation',
|
|
8263
|
+
level: 'high',
|
|
8264
|
+
message: 'Detected content obfuscation',
|
|
8265
|
+
skipSafeZones: true,
|
|
8266
|
+
check: (content)=>{
|
|
8267
|
+
const matches = [];
|
|
8255
8268
|
// Large HTML comments (>200 chars of content)
|
|
8256
8269
|
const commentRegex = /<!--([\s\S]{200,}?)-->/g;
|
|
8257
8270
|
let match;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-scanner.d.ts","sourceRoot":"","sources":["../../src/core/content-scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,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B,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA6ErD;AAmDD,+BAA+B;AAC/B,eAAO,MAAM,aAAa,EAAE,SAAS,QAAQ,EAmO5C,CAAC;AA+BF;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAa;gBAEd,OAAO,CAAC,EAAE,cAAc;IAIpC;;;OAGG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU;IAoCjC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU;CAOvC;AAMD;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,QAAQ,EAAE,WAAW,EAAE,CAAC;gBAErB,QAAQ,EAAE,WAAW,EAAE;CAQpC"}
|
package/dist/index.js
CHANGED
|
@@ -200,6 +200,7 @@ const SNIPPET_MAX_LENGTH = 120;
|
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
202
|
// Rule 3: Content Obfuscation (high) — scans ALL content including safe zones
|
|
203
|
+
// Zero-width chars and base64 are suspicious everywhere (even inside code blocks).
|
|
203
204
|
{
|
|
204
205
|
id: 'obfuscation',
|
|
205
206
|
level: 'high',
|
|
@@ -220,6 +221,18 @@ const SNIPPET_MAX_LENGTH = 120;
|
|
|
220
221
|
line: i + 1,
|
|
221
222
|
snippet: 'Suspicious base64-encoded block detected'
|
|
222
223
|
});
|
|
224
|
+
return matches;
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
// Rule 3b: Large HTML Comments (high) — respects safe zones (code blocks, etc.)
|
|
228
|
+
// HTML comments inside fenced code blocks are normal code examples, not obfuscation.
|
|
229
|
+
{
|
|
230
|
+
id: 'obfuscation',
|
|
231
|
+
level: 'high',
|
|
232
|
+
message: 'Detected content obfuscation',
|
|
233
|
+
skipSafeZones: true,
|
|
234
|
+
check: (content)=>{
|
|
235
|
+
const matches = [];
|
|
223
236
|
// Large HTML comments (>200 chars of content)
|
|
224
237
|
const commentRegex = /<!--([\s\S]{200,}?)-->/g;
|
|
225
238
|
let match;
|
package/dist/scanner.js
CHANGED
|
@@ -167,6 +167,7 @@ const SNIPPET_MAX_LENGTH = 120;
|
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
169
|
// Rule 3: Content Obfuscation (high) — scans ALL content including safe zones
|
|
170
|
+
// Zero-width chars and base64 are suspicious everywhere (even inside code blocks).
|
|
170
171
|
{
|
|
171
172
|
id: 'obfuscation',
|
|
172
173
|
level: 'high',
|
|
@@ -187,6 +188,18 @@ const SNIPPET_MAX_LENGTH = 120;
|
|
|
187
188
|
line: i + 1,
|
|
188
189
|
snippet: 'Suspicious base64-encoded block detected'
|
|
189
190
|
});
|
|
191
|
+
return matches;
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
// Rule 3b: Large HTML Comments (high) — respects safe zones (code blocks, etc.)
|
|
195
|
+
// HTML comments inside fenced code blocks are normal code examples, not obfuscation.
|
|
196
|
+
{
|
|
197
|
+
id: 'obfuscation',
|
|
198
|
+
level: 'high',
|
|
199
|
+
message: 'Detected content obfuscation',
|
|
200
|
+
skipSafeZones: true,
|
|
201
|
+
check: (content)=>{
|
|
202
|
+
const matches = [];
|
|
190
203
|
// Large HTML comments (>200 chars of content)
|
|
191
204
|
const commentRegex = /<!--([\s\S]{200,}?)-->/g;
|
|
192
205
|
let match;
|