nosnitch 0.1.0 → 0.2.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/README.md CHANGED
@@ -4,7 +4,7 @@ Find out which apps in your Docker Compose file send telemetry by default, where
4
4
 
5
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
6
 
7
- nosnitch itself has no telemetry, no accounts and no hosted service. It makes zero network calls unless you pass `--update`.
7
+ nosnitch itself has no telemetry, no accounts and no hosted service. It makes no network calls, ever.
8
8
 
9
9
  ## Quickstart (30 seconds)
10
10
 
@@ -75,7 +75,7 @@ services:
75
75
  | `nosnitch check <image>` | Everything the database knows about one image, with sources. |
76
76
  | `nosnitch list` | Every app in the database. |
77
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.
78
+ `--json` works on `scan`, `check` and `list`. `--debug` adds a stack trace to an error message.
79
79
 
80
80
  ### Exit codes
81
81
 
@@ -102,6 +102,13 @@ docker run --rm --network none -v "$PWD:/work" nosnitch scan docker-compose.yml
102
102
 
103
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
104
 
105
+ ## Permissions
106
+
107
+ - **Reads:** your compose file, files it includes or extends, and its env files (the `.env` next to it and any `env_file`).
108
+ - **Reads environment variables:** only to resolve `${VAR}` in the compose file, the same way `docker compose` does.
109
+ - **Writes:** only `compose.nosnitch.override.yml`, and only with `--fix`.
110
+ - **Network:** none, ever. It works with `docker run --network none`.
111
+
105
112
  ## What it detects
106
113
 
107
114
  - `environment` in list form (`- KEY=value`) and map form (`KEY: value`), including YAML booleans.
@@ -121,7 +128,7 @@ Values are compared exactly. `- N8N_DIAGNOSTICS_ENABLED="false"` in list form pa
121
128
 
122
129
  ## The database
123
130
 
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.
131
+ One YAML file per app in [db/apps/](db/apps/), validated against [db/schema.json](db/schema.json). It has 45 entries: 40 verified against official docs or project source, 5 marked unverified. Apps that send nothing by default are in there too, marked `off`, because "this one is clean" is worth knowing.
125
132
 
126
133
  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
134
 
@@ -155,12 +162,12 @@ It takes about five minutes. Full guide: [CONTRIBUTING.md](CONTRIBUTING.md).
155
162
  - **`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
163
  - **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
164
  - **`--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.
165
+ - **Database updates** ship with the package. The database is bundled in each release, so to get new entries run `npx nosnitch@latest`.
159
166
  - **Blocklist formats.** `hosts` (default), `pihole` (plain domains) and `adguard` (`||domain^`). The blocklist includes destinations for every matched app, including ones already opted out.
160
167
  - **`check`** always exits 0, also for an image that is not in the database.
161
168
  - **Source URL check in CI** fails on 404 and 410, and only warns on timeouts, network errors and other statuses.
162
169
  - **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).
170
+ - **Unverified entries:** Novu, NocoDB and Nextcloud (the docs do not state the default), Gitea and Forgejo (no telemetry setting exists in their config reference, but no official page says outright that they send none).
164
171
  - **Sentry is recorded as `unknown`** because its own documentation contradicts itself on the default.
165
172
  - **Mirrors and private registries** are never matched, only hinted at.
166
173
  - **A file with no services** is a usage error (exit 2), since it is almost always the wrong file.
package/db/index.json CHANGED
@@ -243,6 +243,10 @@
243
243
  "firezone/firezone"
244
244
  ],
245
245
  "telemetry_default": "on",
246
+ "destinations": [
247
+ "t.firez.one"
248
+ ],
249
+ "what_is_sent": "Product telemetry from the web portal, sent to PostHog. Admin emails only if you opt in to product updates.",
246
250
  "disable": [
247
251
  {
248
252
  "type": "env",
@@ -251,11 +255,14 @@
251
255
  }
252
256
  ],
253
257
  "sources": [
254
- "https://docs.firezone.dev/reference/telemetry"
258
+ "https://github.com/firezone/firezone/blob/0.7.36/website/src/app/docs/reference/telemetry/readme.mdx",
259
+ "https://github.com/firezone/firezone/blob/0.7.36/apps/fz_http/lib/fz_http/config/definitions.ex",
260
+ "https://github.com/firezone/firezone/blob/0.7.36/config/config.exs",
261
+ "https://github.com/firezone/firezone/blob/0.7.36/docker-compose.prod.yml"
255
262
  ],
256
- "verified_on": "2026-11-11",
257
- "verified": false,
258
- "notes": "Unverified. The source page could not be opened when this entry was written, so the default and the variable come from a search engine summary of that page. The image name was not checked either. That summary describes the legacy self-hosted release and says the variable turns off product telemetry. Whether it also covers package and firezone-ctl telemetry is not known."
263
+ "verified_on": "2026-11-29",
264
+ "verified": true,
265
+ "notes": "This is the legacy self-hosted Firezone (0.7.x, the firezone/firezone image). Its docs site docs.firezone.dev no longer exists, so the sources are the same docs and code in the official repository at the last 0.7 tag. The docs say telemetry is on by default and that setting TELEMETRY_ENABLED to false on the Docker container disables product telemetry. definitions.ex sets the default to true, and config.exs sends to PostHog at t.firez.one. Firezone 1.x is a different product and is not covered by this entry."
259
266
  },
260
267
  {
261
268
  "name": "Forgejo",
package/dist/cli.js CHANGED
@@ -25,7 +25,6 @@ ${DEFAULT_COMPOSE_FILES.join(", ")}.
25
25
  Options:
26
26
  --json machine-readable output (scan, check, list)
27
27
  --format blocklist format: hosts (default), pihole (plain domains) or adguard (||domain^)
28
- --update download the latest database first (the only network call nosnitch ever makes)
29
28
  --debug show the full stack trace when something fails
30
29
  -h, --help
31
30
  -v, --version
@@ -62,7 +61,6 @@ function parse(argv) {
62
61
  json: { type: "boolean", default: false },
63
62
  fix: { type: "boolean", default: false },
64
63
  format: { type: "string", default: "hosts" },
65
- update: { type: "boolean", default: false },
66
64
  debug: { type: "boolean", default: false },
67
65
  help: { type: "boolean", short: "h", default: false },
68
66
  version: { type: "boolean", short: "v", default: false },
@@ -92,7 +90,7 @@ async function main(argv) {
92
90
  console.log(version());
93
91
  return 0;
94
92
  }
95
- if (values.help || (!command && !values.update)) {
93
+ if (values.help || !command) {
96
94
  console.log(HELP);
97
95
  return values.help ? 0 : 2;
98
96
  }
@@ -100,14 +98,7 @@ async function main(argv) {
100
98
  const looksLikeFile = /\.ya?ml$/i.test(command) || existsSync(command);
101
99
  throw new UsageError(`Unknown command: ${command}`, looksLikeFile ? `Did you mean: nosnitch scan ${quote(command)}` : `The commands are: ${COMMANDS.join(", ")}. Run nosnitch --help for details.`);
102
100
  }
103
- if (values.update) {
104
- const { updateDatabase } = await import("./update.js");
105
- const count = await updateDatabase();
106
- console.error(`Database updated: ${count} apps.`);
107
- if (!command)
108
- return 0;
109
- }
110
- const { db, source } = loadDatabase();
101
+ const db = loadDatabase();
111
102
  switch (command) {
112
103
  case "scan": {
113
104
  const files = composeFiles(rest, "scan");
@@ -116,7 +107,7 @@ async function main(argv) {
116
107
  const exitCode = exitCodeFor(results);
117
108
  const written = values.fix ? writeOverride(results, files[0]) : null;
118
109
  if (values.json) {
119
- const report = { files, database: { source, apps: db.apps.length }, services: results, warnings: project.warnings, override_file: written, exit_code: exitCode };
110
+ const report = { files, database: { apps: db.apps.length }, services: results, warnings: project.warnings, override_file: written, exit_code: exitCode };
120
111
  console.log(JSON.stringify(report, null, 2));
121
112
  }
122
113
  else {
package/dist/db.js CHANGED
@@ -1,15 +1,10 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { homedir } from "node:os";
1
+ import { readFileSync } from "node:fs";
3
2
  import { dirname, join } from "node:path";
4
3
  import { fileURLToPath } from "node:url";
5
4
  import { Ajv } from "ajv";
6
5
  const packageRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
7
6
  export const bundledDbPath = join(packageRoot, "db", "index.json");
8
7
  export const schemaPath = join(packageRoot, "db", "schema.json");
9
- export function cacheDbPath() {
10
- const base = process.env.NOSNITCH_CACHE_DIR ?? join(homedir(), ".cache", "nosnitch");
11
- return join(base, "index.json");
12
- }
13
8
  /** Returns a list of problems. Empty means the database is valid. */
14
9
  export function validateDatabase(db) {
15
10
  if (typeof db !== "object" || db === null || !Array.isArray(db.apps)) {
@@ -27,21 +22,7 @@ export function validateDatabase(db) {
27
22
  }
28
23
  return problems;
29
24
  }
30
- /**
31
- * Loads the database from disk. A copy downloaded with --update is used when it
32
- * exists and is valid, otherwise the copy bundled with the package.
33
- */
25
+ /** Loads the database bundled with the package. */
34
26
  export function loadDatabase() {
35
- const cached = cacheDbPath();
36
- if (existsSync(cached)) {
37
- try {
38
- const db = JSON.parse(readFileSync(cached, "utf8"));
39
- if (validateDatabase(db).length === 0)
40
- return { db, source: "updated" };
41
- }
42
- catch {
43
- // fall through to the bundled copy
44
- }
45
- }
46
- return { db: JSON.parse(readFileSync(bundledDbPath, "utf8")), source: "bundled" };
27
+ return JSON.parse(readFileSync(bundledDbPath, "utf8"));
47
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nosnitch",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Find out which apps in your Docker Compose file send telemetry by default, where it goes, and how to turn it off.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/dist/update.js DELETED
@@ -1,32 +0,0 @@
1
- import { mkdirSync, writeFileSync } from "node:fs";
2
- import { dirname } from "node:path";
3
- import { cacheDbPath, validateDatabase } from "./db.js";
4
- import { NosnitchError } from "./errors.js";
5
- export const UPDATE_URL = "https://raw.githubusercontent.com/Umerrrdo/nosnitch/main/db/index.json";
6
- /**
7
- * Downloads the latest database. This is the only code path in nosnitch that
8
- * touches the network, and it only runs when the user passes --update.
9
- */
10
- export async function updateDatabase(url = process.env.NOSNITCH_UPDATE_URL ?? UPDATE_URL) {
11
- const keep = "nosnitch keeps using the database it already has, so you can run the same command without --update.";
12
- let db;
13
- try {
14
- const res = await fetch(url);
15
- if (!res.ok)
16
- throw new NosnitchError(`Could not download the database: the server answered HTTP ${res.status} for ${url}`, keep);
17
- db = (await res.json());
18
- }
19
- catch (err) {
20
- if (err instanceof NosnitchError)
21
- throw err;
22
- throw new NosnitchError(`Could not download the database from ${url}: ${err.message}`, `Check your internet connection. ${keep}`);
23
- }
24
- const problems = validateDatabase(db);
25
- if (problems.length > 0) {
26
- throw new NosnitchError(`The downloaded database is not valid, so it was not saved:\n${problems.slice(0, 5).join("\n")}`, keep);
27
- }
28
- const target = cacheDbPath();
29
- mkdirSync(dirname(target), { recursive: true });
30
- writeFileSync(target, JSON.stringify(db));
31
- return db.apps.length;
32
- }