Repository navigation
fix(fi-core): stop exporting the process command line and OS user (1.2.1) - #614
Merged
Merged
Conversation
fi-core 1.2.0 merged OpenTelemetry's full process detector into every FITracerProvider resource, so process.command_args, process.command, process.owner, process.executable.path and process.pid went out with every span. Command-line flags can carry secrets (--api-key=...), and the OS user name identifies a person. By default the provider now detects only process.runtime.* (name, version, description). OTEL_NODE_RESOURCE_DETECTORS, the OpenTelemetry Node variable, opts in to host, os and process detection (or all/none). OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES are always applied. Bumps @traceai/fi-core to 1.2.1. Fixes #607 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #607.
What was wrong
@traceai/fi-core1.2.0 merged OpenTelemetry's fullprocessDetectorinto everyFITracerProviderresource. As a result, every span sent to Future AGI (and to any other OTLP destination) carried:process.command_argsandprocess.command. Flags such as--api-key=...or connection strings go out in plain text.process.owner, the OS user name.process.executable.pathandprocess.pid.Before 1.2.0, fi-core detected nothing.
What changes
typescript/packages/fi-core/src/otel.ts:process.runtime.name,process.runtime.versionandprocess.runtime.description. It sends no command line, OS user, executable path, pid, host or OS attributes.OTEL_NODE_RESOURCE_DETECTORS, the OpenTelemetry Node variable, to a comma-separated list ofhost,osandprocess, or toall.noneturns detection off. The values mean the same as in@opentelemetry/sdk-node.OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTES(theenvdetector) are always applied, as the README already documents.Other changes:
@traceai/fi-coregoes to 1.2.1, inpackage.jsonand.release-please-manifest.json, with a CHANGELOG entry and a README paragraph.src/__tests__/resourceDetection.test.ts. It puts a fake--api-key=sk-test-…flag onprocess.argvand checks the resource every exported span carries:process.command*,process.owner,process.executable.*,process.pid,host.*oros.*; the secret flag and the user name appear nowhere;OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTESare kept;processadds full process detection;alladds host, os and process;noneremoves all detection but keeps the service name.service.namestill falls back to OpenTelemetry's own default,unknown_service:<argv0>, whenOTEL_SERVICE_NAMEis not set. That is standard SDK behaviour and has not changed.How it was tested
All runs were in E2B (Node 22.18,
pnpm install --frozen-lockfile --ignore-scripts, as CI installs):tsc --noEmit -p .(fi-core)npx jest(fi-core, all suites)npm run build+node --test test/provider-lifecycle.test.cjsotel.ts(origin/dev)process.command_args: [..., "--api-key=sk-test-0000000000000000"]andprocess.owner: "root";allhad nohost.name@traceai/autosuite (jest --runInBand), this branch vs origin/devsafety,config,privacy-catalog,round6-boundary) fail the same way on origin/dev and are not touched here.@traceai/autohas no CI workflow; tracked separatelyRollout
^1.2.0(@traceai/autoand the instrumentations) pick up 1.2.1 when they install. No dependent needs a republish.@traceai/agent-corealready stripshost.*/process.*before export (feat(agents): one-command coding-agent tracing (fi-agent CLI, 14 adapters, VS Code extension) #609), so coding-agent traces are unaffected either way.FI_HIDE_*/ redaction policies to resource attributes, which the issue lists as an option. With nothing sensitive detected by default, the remaining resource attributes are the ones the user sets.🤖 Generated with Claude Code