fix(jira): truncate summary to 255 characters to prevent INVALID_INPUT error (#9926)

This commit is contained in:
Hugo Pereira Brito
2026-02-02 12:11:03 +01:00
committed by GitHub
parent 0f55d6e21d
commit 2535b55951
2 changed files with 4 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
### Fixed
- Duplicated findings in `entra_user_with_vm_access_has_mfa` check when user has multiple VM access roles [(#9914)](https://github.com/prowler-cloud/prowler/pull/9914)
- Jira integration failing with `INVALID_INPUT` error when sending findings with long resource UIDs exceeding 255-character summary limit [(#9926)](https://github.com/prowler-cloud/prowler/pull/9926)
---

View File

@@ -1875,12 +1875,12 @@ class Jira:
summary_parts.append(finding.resource_uid)
summary = " - ".join(summary_parts[1:])
summary = f"{summary_parts[0]} {summary}"
summary = f"{summary_parts[0]} {summary}"[:255]
payload = {
"fields": {
"project": {"key": project_key},
"summary": f"[Prowler] {finding.metadata.Severity.value.upper()} - {finding.metadata.CheckID} - {finding.resource_uid}",
"summary": summary,
"description": adf_description,
"issuetype": {"name": issue_type},
"customfield_10148": {"value": "SDK"},
@@ -2081,7 +2081,7 @@ class Jira:
if resource_uid:
summary_parts.append(resource_uid)
summary = " - ".join(summary_parts[1:])
summary = f"{summary_parts[0]} {summary}"
summary = f"{summary_parts[0]} {summary}"[:255]
payload = {
"fields": {