From 390e4b327d0e21e12f75ae52e76fb9e508c7aa20 Mon Sep 17 00:00:00 2001 From: Jack Berg <34418638+jack-berg@users.noreply.github.com> Date: Thu, 12 Nov 2026 11:20:17 -0600 Subject: [PATCH 1/3] Add resources required for oss-scanner enrollment --- .oss-scanner/Dockerfile | 9 +++++++++ THREAT_MODEL.md | 42 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .oss-scanner/Dockerfile create mode 100644 THREAT_MODEL.md diff --git a/.oss-scanner/Dockerfile b/.oss-scanner/Dockerfile new file mode 100644 index 00000000000..a2d2f772dd2 --- /dev/null +++ b/.oss-scanner/Dockerfile @@ -0,0 +1,9 @@ +FROM eclipse-temurin:25-jdk-noble + +ENV DISABLE_REMOTE_BUILD_CACHE=1 + +COPY . /src +WORKDIR /src + +RUN ./gradlew --no-daemon --max-workers=2 \ + -Porg.gradle.java.installations.auto-download=false build diff --git a/THREAT_MODEL.md b/THREAT_MODEL.md new file mode 100644 index 00000000000..3f48490d83f --- /dev/null +++ b/THREAT_MODEL.md @@ -0,0 +1,42 @@ +# Threat model + +See the [Security Policy](https://github.com/open-telemetry/.github/blob/main/SECURITY.md) for OpenTelemetry projects. + +Additional context specific to this project can be found below. + +## What this project does and where untrusted input enters + +- This project provides the Java OpenTelemetry API and SDK for recording, processing, and exporting traces, metrics, logs, and profiles. +- Untrusted input enters through telemetry recorded by applications and instrumentation, and through headers used for baggage and trace propagation. +- Additional network inputs include exporter responses, Prometheus scrape requests, and Jaeger remote sampling strategies. +- SDK configuration is normally controlled by the application operator. + +## Components that matter most / least + +The following components matter most: + +- `api/all`, `api/incubator`, and `extensions/trace-propagators`: core primitives for recording telemetry and propagating context within and across processes. +- `sdk/trace`, `sdk/metrics`, `sdk/logs`, `sdk/profiles`, and `sdk/common`: telemetry processing, aggregation, and resource limits. +- `exporters/otlp`, `exporters/common`, and `exporters/sender`: telemetry serialization and HTTP and gRPC transport. +- `exporters/prometheus`: Prometheus HTTP scrape endpoint and metric serialization. +- `sdk-extensions/autoconfigure`, `sdk-extensions/autoconfigure-spi`, and `sdk-extensions/declarative-config`: SDK configuration through environment variables, system properties, YAML files, and service providers. +- `sdk-extensions/jaeger-remote-sampler`: sampling configuration received from a remote gRPC endpoint. + +The following components have lower priority: + +- `exporters/logging` and `exporters/logging-otlp`: exporters primarily used for local development and diagnostics. +- `sdk/testing` and `testing-internal`: testing utilities. +- `opencensus-shim` and `opentracing-shim`: deprecated compatibility shims. + +## How to exercise it + +- Unit tests and fuzz tests are colocated with their modules. Cross-component tests live under `integration-tests`. +- See [build guidance](docs/knowledge/build.md) for requirements and commands. + +## How you rate severity + +Follow the OpenTelemetry Security Policy, including its availability assessment and severity guidance. No additional Java-specific severity rules apply. + +## Anything to leave alone + +Ignore tests, test utilities, benchmarks, and other code not intended for production use. From 2c77911bc0806a1ad98d047ae65ca9bbe3686f33 Mon Sep 17 00:00:00 2001 From: Jack Berg <34418638+jack-berg@users.noreply.github.com> Date: Wed, 25 Nov 2026 12:12:08 -0600 Subject: [PATCH 2/3] Move thread model to .oss-scanner, download otel security policy in dockerfile so its available as an offline resource --- .oss-scanner/Dockerfile | 2 ++ THREAT_MODEL.md => .oss-scanner/threat_model.md | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) rename THREAT_MODEL.md => .oss-scanner/threat_model.md (90%) diff --git a/.oss-scanner/Dockerfile b/.oss-scanner/Dockerfile index a2d2f772dd2..c900bed79b6 100644 --- a/.oss-scanner/Dockerfile +++ b/.oss-scanner/Dockerfile @@ -7,3 +7,5 @@ WORKDIR /src RUN ./gradlew --no-daemon --max-workers=2 \ -Porg.gradle.java.installations.auto-download=false build + +ADD https://raw.githubusercontent.com/open-telemetry/.github/main/SECURITY.md /src/.oss-scanner/security-policy.md diff --git a/THREAT_MODEL.md b/.oss-scanner/threat_model.md similarity index 90% rename from THREAT_MODEL.md rename to .oss-scanner/threat_model.md index 3f48490d83f..908528c9ef8 100644 --- a/THREAT_MODEL.md +++ b/.oss-scanner/threat_model.md @@ -1,6 +1,6 @@ -# Threat model +# OSS Scanner threat model -See the [Security Policy](https://github.com/open-telemetry/.github/blob/main/SECURITY.md) for OpenTelemetry projects. +The [Dockerfile](Dockerfile) downloads the OpenTelemetry Security Policy to `/src/.oss-scanner/security-policy.md` for offline scanning. Additional context specific to this project can be found below. @@ -31,7 +31,7 @@ The following components have lower priority: ## How to exercise it - Unit tests and fuzz tests are colocated with their modules. Cross-component tests live under `integration-tests`. -- See [build guidance](docs/knowledge/build.md) for requirements and commands. +- See [build guidance](../docs/knowledge/build.md) for requirements and commands. ## How you rate severity From 3d407794545c417913f653fcc7741f323fbe8d48 Mon Sep 17 00:00:00 2001 From: Jack Berg <34418638+jack-berg@users.noreply.github.com> Date: Wed, 25 Nov 2026 12:14:52 -0600 Subject: [PATCH 3/3] spotless --- .oss-scanner/threat_model.md | 37 ++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/.oss-scanner/threat_model.md b/.oss-scanner/threat_model.md index 908528c9ef8..cd2dc9dda34 100644 --- a/.oss-scanner/threat_model.md +++ b/.oss-scanner/threat_model.md @@ -1,41 +1,54 @@ # OSS Scanner threat model -The [Dockerfile](Dockerfile) downloads the OpenTelemetry Security Policy to `/src/.oss-scanner/security-policy.md` for offline scanning. +The [Dockerfile](Dockerfile) downloads the OpenTelemetry Security Policy to +`/src/.oss-scanner/security-policy.md` for offline scanning. Additional context specific to this project can be found below. ## What this project does and where untrusted input enters -- This project provides the Java OpenTelemetry API and SDK for recording, processing, and exporting traces, metrics, logs, and profiles. -- Untrusted input enters through telemetry recorded by applications and instrumentation, and through headers used for baggage and trace propagation. -- Additional network inputs include exporter responses, Prometheus scrape requests, and Jaeger remote sampling strategies. +- This project provides the Java OpenTelemetry API and SDK for recording, processing, and exporting + traces, metrics, logs, and profiles. +- Untrusted input enters through telemetry recorded by applications and instrumentation, and through + headers used for baggage and trace propagation. +- Additional network inputs include exporter responses, Prometheus scrape requests, and Jaeger + remote sampling strategies. - SDK configuration is normally controlled by the application operator. ## Components that matter most / least The following components matter most: -- `api/all`, `api/incubator`, and `extensions/trace-propagators`: core primitives for recording telemetry and propagating context within and across processes. -- `sdk/trace`, `sdk/metrics`, `sdk/logs`, `sdk/profiles`, and `sdk/common`: telemetry processing, aggregation, and resource limits. -- `exporters/otlp`, `exporters/common`, and `exporters/sender`: telemetry serialization and HTTP and gRPC transport. +- `api/all`, `api/incubator`, and `extensions/trace-propagators`: core primitives for recording + telemetry and propagating context within and across processes. +- `sdk/trace`, `sdk/metrics`, `sdk/logs`, `sdk/profiles`, and `sdk/common`: telemetry processing, + aggregation, and resource limits. +- `exporters/otlp`, `exporters/common`, and `exporters/sender`: telemetry serialization and HTTP and + gRPC transport. - `exporters/prometheus`: Prometheus HTTP scrape endpoint and metric serialization. -- `sdk-extensions/autoconfigure`, `sdk-extensions/autoconfigure-spi`, and `sdk-extensions/declarative-config`: SDK configuration through environment variables, system properties, YAML files, and service providers. -- `sdk-extensions/jaeger-remote-sampler`: sampling configuration received from a remote gRPC endpoint. +- `sdk-extensions/autoconfigure`, `sdk-extensions/autoconfigure-spi`, and + `sdk-extensions/declarative-config`: SDK configuration through environment variables, system + properties, YAML files, and service providers. +- `sdk-extensions/jaeger-remote-sampler`: sampling configuration received from a remote gRPC + endpoint. The following components have lower priority: -- `exporters/logging` and `exporters/logging-otlp`: exporters primarily used for local development and diagnostics. +- `exporters/logging` and `exporters/logging-otlp`: exporters primarily used for local development + and diagnostics. - `sdk/testing` and `testing-internal`: testing utilities. - `opencensus-shim` and `opentracing-shim`: deprecated compatibility shims. ## How to exercise it -- Unit tests and fuzz tests are colocated with their modules. Cross-component tests live under `integration-tests`. +- Unit tests and fuzz tests are colocated with their modules. Cross-component tests live under + `integration-tests`. - See [build guidance](../docs/knowledge/build.md) for requirements and commands. ## How you rate severity -Follow the OpenTelemetry Security Policy, including its availability assessment and severity guidance. No additional Java-specific severity rules apply. +Follow the OpenTelemetry Security Policy, including its availability assessment and severity +guidance. No additional Java-specific severity rules apply. ## Anything to leave alone