correctover-runtime-guard 2.1.1__tar.gz → 2.1.2__tar.gz

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.
@@ -1,14 +1,13 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: correctover-runtime-guard
3
- Version: 2.1.1
4
- Summary: Real-time RCE/SSRF/credential leak interception for AI agents — 22µs P50, 99.7% detection rate. MCP Server mode with diagnose_error, fault patterns, repair suggestions. Pro license required for full features.
3
+ Version: 2.1.2
4
+ Summary: Real-time RCE/SSRF/credential leak interception for AI agents — MCP Server mode with diagnose_error, fault patterns, repair suggestions. Pro license required for full features.
5
5
  Project-URL: Homepage, https://correctover.com
6
6
  Project-URL: Repository, https://github.com/Correctover/runtime-guard
7
7
  Project-URL: Issues, https://github.com/Correctover/runtime-guard/issues
8
8
  Project-URL: Pricing, https://correctover.com/checkout
9
9
  Author-email: Correctover <wangguigui@correctover.com>
10
10
  License: Proprietary Commercial License
11
- License-File: LICENSE
12
11
  Keywords: ai-agent,correctover,credential-leak,guardrail,interception,mcp,rce,real-time,runtime-guard,security,ssrf
13
12
  Classifier: Development Status :: 4 - Beta
14
13
  Classifier: Intended Audience :: Developers
@@ -25,11 +24,11 @@ Description-Content-Type: text/markdown
25
24
 
26
25
  # 🛡️ correctover-runtime-guard
27
26
 
28
- **Real-time RCE/SSRF/Env Leak interception — 22µs P50.**
27
+ **Real-time RCE/SSRF/Env Leak interception — P50 ≈ 2011µs (local measurement, 2026-08-22).**
29
28
 
30
29
  [![PyPI version](https://img.shields.io/pypi/v/correctover-runtime-guard.svg)](https://pypi.org/project/correctover-runtime-guard/)
31
30
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
32
- [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
31
+ [![License: Proprietary Commercial](https://img.shields.io/badge/license-Proprietary--Commercial-blue.svg)](https://correctover.com/checkout)
33
32
 
34
33
  ## Quick Start
35
34
 
@@ -49,18 +48,29 @@ Runtime guardrail for AI Agent tool calls — intercepts before execution:
49
48
 
50
49
  ### Performance
51
50
 
51
+ Local measurement on a single host (2026-08-22). Indicative only, not a vendor benchmark.
52
+
52
53
  | Metric | Value |
53
54
  |--------|-------|
54
- | P50 latency | 22µs |
55
- | P99 latency | 89µs |
56
- | Overhead | <0.01% |
57
- | Detection rate | 99.7% |
55
+ | P50 latency | ≈2011µs |
56
+ | P99 latency | not benchmarked |
57
+ | Overhead | not benchmarked |
58
+ | Detection rate | qualitative — real-time RCE/SSRF/Env-leak blocking |
59
+
60
+ ### Evidence
61
+
62
+ Backed by CCS fault taxonomy v2.5 (verified 2026-08-22):
63
+
64
+ - **5 verified PoCs** · **3 CVEs referenced**
65
+ - CVE-2026-42271 → LiteLLM (CVSS 8.8, verified)
66
+ - CVE-2026-25536 → MCP TypeScript SDK race condition (CVSS 7.1, verified)
67
+ - CVE-2026-12957 → AWS Language Servers (CVSS 7.8, verified via NVD 2026-08-22)
58
68
 
59
69
  ## Free Tier
60
70
 
61
71
  50 interceptions/day — no credit card required.
62
72
 
63
- Enterprise: $1,999/month — [correctover.com/checkout](https://correctover.com/checkout)
73
+ Enterprise: ¥1,999/month — [correctover.com/checkout](https://correctover.com/checkout)
64
74
 
65
75
  ```bash
66
76
  export CORRECTOVER_LICENSE_KEY=your-key-here
@@ -70,11 +80,11 @@ export CORRECTOVER_LICENSE_KEY=your-key-here
70
80
 
71
81
  | Tool | Install | Description |
72
82
  |------|---------|-------------|
73
- | **Security Scanner** | `npx correctover-scan` | MCP config security audit (14 checks) |
74
- | **Self-Healing Test** | `pip install correctover-test` | Agent self-healing test suite |
75
- | **Vulnerability Scan** | `pip install correctover-security-audit` | 215 fault type scanner |
76
- | **Compliance Check** | `pip install correctover-compliance-check` | OAuth 2.1 + CCS v1.0 |
77
- | **Runtime Guard** | `pip install correctover-runtime-guard` | 22µs RCE/SSRF interception |
78
- | **MCP Server** | `npm install correctover-mcp-server` | 6-dimension validation |
83
+ | **Security Scanner** | `npx correctover-scan` | MCP config security audit(checks 数未核实) |
84
+ | **Self-Healing Test** | `pip install correctover-test` | Agent self-healing test suite(3 scenarios × 3 frameworks) |
85
+ | **Vulnerability Scan** | `pip install correctover-security-audit` | 32 detection rules (CCS v2.5) |
86
+ | **Compliance Check** | `pip install correctover-compliance-check` | OAuth 2.1 + CCS v1.0 (18 checks) |
87
+ | **Runtime Guard** | `pip install correctover-runtime-guard` | RCE/SSRF interception (P50 ≈ 2011µs local measurement) |
88
+ | **MCP Server** | `npm install correctover-mcp-server` | Compatibility package(已退役,转发至 correctover-mcp-gateway) |
79
89
 
80
90
  **Website**: [correctover.com](https://correctover.com) · **GitHub**: [github.com/Correctover](https://github.com/Correctover)
@@ -1,10 +1,10 @@
1
1
  # 🛡️ correctover-runtime-guard
2
2
 
3
- **Real-time RCE/SSRF/Env Leak interception — 22µs P50.**
3
+ **Real-time RCE/SSRF/Env Leak interception — P50 ≈ 2011µs (local measurement, 2026-08-22).**
4
4
 
5
5
  [![PyPI version](https://img.shields.io/pypi/v/correctover-runtime-guard.svg)](https://pypi.org/project/correctover-runtime-guard/)
6
6
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
7
- [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
7
+ [![License: Proprietary Commercial](https://img.shields.io/badge/license-Proprietary--Commercial-blue.svg)](https://correctover.com/checkout)
8
8
 
9
9
  ## Quick Start
10
10
 
@@ -24,18 +24,29 @@ Runtime guardrail for AI Agent tool calls — intercepts before execution:
24
24
 
25
25
  ### Performance
26
26
 
27
+ Local measurement on a single host (2026-08-22). Indicative only, not a vendor benchmark.
28
+
27
29
  | Metric | Value |
28
30
  |--------|-------|
29
- | P50 latency | 22µs |
30
- | P99 latency | 89µs |
31
- | Overhead | <0.01% |
32
- | Detection rate | 99.7% |
31
+ | P50 latency | ≈2011µs |
32
+ | P99 latency | not benchmarked |
33
+ | Overhead | not benchmarked |
34
+ | Detection rate | qualitative — real-time RCE/SSRF/Env-leak blocking |
35
+
36
+ ### Evidence
37
+
38
+ Backed by CCS fault taxonomy v2.5 (verified 2026-08-22):
39
+
40
+ - **5 verified PoCs** · **3 CVEs referenced**
41
+ - CVE-2026-42271 → LiteLLM (CVSS 8.8, verified)
42
+ - CVE-2026-25536 → MCP TypeScript SDK race condition (CVSS 7.1, verified)
43
+ - CVE-2026-12957 → AWS Language Servers (CVSS 7.8, verified via NVD 2026-08-22)
33
44
 
34
45
  ## Free Tier
35
46
 
36
47
  50 interceptions/day — no credit card required.
37
48
 
38
- Enterprise: $1,999/month — [correctover.com/checkout](https://correctover.com/checkout)
49
+ Enterprise: ¥1,999/month — [correctover.com/checkout](https://correctover.com/checkout)
39
50
 
40
51
  ```bash
41
52
  export CORRECTOVER_LICENSE_KEY=your-key-here
@@ -45,11 +56,11 @@ export CORRECTOVER_LICENSE_KEY=your-key-here
45
56
 
46
57
  | Tool | Install | Description |
47
58
  |------|---------|-------------|
48
- | **Security Scanner** | `npx correctover-scan` | MCP config security audit (14 checks) |
49
- | **Self-Healing Test** | `pip install correctover-test` | Agent self-healing test suite |
50
- | **Vulnerability Scan** | `pip install correctover-security-audit` | 215 fault type scanner |
51
- | **Compliance Check** | `pip install correctover-compliance-check` | OAuth 2.1 + CCS v1.0 |
52
- | **Runtime Guard** | `pip install correctover-runtime-guard` | 22µs RCE/SSRF interception |
53
- | **MCP Server** | `npm install correctover-mcp-server` | 6-dimension validation |
59
+ | **Security Scanner** | `npx correctover-scan` | MCP config security audit(checks 数未核实) |
60
+ | **Self-Healing Test** | `pip install correctover-test` | Agent self-healing test suite(3 scenarios × 3 frameworks) |
61
+ | **Vulnerability Scan** | `pip install correctover-security-audit` | 32 detection rules (CCS v2.5) |
62
+ | **Compliance Check** | `pip install correctover-compliance-check` | OAuth 2.1 + CCS v1.0 (18 checks) |
63
+ | **Runtime Guard** | `pip install correctover-runtime-guard` | RCE/SSRF interception (P50 ≈ 2011µs local measurement) |
64
+ | **MCP Server** | `npm install correctover-mcp-server` | Compatibility package(已退役,转发至 correctover-mcp-gateway) |
54
65
 
55
66
  **Website**: [correctover.com](https://correctover.com) · **GitHub**: [github.com/Correctover](https://github.com/Correctover)
@@ -1,6 +1,6 @@
1
1
  """
2
2
  correctover-runtime-guard — Runtime interception for RCE/SSRF/Env leaks.
3
- 22µs P50 detection latency via correctover GuardrailProvider hooks.
3
+ P50 detection latency measured at ~2,011µs on local host (2026-08-22 benchmark).
4
4
 
5
5
  v2.1.1: NB- key decode fix (Alibaba Cloud FC payment system).
6
6
 
@@ -8,4 +8,4 @@ Pricing: Pro ¥199/month | Enterprise ¥1,999/month
8
8
  Website: https://correctover.com/checkout
9
9
  """
10
10
 
11
- __version__ = "2.1.1"
11
+ __version__ = "2.1.2"
@@ -4,7 +4,7 @@ correctover-runtime-guard CLI — license-enforced freemium.
4
4
  Free: diagnose first 2 threats, no repair strategies, no live interception
5
5
  Pro: full diagnosis + repair + live MCP interception + auto-heal
6
6
 
7
- Hook: "This pattern was exploited in Correctover0026 (CVSS 9.8). 3 more hidden."
7
+ Hook: "This pattern was exploited in Correctover0026. 3 more hidden."
8
8
  """
9
9
 
10
10
  import sys
@@ -15,52 +15,54 @@ import click
15
15
 
16
16
  from .guard import RuntimeGuard, FAULT_PATTERNS
17
17
  from .license import LicenseValidator, LicenseExceededError
18
+ from . import __version__ as GUARD_VERSION
18
19
 
19
- VERSION = "2.0.0"
20
+ VERSION = GUARD_VERSION
20
21
  CTA_URL = "https://correctover.com/checkout"
21
- LATENCY_P50 = "22µs"
22
+ # Local measurement 2026-08-22; do not present as a vendor benchmark.
23
+ LATENCY_P50 = "2011µs"
22
24
  FREE_THREAT_PREVIEW = 2
23
25
 
24
26
  # Ammunition: map runtime guard pattern IDs to CCS taxonomy evidence
25
27
  GUARD_AMMO = {
26
28
  "RCE-001": {
27
29
  "taxonomy_id": "CMD-001",
28
- "cwe": "CWE-78", "cve": "CVE-2026-42271", "cvss": 9.8,
30
+ "cwe": "CWE-78", "cve": "CVE-2026-42271", "cvss": 8.8,
29
31
  "bounty_cases": ["Correctover0026", "Correctover0027", "Correctover0028", "Correctover0030"],
30
32
  "verified_poc": True,
31
- "real_target": "MladenSU/cli-mcp-server (CVSS 9.8)",
33
+ "real_target": "LiteLLM (CVSS 8.8)",
32
34
  "consequence": "Remote code execution — full system compromise",
33
35
  },
34
36
  "RCE-002": {
35
37
  "taxonomy_id": "CMD-001",
36
- "cwe": "CWE-78", "cve": "CVE-2026-42271", "cvss": 9.8,
38
+ "cwe": "CWE-78", "cve": "CVE-2026-42271", "cvss": 8.8,
37
39
  "bounty_cases": ["Correctover0049"],
38
40
  "verified_poc": True,
39
- "real_target": "AutoGen CaptainAgent (CVSS 9.8)",
41
+ "real_target": "LiteLLM (CVSS 8.8)",
40
42
  "consequence": "Destructive command execution — data loss or system destruction",
41
43
  },
42
44
  "SSRF-001": {
43
45
  "taxonomy_id": "SSRF-001",
44
- "cwe": "CWE-918", "cve": "CVE-2026-25536", "cvss": 9.1,
46
+ "cwe": "CWE-918", "cve": "CVE-2026-25536", "cvss": 7.1,
45
47
  "bounty_cases": ["Correctover0006", "Correctover0022", "Correctover0023"],
46
48
  "verified_poc": True,
47
- "real_target": "puppeteer-mcp-server, BrowserMCP (CVSS 7.5-8.1)",
49
+ "real_target": "MCP TypeScript SDK race condition (CVSS 7.1)",
48
50
  "consequence": "SSRF — cloud metadata access, internal service enumeration",
49
51
  },
50
52
  "SSRF-002": {
51
53
  "taxonomy_id": "SSRF-001",
52
- "cwe": "CWE-918", "cve": "CVE-2026-25536", "cvss": 9.1,
54
+ "cwe": "CWE-918", "cve": "CVE-2026-25536", "cvss": 7.1,
53
55
  "bounty_cases": ["Correctover0044", "Correctover0046", "Correctover0047"],
54
56
  "verified_poc": True,
55
- "real_target": "mcp-clickhouse, mcp-server-bigquery (CVSS 7.5)",
57
+ "real_target": "MCP TypeScript SDK race condition (CVSS 7.1)",
56
58
  "consequence": "Internal network access — cloud metadata credential theft",
57
59
  },
58
60
  "ENV-001": {
59
61
  "taxonomy_id": "CRED-001",
60
- "cwe": "CWE-200", "cve": "CVE-2026-12957", "cvss": 9.1,
62
+ "cwe": "CWE-200", "cve": "CVE-2026-12957", "cvss": 7.8, # 12957 real target = AWS Language Servers; CVSS verified via NVD 2026-08-22 (v3.1 7.8 HIGH / v4.0 8.5)
61
63
  "bounty_cases": [],
62
64
  "verified_poc": True,
63
- "real_target": "CrewAI v1.15.2 (CVSS 9.1, MSRC accepted)",
65
+ "real_target": "AWS Language Servers (CVSS 7.8, NVD 2026-08-22)",
64
66
  "consequence": "Environment variable leak — API key and secret exposure",
65
67
  },
66
68
  "ENV-002": {
@@ -117,6 +119,22 @@ def _require_pro():
117
119
  return True
118
120
 
119
121
 
122
+ def _gate_scan(validator, is_pro: bool):
123
+ """Free tier: enforce FREE_DAILY_LIMIT (50 scans/day) before running a scan."""
124
+ if is_pro:
125
+ return
126
+ status = validator.check_license()
127
+ if not status.get("can_scan", True):
128
+ limit = status.get("daily_limit", 50)
129
+ click.echo(
130
+ f"\n{'━'*55}\n"
131
+ f"🔒 Free tier daily scan limit reached ({limit}/day).\n"
132
+ f" → Upgrade to Pro for unlimited scans: {CTA_URL}\n"
133
+ f"{'━'*55}\n"
134
+ )
135
+ sys.exit(2)
136
+
137
+
120
138
  def _get_ammo(pattern_id: str) -> dict:
121
139
  """Get ammunition data for a runtime guard pattern."""
122
140
  return GUARD_AMMO.get(pattern_id, {})
@@ -127,10 +145,16 @@ def _get_ammo(pattern_id: str) -> dict:
127
145
  def cli():
128
146
  """🛡️ Correctover Runtime Guard — real-time RCE/SSRF/credential leak interception.
129
147
 
130
- 22µs P50 detection. 8 fault patterns cross-referenced with CCS v2.5 taxonomy.
131
- Backed by 52 ZDI bounty cases · 8 verified PoCs · 6 CVEs.
148
+ 2011µs P50 detection (local measurement). 8 fault patterns cross-referenced with CCS v2.5 taxonomy.
149
+ Backed by 52 ZDI bounty cases · 5 verified PoCs · 3 CVEs.
132
150
  """
133
- pass
151
+ # Windows GBK terminals crash on non-ASCII output (UnicodeEncodeError).
152
+ # Force UTF-8 at the CLI output entry; reconfigure() exists in Py3.7+.
153
+ try:
154
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
155
+ sys.stderr.reconfigure(encoding="utf-8", errors="replace")
156
+ except (AttributeError, ValueError):
157
+ pass
134
158
 
135
159
 
136
160
  @cli.command()
@@ -155,7 +179,7 @@ def start(transport, host, port):
155
179
  click.echo(f" Transport: {BOLD}{transport}{RESET}")
156
180
  click.echo(f" Detection: {GREEN}{LATENCY_P50} P50{RESET}")
157
181
  click.echo(f" Patterns: {len(FAULT_PATTERNS)} cross-referenced with CCS v2.5 taxonomy")
158
- click.echo(f" {DIM}Backed by 52 ZDI bounty cases · 8 verified PoCs · 6 CVEs{RESET}")
182
+ click.echo(f" {DIM}Backed by 52 ZDI bounty cases · 5 verified PoCs · 3 CVEs{RESET}")
159
183
  click.echo(f"{BAR}\n")
160
184
 
161
185
  from .mcp_server import serve
@@ -171,6 +195,7 @@ def diagnose(error_message):
171
195
  Pro tier: shows all threats with full repair + evidence.
172
196
  """
173
197
  is_pro, validator = _get_license_status()
198
+ _gate_scan(validator, is_pro)
174
199
 
175
200
  RED = "\033[91m"; YELLOW = "\033[93m"; GREEN = "\033[92m"
176
201
  CYAN = "\033[96m"; BOLD = "\033[1m"; DIM = "\033[2m"; RESET = "\033[0m"
@@ -186,11 +211,12 @@ def diagnose(error_message):
186
211
  guard._is_pro = False
187
212
 
188
213
  events = guard.diagnose_error(error_message)
214
+ validator.record_scan(risks_found=len(events))
189
215
 
190
216
  click.echo(f"\n{BAR}")
191
217
  click.echo(f" {BOLD}Error Diagnosis Report{RESET}")
192
218
  click.echo(f" Input: {DIM}{error_message[:120]}{'...' if len(error_message) > 120 else ''}{RESET}")
193
- click.echo(f" {DIM}Cross-referenced with CCS v2.5 taxonomy (52 ZDI cases, 8 verified PoCs){RESET}")
219
+ click.echo(f" {DIM}Cross-referenced with CCS v2.5 taxonomy (52 ZDI cases, 5 verified PoCs){RESET}")
194
220
  click.echo(f"{BAR}\n")
195
221
 
196
222
  if not events:
@@ -219,7 +245,10 @@ def diagnose(error_message):
219
245
  if ammo:
220
246
  evidence_parts = [ammo["cwe"]]
221
247
  if ammo.get("cve"):
222
- evidence_parts.append(f"{ammo['cve']} (CVSS {ammo['cvss']})")
248
+ if ammo.get("cvss"):
249
+ evidence_parts.append(f"{ammo['cve']} (CVSS {ammo['cvss']})")
250
+ else:
251
+ evidence_parts.append(f"{ammo['cve']} (CVSS unverified)")
223
252
  click.echo(f" {CYAN}📎 Maps to: {' | '.join(evidence_parts)}{RESET}")
224
253
  if ammo.get("real_target"):
225
254
  click.echo(f" {DIM} Exploited in: {ammo['real_target']}{RESET}")
@@ -244,7 +273,10 @@ def diagnose(error_message):
244
273
  if ammo:
245
274
  evidence_parts = [ammo["cwe"]]
246
275
  if ammo.get("cve"):
247
- evidence_parts.append(f"{ammo['cve']} (CVSS {ammo['cvss']})")
276
+ if ammo.get("cvss"):
277
+ evidence_parts.append(f"{ammo['cve']} (CVSS {ammo['cvss']})")
278
+ else:
279
+ evidence_parts.append(f"{ammo['cve']} (CVSS unverified)")
248
280
  click.echo(f" {CYAN}📎 Evidence: {' | '.join(evidence_parts)}{RESET}")
249
281
  if ammo.get("real_target"):
250
282
  click.echo(f" {DIM} Exploited in: {ammo['real_target']}{RESET}")
@@ -265,7 +297,7 @@ def diagnose(error_message):
265
297
  f" ✓ Repair strategies for each threat\n"
266
298
  f" ✓ Full ZDI bounty case details\n"
267
299
  f" ✓ Real-time blocking ({LATENCY_P50} P50)\n"
268
- f" ✓ Auto-heal (84.1% resolved automatically)\n"
300
+ f" ✓ Auto-heal on detected threats\n"
269
301
  f" ✓ Live interception MCP server\n"
270
302
  f"{BAR}\n"
271
303
  f" → {CTA_URL}\n"
@@ -287,7 +319,7 @@ def stats():
287
319
  click.echo(f" {BOLD}Runtime Guard Statistics{RESET}")
288
320
  click.echo(f" Detection latency: {GREEN}{LATENCY_P50} P50{RESET}")
289
321
  click.echo(f" Fault patterns: {len(FAULT_PATTERNS)} cross-referenced with CCS v2.5")
290
- click.echo(f" {DIM}Backed by 52 ZDI bounty cases · 8 verified PoCs · 6 CVEs · max CVSS 9.8{RESET}")
322
+ click.echo(f" {DIM}Backed by 52 ZDI bounty cases · 5 verified PoCs · 3 CVEs · max CVSS 9.8{RESET}")
291
323
  click.echo(f"{BAR}\n")
292
324
 
293
325
  from collections import Counter
@@ -303,7 +335,11 @@ def stats():
303
335
  ammo = _get_ammo(p.pattern_id)
304
336
  click.echo(f" {sev_color}[{p.severity}]{RESET} {DIM}[{p.pattern_id}]{RESET} {p.description}")
305
337
  if ammo:
306
- cve_str = f" | {ammo['cve']} (CVSS {ammo['cvss']})" if ammo.get("cve") else ""
338
+ if ammo.get("cve"):
339
+ cve_str = (f" | {ammo['cve']} (CVSS {ammo['cvss']})" if ammo.get("cvss")
340
+ else f" | {ammo['cve']} (CVSS unverified)")
341
+ else:
342
+ cve_str = ""
307
343
  click.echo(f" {CYAN}📎 {ammo['cwe']}{cve_str}{RESET}")
308
344
  if ammo.get("real_target"):
309
345
  click.echo(f" {DIM} Exploited in: {ammo['real_target']}{RESET}")
@@ -1,6 +1,6 @@
1
1
  """
2
2
  Runtime Guard Engine — RCE/SSRF/Env leak interception via correctover SDK hooks.
3
- 22µs P50 detection latency.
3
+ Real-time pattern detection (P50 latency measured ~2,011µs on local host, 2026-08-22).
4
4
 
5
5
  v2.0: License enforcement added — core scan requires valid license.
6
6
  Free tier gets limited diagnostics (first 2 patterns, no repair).
@@ -114,6 +114,7 @@ class LicenseValidator:
114
114
  STATE_FILE = Path.home() / ".correctover" / "license.json"
115
115
  KEY_VERSION = "v2"
116
116
 
117
+ FREE_DAILY_LIMIT = 50 # free-tier scans/interceptions per calendar day
117
118
  FREE_FIX_PREVIEW = 2
118
119
  FREE_REPORT = False
119
120
  FREE_HISTORY = False
@@ -153,22 +154,32 @@ class LicenseValidator:
153
154
  self.state["_integrity"] = _state_integrity_hash(content)
154
155
  self.STATE_FILE.write_text(json.dumps(self.state, indent=2))
155
156
 
157
+ def _get_day(self) -> str:
158
+ return time.strftime("%Y-%m-%d")
159
+
156
160
  def _get_product_state(self) -> Dict:
157
161
  return self.state["products"].setdefault(self.product, {
158
162
  "total_scans": 0,
159
163
  "total_risks_found": 0,
160
164
  "first_scan": time.time(),
161
165
  "last_scan": None,
166
+ "daily": {}, # {"2026-08-22": count} free-tier per-day scan counter
162
167
  })
163
168
 
169
+ def _scans_today(self) -> int:
170
+ ps = self._get_product_state()
171
+ return ps.get("daily", {}).get(self._get_day(), 0)
172
+
164
173
  def check_license(self) -> Dict:
165
- """Check license status. Returns tier info and capabilities."""
174
+ """Check license status. Free tier capped at FREE_DAILY_LIMIT scans/day."""
166
175
  license_key = self.state.get("license_key") or os.environ.get("CORRECTOVER_LICENSE_KEY")
167
176
 
168
177
  if license_key and self._verify_license_key(license_key):
169
178
  return {
170
179
  "tier": "pro",
171
180
  "can_scan": True,
181
+ "scans_today": self._scans_today(),
182
+ "daily_limit": None,
172
183
  "can_fix": True,
173
184
  "can_report": True,
174
185
  "can_heal": True,
@@ -177,9 +188,12 @@ class LicenseValidator:
177
188
  "license_key": license_key[:8] + "..." if license_key else None,
178
189
  }
179
190
 
191
+ used = self._scans_today()
180
192
  return {
181
193
  "tier": "free",
182
- "can_scan": True,
194
+ "can_scan": used < self.FREE_DAILY_LIMIT,
195
+ "scans_today": used,
196
+ "daily_limit": self.FREE_DAILY_LIMIT,
183
197
  "can_fix": False,
184
198
  "can_report": False,
185
199
  "can_heal": False,
@@ -193,11 +207,19 @@ class LicenseValidator:
193
207
  return self.check_license()["tier"] == "pro"
194
208
 
195
209
  def record_scan(self, risks_found: int = 0) -> Dict:
196
- """Record a scan. Always allowed — this is the hook."""
210
+ """Record a scan. Free tier is capped at FREE_DAILY_LIMIT scans/day."""
211
+ status = self.check_license()
212
+ if status["tier"] == "free" and not status["can_scan"]:
213
+ raise LicenseExceededError(
214
+ f"Free tier daily scan limit reached ({self.FREE_DAILY_LIMIT}/day). "
215
+ f"Upgrade to Pro for unlimited scans."
216
+ )
197
217
  ps = self._get_product_state()
198
218
  ps["total_scans"] += 1
199
219
  ps["total_risks_found"] += risks_found
200
220
  ps["last_scan"] = time.time()
221
+ daily = ps.setdefault("daily", {})
222
+ daily[self._get_day()] = daily.get(self._get_day(), 0) + 1
201
223
  self._save_state()
202
224
 
203
225
  history = self.state.setdefault("scan_history", [])
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "correctover-runtime-guard"
7
- version = "2.1.1"
8
- description = "Real-time RCE/SSRF/credential leak interception for AI agents — 22µs P50, 99.7% detection rate. MCP Server mode with diagnose_error, fault patterns, repair suggestions. Pro license required for full features."
7
+ version = "2.1.2"
8
+ description = "Real-time RCE/SSRF/credential leak interception for AI agents — MCP Server mode with diagnose_error, fault patterns, repair suggestions. Pro license required for full features."
9
9
  readme = "README.md"
10
10
  license = { text = "Proprietary Commercial License" }
11
11
  authors = [{ name = "Correctover", email = "wangguigui@correctover.com" }]
@@ -35,7 +35,6 @@ Pricing = "https://correctover.com/checkout"
35
35
 
36
36
  [project.scripts]
37
37
  correctover-runtime-guard = "correctover_agent.cli:cli"
38
- correctover = "correctover_agent.cli:cli"
39
38
 
40
39
  [tool.hatch.build.targets.wheel]
41
40
  packages = ["correctover_agent"]
@@ -1,3 +0,0 @@
1
-
2
- __pycache__/
3
- *.pyc
@@ -1,8 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "correctover-runtime-guard": {
4
- "command": "correctover-runtime-guard",
5
- "args": ["start", "--format", "json"]
6
- }
7
- }
8
- }
@@ -1,17 +0,0 @@
1
- Copyright (c) 2026 Correctover. All rights reserved.
2
-
3
- PROPRIETARY COMMERCIAL LICENSE
4
-
5
- This software is proprietary and confidential. Unauthorized copying,
6
- distribution, modification, or use of this software, via any medium,
7
- is strictly prohibited without a valid commercial license from Correctover.
8
-
9
- Free tier usage is limited to:
10
- - Diagnostic scanning of up to 2 fault patterns per invocation
11
- - No repair suggestions, no live interception, no auto-heal
12
-
13
- Pro tier features require a valid license key issued by Correctover.
14
- Purchase at: https://correctover.com/checkout
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
17
- See https://correctover.com/terms for full terms of service.
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "https://glama.ai/schema/glama.json",
3
- "name": "correctover-runtime-guard",
4
- "displayName": "Correctover Runtime Guard — Real-time RCE/SSRF/Env Leak Interception",
5
- "description": "Runtime guardrail for AI Agent tool calls. Intercept RCE, SSRF, and environment variable leaks at 22µs P50. MCP Server mode with diagnose_error, get_fault_pattern, and get_repair_suggestion tools.",
6
- "homepage": "https://correctover.com/agents/runtime-guard",
7
- "category": "Security",
8
- "license": "Apache-2.0",
9
- "tags": ["runtime", "guard", "rce", "ssrf", "env-leak", "mcp", "agent-security", "correctover", "guardrail"],
10
- "pricing": {
11
- "model": "freemium",
12
- "description": "Enterprise $1,999/mo. Free: 1,500 calls/month (50/day).",
13
- "free_tier": "1,500 calls/month (50/day)"
14
- }
15
- }
@@ -1,5 +0,0 @@
1
- name: correctover-runtime-guard
2
- description: Runtime RCE/SSRF/Env leak interception — 22µs P50 via GuardrailProvider
3
- version: 1.0.0
4
- runtime: python
5
- entry: correctover-runtime-guard