Running a shell script via Google Assistant

I have a shell command that I’d like to be able to run through Google Assistant but the shell_command domain cannot be exposed. The two ways I can think of to resolve this are:

  1. Have a script that wraps the shell command and expose that to google. The downside is that it will either require exposing all scripts, or move to a whitelist mode (which, if I understand correctly, will turn all domains to whitelist mode).
  2. Create an input boolean or a template switch that will run the shell command.

Is there a better solution? Am I missing anything?

Anyone? Any ideas?

Turns you can whitelist a specific entity even if the domain is not exposed, without affecting anything else, so I created a script and exposed it.