Skip to content

[Bug]: entrypoint.sh has unquoted variable expansion and missing operational logging #12

Description

@mrhillsman

Bug Description

`entrypoint.sh` (line 5) passes `$VIRTWORK_ARGS` unquoted to `exec`, which will cause word-splitting on arguments that contain spaces. Additionally, the script does not log the command being executed, making debugging pod startup failures harder in OpenShift.

Steps to Reproduce

  1. Set `VIRTWORK_ARGS` to a value containing spaces (e.g., `--namespace "my namespace"`)
  2. Run the entrypoint script
  3. Observe that the argument is split incorrectly

Expected Behavior

Arguments should be handled correctly regardless of spaces. The script should also:

  • Log the command being executed before `exec`
  • Validate that `VIRTWORK_COMMAND` is a valid subcommand

Actual Behavior

  1. Unquoted `$VIRTWORK_ARGS` will word-split incorrectly if values contain spaces
  2. No logging of the command being executed before `exec`
  3. No validation that `VIRTWORK_COMMAND` is a valid subcommand

Command

Other

Go Version

Not provided

Deployment Mode

In-cluster pod (deploy/ manifests)

Additional Context

Severity: Low

Files:

  • `entrypoint.sh:5` — `exec /usr/local/bin/virtwork $VIRTWORK_COMMAND $VIRTWORK_ARGS`

Note: Quoting `"$VIRTWORK_ARGS"` would treat the entire string as one argument, which is also wrong. The real fix is to use shell array handling or accept that args must be space-delimited simple tokens (and document this constraint).

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.size/XSDenotes a PR that changes 0-9 lines, ignoring generated files.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions