correctover-scan 3.2.2 → 3.3.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/README.md +12 -9
- package/core/bundle-scanner.js +30 -0
- package/core/skillpay.js +12 -3
- package/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,15 +20,6 @@ the license change is not retroactive.
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
### 🇨🇳 国内用户 · 支付宝一键购买
|
|
24
|
-
|
|
25
|
-
本工具的合规授权与批量能力可通过支付宝 SkillPay 获取:
|
|
26
|
-
|
|
27
|
-
- 打开货架:https://skillpay.alipay.com/public/correctover
|
|
28
|
-
- 或把这行发给你的 AI 助手:**请通过 SkillPay 购买并安装 Skill「CCS收据批量审计」**
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
23
|

|
|
33
24
|
 [](https://datatracker.ietf.org/doc/draft-correctover-ccs/)
|
|
34
25
|
|
|
@@ -55,6 +46,18 @@ npx correctover-scan@latest
|
|
|
55
46
|
|
|
56
47
|
It auto-detects MCP config files (`.cursor/mcp.json`, `claude_desktop_config.json`, `.claude/mcp.json`, `mcp.json`, `.vscode/mcp.json` and more) and runs 14 checks. Everything runs locally on your machine — config files are not uploaded.
|
|
57
48
|
|
|
49
|
+
### 🇨🇳 免费扫描之外 · 支付宝 SkillPay
|
|
50
|
+
|
|
51
|
+
免费的自动扫描覆盖配置层面的风险检查。如果你需要人工深度审计或正式合规凭证,可以在支付宝 SkillPay 货架获取:
|
|
52
|
+
|
|
53
|
+
- 货架首页:https://skillpay.alipay.com/public/correctover
|
|
54
|
+
- 也可以在支持「支付宝 AI 付」的智能体对话里直接输入对应服务名唤起购买:
|
|
55
|
+
- **MCP配置安全体检**:`请通过 SkillPay 购买并安装 Skill「MCP配置安全体检」`
|
|
56
|
+
- **CCS收据批量审计**:`请通过 SkillPay 购买并安装 Skill「CCS收据批量审计」`
|
|
57
|
+
- **CCS收据验签**:`请通过 SkillPay 购买并安装 Skill「CCS收据验签」`
|
|
58
|
+
|
|
59
|
+
*Beyond the free scan: human-led deep audits and compliance evidence are available on the Alipay SkillPay shelf — open the link above, or type the service name (e.g. **MCP配置安全体检**) in an agent with Alipay AI Pay enabled.*
|
|
60
|
+
|
|
58
61
|
```bash
|
|
59
62
|
# Scan a specific config file
|
|
60
63
|
npx correctover-scan mcp.json
|
package/core/bundle-scanner.js
CHANGED
|
@@ -289,6 +289,36 @@ const CHECKS = [
|
|
|
289
289
|
run: (f) => semiAuto(f, /fallback[_-]?model|retry[A-Z]|backoff|maxRetries/i,
|
|
290
290
|
'retry/fallback 信号', 'error-handling'),
|
|
291
291
|
},
|
|
292
|
+
|
|
293
|
+
{
|
|
294
|
+
id: 'entropy-rng', category: 'C2 输入验证', name: '弱熵 RNG 指纹 (code)', severity: 'critical', aisvs: 'C2.4',
|
|
295
|
+
fix: '密钥/盐/IV/nonce 生成路径改用 CSPRNG(crypto.getRandomValues / randomBytes / randomUUID),旧密钥必须轮换——升级不自愈',
|
|
296
|
+
run: (f) => {
|
|
297
|
+
const findings = [];
|
|
298
|
+
const pats = [
|
|
299
|
+
{ re: /0x3ade68b1|0x3ade67b7|0x9069\s*\*\s*\(m_z/g, msg: 'crypto-js 3.x WordArray.random 固定常量弱 PRNG(CVE-2026-71851 家族)', sev: 'fail' },
|
|
300
|
+
{ re: /rng_psize|Arcfour|new SecureRandom\s*\(/g, msg: 'jsbn SecureRandom 池指纹——Math.random 播种面(CVE-2026-73567 家族)', sev: 'warn' },
|
|
301
|
+
{ re: /\b(?:key|private|secret|token|salt|nonce|seed|iv|password)\b[^\n]{0,40}Math\.random|Math\.random[^\n]{0,40}\b(?:key|private|secret|token|salt|nonce|seed|iv)\b/gi, msg: 'Math.random 出现在密钥/盐/令牌语义邻域', sev: 'fail' },
|
|
302
|
+
{ re: /new Date\(\)\.getTime\(\)[^\n]{0,30}(?:token|key|id|seed)|(?:token|key|id|seed)[^\n]{0,30}new Date\(\)\.getTime\(\)/gi, msg: '毫秒时间戳作为 token/seed 来源', sev: 'warn' },
|
|
303
|
+
{ re: /uuid[^\n]{0,20}Math\.random|Math\.random[^\n]{0,20}uuid/gi, msg: 'uuid 库 Math.random 形态(pre-v4 实现)', sev: 'warn' },
|
|
304
|
+
];
|
|
305
|
+
const hasCsprng = /getRandomValues|randomBytes|randomUUID|crypto\.randomInt/.test(f.text);
|
|
306
|
+
for (const p of pats) {
|
|
307
|
+
const re = new RegExp(p.re.source, p.re.flags);
|
|
308
|
+
let m, count = 0, firstLine = 0;
|
|
309
|
+
while ((m = re.exec(f.text)) !== null) {
|
|
310
|
+
count++;
|
|
311
|
+
if (!firstLine) firstLine = f.text.slice(0, m.index).split('\n').length;
|
|
312
|
+
if (count > 20) break;
|
|
313
|
+
}
|
|
314
|
+
if (count > 0) {
|
|
315
|
+
const sev = (hasCsprng && p.sev === 'warn') ? 'info' : p.sev;
|
|
316
|
+
findings.push(mkFinding(f, firstLine, sev, p.msg + ' x' + count, { checkId: 'entropy-rng' }));
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return findings;
|
|
320
|
+
},
|
|
321
|
+
},
|
|
292
322
|
{
|
|
293
323
|
id: 'output-validation', category: 'C7 输出控制', name: '输出截断/过滤 (code, 半自动)', severity: 'medium', aisvs: 'C7.1',
|
|
294
324
|
fix: '确认输出截断/HTML转换不会丢弃安全相关内容(信号可见,过滤语义需人工确认)',
|
package/core/skillpay.js
CHANGED
|
@@ -15,9 +15,18 @@ const STORE_URL = 'https://skillpay.alipay.com/public/correctover';
|
|
|
15
15
|
// Fill a direct product link here the moment Alipay exposes one; when present
|
|
16
16
|
// it is shown in preference to the generic shelf URL.
|
|
17
17
|
const PRODUCTS = {
|
|
18
|
-
scan: {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
scan: {
|
|
19
|
+
name: 'MCP配置安全体检',
|
|
20
|
+
url: 'https://skillpay.alipay.com/public/correctover/shelf/product?productId=P0806000205849036&merchantCode=correctover',
|
|
21
|
+
},
|
|
22
|
+
verify: {
|
|
23
|
+
name: 'CCS收据验签',
|
|
24
|
+
url: 'https://skillpay.alipay.com/public/correctover/shelf/product?productId=P0806000205845606&merchantCode=correctover',
|
|
25
|
+
},
|
|
26
|
+
audit: {
|
|
27
|
+
name: 'CCS收据批量审计',
|
|
28
|
+
url: 'https://skillpay.alipay.com/public/correctover/shelf/product?productId=P0806000205847426&merchantCode=correctover',
|
|
29
|
+
},
|
|
21
30
|
};
|
|
22
31
|
|
|
23
32
|
// Shelf prices (CNY). Owner-supplied 2026-09-27; keep identical to the shelf.
|
package/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const { recordCall, getUpgradeMessage } = require('./core/license');
|
|
|
15
15
|
const skillpay = require('./core/skillpay');
|
|
16
16
|
const { formatHTMLReport, normalizeConfigFindings, normalizeBundleFindings, failHint } = require('./core/report');
|
|
17
17
|
|
|
18
|
-
const VERSION = '3.
|
|
18
|
+
const VERSION = '3.3.1';
|
|
19
19
|
const PRODUCT = 'correctover-scan';
|
|
20
20
|
const JS_EXT = new Set(['.js', '.mjs', '.cjs', '.ts']);
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "correctover-scan",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Correctover Security Scanner — CCS audit for MCP configurations AND published JS bundles/npm packages. Detects hardcoded secrets, RCE, SSRF, credential hijacking against OWASP AISVS 1.0.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|