Skip to content

fix(telemetry): the command span holds no argument value, so a secret given to devops config set never reaches the trace backend #1996

Closed

Description

@dan-petty

Problem

_delegate in src/devops_cli/main.py joins every command argument into the span attribute cli.args (args_summary = " ".join(effective_args)). The span goes to the configured OTLP endpoint. So devops config set <key> <value> with a credential sends the credential to the trace backend, and any other command that takes a secret as an argument does the same.

The #1921 work found this. Its change record keeps the command path and no argument for this reason.

Proposed fix

  • Keep the command path and cli.args_count on the span, and remove cli.args.
  • Or record only the option names, never a value, if a dashboard needs them. OpenTelemetry's semantic conventions give process.command_args as an opt-in attribute for this reason.

Acceptance criteria

  • A test runs a command with a secret-like argument through _delegate against the shared span fake, and no exported attribute holds the argument value.
  • No dashboard query under k8s/monitoring/ reads cli.args.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope/telemetrytype/security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions