Skip to content

Fix pdp-tester CI job for K8s-based refactor (PER-13630)#307

Merged
EliMoshkovich merged 6 commits intomainfrom
PER-13630-fix-pdp-tester-ci-for-k8s
Apr 13, 2026
Merged

Fix pdp-tester CI job for K8s-based refactor (PER-13630)#307
EliMoshkovich merged 6 commits intomainfrom
PER-13630-fix-pdp-tester-ci-for-k8s

Conversation

@EliMoshkovich
Copy link
Copy Markdown
Collaborator

Summary

The pdp-tester was refactored from Docker-based to Kubernetes-based (permitio/pdp-tester#80). The old CI used Docker directly to run PDP containers, but the new code requires a Kubernetes cluster. This PR fixes the pdp-tester CI job.

Changes

  • Add k3d cluster setup (same approach as pdp-tester's own CI)
  • Import both PDP image (permitio/pdp-v2:next) and pdp-tester image into k3d
  • Deploy via Helm chart in job mode with tag next (the PR's PDP build)
  • Wait for Job completion and check test results from logs
  • Teardown k3d cluster on completion

Why it broke

The pdp-tester refactor (permitio/pdp-tester#80) removed Docker-based container management (aiodocker, PdpCluster) and replaced it with Kubernetes-native Pod management (kubernetes_asyncio, KubernetesRuntime). The old LOCAL_TAGS, AUTO_REMOVE, and Docker socket approach no longer exists.

Test plan

  • CI pipeline runs successfully with the k3d cluster
  • PDP image built from PR is tested via pdp-tester
  • Test results are correctly reported in CI logs

🤖 Generated with Claude Code

The pdp-tester was refactored from Docker-based to Kubernetes-based
(permitio/pdp-tester#80). The old CI used Docker directly to run PDP
containers, but the new code requires a Kubernetes cluster.

Changes:
- Add k3d cluster setup (same approach as pdp-tester's own CI)
- Import both PDP image and pdp-tester image into k3d
- Deploy via Helm chart in job mode with tag 'next' (the PR's PDP build)
- Wait for Job completion and check test results from logs
- Teardown k3d cluster on completion

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear bot commented Apr 13, 2026

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

🔍 Vulnerabilities of permitio/pdp-v2:next

📦 Image Reference permitio/pdp-v2:next
digestsha256:65aa1b3d2192e32c5d86f659708eb381451e66db78271d0ec73eaa96454d6e5a
vulnerabilitiescritical: 0 high: 7 medium: 4 low: 1 unspecified: 2
platformlinux/amd64
size215 MB
packages253
📦 Base Image python:3.10-alpine3.22
also known as
  • 3.10.20-alpine3.22
  • b259d89e26fbe01d956a4834260c0e5a7c7b305ecda39ae3b59e208e5a03a2aa
digestsha256:a7b85667f5c4e8db146b494344e4a3826e695185c7260bddab7ec9667a2406e3
vulnerabilities
critical: 0 high: 5 medium: 0 low: 0 unspecified: 2openssl 3.5.5-r0 (apk)

pkg:apk/alpine/openssl@3.5.5-r0?os_name=alpine&os_version=3.22

high : CVE--2026--31790

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.018%
EPSS Percentile5th percentile
Description

high : CVE--2026--28390

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.049%
EPSS Percentile15th percentile
Description

high : CVE--2026--28389

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.049%
EPSS Percentile15th percentile
Description

high : CVE--2026--28388

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.023%
EPSS Percentile6th percentile
Description

high : CVE--2026--2673

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.045%
EPSS Percentile14th percentile
Description

unspecified : CVE--2026--31789

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.009%
EPSS Percentile1st percentile
Description

unspecified : CVE--2026--28387

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.017%
EPSS Percentile4th percentile
Description
critical: 0 high: 1 medium: 1 low: 0 musl 1.2.5-r10 (apk)

pkg:apk/alpine/musl@1.2.5-r10?os_name=alpine&os_version=3.22

high : CVE--2026--40200

Affected range<1.2.5-r12
Fixed version1.2.5-r12
EPSS Score0.014%
EPSS Percentile2nd percentile
Description

medium : CVE--2026--6042

Affected range<1.2.5-r11
Fixed version1.2.5-r11
EPSS Score0.013%
EPSS Percentile2nd percentile
Description
critical: 0 high: 1 medium: 0 low: 0 go.opentelemetry.io/otel/sdk 1.42.0 (golang)

pkg:golang/go.opentelemetry.io/otel/sdk@1.42.0

high 7.3: CVE--2026--39883 Untrusted Search Path

Affected range>=1.15.0
<=1.42.0
Fixed version1.43.0
CVSS Score7.3
CVSS VectorCVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS Score0.006%
EPSS Percentile0th percentile
Description

Summary

The fix for GHSA-9h8m-3fm2-qjrq (CVE-2026-24051) changed the Darwin ioreg command to use an absolute path but left the BSD kenv command using a bare name, allowing the same PATH hijacking attack on BSD and Solaris platforms.

Root Cause

sdk/resource/host_id.go line 42:

if result, err := r.execCommand("kenv", "-q", "smbios.system.uuid"); err == nil {

Compare with the fixed Darwin path at line 58:

result, err := r.execCommand("/usr/sbin/ioreg", "-rd1", "-c", "IOPlatformExpertDevice")

The execCommand helper at sdk/resource/host_id_exec.go uses exec.Command(name, arg...) which searches $PATH when the command name contains no path separator.

Affected platforms (per build tag in host_id_bsd.go:4): DragonFly BSD, FreeBSD, NetBSD, OpenBSD, Solaris.

The kenv path is reached when /etc/hostid does not exist (line 38-40), which is common on FreeBSD systems.

Attack

  1. Attacker has local access to a system running a Go application that imports go.opentelemetry.io/otel/sdk
  2. Attacker places a malicious kenv binary earlier in $PATH
  3. Application initializes OpenTelemetry resource detection at startup
  4. hostIDReaderBSD.read() calls exec.Command("kenv", ...) which resolves to the malicious binary
  5. Arbitrary code executes in the context of the application

Same attack vector and impact as CVE-2026-24051.

Suggested Fix

Use the absolute path:

if result, err := r.execCommand("/bin/kenv", "-q", "smbios.system.uuid"); err == nil {

On FreeBSD, kenv is located at /bin/kenv.

critical: 0 high: 0 medium: 1 low: 0 sqlparse 0.5.0 (pypi)

pkg:pypi/sqlparse@0.5.0

medium 6.9: GHSA--27jp--wm6q--gp25 Allocation of Resources Without Limits or Throttling

Affected range<=0.5.3
Fixed version0.5.4
CVSS Score6.9
CVSS VectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Description

Summary

The below gist hangs while attempting to format a long list of tuples.

This was found while drafting a regression test for Dja
ngo 5.2's composite primary key feature
, which allows querying composite fields with tuples.

critical: 0 high: 0 medium: 1 low: 0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp 1.42.0 (golang)

pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp@1.42.0

medium 5.3: CVE--2026--39882 Memory Allocation with Excessive Size Value

Affected range<1.43.0
Fixed version1.43.0
CVSS Score5.3
CVSS VectorCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score0.016%
EPSS Percentile3rd percentile
Description

overview:
this report shows that the otlp HTTP exporters (traces/metrics/logs) read the full HTTP response body into an in-memory bytes.Buffer without a size cap.

this is exploitable for memory exhaustion when the configured collector endpoint is attacker-controlled (or a network attacker can mitm the exporter connection).

severity

HIGH

not claiming: this is a remote dos against every default deployment.
claiming: if the exporter sends traces to an untrusted collector endpoint (or over a network segment where mitm is realistic), that endpoint can crash the process via a large response body.

callsite (pinned):

  • exporters/otlp/otlptrace/otlptracehttp/client.go:199
  • exporters/otlp/otlptrace/otlptracehttp/client.go:230
  • exporters/otlp/otlpmetric/otlpmetrichttp/client.go:170
  • exporters/otlp/otlpmetric/otlpmetrichttp/client.go:201
  • exporters/otlp/otlplog/otlploghttp/client.go:190
  • exporters/otlp/otlplog/otlploghttp/client.go:221

permalinks (pinned):

root cause:
each exporter client reads resp.Body using io.Copy(&respData, resp.Body) into a bytes.Buffer on both success and error paths, with no upper bound.

impact:
a malicious collector can force large transient heap allocations during export (peak memory scales with attacker-chosen response size) and can potentially crash the instrumented process (oom).

affected component:

  • go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  • go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
  • go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp

repro (local-only):

unzip poc.zip -d poc
cd poc
make canonical resp_bytes=33554432 chunk_delay_ms=0

expected output contains:

[CALLSITE_HIT]: otlptracehttp.UploadTraces::io.Copy(resp.Body)
[PROOF_MARKER]: resp_bytes=33554432 peak_alloc_bytes=118050512

control (same env, patched target):

unzip poc.zip -d poc
cd poc
make control resp_bytes=33554432 chunk_delay_ms=0

expected control output contains:

[CALLSITE_HIT]: otlptracehttp.UploadTraces::io.Copy(resp.Body)
[NC_MARKER]: resp_bytes=33554432 peak_alloc_bytes=512232

attachments: poc.zip (attached)

PR_DESCRIPTION.md

attack_scenario.md

poc.zip

Fixed in: open-telemetry/opentelemetry-go#8108

critical: 0 high: 0 medium: 1 low: 0 busybox 1.37.0-r20 (apk)

pkg:apk/alpine/busybox@1.37.0-r20?os_name=alpine&os_version=3.22

medium : CVE--2025--60876

Affected range<=1.37.0-r20
Fixed versionNot Fixed
EPSS Score0.043%
EPSS Percentile13th percentile
Description
critical: 0 high: 0 medium: 0 low: 1 zlib 1.3.1-r2 (apk)

pkg:apk/alpine/zlib@1.3.1-r2?os_name=alpine&os_version=3.22

low : CVE--2026--27171

Affected range<=1.3.1-r2
Fixed versionNot Fixed
EPSS Score0.007%
EPSS Percentile1st percentile
Description

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

🔍 Vulnerabilities of permitio/pdp-v2:next

📦 Image Reference permitio/pdp-v2:next
digestsha256:65aa1b3d2192e32c5d86f659708eb381451e66db78271d0ec73eaa96454d6e5a
vulnerabilitiescritical: 0 high: 7 medium: 0 low: 0
platformlinux/amd64
size215 MB
packages253
📦 Base Image python:3.10-alpine3.22
also known as
  • 3.10.20-alpine3.22
  • b259d89e26fbe01d956a4834260c0e5a7c7b305ecda39ae3b59e208e5a03a2aa
digestsha256:a7b85667f5c4e8db146b494344e4a3826e695185c7260bddab7ec9667a2406e3
vulnerabilities
critical: 0 high: 5 medium: 0 low: 0 openssl 3.5.5-r0 (apk)

pkg:apk/alpine/openssl@3.5.5-r0?os_name=alpine&os_version=3.22

high : CVE--2026--31790

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.018%
EPSS Percentile5th percentile
Description

high : CVE--2026--28390

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.049%
EPSS Percentile15th percentile
Description

high : CVE--2026--28389

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.049%
EPSS Percentile15th percentile
Description

high : CVE--2026--28388

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.023%
EPSS Percentile6th percentile
Description

high : CVE--2026--2673

Affected range<3.5.6-r0
Fixed version3.5.6-r0
EPSS Score0.045%
EPSS Percentile14th percentile
Description
critical: 0 high: 1 medium: 0 low: 0 go.opentelemetry.io/otel/sdk 1.42.0 (golang)

pkg:golang/go.opentelemetry.io/otel/sdk@1.42.0

high 7.3: CVE--2026--39883 Untrusted Search Path

Affected range>=1.15.0
<=1.42.0
Fixed version1.43.0
CVSS Score7.3
CVSS VectorCVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS Score0.006%
EPSS Percentile0th percentile
Description

Summary

The fix for GHSA-9h8m-3fm2-qjrq (CVE-2026-24051) changed the Darwin ioreg command to use an absolute path but left the BSD kenv command using a bare name, allowing the same PATH hijacking attack on BSD and Solaris platforms.

Root Cause

sdk/resource/host_id.go line 42:

if result, err := r.execCommand("kenv", "-q", "smbios.system.uuid"); err == nil {

Compare with the fixed Darwin path at line 58:

result, err := r.execCommand("/usr/sbin/ioreg", "-rd1", "-c", "IOPlatformExpertDevice")

The execCommand helper at sdk/resource/host_id_exec.go uses exec.Command(name, arg...) which searches $PATH when the command name contains no path separator.

Affected platforms (per build tag in host_id_bsd.go:4): DragonFly BSD, FreeBSD, NetBSD, OpenBSD, Solaris.

The kenv path is reached when /etc/hostid does not exist (line 38-40), which is common on FreeBSD systems.

Attack

  1. Attacker has local access to a system running a Go application that imports go.opentelemetry.io/otel/sdk
  2. Attacker places a malicious kenv binary earlier in $PATH
  3. Application initializes OpenTelemetry resource detection at startup
  4. hostIDReaderBSD.read() calls exec.Command("kenv", ...) which resolves to the malicious binary
  5. Arbitrary code executes in the context of the application

Same attack vector and impact as CVE-2026-24051.

Suggested Fix

Use the absolute path:

if result, err := r.execCommand("/bin/kenv", "-q", "smbios.system.uuid"); err == nil {

On FreeBSD, kenv is located at /bin/kenv.

critical: 0 high: 1 medium: 0 low: 0 musl 1.2.5-r10 (apk)

pkg:apk/alpine/musl@1.2.5-r10?os_name=alpine&os_version=3.22

high : CVE--2026--40200

Affected range<1.2.5-r12
Fixed version1.2.5-r12
EPSS Score0.014%
EPSS Percentile2nd percentile
Description

EliMoshkovich and others added 5 commits April 13, 2026 11:45
The pdp-tester discovers PDP tags via Docker Hub. The 'next' tag only
exists locally, so tag discovery fails. Fix: tag the PDP image as
'latest' before importing into k3d, which matches pdp-tester's default
includeTags config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use LOCAL_TAGS=["next"] to tell pdp-tester to use the locally built
PDP image without querying Docker Hub for tag discovery. Clear
includeTags to avoid pulling anything from Docker Hub.

Requires permitio/pdp-tester to have LOCAL_TAGS support in the Helm
chart (permitio/pdp-tester PR pending).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Will revert to skipGenerate=true after first successful run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
--set 'pdp.includeTags={}' rendered as [""] (non-empty list), causing
Docker Hub tag discovery to run and timeout. Use --set 'pdp.includeTags='
which makes the value falsy, skipping INCLUDE_TAGS env var entirely.
Only LOCAL_TAGS=["next"] is used.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@EliMoshkovich EliMoshkovich merged commit b1e21a3 into main Apr 13, 2026
7 of 8 checks passed
@EliMoshkovich EliMoshkovich deleted the PER-13630-fix-pdp-tester-ci-for-k8s branch April 13, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants