-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
<script type="shell"> to execute arbitrary shell commands, and import stdout or result written to local file as a JavaScript module #3443
Comments
I don't think any browser is interested in introducing new languages to the web, such as bash. |
The concept does not intend to introduce a new language to the web. The concept is based on allowing execution of existing binaries already available at the user OS, and wrapping |
The user could configure the sandboxed environment for the specific commands which are authorized, for example excluding We can already do this using Native Messaging. The concept is to allow the same procedure at |
@domenic Have certainly not worked out all of the details, nor even composed a POC specific to parsing a HTML has used If the concept is not viable at Is the concept not viable? |
In general I don't think breaking out of the web sandbox and running binaries on a user's OS is something we want to allow at all. It drastically breaks the web's security model. Using a cooperating local server, which the user has to install via out-of-band trusted channels, is the canonical way to do this. |
Fair enough. Suppose was trying to avoid manually opening Not sure if it is possible to somehow use the existing Native Messaging implementation as an underlying process of the present concept - again, without specifically using the Chrome App to achieve the same. In any event, your feedback is helpful. |
Yeah, this is out-of-scope. Not really sure what a viable place would be to have this discussion, sorry. |
The access to native apps and OS resources been presented in HTML from very beginning. HTA stands for HTML application and was available in IE up to now. Similar approach been considered by other browsers. @annevk , the type=bash has sence only in context of HTML application(not as web page). Should this subject be addressed in such context? |
@sashafirsov maybe; that would go counter to the cross-platform nature of HTML and is therefore out-of-scope here. |
@annevk How exactly would adding a |
"Monstruous" softwares like Electron, NW.js, CEF, webviews runtime and others, which are highly inconvenient to build and distribute, exist only because browsers did not implement a simple and secure way to give to web applications native capabilities such as running a local program or script, via a secure model based on permissions approved by the end-user in the context of digitally signed web applications. The web and computing in general would be way better if one could simply build desktop applications into the browser that could naturally interact with local resources. |
Note, this is just a concept that have been mulling over for a few months. Given
<script type="shell" src="file:///home/USER/.config/SHELL_SCRIPTS/ls.sh"></script>
or
or
This is a concept roughly based on Native Messaging available at Chromium and Firefox browsers.
We could provide some form of notification to the user where permission is either granted or not (similar to
navigator.getUserMedia()
,navigator.registerProtocolHandler()
, etc.) for a given local folder either containing the binary itself or having adequate permissions to be executed as a program; and sandbox the permissions to the specific folder to avoid permission escalation concerns.We could also create some form of wrapper for
stdout
of the command(s) or fetching of a temporary created file for the purpose of usingexport {<export result of shell command here as JavaScript module>}
.Has this concept or inquiry been previously presented to and considered by HTML Standard?
What is the viability, and security considerations of adding
"shell"
to<script>
element type to execute arbitrary shell commands wheresrc
requests resources fromfile:
protocol?The text was updated successfully, but these errors were encountered: