correctover-scan 1.3.0 → 1.4.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 +22 -1
- package/core/license.js +37 -23
- package/package.json +4 -9
package/README.md
CHANGED
|
@@ -82,10 +82,31 @@ Try the online version: [correctover.com/scan](https://correctover.com/scan/)
|
|
|
82
82
|
- **OWASP AISVS 1.0** — AI System Vulnerability Severity
|
|
83
83
|
- **GB/T《智能体应用安全基本要求》** — Chinese National Mandatory Standard
|
|
84
84
|
|
|
85
|
+
## Free Tier
|
|
86
|
+
|
|
87
|
+
50 scans/day — no credit card required.
|
|
88
|
+
|
|
89
|
+
Unlock unlimited: [correctover.com/checkout](https://correctover.com/checkout)
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
export CORRECTOVER_LICENSE_KEY=your-key-here
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Related Correctover Tools
|
|
96
|
+
|
|
97
|
+
| Tool | Install | Description |
|
|
98
|
+
|------|---------|-------------|
|
|
99
|
+
| **Security Scanner** | `npx correctover-scan` | MCP config security audit (14 checks) |
|
|
100
|
+
| **Self-Healing Test** | `pip install correctover-test` | Agent self-healing test suite |
|
|
101
|
+
| **Vulnerability Scan** | `pip install correctover-security-audit` | 215 fault type scanner |
|
|
102
|
+
| **Compliance Check** | `pip install correctover-compliance-check` | OAuth 2.1 + CCS v1.0 |
|
|
103
|
+
| **Runtime Guard** | `pip install correctover-runtime-guard` | 22µs RCE/SSRF interception |
|
|
104
|
+
| **MCP Server** | `npm install correctover-mcp-server` | 6-dimension validation |
|
|
105
|
+
|
|
85
106
|
## Links
|
|
86
107
|
|
|
87
108
|
- [correctover.com](https://correctover.com) — AI Agent Runtime Assurance
|
|
88
|
-
- [CCS Standard](https://correctover.com/ccs) — Conformance Specification
|
|
109
|
+
- [CCS Standard](https://correctover.com/ccs) — Conformance Specification (DOI: 10.5281/zenodo.21234580)
|
|
89
110
|
- [Web Scanner](https://correctover.com/scan/) — Online version
|
|
90
111
|
- [GitHub](https://github.com/Correctover) — Source code
|
|
91
112
|
|
package/core/license.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* License validator for correctover-scan NPM.
|
|
3
|
-
* Mirrors the Python LicenseValidator:
|
|
3
|
+
* Mirrors the Python LicenseValidator: 30 free checks/month (no daily reset), CORRECTOVER_LICENSE_KEY unlocks.
|
|
4
4
|
* Supports CV-TRL/CV-PRO (FC) and COV- (Cloud) key formats.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ const path = require('path');
|
|
|
9
9
|
const crypto = require('crypto');
|
|
10
10
|
const os = require('os');
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const FREE_LIMIT_PER_MONTH = 30;
|
|
13
13
|
const STATE_FILE = path.join(os.homedir(), '.correctover', 'license.json');
|
|
14
14
|
|
|
15
15
|
function loadState() {
|
|
@@ -28,14 +28,18 @@ function saveState(state) {
|
|
|
28
28
|
} catch (e) {}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
function currentMonth() {
|
|
32
|
+
return new Date().toISOString().slice(0, 7); // YYYY-MM
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
function getProductState(state, product) {
|
|
32
|
-
const
|
|
36
|
+
const month = currentMonth();
|
|
33
37
|
if (!state.products[product]) {
|
|
34
|
-
state.products[product] = {
|
|
38
|
+
state.products[product] = { checks_used: 0, month: month, total_checks: 0 };
|
|
35
39
|
}
|
|
36
|
-
if (state.products[product].
|
|
37
|
-
state.products[product].
|
|
38
|
-
state.products[product].
|
|
40
|
+
if (state.products[product].month !== month) {
|
|
41
|
+
state.products[product].checks_used = 0;
|
|
42
|
+
state.products[product].month = month;
|
|
39
43
|
}
|
|
40
44
|
return state.products[product];
|
|
41
45
|
}
|
|
@@ -80,49 +84,59 @@ function checkLicense(product) {
|
|
|
80
84
|
return {
|
|
81
85
|
authorized: true,
|
|
82
86
|
tier: 'pro',
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
checks_remaining: Infinity,
|
|
88
|
+
checks_used: ps.checks_used,
|
|
85
89
|
limit: Infinity,
|
|
86
90
|
};
|
|
87
91
|
}
|
|
88
92
|
|
|
89
|
-
const remaining = Math.max(0,
|
|
93
|
+
const remaining = Math.max(0, FREE_LIMIT_PER_MONTH - ps.checks_used);
|
|
90
94
|
return {
|
|
91
95
|
authorized: remaining > 0,
|
|
92
96
|
tier: 'free',
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
limit:
|
|
97
|
+
checks_remaining: remaining,
|
|
98
|
+
checks_used: ps.checks_used,
|
|
99
|
+
limit: FREE_LIMIT_PER_MONTH,
|
|
96
100
|
};
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
function recordCall(product) {
|
|
103
|
+
function recordCall(product, count = 1) {
|
|
100
104
|
const state = loadState();
|
|
101
105
|
const status = checkLicense(product);
|
|
102
106
|
if (!status.authorized) return status;
|
|
103
107
|
|
|
104
108
|
const ps = getProductState(state, product);
|
|
105
|
-
ps.
|
|
106
|
-
ps.
|
|
109
|
+
ps.checks_used += count;
|
|
110
|
+
ps.total_checks = (ps.total_checks || 0) + count;
|
|
107
111
|
saveState(state);
|
|
108
112
|
|
|
109
|
-
status.
|
|
110
|
-
status.
|
|
113
|
+
status.checks_remaining = Math.max(0, FREE_LIMIT_PER_MONTH - ps.checks_used);
|
|
114
|
+
status.checks_used = ps.checks_used;
|
|
111
115
|
return status;
|
|
112
116
|
}
|
|
113
117
|
|
|
114
|
-
function
|
|
118
|
+
function canRun(product, count) {
|
|
119
|
+
const status = checkLicense(product);
|
|
120
|
+
if (status.tier === 'pro') return true;
|
|
121
|
+
return status.checks_remaining >= count;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function getUpgradeMessage(status, context) {
|
|
115
125
|
if (status.tier !== 'free') return '';
|
|
116
|
-
if (status.
|
|
117
|
-
return `\n🚫 Free tier limit reached (${
|
|
126
|
+
if (status.checks_remaining <= 0) {
|
|
127
|
+
return `\n🚫 Free tier limit reached (${FREE_LIMIT_PER_MONTH} checks/month).\n Upgrade to Pro: https://correctover.com/checkout\n Or: export CORRECTOVER_LICENSE_KEY=<your-key>\n`;
|
|
128
|
+
}
|
|
129
|
+
if (context === 'results') {
|
|
130
|
+
return `\n${'━'.repeat(50)}\n🔒 ${status.checks_remaining} checks remaining this month.\n Upgrade to Pro for:\n • Full risk report (all findings)\n • Fix recommendations + auto-heal\n • HTML audit reports\n${'━'.repeat(50)}\n → https://correctover.com/checkout\n${'━'.repeat(50)}\n`;
|
|
118
131
|
}
|
|
119
|
-
return `\n📊 Free tier: ${status.
|
|
132
|
+
return `\n📊 Free tier: ${status.checks_remaining} checks remaining this month.\n Upgrade: https://correctover.com/checkout\n`;
|
|
120
133
|
}
|
|
121
134
|
|
|
122
135
|
module.exports = {
|
|
123
|
-
|
|
136
|
+
FREE_LIMIT_PER_MONTH,
|
|
124
137
|
checkLicense,
|
|
125
138
|
recordCall,
|
|
139
|
+
canRun,
|
|
126
140
|
getUpgradeMessage,
|
|
127
141
|
verifyLicenseKey,
|
|
128
142
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "correctover-scan",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "MCP security scanner — 1 command, 14 OWASP AISVS 1.0 checks. Detect RCE, SSRF, credential exposure. Free: 30 checks/month.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"correctover-scan": "./index.js"
|
|
@@ -24,12 +24,7 @@
|
|
|
24
24
|
"cursor",
|
|
25
25
|
"model-context-protocol",
|
|
26
26
|
"vulnerability",
|
|
27
|
-
"audit"
|
|
28
|
-
"runtime-security",
|
|
29
|
-
"rce-detection",
|
|
30
|
-
"ssrf-detection",
|
|
31
|
-
"credential-hijacking",
|
|
32
|
-
"guardrail"
|
|
27
|
+
"audit"
|
|
33
28
|
],
|
|
34
29
|
"author": "Correctover",
|
|
35
30
|
"license": "MIT",
|
|
@@ -50,4 +45,4 @@
|
|
|
50
45
|
"engines": {
|
|
51
46
|
"node": ">=16.0.0"
|
|
52
47
|
}
|
|
53
|
-
}
|
|
48
|
+
}
|