Skip to content

Security: harden agent provisioning command execution #1707

Description

@sign-mark

Summary

Agent provisioning constructs a shell command from request-derived values before executing the spin-up script. This permits shell interpretation of untrusted input and can expose provisioning secrets through captured script output.

Fix

  • Execute the configured script with an argument array rather than a shell command string.
  • Reject unsafe identifiers used in generated endpoint filenames.
  • Fail closed when required provisioning configuration is absent.
  • Enforce execution timeout and propagate script failures.
  • Avoid logging captured script output that may contain secrets.

Validation

  • Added regression tests for argument-array execution, unsafe identifier rejection, and script failure propagation.
  • agent-provisioning build passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions