Skip to content

terminal.allowCommands should have more strict default value #302

New issue

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

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

Already on GitHub? # to your account

Open
AriPerkkio opened this issue Sep 2, 2024 · 0 comments · May be fixed by #372
Open

terminal.allowCommands should have more strict default value #302

AriPerkkio opened this issue Sep 2, 2024 · 0 comments · May be fixed by #372
Labels
breaking changes enhancement New feature or request

Comments

@AriPerkkio
Copy link
Member

AriPerkkio commented Sep 2, 2024

Is your feature request related to a problem?

By default the terminal allows users to use any available command. In tutorials this is usually not intended experience. The lesson authors should define commands that are allowed - if any.

Describe the solution you'd like.

Let's change the default value of terminal.allowCommands from [] to something like ['ls', 'echo'].

Lesson authors should still be able to allow all possible commands by specifying terminal.allowCommands: [] in metadata.

Describe alternatives you've considered.

Recommend authors to always specify terminal.allowCommands.

Additional context

No response

@AriPerkkio AriPerkkio added enhancement New feature or request breaking changes labels Sep 2, 2024
RonithManikonda added a commit that referenced this issue Oct 13, 2024
Change the default value of `terminal.allowCommands` from an empty array to `['ls', 'echo']`. This change prevents users from running all available commands by default in tutorials, enhancing security and focus. Lesson authors can still allow all commands by specifying `terminal.allowCommands: []` in the metadata.

BREAKING CHANGE: The default value of `terminal.allowCommands` is now restricted to `['ls', 'echo']`. To allow all commands, explicitly set `terminal.allowCommands: []` in the metadata.

Closes #302
RonithManikonda added a commit that referenced this issue Oct 31, 2024
adjust tests to expect ['ls', 'echo'] as default allowCommands when undefined, aligning tests with updated functionality

closes #302
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
breaking changes enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant