Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline|package-lock.json|Cargo.lock|scripts/sign_image.sh|scripts/zap|sonar-project.properties|uv.lock|go.sum|mcpgateway/sri_hashes.json|^.secrets.baseline$",
"lines": null
},
"generated_at": "2026-04-15T16:31:17Z",
"generated_at": "2026-04-16T00:46:36Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -344,79 +344,79 @@
"hashed_secret": "844c398e469ef3fb919da3778944365ab2175fb7",
"is_secret": false,
"is_verified": false,
"line_number": 469,
"line_number": 468,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "319037749ce37e577db0b3628c7f90e333544391",
"is_secret": false,
"is_verified": false,
"line_number": 893,
"line_number": 892,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "6ae2832e494d1098e8901fe156083e39399a24f1",
"is_secret": false,
"is_verified": false,
"line_number": 895,
"line_number": 894,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "43fc45734b96bcb1b6cef373e949eb3524ae199b",
"is_secret": false,
"is_verified": false,
"line_number": 1586,
"line_number": 1585,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "9d989e8d27dc9e0ec3389fc855f142c3d40f0c50",
"is_secret": false,
"is_verified": false,
"line_number": 1797,
"line_number": 1796,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "d3ac7a4ef1a838b4134f2f6e7f3c0d249d74b674",
"is_secret": false,
"is_verified": false,
"line_number": 6226,
"line_number": 6225,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "5932862bcd24dd27d0dc0407ec94fe9d6ea24aeb",
"is_secret": false,
"is_verified": false,
"line_number": 6723,
"line_number": 6722,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "c77c805e32f173e4321ee9187de9c29cb3804513",
"is_secret": false,
"is_verified": false,
"line_number": 6735,
"line_number": 6734,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "8fe3df8a68ddd0d4ab2214186cbb8e38ccd0e06a",
"is_secret": false,
"is_verified": false,
"line_number": 6807,
"line_number": 6806,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "93ac8946882128457cd9e283b30ca851945e6690",
"is_secret": false,
"is_verified": false,
"line_number": 7877,
"line_number": 7876,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ MCP_2025_RPC_PATH ?= /mcp/
MCP_2025_BEARER_TOKEN ?=

# Virtual-environment variables
VENVS_DIR ?= $(HOME)/.venv
VENV_DIR ?= $(VENVS_DIR)/$(PROJECT_NAME)
VENV_DIR ?= $(CURDIR)/.venv

# -----------------------------------------------------------------------------
# Project-wide clean-up targets
Expand Down Expand Up @@ -253,7 +252,7 @@ DETECT_SECRETS_SPEC ?= git+https://github.com/ibm/detect-secrets.git@076672a
.PHONY: venv
venv: uv
@rm -Rf "$(VENV_DIR)"
@test -d "$(VENVS_DIR)" || mkdir -p "$(VENVS_DIR)"
@mkdir -p "$(VENV_DIR)"
@$(UV_BIN) venv "$(VENV_DIR)"
@echo -e "βœ… Virtual env created.\nπŸ’‘ Enter it with:\n . $(VENV_DIR)/bin/activate\n"

Expand Down
5 changes: 2 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
HANDBOOK_NAME := mcpgateway-docs

# Do not change anything below this line
VENVS_DIR := $(HOME)/.venv
VENV_DIR := $(VENVS_DIR)/$(HANDBOOK_NAME)
VENV_DIR := $(CURDIR)/.venv

# Setup to support M1 Macs - Linux will be empty; x86 Macs essentially NO-OP
BREW_SHELLENV := $(shell brew shellenv 2>/dev/null)
Expand All @@ -18,7 +17,7 @@ help:
# help: venv - create a clean virtual environment for development
.PHONY: venv
venv:
@test -d "$(VENVS_DIR)" || mkdir -p "$(VENVS_DIR)"
@mkdir -p "$(VENV_DIR)"
@rm -Rf "$(VENV_DIR)"
@eval '$(BREW_SHELLENV)' && python3 -m venv "$(VENV_DIR)"
@/bin/bash -c "source $(VENV_DIR)/bin/activate && pip install --upgrade pip setuptools wheel && pip install markdown-blockdiag && pip install -r requirements.txt"
Expand Down
4 changes: 2 additions & 2 deletions mcpgateway/services/tool_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,13 @@ class can override either to raise), and without this staged
if isinstance(text, str):
return text
except Exception: # pylint: disable=broad-except
pass
pass # nosec B110
try:
text = repr(obj)
if isinstance(text, str):
return text
except Exception: # pylint: disable=broad-except
pass
pass # nosec B110
# ``fallback_type`` came from ``_safe_type_name`` so it's
# guaranteed to be a ``str`` already.
return f"<{fallback_type} object (unrepresentable)>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ PROJECT_NAME = {{ cookiecutter.plugin_slug }}
TARGET ?= {{ cookiecutter.plugin_slug }}

# Virtual-environment variables
VENVS_DIR ?= $(HOME)/.venv
VENV_DIR ?= $(VENVS_DIR)/$(PROJECT_NAME)
VENV_DIR ?= $(CURDIR)/.venv

# =============================================================================
# Linters
Expand Down Expand Up @@ -296,8 +295,7 @@ show-runtime:
.PHONY: venv
venv:
@rm -Rf "$(VENV_DIR)"
@test -d "$(VENVS_DIR)" || mkdir -p "$(VENVS_DIR)"
@python3 -m venv "$(VENV_DIR)"
@mkdir -p "$(VENV_DIR)"
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m pip install --upgrade pip setuptools pdm uv"
@echo -e "Virtual env created.\n Enter it with:\n . $(VENV_DIR)/bin/activate\n"

Expand Down
5 changes: 2 additions & 3 deletions plugins/external/cedar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ PROJECT_NAME = cedarpolicyplugin
TARGET ?= cedarpolicyplugin

# Virtual-environment variables
VENVS_DIR ?= $(HOME)/.venv
VENV_DIR ?= $(VENVS_DIR)/$(PROJECT_NAME)
VENV_DIR ?= $(CURDIR)/.venv

# =============================================================================
# Linters
Expand Down Expand Up @@ -298,7 +297,7 @@ show-runtime:
.PHONY: venv
venv:
@rm -Rf "$(VENV_DIR)"
@test -d "$(VENVS_DIR)" || mkdir -p "$(VENVS_DIR)"
@mkdir -p "$(VENV_DIR)"
@python3 -m venv "$(VENV_DIR)"
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m pip install --upgrade pip setuptools pdm uv"
@echo -e "βœ… Virtual env created.\nπŸ’‘ Enter it with:\n . $(VENV_DIR)/bin/activate\n"
Expand Down
5 changes: 2 additions & 3 deletions plugins/external/llmguard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ PROJECT_NAME = llmguardplugin
TARGET ?= llmguardplugin

# Virtual-environment variables
VENVS_DIR ?= $(HOME)/.venv
VENV_DIR ?= $(VENVS_DIR)/$(PROJECT_NAME)
VENV_DIR ?= $(CURDIR)/.venv

# =============================================================================
# Linters
Expand Down Expand Up @@ -311,7 +310,7 @@ show-runtime:
.PHONY: venv
venv:
@rm -Rf "$(VENV_DIR)"
@test -d "$(VENVS_DIR)" || mkdir -p "$(VENVS_DIR)"
@mkdir -p "$(VENV_DIR)"
@python3 -m venv "$(VENV_DIR)"
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m pip install --upgrade pip setuptools pdm uv"
@echo -e "βœ… Virtual env created.\nπŸ’‘ Enter it with:\n . $(VENV_DIR)/bin/activate\n"
Expand Down
5 changes: 2 additions & 3 deletions plugins/external/opa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ OPASERVER_VERSION ?= 1.10.1
POLICY_PATH = "./opaserver/rego/policy.rego"

# Virtual-environment variables
VENVS_DIR ?= $(HOME)/.venv
VENV_DIR ?= $(VENVS_DIR)/$(PROJECT_NAME)
VENV_DIR ?= $(CURDIR)/.venv

# =============================================================================
# Linters
Expand Down Expand Up @@ -301,7 +300,7 @@ show-runtime:
.PHONY: venv
venv:
@rm -Rf "$(VENV_DIR)"
@test -d "$(VENVS_DIR)" || mkdir -p "$(VENVS_DIR)"
@mkdir -p "$(VENV_DIR)"
@python3 -m venv "$(VENV_DIR)"
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m pip install --upgrade pip setuptools pdm uv"
@echo -e "βœ… Virtual env created.\nπŸ’‘ Enter it with:\n . $(VENV_DIR)/bin/activate\n"
Expand Down
3 changes: 1 addition & 2 deletions smoketest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
PORT_TIME_SERVER = 8002 # mcpgateway.translate
DOCKER_CONTAINER = "mcpgateway"
PROJECT_NAME = "mcpgateway"
VENVS_DIR = os.getenv("VENVS_DIR", os.path.join(os.path.expanduser("~"), ".venv"))
PROJECT_VENV_DIR = os.getenv("VENV_DIR", os.path.join(VENVS_DIR, PROJECT_NAME))
PROJECT_VENV_DIR = os.getenv("VENV_DIR", os.path.join(os.path.dirname(os.path.abspath(__file__)), ".venv"))
PROJECT_VENV_PYTHON = os.path.join(PROJECT_VENV_DIR, "bin", "python")

MAKE_VENV_CMD = ["make", "venv", "install", "install-dev"]
Expand Down
Loading