Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run commands only after user consent #1744

Open
joaquimrocha opened this issue Feb 26, 2024 · 0 comments
Open

Run commands only after user consent #1744

joaquimrocha opened this issue Feb 26, 2024 · 0 comments
Assignees

Comments

@joaquimrocha
Copy link
Collaborator

With #1677 we allow plugins to run commands when in the app mode, but we should make this option available only after user consent, for extra security.

Since the command running is done in the app layer, I think we should be able to show a (native/electron) dialog asking the user to run the command. If there was a way to have a list of allowed commands for the user to review, that'd be even better, but maybe that's too complicated.

I can think of a couple of options for the UX, but maybe this works:

  • Plugin calls runCommand, which continues till the request is done to the electron layer
  • The electron app checks the run-command-consent setting:
    • If true: continue to running the command
    • If false: trigger the ask-for-command-consent dialog; after which the command is run.

In general settings, we should have a setting showing whether commands are allowed to run. When clicking the switch, the dialog runs again (we can never set the setting directly/automatically from the frontend, else it can simply be faked without user intervention)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants