@dura-run/cli 0.2.1 → 0.3.1
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.
- package/README.md +40 -0
- package/dist/dura.js +739 -640
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -41,6 +41,46 @@ dura deploy
|
|
|
41
41
|
|
|
42
42
|
All project-scoped commands pick up `projectId` from `dura.json` — you only need `--project <id>` when running outside a project directory.
|
|
43
43
|
|
|
44
|
+
## Security
|
|
45
|
+
|
|
46
|
+
### `dura dev` runs your handlers in-process (GH #118)
|
|
47
|
+
|
|
48
|
+
Until we wire isolated-vm into the local runner, `dura dev` loads your
|
|
49
|
+
automation code via native `import(...)` in the CLI's Node process. That
|
|
50
|
+
process has full access to your filesystem — including `~/.dura/config`
|
|
51
|
+
(where the CLI stores your API key), `~/.ssh`, `~/.aws`, and environment
|
|
52
|
+
variables. A malicious npm dependency anywhere in your handler's import
|
|
53
|
+
graph could read those files and exfiltrate them on the first request.
|
|
54
|
+
|
|
55
|
+
To make this risk explicit, `dura dev` refuses to start whenever you
|
|
56
|
+
have credentials stored locally unless you opt in per project:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Option 1 — pass --trust (recommended; acknowledges the risk once)
|
|
60
|
+
dura dev --trust
|
|
61
|
+
|
|
62
|
+
# Option 2 — set an env var (useful in scripts / devcontainers)
|
|
63
|
+
DURA_DEV_TRUST=1 dura dev
|
|
64
|
+
|
|
65
|
+
# Option 3 — log out first (removes the credentials being protected)
|
|
66
|
+
dura logout
|
|
67
|
+
dura dev
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Acceptance is recorded in `.dura/dev-trust` inside your project, so
|
|
71
|
+
subsequent runs proceed without re-prompting. The warning banner is
|
|
72
|
+
still printed each time as a reminder. Delete `.dura/dev-trust` to
|
|
73
|
+
revoke trust for the project. Add the file to `.gitignore` if you
|
|
74
|
+
don't want to share your acceptance with collaborators.
|
|
75
|
+
|
|
76
|
+
Treat `dura dev` with the same trust you'd give `node -e ...` in a
|
|
77
|
+
project that imports every one of your dependencies — audit your
|
|
78
|
+
`package.json` (and lockfile) before trusting a new project.
|
|
79
|
+
|
|
80
|
+
We're tracking a full isolated-vm migration for local dev in
|
|
81
|
+
[GH #147](https://github.com/dura-run/dura-run/issues/147) — once
|
|
82
|
+
that ships, the trust gate will be removed.
|
|
83
|
+
|
|
44
84
|
## Documentation
|
|
45
85
|
|
|
46
86
|
Full docs and recipes at [docs.dura.run](https://docs.dura.run).
|