data-compliance-mcp 1.0.19 → 1.0.20

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/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.20] - 2026-06-17
4
+ - fix: Stripe webhook now validates payment_link ID — ignores events not belonging to this server
5
+
3
6
  ## [1.0.19] - 2026-06-16
4
7
  - feat: ATO optimisation — purpose verb, usage context, required fields, ToolRank badge
5
8
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "data-compliance-mcp",
3
3
  "mcpName": "io.github.OjasKord/data-compliance-mcp",
4
- "version": "1.0.19",
4
+ "version": "1.0.20",
5
5
  "description": "Data safety classifier for AI agents. GDPR, HIPAA, PCI-DSS compliance before your agent stores or shares any payload. SAFE/ESCALATE verdict in one call.",
6
6
  "main": "src/server.js",
7
7
  "scripts": {
package/server.json CHANGED
@@ -1,25 +1,42 @@
1
- {
2
- "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
- "name": "io.github.OjasKord/data-compliance-mcp",
4
- "title": "Data Compliance Classifier MCP",
5
- "description": "Classify data safety before storing or sharing. GDPR, HIPAA, PCI-DSS, CCPA. AI-powered.",
6
- "version": "1.0.6",
7
- "websiteUrl": "https://kordagencies.com",
8
- "repository": {
9
- "url": "https://github.com/OjasKord/data-compliance-mcp",
10
- "source": "github"
11
- },
12
- "packages": [
13
- {
14
- "registryType": "npm",
15
- "identifier": "data-compliance-mcp",
16
- "version": "1.0.6",
17
- "transport": { "type": "stdio" },
18
- "environmentVariables": [
19
- { "name": "ANTHROPIC_API_KEY", "description": "Anthropic API key for AI classification", "isRequired": true, "isSecret": true },
20
- { "name": "ABUSEIPDB_API_KEY", "description": "AbuseIPDB API key for threat intelligence (optional)", "isRequired": false, "isSecret": true }
21
- ]
22
- }
23
- ],
24
- "remotes": [{ "type": "streamable-http", "url": "https://data-compliance-mcp-production.up.railway.app" }]
25
- }
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.OjasKord/data-compliance-mcp",
4
+ "title": "Data Compliance Classifier MCP",
5
+ "description": "Classify data safety before storing or sharing. GDPR, HIPAA, PCI-DSS, CCPA. AI-powered.",
6
+ "version": "1.0.19",
7
+ "websiteUrl": "https://kordagencies.com",
8
+ "repository": {
9
+ "url": "https://github.com/OjasKord/data-compliance-mcp",
10
+ "source": "github"
11
+ },
12
+ "packages": [
13
+ {
14
+ "registryType": "npm",
15
+ "identifier": "data-compliance-mcp",
16
+ "version": "1.0.19",
17
+ "transport": {
18
+ "type": "stdio"
19
+ },
20
+ "environmentVariables": [
21
+ {
22
+ "name": "ANTHROPIC_API_KEY",
23
+ "description": "Anthropic API key for AI classification",
24
+ "isRequired": true,
25
+ "isSecret": true
26
+ },
27
+ {
28
+ "name": "ABUSEIPDB_API_KEY",
29
+ "description": "AbuseIPDB API key for threat intelligence (optional)",
30
+ "isRequired": false,
31
+ "isSecret": true
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ "remotes": [
37
+ {
38
+ "type": "streamable-http",
39
+ "url": "https://data-compliance-mcp-production.up.railway.app"
40
+ }
41
+ ]
42
+ }
package/src/server.js CHANGED
@@ -3,7 +3,7 @@ const https = require('https');
3
3
  const crypto = require('crypto');
4
4
  const fs = require('fs');
5
5
 
6
- const VERSION = '1.0.19';
6
+ const VERSION = '1.0.20';
7
7
  const PERSIST_FILE = '/tmp/datacompliance_stats.json';
8
8
  const API_KEYS_FILE = '/tmp/datacompliance_apikeys.json';
9
9
  const ANTHROPIC_API_KEY = process.env.ANTHROPIC_API_KEY || '';
@@ -41,6 +41,7 @@ function checkPerMinuteLimit(ip, toolName, limit) {
41
41
  const STRIPE_PRO_URL = 'https://buy.stripe.com/cNidR87s9dXD0pue7Sebu0r';
42
42
  const ENTERPRISE_UPGRADE_URL = 'https://buy.stripe.com/9B6bJ0aElbPv7RW9RCebu0s';
43
43
  const STRIPE_ENTERPRISE_URL = 'https://buy.stripe.com/cNi7sKeUB8Dj7RW7Juebu0d';
44
+ const ALLOWED_PAYMENT_LINK_IDS = ['plink_1TQzEjD6WvRe6sn35lz6hsVZ', 'plink_1TQzGlD6WvRe6sn3o85eJaLV', 'plink_1TObMjD6WvRe6sn3jOhhQVLR'];
44
45
 
45
46
  const REDIS_PREFIX = 'dcc';
46
47
  const FREE_TIER_REDIS_KEY = 'dcc:free_tier_usage';
@@ -920,6 +921,11 @@ async function handleStripeWebhook(body, sig) {
920
921
  const event = JSON.parse(body);
921
922
  if (event.type === 'checkout.session.completed') {
922
923
  const session = event.data.object;
924
+ const paymentLinkId = session.payment_link;
925
+ if (paymentLinkId && !ALLOWED_PAYMENT_LINK_IDS.includes(paymentLinkId)) {
926
+ console.log('[data-compliance] Webhook received but payment link ' + paymentLinkId + ' not for this server — ignoring.');
927
+ return { received: true, ignored: true };
928
+ }
923
929
  const email = session.customer_email || session.customer_details?.email;
924
930
  const plan = getPlanFromProduct(session.metadata?.product_name || '');
925
931
  if (email) {