-
Notifications
You must be signed in to change notification settings - Fork 82
feat(terminal): restrict default allowed commands to 'ls' and 'echo' #372
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
base: main
Are you sure you want to change the base?
Conversation
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start, these changes look good to me! 💯
Though there are some failing unit tests - could you take a look at those? You can run them with:
$ cd packages/runtime/
$ pnpm test
docs/tutorialkit.dev/src/content/docs/reference/configuration.mdx
Outdated
Show resolved
Hide resolved
adjust tests to expect ['ls', 'echo'] as default allowCommands when undefined, aligning tests with updated functionality closes #302
Deploying tutorialkit-demo-page with
|
Latest commit: |
43c24c4
|
Status: | ✅ Deploy successful! |
Preview URL: | https://cdcd4fde.tutorialkit-demo-page.pages.dev |
Branch Preview URL: | https://ronith-hide-toggle-terminal.tutorialkit-demo-page.pages.dev |
Co-authored-by: Ari Perkkiö <ari.perkkio@gmail.com>
Co-authored-by: Ari Perkkiö <ari.perkkio@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the tests are still failing, could you take a look at those? 👀
Change the default value of `terminal.allowCommands` from an empty array to `['ls', 'echo']`. This update enhances security and focus by limiting the commands available in tutorials by default. Lesson authors can still enable all commands by setting `terminal.allowCommands: []` explicitly 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 #372
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, great work @RonithManikonda! 💯
As this change is a breaking change, we'll merge this into main
before releasing version 2.0.0 of TutorialKit.
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 specifyingterminal.allowCommands: []
in the metadata.BREAKING CHANGE: The default value of
terminal.allowCommands
is now restricted to['ls', 'echo']
. To allow all commands, explicitly setterminal.allowCommands: []
in the metadata.Closes #302