Skip to content

Tag the run span with the raw command and effective interp options - #603

Draft
julesmcrt wants to merge 1 commit into
mainfrom
jules.macret/run-span-command-options
Draft

Tag the run span with the raw command and effective interp options#603
julesmcrt wants to merge 1 commit into
mainfrom
jules.macret/run-span-command-options

Conversation

@julesmcrt

Copy link
Copy Markdown
Collaborator

Summary

  • Add interp.Script(text string) RunnerOption to attach the raw, unparsed script/command string to a Runner, and tag it on the top-level run telemetry span as rshell.run.command.
  • Tag the effective RunnerOption configuration on the same span as rshell.run.options.*: mode, max_execution_time, proc_path, host_prefix, allowed_paths (as path:ro/path:rw), allow_all_commands, allowed_commands, allowed_system_services, and systemd_target_configured.
  • Wire cmd/rshell/main.go to pass the raw script text through interp.Script so the CLI's telemetry includes it.

Note: the full raw script text is tagged verbatim, so any secrets embedded in a script will flow into telemetry unredacted. This is an intentional, explicitly-requested tradeoff — see the design decisions in AGENTS.md around process/argv privacy for context on why this is called out.

Test plan

  • make fmt
  • go build ./...
  • go vet ./...
  • go test ./interp/... ./cmd/... (added TestRunSpanCommandAndOptions in interp/tracing_test.go)

🤖 Generated with Claude Code

…ions

Adds rshell.run.command (the full script text, via a new Script
RunnerOption) and rshell.run.options.* tags (mode, max_execution_time,
proc_path, host_prefix, allowed_paths, allow_all_commands,
allowed_commands, allowed_system_services, systemd_target_configured)
to the top-level "run" telemetry span, so a trace fully describes what
was executed and under which policy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant