@solongate/proxy 0.22.0 → 0.23.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/dist/index.js CHANGED
@@ -566,79 +566,10 @@ function installHooks(selectedTools = []) {
566
566
  console.log(` Created ${settingsPath}`);
567
567
  activatedNames.push(client.name);
568
568
  }
569
- const protectedDirs = [".solongate", ...clients.map((c3) => c3.dir)];
570
- try {
571
- if (process.platform === "win32") {
572
- for (const dir of protectedDirs) {
573
- const fullDir = resolve2(dir);
574
- if (existsSync3(fullDir)) {
575
- try {
576
- try {
577
- execSync(`powershell.exe -Command "icacls '${fullDir}' /remove:d '*S-1-1-0' /T /Q"`, { stdio: "ignore" });
578
- } catch {
579
- }
580
- try {
581
- execSync(`powershell.exe -Command "icacls '${fullDir}' /deny '*S-1-1-0:(OI)(CI)(DE,DC,WD,AD,WA)' /T /Q"`, { stdio: "ignore" });
582
- } catch {
583
- }
584
- execSync(`attrib +R /S /D "${fullDir}"`, { stdio: "ignore" });
585
- } catch {
586
- }
587
- }
588
- }
589
- } else {
590
- for (const dir of protectedDirs) {
591
- const fullDir = resolve2(dir);
592
- if (existsSync3(fullDir)) {
593
- try {
594
- execSync(`chmod -R a-w "${fullDir}"`, { stdio: "ignore" });
595
- } catch {
596
- }
597
- try {
598
- execSync(`chattr +i -R "${fullDir}"`, { stdio: "ignore" });
599
- } catch {
600
- }
601
- }
602
- }
603
- }
604
- const protectedFiles = [".env", ".gitignore", ".mcp.json", "policy.json"];
605
- for (const file of protectedFiles) {
606
- const fullPath = resolve2(file);
607
- if (existsSync3(fullPath)) {
608
- if (process.platform === "win32") {
609
- try {
610
- execSync(`powershell.exe -Command "icacls '${fullPath}' /remove:d '*S-1-1-0' /Q"`, { stdio: "ignore" });
611
- } catch {
612
- }
613
- try {
614
- execSync(`powershell.exe -Command "icacls '${fullPath}' /deny '*S-1-1-0:(DE,WD,AD,WA)' /Q"`, { stdio: "ignore" });
615
- } catch {
616
- }
617
- try {
618
- execSync(`attrib +R "${fullPath}"`, { stdio: "ignore" });
619
- } catch {
620
- }
621
- } else {
622
- try {
623
- execSync(`chmod a-w "${fullPath}"`, { stdio: "ignore" });
624
- } catch {
625
- }
626
- try {
627
- execSync(`chattr +i "${fullPath}"`, { stdio: "ignore" });
628
- } catch {
629
- }
630
- }
631
- }
632
- }
633
- console.log(" OS-level DENY protection applied (icacls/chmod)");
634
- console.log(" Protected files: .env, .gitignore, .mcp.json, policy.json");
635
- } catch {
636
- }
637
569
  console.log("");
638
570
  console.log(" Hooks installed:");
639
571
  console.log(" guard.mjs \u2192 blocks policy-violating calls (pre-execution)");
640
572
  console.log(" audit.mjs \u2192 logs all calls to dashboard (post-execution)");
641
- console.log(" File system \u2192 read-only (OS-level protection)");
642
573
  console.log(` Activated for: ${activatedNames.join(", ")}`);
643
574
  }
644
575
  function ensureEnvFile() {
package/dist/init.js CHANGED
@@ -273,79 +273,10 @@ function installHooks(selectedTools = []) {
273
273
  console.log(` Created ${settingsPath}`);
274
274
  activatedNames.push(client.name);
275
275
  }
276
- const protectedDirs = [".solongate", ...clients.map((c) => c.dir)];
277
- try {
278
- if (process.platform === "win32") {
279
- for (const dir of protectedDirs) {
280
- const fullDir = resolve(dir);
281
- if (existsSync(fullDir)) {
282
- try {
283
- try {
284
- execSync(`powershell.exe -Command "icacls '${fullDir}' /remove:d '*S-1-1-0' /T /Q"`, { stdio: "ignore" });
285
- } catch {
286
- }
287
- try {
288
- execSync(`powershell.exe -Command "icacls '${fullDir}' /deny '*S-1-1-0:(OI)(CI)(DE,DC,WD,AD,WA)' /T /Q"`, { stdio: "ignore" });
289
- } catch {
290
- }
291
- execSync(`attrib +R /S /D "${fullDir}"`, { stdio: "ignore" });
292
- } catch {
293
- }
294
- }
295
- }
296
- } else {
297
- for (const dir of protectedDirs) {
298
- const fullDir = resolve(dir);
299
- if (existsSync(fullDir)) {
300
- try {
301
- execSync(`chmod -R a-w "${fullDir}"`, { stdio: "ignore" });
302
- } catch {
303
- }
304
- try {
305
- execSync(`chattr +i -R "${fullDir}"`, { stdio: "ignore" });
306
- } catch {
307
- }
308
- }
309
- }
310
- }
311
- const protectedFiles = [".env", ".gitignore", ".mcp.json", "policy.json"];
312
- for (const file of protectedFiles) {
313
- const fullPath = resolve(file);
314
- if (existsSync(fullPath)) {
315
- if (process.platform === "win32") {
316
- try {
317
- execSync(`powershell.exe -Command "icacls '${fullPath}' /remove:d '*S-1-1-0' /Q"`, { stdio: "ignore" });
318
- } catch {
319
- }
320
- try {
321
- execSync(`powershell.exe -Command "icacls '${fullPath}' /deny '*S-1-1-0:(DE,WD,AD,WA)' /Q"`, { stdio: "ignore" });
322
- } catch {
323
- }
324
- try {
325
- execSync(`attrib +R "${fullPath}"`, { stdio: "ignore" });
326
- } catch {
327
- }
328
- } else {
329
- try {
330
- execSync(`chmod a-w "${fullPath}"`, { stdio: "ignore" });
331
- } catch {
332
- }
333
- try {
334
- execSync(`chattr +i "${fullPath}"`, { stdio: "ignore" });
335
- } catch {
336
- }
337
- }
338
- }
339
- }
340
- console.log(" OS-level DENY protection applied (icacls/chmod)");
341
- console.log(" Protected files: .env, .gitignore, .mcp.json, policy.json");
342
- } catch {
343
- }
344
276
  console.log("");
345
277
  console.log(" Hooks installed:");
346
278
  console.log(" guard.mjs \u2192 blocks policy-violating calls (pre-execution)");
347
279
  console.log(" audit.mjs \u2192 logs all calls to dashboard (post-execution)");
348
- console.log(" File system \u2192 read-only (OS-level protection)");
349
280
  console.log(` Activated for: ${activatedNames.join(", ")}`);
350
281
  }
351
282
  function ensureEnvFile() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "MCP security proxy — protect any MCP server with customizable policies, path/command constraints, rate limiting, and audit logging. Zero code changes required.",
5
5
  "type": "module",
6
6
  "bin": {