@zereight/mcp-gitlab 2.1.68 → 2.1.70

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.
Files changed (40) hide show
  1. package/README.ko.md +11 -3
  2. package/README.md +237 -232
  3. package/README.pt-BR.md +8 -4
  4. package/README.zh-CN.md +7 -3
  5. package/build/cli/args.js +298 -0
  6. package/build/cli/compact-mcp-result.js +87 -0
  7. package/build/cli/curated.js +243 -0
  8. package/build/cli/exposure.js +72 -0
  9. package/build/cli/help.js +108 -0
  10. package/build/cli/output.js +65 -0
  11. package/build/cli/replay-command.js +53 -0
  12. package/build/cli/router.js +158 -0
  13. package/build/cli/tables.js +117 -0
  14. package/build/cli-boolean-flags.js +38 -0
  15. package/build/cli-command.js +14 -4
  16. package/build/config.js +30 -7
  17. package/build/index.js +176 -90
  18. package/build/oauth.js +93 -10
  19. package/build/scripts/generate-tool-docs.js +2 -1
  20. package/build/test/cli/args.test.js +175 -0
  21. package/build/test/cli/boolean-flags.test.js +106 -0
  22. package/build/test/cli/compact-mcp-result.test.js +93 -0
  23. package/build/test/cli/credentials.test.js +153 -0
  24. package/build/test/cli/exposure.test.js +104 -0
  25. package/build/test/cli/load-config-snapshot.js +5 -0
  26. package/build/test/cli/output.test.js +74 -0
  27. package/build/test/cli/replay-command.test.js +37 -0
  28. package/build/test/cli/router.test.js +183 -0
  29. package/build/test/gitlab-api-tool-errors.test.js +112 -0
  30. package/build/test/oauth-device-flow-tests.js +10 -0
  31. package/build/test/oauth-download-url.test.js +157 -0
  32. package/build/test/oauth-startup.test.js +204 -0
  33. package/build/test/test-dynamic-project-scope.js +2 -0
  34. package/build/test/test-geteffectiveprojectid.js +20 -26
  35. package/build/test/test-permission-mode.js +86 -0
  36. package/build/test/test-pipeline-schedules.js +3 -1
  37. package/build/test/utils/url.test.js +14 -1
  38. package/build/tools/denied-regex.js +38 -0
  39. package/build/utils/url.js +15 -0
  40. package/package.json +1 -1
@@ -17,6 +17,21 @@ export function normalizeGitLabApiUrl(url) {
17
17
  }
18
18
  return normalizedUrl;
19
19
  }
20
+ const LOOPBACK_HOSTNAMES = new Set(["localhost", "127.0.0.1", "[::1]"]);
21
+ /**
22
+ * True when the URL is plain `http://` to a non-loopback host, i.e. credentials sent
23
+ * to it would cross the network in cleartext. Unparseable URLs return false (they are
24
+ * rejected by the config validation instead).
25
+ */
26
+ export function isCleartextRemoteUrl(url) {
27
+ try {
28
+ const parsed = new URL(url);
29
+ return parsed.protocol === "http:" && !LOOPBACK_HOSTNAMES.has(parsed.hostname);
30
+ }
31
+ catch {
32
+ return false;
33
+ }
34
+ }
20
35
  /**
21
36
  * Dot segments anywhere in a decoded value, including after a percent-encoded
22
37
  * separator ("..%2F..%2Fuser" decodes to a path-traversal sequence).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zereight/mcp-gitlab",
3
- "version": "2.1.68",
3
+ "version": "2.1.70",
4
4
  "mcpName": "io.github.zereight/gitlab-mcp",
5
5
  "description": "GitLab MCP server for projects, merge requests, issues, pipelines, wiki, releases, and more",
6
6
  "keywords": [