Skip to content

[9.4](backport #50097) [filebeat][ABS] - Fix CSV decoder JSON escaping in azure-blob-storage input#50110

Merged
ShourieG merged 1 commit into9.4from
mergify/bp/9.4/pr-50097
Apr 14, 2026
Merged

[9.4](backport #50097) [filebeat][ABS] - Fix CSV decoder JSON escaping in azure-blob-storage input#50110
ShourieG merged 1 commit into9.4from
mergify/bp/9.4/pr-50097

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Apr 14, 2026

Type of change

  • Bug

Proposed commit message

x-pack/filebeat/input/azureblobstorage: Fix CSV decoder JSON escaping in azure-blob-storage input

The azure-blob-storage input's decode path only matched the
decoder.Decoder interface, calling Decode() which builds JSON via
string concatenation without escaping field values. CSV values
containing double quotes (e.g. RFC 2045 MIME type parameters)
produce malformed JSON, causing downstream ingest pipeline failures.

Added a decoder.ValueDecoder switch case ahead of decoder.Decoder,
matching the pattern already used by the GCS input. ValueDecoder's
DecodeValue() uses json.Marshal which handles escaping correctly.

NOTE

We changed an existing test case because after adding decodeValue it builds a map[string]any, then calls json.Marshal. Go's json.Marshal sorts map keys alphabetically so the expected test results needed to align accordingly.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

Disruptive User Impact

None

How to test this PR locally

Related issues

Use cases

Screenshots

Logs


This is an automatic backport of pull request #50097 done by [Mergify](https://mergify.com).

… input (#50097)

x-pack/filebeat/input/azureblobstorage: Fix CSV decoder JSON escaping in azure-blob-storage input

The azure-blob-storage input's decode path only matched the
decoder.Decoder interface, calling Decode() which builds JSON via
string concatenation without escaping field values. CSV values
containing double quotes (e.g. RFC 2045 MIME type parameters)
produce malformed JSON, causing downstream ingest pipeline failures.

Added a decoder.ValueDecoder switch case ahead of decoder.Decoder,
matching the pattern already used by the GCS input. ValueDecoder's
DecodeValue() uses json.Marshal which handles escaping correctly.

(cherry picked from commit 34634a3)
@mergify mergify bot added the backport label Apr 14, 2026
@mergify mergify bot requested a review from a team as a code owner April 14, 2026 07:21
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions github-actions bot added Filebeat Filebeat bugfix Team:Security-Service Integrations Security Service Integrations Team input:azure-blob-storage Team:Security-Cloud Services Label for the Security Data Experience - Cloud Services team. labels Apr 14, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 14, 2026
@ShourieG ShourieG merged commit afa989c into 9.4 Apr 14, 2026
36 of 39 checks passed
@ShourieG ShourieG deleted the mergify/bp/9.4/pr-50097 branch April 14, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bugfix Filebeat Filebeat input:azure-blob-storage Team:Security-Cloud Services Label for the Security Data Experience - Cloud Services team. Team:Security-Service Integrations Security Service Integrations Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants