|
5 | 5 | // parsed by the [syntax] package as either [syntax.LangBash] |
6 | 6 | // or [syntax.LangPOSIX], behaving like Bash as a result. |
7 | 7 | // |
8 | | -// Scripts run without a system shell, so they work on any platform including |
9 | | -// Windows. Handlers such as [ExecHandler], [OpenHandler], and [ReadDirHandler2] |
10 | | -// replace how programs are executed and files are accessed, allowing scripts |
11 | | -// to be sandboxed or run against virtual filesystems. |
| 8 | +// Scripts run without a system shell, so they work on any platform including Windows. |
| 9 | +// Handlers such as [ExecHandler], [OpenHandler], and [ReadDirHandler2] |
| 10 | +// replace how programs are executed and files are accessed, |
| 11 | +// allowing scripts to be controlled or run against virtual filesystems. |
12 | 12 | // The [mvdan.cc/sh/x/coreutils] package provides portable |
13 | 13 | // implementations of common utilities like cat, cp, and find. |
14 | 14 | // |
| 15 | +// Note that hanlders do not provide a sandbox or any other sort of OS-level isolation. |
| 16 | +// For example, an [OpenHandler] refusing access to the /etc directory |
| 17 | +// can be foiled by [ExecHandler] allowing access to external programs like cat. |
| 18 | +// |
15 | 19 | // The interpreter currently aims to behave like a non-interactive shell, |
16 | 20 | // which is how most shells run scripts, and is more useful to machines. |
17 | 21 | // In the future, it may gain an option to behave like an interactive shell. |
|
0 commit comments