From ea0c7eb27180e15c9e9099fc382c83fd12f908a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20De=20la=20Torre=20Vico?= Date: Fri, 31 Jul 2026 11:02:45 +0200 Subject: [PATCH] fix(mcp): prevent prowler_list_integrations 500 on tenants with a Jira integration (#12259) --- mcp_server/changelog.d/list-integrations-jira.fixed.md | 1 + .../prowler_mcp_server/prowler_app/models/integrations.py | 2 +- .../prowler_mcp_server/prowler_app/tools/integrations.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 mcp_server/changelog.d/list-integrations-jira.fixed.md diff --git a/mcp_server/changelog.d/list-integrations-jira.fixed.md b/mcp_server/changelog.d/list-integrations-jira.fixed.md new file mode 100644 index 0000000000..a839a35f18 --- /dev/null +++ b/mcp_server/changelog.d/list-integrations-jira.fixed.md @@ -0,0 +1 @@ +`prowler_list_integrations` failing with a 500 error on tenants with a Jira integration, caused by the request leaving `configuration` out of the sparse fieldset diff --git a/mcp_server/prowler_mcp_server/prowler_app/models/integrations.py b/mcp_server/prowler_mcp_server/prowler_app/models/integrations.py index 8bc3d6f303..35d6c3d518 100644 --- a/mcp_server/prowler_mcp_server/prowler_app/models/integrations.py +++ b/mcp_server/prowler_mcp_server/prowler_app/models/integrations.py @@ -225,7 +225,7 @@ class JiraIssueTypes(MinimalSerializerMixin, BaseModel): model_config = ConfigDict(frozen=True) project_key: str = Field( - description="Jira project key the issue types belong to (e.g. 'PRWLR')" + description="Jira project key the issue types belong to (e.g. 'PROJ')" ) issue_types: list[str] = Field( description="Issue types that can be used when sending findings to this project (e.g. 'Task', 'Bug', 'Story')" diff --git a/mcp_server/prowler_mcp_server/prowler_app/tools/integrations.py b/mcp_server/prowler_mcp_server/prowler_app/tools/integrations.py index a92cc5cc5e..e189a95684 100644 --- a/mcp_server/prowler_mcp_server/prowler_app/tools/integrations.py +++ b/mcp_server/prowler_mcp_server/prowler_app/tools/integrations.py @@ -25,7 +25,7 @@ from prowler_mcp_server.prowler_app.tools.base import BaseTool # detailed view returned by prowler_get_integration INTEGRATION_LIST_FIELDS = ( "enabled,connected,connection_last_checked_at,integration_type,providers," - "inserted_at,updated_at" + "configuration,inserted_at,updated_at" ) CONNECTION_CHECK_TIMEOUT = 120 @@ -639,7 +639,7 @@ class IntegrationsTools(BaseTool): description="UUID of the Jira integration. Use prowler_list_integrations with integration_type=['jira'] to find it." ), project_key: str = Field( - description="Key of the Jira project to read the issue types from (e.g. 'PRWLR'). It must be one of the keys in the 'projects' mapping of the integration configuration." + description="Key of the Jira project to read the issue types from (e.g. 'PROJ'). It must be one of the keys in the 'projects' mapping of the integration configuration." ), ) -> dict[str, Any]: """List the issue types available in a Jira project. @@ -677,7 +677,7 @@ class IntegrationsTools(BaseTool): description="UUID of the Jira integration to send the findings through. It must be enabled." ), project_key: str = Field( - description="Key of the Jira project the work items are created in (e.g. 'PRWLR'). It must be one of the keys in the 'projects' mapping of the integration configuration." + description="Key of the Jira project the work items are created in (e.g. 'PROJ'). It must be one of the keys in the 'projects' mapping of the integration configuration." ), issue_type: str = Field( description="Jira issue type for the created work items (e.g. 'Task', 'Bug', 'Story'). It must be one of the values returned by prowler_get_jira_issue_types for this project."