Skip to content

Implement an allowed commands check on the run-rad-commands action #12529

Description

@zachcasper

Summary

Validate every entry in the rad_commands input against an allowed-command enum before executing anything in the run-rad-commands action.

Part of the Repo Radius feature specification (PR #12078).

Details

Because run-rad-commands runs an arbitrary ordered list of rad commands, the action must accept only commands from an allowed set. Validation happens up front, before any command runs, so a disallowed command fails fast with a clear "Command not allowed" outcome and nothing is executed (see User Story 1.2). Constraining operations to an allowed enum is also what lets new operations ship as backward compatible additions to the enum rather than as new actions (see Appendix 3).

Requirements

  • FR7: run-rad-commands shall validate each entry in rad_commands against an allowed-command enum before executing anything.

Acceptance criteria

  • Each entry in rad_commands is validated against an allowed-command enum before any command runs.
  • A disallowed command fails the run with a distinct "Command not allowed" outcome and no commands are executed.
  • The allowed-command enum is defined in one place and easy to extend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis issue describes a feature request in Radius

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions