dante-watch 0.1.2 → 0.1.4

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 (69) hide show
  1. package/README.md +78 -23
  2. package/package.json +1 -1
  3. package/src/bib/answers.mjs +2 -2
  4. package/src/bib/bib.json +1 -1
  5. package/src/bib/ear.mjs +24 -21
  6. package/src/bib/net.json +1 -1
  7. package/src/bib/net.mjs +7 -9
  8. package/src/bib/probe.mjs +7 -8
  9. package/src/bib/pruef.json +1 -0
  10. package/src/bib/router.mjs +16 -19
  11. package/src/bib/system.mjs +22 -16
  12. package/src/bib/systems.json +1 -0
  13. package/src/bib/wash.mjs +5 -13
  14. package/src/checks/battery.mjs +15 -10
  15. package/src/checks/common.mjs +5 -5
  16. package/src/checks/demo.mjs +2 -2
  17. package/src/checks/formats.mjs +221 -0
  18. package/src/checks/hf.mjs +252 -0
  19. package/src/checks/loc.mjs +2 -4
  20. package/src/checks/php2shell.mjs +8 -9
  21. package/src/checks/rechte.mjs +2 -3
  22. package/src/checks/secrets.mjs +15 -6
  23. package/src/checks/sshd.mjs +3 -5
  24. package/src/checks/webshell.mjs +3 -5
  25. package/src/cli.mjs +15 -10
  26. package/src/core/check.mjs +4 -8
  27. package/src/core/consent.mjs +7 -7
  28. package/src/core/render.mjs +2 -2
  29. package/src/core/sh.mjs +34 -8
  30. package/src/i18n-checks.mjs +6 -3
  31. package/src/i18n.mjs +54 -14
  32. package/src/mascot.mjs +3 -5
  33. package/src/me/deep.mjs +37 -0
  34. package/src/me/diary.mjs +51 -0
  35. package/src/me/home.mjs +10 -0
  36. package/src/me/hostkey.mjs +94 -0
  37. package/src/me/lock.mjs +41 -0
  38. package/src/me/nudge.mjs +52 -0
  39. package/src/me/onboard.mjs +102 -0
  40. package/src/me/overview.mjs +10 -0
  41. package/src/me/patrol.mjs +43 -0
  42. package/src/me/pick.mjs +64 -0
  43. package/src/me/pool.mjs +15 -0
  44. package/src/me/recon.mjs +124 -0
  45. package/src/me/refresh.mjs +70 -0
  46. package/src/me/schedule-deep.mjs +86 -0
  47. package/src/me/schedule.mjs +120 -0
  48. package/src/me/servers.mjs +103 -0
  49. package/src/me/sysid.mjs +113 -0
  50. package/src/me/sysq.mjs +23 -0
  51. package/src/me/sysreport.mjs +73 -0
  52. package/src/me/texts.mjs +412 -0
  53. package/src/me/user.mjs +70 -0
  54. package/src/pack/builtin.mjs +115 -4
  55. package/src/pack/ere.mjs +87 -0
  56. package/src/pack/install.mjs +6 -8
  57. package/src/pack/key.mjs +2 -3
  58. package/src/pack/know.mjs +4 -5
  59. package/src/pack/pack.mjs +14 -10
  60. package/src/pack/rules.mjs +109 -1
  61. package/src/pack/texts.mjs +8 -7
  62. package/src/session.mjs +321 -51
  63. package/src/ticker.mjs +11 -10
  64. package/src/ui/footer.mjs +9 -5
  65. package/src/ui/job-worker.mjs +4 -4
  66. package/src/ui/job.mjs +7 -6
  67. package/src/ui/quips.mjs +1 -2
  68. package/src/ui/wait.mjs +3 -4
  69. package/src/version.mjs +11 -0
package/README.md CHANGED
@@ -4,37 +4,92 @@
4
4
 
5
5
  ```
6
6
  npx dante-watch # open a session: talk to Dante in German, English or Spanish
7
+ npx dante-watch --version # which version runs
7
8
  npx dante-watch --ssh root@host --key ~/.ssh/id # check a server you own, once
8
9
  ```
9
10
 
10
11
  Every verdict carries the real line it came from. If Dante cannot read the proof, it says
11
12
  `unknown` — never `safe`. Safe is a thing it proves, not a thing it assumes.
12
13
 
13
- ## What Dante sends
14
-
15
- **By default and on its own: nothing.** The code has no `fetch`, no HTTP client, no telemetry, no
16
- update check. It never calls anyone while it watches.
17
-
18
- There is exactly one way something can leave your machine, and you start it yourself:
19
-
20
- - You type `update` (German `aktualisier`, Spanish `actualiza`). Dante prints the exact command and
21
- asks `yes/no`. On a clear *yes* it runs one `curl` on **your** machine to
22
- `https://api.nm-streetwear.space/dante/packs`, carrying **your license token** and nothing else —
23
- no host names, no findings, no file names, nothing from the servers you check.
24
- - You can skip it forever. The free state is complete and runs offline. You can also download a pack
25
- in a browser and install it with `pack <file>`; then Dante never touches the network at all.
26
-
27
- If you use `--ssh` (or `server root@host` in the session), Dante connects to **that host, with that
28
- key, and nowhere else**. Everything it runs there is printed with the line it got back.
29
-
30
- What it reads and writes on your machine: the folder `~/.dante/` — your token (mode 0600), the packs
31
- you installed, and a counter of your *yes* answers. Fixes happen only after a clear *yes*.
14
+ ## What Dante sends, reads and writes
15
+
16
+ **By default and on its own: nothing.** The code has no `fetch`, no HTTP client, no telemetry, no update check.
17
+ While you talk to him, and while he patrols, he calls nobody.
18
+
19
+ Exactly two things can reach our server, and **you** start both, after a clear *yes* to the command he prints:
20
+
21
+ - `update` (German `aktualisier`, Spanish `actualiza`): one `curl` to `https://api.nm-streetwear.space/dante/packs`
22
+ carrying **your license token** and nothing else. `update` also looks around again on your machine (see below).
23
+ - `buy` (`kaufen`, `comprar`), or a question once a week when his knowledge is 30 days old: one `curl` to the
24
+ **public** catalog `https://api.nm-streetwear.space/dante/catalog`. Nothing of yours goes out, not even a token.
25
+ Only if there are packs you lack does he ask whether to open the shop page in your browser.
26
+
27
+ You can skip both forever. The free state is complete and runs offline. Download a pack in a browser and install it
28
+ with `pack <file>`, and Dante never touches the network at all.
29
+
30
+ **Getting to know you (`user.md`).** On the first start he asks *"May I look around?"*. On a *yes* he reads, on this
31
+ machine only: the system name, your Git name, the hosts in `~/.ssh/config` and the readable ones in
32
+ `~/.ssh/known_hosts`, and the **names** of your project folders (folders with a `.git`). He does not read file
33
+ contents and not your shell history. He writes it into `~/.dante/user.md` — plain Markdown you can open and change.
34
+ Every 20 days he asks whether to look again; `update` does it too. He knocks at a server over SSH only if you said yes
35
+ to that server, read-only, with your own key.
36
+
37
+ **The schedule (armed).** Only after a separate, clear *yes* he writes a schedule — a launchd agent on a Mac, a cron
38
+ entry elsewhere — that starts `dante-watch --patrol` four times a day (00, 06, 12, 18 h). A patrol runs the checks on
39
+ this machine and on the servers you approved, writes `~/.dante/diary.jsonl` and changes nothing; its only connections are
40
+ SSH to those servers. You can ask him *"what happened?"* and he answers from the diary. `abschalten` / `disarm` /
41
+ `desarmar` removes both schedules again; it is shown in plain words before it is written.
42
+
43
+ **The deep run (`deep`, weekly if you said yes).** This is the one place where Dante **reads the content of your files**
44
+ — locally, read-only: he searches your project folders (and the web roots of servers you approved) for keys, tokens
45
+ and passwords left in code, with the formats of his check library (hundreds of patterns for AWS, GitHub, Stripe, private
46
+ keys, database URLs, … built per system: he first looks which systems are there — `package.json`, `composer.json`,
47
+ `requirements.txt` … — and uses only those patterns). On a hit he looks closer: file rights, is it in Git, was it ever
48
+ committed, is it git-ignored. **He shows the file, the line and the kind of secret — never the value.** A key in a private,
49
+ git-ignored file (your local `.env`) is normal and says so. Example files (`*.example`) and placeholder lines are skipped.
50
+ He skips `node_modules`, `.git`, `vendor` and build folders. Nothing leaves your machine. It has its own schedule entry
51
+ (Monday, 03:30) with its own yes, and while it runs it closes the lane: the patrol sees the lock and steps aside instead
52
+ of waiting. A lock left behind by a crash is ignored after a few hours.
53
+
54
+ **Models and agents (the pack "Hugging Face Analysis", `models`).** With this pack Dante looks at the AI models you downloaded
55
+ (the Hugging Face cache `~/.cache/huggingface/hub`, `~/models`, your project folders) and at the configuration of your AI
56
+ agents (for example `~/.claude.json`, Claude Desktop, Cursor, `.mcp.json`). For a model he reads names, sizes, the head of the
57
+ README (the model card) and `config.json` — **never the weights**; for the Python files a model ships he reports the file, the
58
+ line and the kind of pattern, not the code. For an agent configuration he reads the JSON locally and reports server, what it
59
+ can do and what stands out — **never the values**, so no key or token is shown. Nothing leaves your machine. Without the pack
60
+ he says what it is and offers to open the shop page.
61
+
62
+ **Finding your servers (`find my servers`).** Dante reads `~/.ssh/config` and the readable host names in `~/.ssh/known_hosts`
63
+ (code hosting such as github.com is left out). Only after a separate *yes* he also looks into your shell history, and there
64
+ only at lines that start `ssh`, `scp` or `rsync`: he keeps who@where, how often, and the name of the key file, nothing else
65
+ from the history. Servers found this way are entered in `user.md` with the patrol off; knocking at them (to read the system and
66
+ PHP version) is another *yes*.
67
+
68
+ **What system is this, and what is going on there?** (`what is my system`, `which is my mac`, `what is going on`, in German, English
69
+ and Spanish). For this machine, a server you picked or all known servers, Dante runs a fixed list of harmless read-only probes
70
+ (`/etc/os-release`, `uname`, `sw_vers`, `freebsd-version`, `hostname`, `df`, `uptime` and the like; the list is in `src/me/sysid.mjs`)
71
+ and recognises the system from their output against a library of about 85 systems (Linux distributions, macOS, the BSDs, OpenWrt,
72
+ OPNsense, Proxmox, ESXi, Synology and more). The library holds only patterns and facts, never a command of its own, and a system it
73
+ does not recognise is called unknown, not guessed. "What is going on" adds the busiest processes, open ports, failed services and who
74
+ is logged in. Everything shown is read off the machine; the "usual for this system" line (package manager, firewall, logs) comes from
75
+ the library and is labelled that way.
76
+
77
+ **"Is someone in between?" (a changed SSH host key).** When a server's key has changed, Dante offers a look, without logging in:
78
+ he reads the public keys the server shows (`ssh-keyscan`), compares them with the ones remembered in your `known_hosts`
79
+ (`ssh-keygen -F`), and, after a separate *yes*, also runs `ssh-keyscan` from one or two of your other servers over ssh. A rebuilt
80
+ server shows the same new key from everywhere; an attacker on your own path shows your machine a different key than a server elsewhere
81
+ sees. He reports what speaks for or against and never calls it safe: only a comparison with the provider's console proves the key
82
+ is the server's own, and he prints the fingerprint to compare. Nothing is changed and nothing is sent anywhere.
83
+
84
+ What he reads and writes on your machine: the folder `~/.dante/` — your token (mode 0600), the packs you installed,
85
+ `user.md`, the diary, the small scripts the schedules start (`patrol.sh`, `deep.sh`), a lock file while the deep run is on, a note of when he last asked — plus the schedule entry if you
86
+ armed him. Fixes happen only after a clear *yes*, with the exact commands shown first.
32
87
 
33
88
  - **No install hooks.** `npm install` runs no scripts. No `postinstall`, nothing executes on install.
34
- - **No dependencies.** Only Node (≥18) and its own modules (`child_process`, `fs`, `os`, `path`,
35
- `readline`, `crypto`). Nothing is pulled in that you did not read.
36
- - **The code is readable.** The rest of the package is data: the language books and rules as plain
37
- JSON (`src/bib/*.json`), no blobs, no obfuscation.
89
+ - **No dependencies.** Only Node (≥18) and its own modules (`child_process`, `fs`, `os`, `path`, `readline`, `crypto`,
90
+ `worker_threads`, `url`). Nothing is pulled in that you did not read.
91
+ - **The code is readable.** The rest of the package is data: the language books and rules as plain JSON
92
+ (`src/bib/*.json`), no blobs, no obfuscation.
38
93
 
39
94
  If you review packages for a living: this one does not phone home, and it says so here on purpose.
40
95
  Questions: info@nm-streetwear.space.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dante-watch",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Dante watches your own server and never lies to itself: every verdict carries the real line it came from.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,5 +1,5 @@
1
- // What Dante says when he only explains. Max five lines each, and nothing in here claims a
2
- // result — verdicts only ever come from a check and its real line.
1
+ // Canned answers for questions Dante can answer without running anything: five lines at most each.
2
+ // None of them states a result; verdicts come only from a check and its evidence line.
3
3
  export const ANSWERS = {
4
4
  frage_luecke: {
5
5
  de: ["PHP2Shell (CVE-2026-109618/-619) ist eine Lücke im PHP-Kern.", "Wer sie trifft, kann über eine Webanfrage eigene Befehle auf dem Server ausführen (RCE).", "Betroffen sind nur Rechner mit PHP. Ob deiner es ist, sag ich dir erst mit echter Zeile:", "„prüf“ für diesen Rechner, „server user@host“ für einen Server."],