Skip to content

[Logs UX] Fix codeql and buildkite pipeline issue#233455

Merged
achyutjhunjhunwala merged 11 commits intoelastic:mainfrom
achyutjhunjhunwala:fix-codeql-issues-and-buildkite-pipeline
Aug 29, 2025
Merged

[Logs UX] Fix codeql and buildkite pipeline issue#233455
achyutjhunjhunwala merged 11 commits intoelastic:mainfrom
achyutjhunjhunwala:fix-codeql-issues-and-buildkite-pipeline

Conversation

@achyutjhunjhunwala
Copy link
Contributor

Summary

closes - https://github.com/elastic/kibana-team/issues/1960#issuecomment-3236355328

This PR resolves two critical issues -:

  1. Security: Fixed CodeQL security alerts for incomplete string sanitisation
  2. CI/CD: Fixed Docker permission denied errors in Buildkite pipeline

Changes Made

🔒 Security Fix - String Escaping

  • File: src/platform/packages/shared/kbn-otel-semantic-conventions/src/generate.ts
  • Issue: CodeQL flagged incomplete sanitization on lines 31, 32, 33, and 38
  • Fix: Updated string escaping to properly handle both backslashes and single quotes

🐳 Docker Permission Fix

  • File: .buildkite/scripts/steps/otel_semconv_sync.sh
  • Issue: Docker weaver command failing with "Permission denied" when writing output files
  • Root Cause: User ID mapping conflict between host and container environment
  • Solution: Pre-create output directory with proper permissions before Docker execution

The CI fix is still trial and error. I am discussing with Kibana Ops to see how to better check for such errors

@achyutjhunjhunwala achyutjhunjhunwala self-assigned this Aug 29, 2025
@achyutjhunjhunwala achyutjhunjhunwala added the release_note:skip Skip the PR/issue when compiling release notes label Aug 29, 2025
@achyutjhunjhunwala achyutjhunjhunwala requested a review from a team as a code owner August 29, 2025 10:58
@achyutjhunjhunwala achyutjhunjhunwala added backport:skip This PR does not require backporting Team:obs-onboarding Observability Onboarding Team labels Aug 29, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

@achyutjhunjhunwala achyutjhunjhunwala enabled auto-merge (squash) August 29, 2025 10:58
Copy link
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@achyutjhunjhunwala achyutjhunjhunwala enabled auto-merge (squash) August 29, 2025 17:57
@achyutjhunjhunwala achyutjhunjhunwala merged commit 9a8dd4b into elastic:main Aug 29, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #104 / cases security and spaces enabled: basic Common analytics indexes synchronization task should sync the cases attachments index

Metrics [docs]

✅ unchanged

History

cc @achyutjhunjhunwala

@achyutjhunjhunwala achyutjhunjhunwala deleted the fix-codeql-issues-and-buildkite-pipeline branch August 29, 2025 18:32
ymao1 pushed a commit to ymao1/kibana that referenced this pull request Aug 29, 2025
## Summary

closes -
elastic/kibana-team#1960 (comment)

This PR resolves two critical issues -:

1. Security: [Fixed CodeQL security alerts for incomplete string
sanitisation](elastic/kibana-team#1960 (comment))
2. [CI/CD: Fixed Docker permission denied errors in Buildkite
pipeline](https://buildkite.com/elastic/kibana-opentelemetry-semantic-conventions-sync/builds/3/steps/table?jid=0198f539-82a8-4fb2-9be9-f6704960a5a8)

  Changes Made

  🔒 Security Fix - String Escaping

- File:
src/platform/packages/shared/kbn-otel-semantic-conventions/src/generate.ts
- Issue: CodeQL flagged incomplete sanitization on lines 31, 32, 33, and
38
- Fix: Updated string escaping to properly handle both backslashes and
single quotes

  🐳 Docker Permission Fix

  - File: .buildkite/scripts/steps/otel_semconv_sync.sh
- Issue: Docker weaver command failing with "Permission denied" when
writing output files
- Root Cause: User ID mapping conflict between host and container
environment
- Solution: Pre-create output directory with proper permissions before
Docker execution

The CI fix is still trial and error. I am discussing with Kibana Ops to
see how to better check for such errors
jkelas pushed a commit to jkelas/kibana that referenced this pull request Sep 2, 2025
## Summary

closes -
elastic/kibana-team#1960 (comment)

This PR resolves two critical issues -:

1. Security: [Fixed CodeQL security alerts for incomplete string
sanitisation](elastic/kibana-team#1960 (comment))
2. [CI/CD: Fixed Docker permission denied errors in Buildkite
pipeline](https://buildkite.com/elastic/kibana-opentelemetry-semantic-conventions-sync/builds/3/steps/table?jid=0198f539-82a8-4fb2-9be9-f6704960a5a8)

  Changes Made

  🔒 Security Fix - String Escaping

- File:
src/platform/packages/shared/kbn-otel-semantic-conventions/src/generate.ts
- Issue: CodeQL flagged incomplete sanitization on lines 31, 32, 33, and
38
- Fix: Updated string escaping to properly handle both backslashes and
single quotes

  🐳 Docker Permission Fix

  - File: .buildkite/scripts/steps/otel_semconv_sync.sh
- Issue: Docker weaver command failing with "Permission denied" when
writing output files
- Root Cause: User ID mapping conflict between host and container
environment
- Solution: Pre-create output directory with proper permissions before
Docker execution

The CI fix is still trial and error. I am discussing with Kibana Ops to
see how to better check for such errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting otel-semantic-conventions release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants