tasty-lima 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +55 -12
  2. package/dist/tasty-lima.js +202 -201
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -6,6 +6,16 @@ A quick and easy-to-use UI for creating and interacting with [Lima VMs](https://
6
6
  local web UI for creating, starting, stopping, and editing Lima VMs, no Lima preinstallation is required!
7
7
  On first run it automatically downloads the pinned `limactl` (and QEMU, if needed) into `~/.tasty-lima/`.
8
8
 
9
+ ## Screenshots
10
+
11
+ ### Instances list
12
+
13
+ ![Instances list view showing running VMs with status, OS, arch, CPU, memory, and disk usage](https://raw.githubusercontent.com/benduran/tasty-lima/main/instances-list.png)
14
+
15
+ ### Creating a VM
16
+
17
+ ![Animated walkthrough of creating a new VM: naming the instance, picking a template, and choosing arch and VM type](https://raw.githubusercontent.com/benduran/tasty-lima/main/create-a-vm.gif)
18
+
9
19
  ## Install
10
20
 
11
21
  ### Via npm
@@ -55,24 +65,57 @@ chmod +x tasty-lima-macos-arm64
55
65
  tasty-lima [options]
56
66
  ```
57
67
 
58
- | Option | Default | Description |
59
- | ------------ | ----------- | ----------------------------------------------------------- |
60
- | `-p, --port` | `60011` | Port for the local helper server to listen on |
61
- | `--hostname` | `127.0.0.1` | Hostname for the local helper server |
62
- | `--noUI` | `false` | Don't serve the web UI (utility for tasty-lima development) |
68
+ | Option | Default | Description |
69
+ | --------------- | ----------- | ------------------------------------------------------------------------- |
70
+ | `-p, --port` | `60011` | Port for the local helper server to listen on |
71
+ | `--hostname` | `127.0.0.1` | Hostname for the local helper server |
72
+ | `--noOpen` | `false` | Don't open the system's default web browser on start |
73
+ | `--noUI` | `false` | Don't serve the web UI (utility for tasty-lima development) |
74
+ | `--allowOrigin` | none | Extra browser origin allowed to call the API (for tasty-lima development) |
63
75
 
64
- Once started, open the printed URL (e.g. `http://127.0.0.1:60011`) in your
65
- browser.
76
+ `tasty-lima` will automatically open your browser and print the link you should use to access the `tasty-lima` UI (e.g. `http://127.0.0.1:60011/#t=<token>`).
77
+ The link will have an access token embedded, which changes on every launch.
78
+ Treat the link like a password.
79
+ A link without the correct token embedded will not work.
66
80
 
67
- ## Screenshots
81
+ ## Secure by default
68
82
 
69
- ### Instances list
83
+ `tasty-lima` treats the code inside a VM as untrusted (things like `npm` postinstall scripts,
84
+ Rust `build.rs`, anything dodgy you'd rather not run on your own machine).
85
+ Nothing in a VM should be able to escape the VM and access your personal computer's files, applications, your credentials or `tasty-lima` itself, unless you explicitly allow it.
70
86
 
71
- ![Instances list view showing running VMs with status, OS, arch, CPU, memory, and disk usage](https://raw.githubusercontent.com/benduran/tasty-lima/main/instances-list.png)
87
+ A new VM starts locked down, adhering to the following guidelines:
72
88
 
73
- ### Creating a VM
89
+ ### No SSH agent forwarding
74
90
 
75
- ![Animated walkthrough of creating a new VM: naming the instance, picking a template, and choosing arch and VM type](https://raw.githubusercontent.com/benduran/tasty-lima/main/create-a-vm.gif)
91
+ Forwarding exposes your host SSH keys to everything running in the VM while you're connected.
92
+ It's recommended to create unique SSH keys that are only used inside of the VM, so you can revoke them if your VM is compromised, leaving your host machine untouched / unaffected.
93
+
94
+ If a VM needs git access, give it its own key instead of forwarding your agent.
95
+ Run this inside the VM, then add the public key to your git host as a deploy key:
96
+
97
+ ```bash
98
+ ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N "" -C "lima-$(hostname)"
99
+ ```
100
+
101
+ ### No host folders
102
+
103
+ By default, the VM only sees the folders you add yourself, and starts with zero folders shared / mounted between the host and the VM.
104
+ Creating or editing a VM will fail if `~/.lima/_config/default.yaml` or `override.yaml` tries to sneak in a mount, or make one writable, that you didn't ask for.
105
+
106
+ ### No access to apps on your computer (Apple Virtualization only)
107
+
108
+ New `vz` VMs set `networkOpts.hostLoopback: false`, so the VM cannot connect to anything listening on your machine's `127.0.0.1`.
109
+ Turn on "Let this VM connect to apps running on your computer" if it needs a local database, dev server or proxy.
110
+ Lima cannot switch this off for QEMU, WSL2 or `user-v2` networks.
111
+
112
+ ### A locked local API
113
+
114
+ Every API and WebSocket request needs the access token from the startup link, which is what keeps outside actors, including code running inside of your VMs, from controlling `tasty-lima`.
115
+ Requests from other websites (an unexpected `Origin` or `Host`) are rejected, too.
116
+
117
+ Keep `--hostname` on a loopback address, like `localhost` or `127.0.0.1`.
118
+ On any other address `tasty-lima` prints a warning and stops checking the `Host` header, so the token does most of the work, and it then crosses your network unencrypted.
76
119
 
77
120
  ## Development
78
121