fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.16k stars 432 forks source link

Run bash scripts #21299

Open nonpunctual opened 3 months ago

nonpunctual commented 3 months ago

Problem

Scripts with bash command line interpreter can't be uploaded.

What have you tried?

Tried to upload .sh file with #!/bin/bash as command line interpreter.

Potential solutions

Allow scripts with #!/bin/bash command line interpreter to be uploaded.

What is the expected workflow as a result of your proposal?

There are "bash-isms" that are not POSIX (sh) compatible. The default shell on macOS was bash before it was zsh. It would be nice for users to not have bash rejected on upload. Scripts should for the most part be executed by the proper shell on the Mac, but, it's a bad user experience for admins to have to change the command line interpreter from bash to sh just for uploading.

dherder commented 1 month ago

@noahtalerman the end user should be able to run any type of script if the interpreter is on the system. Why do we limit the admin/end user in this way?

pintomi1989 commented 1 month ago

Opened new issue for customer-cisneros: https://github.com/fleetdm/fleet/issues/22627 @noahtalerman