nosnitch 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +180 -2
- package/db/index.json +1178 -0
- package/db/schema.json +125 -0
- package/dist/blocklist.js +42 -0
- package/dist/cli.js +179 -0
- package/dist/compose.js +332 -0
- package/dist/db.js +47 -0
- package/dist/errors.js +16 -0
- package/dist/fix.js +44 -0
- package/dist/matcher.js +92 -0
- package/dist/render.js +121 -0
- package/dist/scanner.js +159 -0
- package/dist/types.js +1 -0
- package/dist/update.js +32 -0
- package/package.json +49 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 nosnitch contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,181 @@
|
|
|
1
|
-
#
|
|
1
|
+
# nosnitch
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Find out which apps in your Docker Compose file send telemetry by default, where it goes, and how to turn it off.
|
|
4
|
+
|
|
5
|
+
Self-hosted apps often ship with telemetry on, and every app has its own opt-out: `N8N_DIAGNOSTICS_ENABLED`, `DOCUMENSO_DISABLE_TELEMETRY`, `TELEMETRY_ENABLED`, `DO_NOT_TRACK`, a YAML key, a UI toggle. nosnitch keeps them in one community database and checks your compose file against it.
|
|
6
|
+
|
|
7
|
+
nosnitch itself has no telemetry, no accounts and no hosted service. It makes zero network calls unless you pass `--update`.
|
|
8
|
+
|
|
9
|
+
## Quickstart (30 seconds)
|
|
10
|
+
|
|
11
|
+
You need Node 20 or newer. Run this in the folder that holds your compose file:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npx nosnitch scan
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Without a file name, nosnitch looks for `compose.yaml`, `compose.yml`, `docker-compose.yaml` or `docker-compose.yml`, in that order, the same as Docker Compose. You can also pass the file: `npx nosnitch scan path/to/docker-compose.yml`.
|
|
18
|
+
|
|
19
|
+
Then let it write the fix and apply it:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx nosnitch scan --fix
|
|
23
|
+
docker compose -f docker-compose.yml -f compose.nosnitch.override.yml up -d
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The examples below write `nosnitch` for short. Use `npx nosnitch`, or install it once with `npm install -g nosnitch`.
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
`nosnitch scan test/fixtures/example-compose.yml`
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
SERVICE IMAGE TELEMETRY DEFAULT DESTINATIONS FIX
|
|
34
|
+
----------------------- ------------------------------------------------- ----------------- -------------------------------- -----------------------------------------
|
|
35
|
+
n8n docker.n8n.io/n8nio/n8n:1.70.2 on - set N8N_DIAGNOSTICS_ENABLED=false
|
|
36
|
+
grafana grafana/grafana:11.3.0 on stats.grafana.org OK: GF_ANALYTICS_REPORTING_ENABLED=false
|
|
37
|
+
meilisearch getmeili/meilisearch:v1.11 on - OK: MEILI_NO_ANALYTICS=true
|
|
38
|
+
langfuse-web docker.io/langfuse/langfuse:3 on eu.posthog.com OK: TELEMETRY_ENABLED=false
|
|
39
|
+
hasura hasura/graphql-engine:v2.44.0 on telemetry.hasura.io set HASURA_GRAPHQL_ENABLE_TELEMETRY=false
|
|
40
|
+
immich-machine-learning ghcr.io/immich-app/immich-machine-learning:v3.3.5 on mobile.events.data.microsoft.com set ORT_DISABLE_TELEMETRY=1
|
|
41
|
+
postgres postgres:16-alpine - - not in database
|
|
42
|
+
internal-api - - - no image (built locally)
|
|
43
|
+
|
|
44
|
+
3 service(s) send telemetry by default and are not opted out: n8n, hasura, immich-machine-learning
|
|
45
|
+
langfuse-web: still sent after opting out: Enterprise self-hosted telemetry is used for license compliance and cannot be disabled.
|
|
46
|
+
Not in database (1): postgres:16-alpine
|
|
47
|
+
nosnitch does not guess. Know how one of these behaves? Add it: https://github.com/Umerrrdo/nosnitch/blob/main/CONTRIBUTING.md
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The exit code is 1 because three services still have telemetry on. With `--fix`, nosnitch writes this next to your compose file and leaves the original alone:
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
# Generated by nosnitch. Turns off telemetry that is on by default.
|
|
54
|
+
# Use it with: docker compose -f example-compose.yml -f compose.nosnitch.override.yml up -d
|
|
55
|
+
services:
|
|
56
|
+
"n8n":
|
|
57
|
+
environment:
|
|
58
|
+
N8N_DIAGNOSTICS_ENABLED: "false"
|
|
59
|
+
"hasura":
|
|
60
|
+
environment:
|
|
61
|
+
HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
|
|
62
|
+
"immich-machine-learning":
|
|
63
|
+
environment:
|
|
64
|
+
ORT_DISABLE_TELEMETRY: "1"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Commands
|
|
68
|
+
|
|
69
|
+
| Command | What it does |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| `nosnitch scan [compose-file] [more-files...]` | Table of services, telemetry default, destinations and fix. |
|
|
72
|
+
| `nosnitch scan [compose-file] --fix` | Also writes `compose.nosnitch.override.yml` with only the env additions. Never edits your file. |
|
|
73
|
+
| `nosnitch blocklist [compose-file]` | Documented telemetry destinations in hosts-file format. |
|
|
74
|
+
| `nosnitch blocklist [compose-file] --format pihole` | Plain domain list. `--format adguard` gives `\|\|domain^` rules. |
|
|
75
|
+
| `nosnitch check <image>` | Everything the database knows about one image, with sources. |
|
|
76
|
+
| `nosnitch list` | Every app in the database. |
|
|
77
|
+
|
|
78
|
+
`--json` works on `scan`, `check` and `list`. `--update` downloads the latest database before running the command. `--debug` adds a stack trace to an error message.
|
|
79
|
+
|
|
80
|
+
### Exit codes
|
|
81
|
+
|
|
82
|
+
| Code | Meaning |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| 0 | Nothing known is left on. |
|
|
85
|
+
| 1 | `scan` found a verified entry with telemetry on (fully or partly) and no opt-out in your compose file. |
|
|
86
|
+
| 2 | Usage or file error. |
|
|
87
|
+
|
|
88
|
+
That makes `scan` usable as a CI check. To check the result after `--fix`, pass both files, the same way you would to Docker Compose:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
nosnitch scan docker-compose.yml compose.nosnitch.override.yml
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Docker
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
docker build -t nosnitch .
|
|
98
|
+
docker run --rm --network none -v "$PWD:/work" nosnitch scan docker-compose.yml
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`--network none` is optional. It is there to show the scan needs no network.
|
|
102
|
+
|
|
103
|
+
For `--fix` the container has to write into your folder. On Linux add `--user "$(id -u):$(id -g)"` so the override file belongs to you. On Windows use `-v "${PWD}:/work"` in PowerShell.
|
|
104
|
+
|
|
105
|
+
## What it detects
|
|
106
|
+
|
|
107
|
+
- `environment` in list form (`- KEY=value`) and map form (`KEY: value`), including YAML booleans.
|
|
108
|
+
- `env_file` as a string, a list or `path:` objects. `environment` wins over `env_file`, as in Compose.
|
|
109
|
+
- `${VAR}`, `${VAR:-default}` and `${VAR-default}`, resolved from your shell and the `.env` file next to the compose file.
|
|
110
|
+
- Opt-out flags in `command` and `entrypoint`, for example `--disable-telemetry`.
|
|
111
|
+
- Anchors and merge keys (`<<: *common`).
|
|
112
|
+
- `include:` and `extends:`, including files in other folders.
|
|
113
|
+
- Services behind `profiles:`. Every service is scanned, whichever profile it is in.
|
|
114
|
+
- Image names with or without `docker.io/`, `library/`, a tag or a digest.
|
|
115
|
+
|
|
116
|
+
An image that is not in the database is listed as "not in database". nosnitch never guesses from a similar name. An image on a private registry or mirror, such as `registry.example.com/n8nio/n8n`, is not matched either. nosnitch only tells you which entry it looks like, so you can run `nosnitch check n8nio/n8n` yourself.
|
|
117
|
+
|
|
118
|
+
If an image name uses a variable that is not set (`image: ${APP_IMAGE}`), nosnitch says so and asks you to set it in your shell or in the `.env` file next to the compose file.
|
|
119
|
+
|
|
120
|
+
Values are compared exactly. `- N8N_DIAGNOSTICS_ENABLED="false"` in list form passes the quote characters to the app, so nosnitch does not count it as off and tells you why.
|
|
121
|
+
|
|
122
|
+
## The database
|
|
123
|
+
|
|
124
|
+
One YAML file per app in [db/apps/](db/apps/), validated against [db/schema.json](db/schema.json). It has 45 entries: 39 verified against official docs or project source, 6 marked unverified. Apps that send nothing by default are in there too, marked `off`, because "this one is clean" is worth knowing.
|
|
125
|
+
|
|
126
|
+
The rule for the data: **never invent anything**. Every entry needs a source URL, and every claim must come from official docs or the project's source. A detail that cannot be confirmed is left out and the entry is marked `verified: false`. Wrong privacy advice is worse than none.
|
|
127
|
+
|
|
128
|
+
In practice that means:
|
|
129
|
+
|
|
130
|
+
- `destinations` lists only hostnames the project itself documents. Many projects do not name them, so the list is often empty. An empty list does not mean nothing is sent.
|
|
131
|
+
- Unverified entries are shown with `(unverified)` and never cause exit code 1.
|
|
132
|
+
- `still_sent` records what keeps going out after the opt-out, where the docs say so (Langfuse enterprise licensing, Appsmith keep-alive pings, Novu's hourly ping).
|
|
133
|
+
|
|
134
|
+
Blocklist caveat: some destinations are shared services such as `eu.posthog.com` or `api.mixpanel.com`. Blocking them on your network also blocks every other app that uses them.
|
|
135
|
+
|
|
136
|
+
## How to add an app
|
|
137
|
+
|
|
138
|
+
It takes about five minutes. Full guide: [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
139
|
+
|
|
140
|
+
1. Copy an existing file in `db/apps/` to `db/apps/<slug>.yaml`.
|
|
141
|
+
2. Fill it in from the project's official docs or source, and paste those URLs under `sources`.
|
|
142
|
+
3. Run `npm run build:db` and `npm test`.
|
|
143
|
+
4. Open a pull request.
|
|
144
|
+
|
|
145
|
+
## Not in scope
|
|
146
|
+
|
|
147
|
+
- Runtime traffic monitoring. lan-sheriff and g0efilter already do that.
|
|
148
|
+
- Vulnerability scanning.
|
|
149
|
+
- A hosted service, accounts, or telemetry of our own.
|
|
150
|
+
|
|
151
|
+
## Choices made where the spec was open
|
|
152
|
+
|
|
153
|
+
- **Exit code 1** counts verified entries whose default is `on` or `partial`. Unverified entries and entries with an undocumented default are reported but do not fail the run.
|
|
154
|
+
- **Extra entry fields.** `still_sent` and `notes`, plus `optional`, `accepted_values` and `alternatives` on env methods. `optional` marks variables that stop other outbound calls (update checks, template fetching) rather than telemetry. They are shown by `check` and are not written by `--fix`.
|
|
155
|
+
- **`fixed_in`.** A service counts as fixed only when its tag is a full version at or above `fixed_in`. Moving tags such as `release`, `latest` or `v3` stay flagged, because the tag does not say which version was pulled.
|
|
156
|
+
- **Apps with only a config-file or UI opt-out** (SigNoz, PowerSync, TimescaleDB, Activepieces) stay flagged with a manual instruction. nosnitch cannot see inside mounted config files.
|
|
157
|
+
- **`--fix` output location.** The override is written next to the first compose file.
|
|
158
|
+
- **`--update`** downloads `db/index.json` from this repository's `main` branch into `~/.cache/nosnitch/` (or `NOSNITCH_CACHE_DIR`), after validating it against the schema.
|
|
159
|
+
- **Blocklist formats.** `hosts` (default), `pihole` (plain domains) and `adguard` (`||domain^`). The blocklist includes destinations for every matched app, including ones already opted out.
|
|
160
|
+
- **`check`** always exits 0, also for an image that is not in the database.
|
|
161
|
+
- **Source URL check in CI** fails on 404 and 410, and only warns on timeouts, network errors and other statuses.
|
|
162
|
+
- **OneCLI is listed as `off`.** The seed list said `DO_NOT_TRACK=1`, but its [telemetry page](https://onecli.sh/docs/reference/telemetry) says self-hosted OneCLI sends no telemetry.
|
|
163
|
+
- **Unverified entries:** Novu, NocoDB and Nextcloud (the docs do not state the default), Firezone (its docs page could not be opened), Gitea and Forgejo (no telemetry setting exists in their config reference, but no official page says outright that they send none).
|
|
164
|
+
- **Sentry is recorded as `unknown`** because its own documentation contradicts itself on the default.
|
|
165
|
+
- **Mirrors and private registries** are never matched, only hinted at.
|
|
166
|
+
- **A file with no services** is a usage error (exit 2), since it is almost always the wrong file.
|
|
167
|
+
|
|
168
|
+
## Development
|
|
169
|
+
|
|
170
|
+
```sh
|
|
171
|
+
npm install
|
|
172
|
+
npm test # builds, then runs the tests
|
|
173
|
+
npm run build:db # regenerate db/index.json after editing db/apps/
|
|
174
|
+
npm run check:sources # check that every source URL responds (uses the network)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
What was tested, and how, is written up in [TESTING.md](TESTING.md).
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
MIT
|