@misconfig/cli 1.3.0 → 1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.1 (2026-11-03)
4
+
5
+ Nothing about your setup goes to misconfig.ai:
6
+
7
+ - `--open` saves the full report as one page on your computer and opens it in your browser. Nothing is uploaded. The page has no scripts, and its content security policy blocks every script and request, so nothing in it can run or load, whatever a checked file says. In CI or a script, it saves the file without opening a browser.
8
+ - Share links, README badges, private report links and the browser check at misconfig.ai/check were retired, and misconfig.ai deleted every report it stored. `--share` stops with a message that says so, and old links say the report was retired.
9
+ - The only option that sends anything about your setup is `--lookup`, which sends package names and versions to OSV.dev after you approve them. `--yes` now applies to lookups only.
10
+
11
+ Today's malware list:
12
+
13
+ - Before each check, the command downloads today's list of known malware from misconfig.ai: what OSV.dev has listed since the release, for MCP and agent packages and editor extensions, updated every hour. New malware is caught without waiting for a release. The list is a few kilobytes, kept in memory for that run, and the report says which list the check used.
14
+ - The request names the command's version and the kind of system, which is how misconfig.ai counts runs, and carries nothing about your setup. `DO_NOT_TRACK=1` downloads the list without being counted. `--offline`, or `MISCONFIG_OFFLINE=1`, skips the download and uses the list in the release. If the list doesn't arrive within 5 seconds, the check uses the release's list and says so.
15
+
16
+ Malware:
17
+
18
+ - The bundled list includes every MCP package and editor extension OSV.dev listed as malware up to this release: about 150 packages on npm and PyPI and 20 extensions, each with its listing. Before, a check without `--lookup` found 11 of the 159 MCP packages OSV.dev lists; now it finds 157.
19
+ - When a listing names only some versions of a package, usually a real package whose publishing account was taken over, only those versions count against it. A server that doesn't pin a version is told those versions were malware and to pin one, not that the package is.
20
+ - An extension listed on one marketplace, Microsoft's or Open VSX, is flagged only in editors that install from it. The same ID can be a different publisher's extension on the other.
21
+ - `--lookup` fixes:
22
+ - An unpinned package with only some versions listed as malware was reported as malware. It's now "has had versions listed as malware", at high rather than critical.
23
+ - Extensions whose ID has capitals, such as `AzureCdnInfo.edrtester`, were looked up in lowercase, which OSV.dev doesn't match, so their listings were missed. The ID is now read from the extension's own `package.json`, and only the publisher and name are kept from it.
24
+ - VSCodium, Cursor, Windsurf and Kiro extensions are looked up on Open VSX, where they come from, and a VS Code extension is no longer matched with an Open VSX listing for someone else's extension with the same ID.
25
+ - The list `--lookup` shows before it sends names where each package comes from in words, npm, PyPI, VS Marketplace or Open VSX, in even columns.
26
+ - Versions numbered by date, such as `2.49.1772191521`, are read as versions.
27
+
28
+ Safer output:
29
+
30
+ - A project can't put a command of its own into a fix any more. A package name goes into a fix, such as `npm view NAME version`, only when it's a name the registry would accept, so an `.mcp.json` whose arguments hold a download piped into a shell can't make misconfig tell you to run it. That download is still reported as one.
31
+ - Marks that reorder text, such as U+202E, and invisible line breaks are shown as � in the terminal and on the page `--open` saves, so a file can't make a finding read differently from what it says.
32
+
33
+ Fewer false findings:
34
+
35
+ - Run in your home folder, the command no longer reports "Agent workspace is your home folder" on its own account: it checked the computer's settings, not a project, and each agent's settings already say if it was started there. The header says how to check a project instead. `--project-only` in a home folder still reports it.
36
+
3
37
  ## 1.3.0 (2026-11-02)
4
38
 
5
39
  Everything since 1.1.0. Versions 1.1.1 and 1.2.0 were never published, so their changes are part of this release.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  See every file that controls your AI coding agents, what each one tells them to do, which settings put your machine at risk, and whether anything they run is known malware.
4
4
 
5
5
  ```sh
6
- npx @misconfig/cli@1.3.0
6
+ npx @misconfig/cli@1.3.1
7
7
  ```
8
8
 
9
9
  Run it in a project folder. It works on macOS, Windows and Linux with Node.js 18 or later, and needs no install or account. On Windows, if PowerShell says running scripts is disabled, type `npx.cmd` instead of `npx`.
@@ -11,8 +11,8 @@ Run it in a project folder. It works on macOS, Windows and Linux with Node.js 18
11
11
  ## Example
12
12
 
13
13
  ```
14
- $ npx @misconfig/cli@1.3.0
15
- misconfig 1.3.0
14
+ $ npx @misconfig/cli@1.3.1
15
+ misconfig 1.3.1
16
16
  Checked ~/code/shop and the agent settings on this computer. Everything
17
17
  ran here; nothing was uploaded.
18
18
 
@@ -48,12 +48,11 @@ Grade D, 60 out of 100
48
48
  3 high, 1 medium
49
49
  Checked 5 agent files and 1 MCP server.
50
50
 
51
- Everything each file says npx @misconfig/cli --explain
52
- Full report in your browser npx @misconfig/cli --open
53
- Share this project's report npx @misconfig/cli --share
54
- Look up installs on OSV.dev npx @misconfig/cli --lookup
55
- Every rule explained https://misconfig.ai/rules
56
- Full details as JSON npx @misconfig/cli --json
51
+ Everything each file says npx @misconfig/cli --explain
52
+ Full report in your browser npx @misconfig/cli --open
53
+ Look up installs on OSV.dev npx @misconfig/cli --lookup
54
+ Every rule explained https://misconfig.ai/rules
55
+ Full details as JSON npx @misconfig/cli --json
57
56
  ```
58
57
 
59
58
  In a terminal the grade sits on a yellow square, the way it does on misconfig.ai, and each finding is marked in its level's color. Piped into a file or a CI log, the output is the plain text above. Each finding ends its location line with its rule, such as `FLAG-ALIAS`; https://misconfig.ai/rules explains every rule, what each level means and how the score is worked out.
@@ -77,7 +76,9 @@ Add `--explain` to see everything each file sets: permission modes, allowed and
77
76
 
78
77
  ## Malware and missing fixes
79
78
 
80
- Each release ships a list of what's been reported, each with its source: packages and editor extensions that were malicious, such as postmark-mcp and the Nx releases from the s1ngularity attack, and Claude Code, Codex and Claude Desktop versions missing security fixes. The check compares what's installed against it on your computer. It reads versions from each agent's `package.json`, its install folders, your editors' extension lists and the project's lockfile, and looks for the files attacks leave by name only. Programs inside skill folders are listed by name and never opened.
79
+ Each release ships a list of what's been reported, each with its source: packages and editor extensions that were malicious, such as postmark-mcp and the Nx releases from the s1ngularity attack, every MCP package and editor extension OSV.dev listed as malware up to the release, and Claude Code, Codex and Claude Desktop versions missing security fixes. When a listing names only some versions of a package, usually a real one whose publishing account was taken over, only those versions count against it. An extension listed on one marketplace, Microsoft's or Open VSX, is flagged only in the editors that install from it.
80
+
81
+ Before each check, the command also downloads today's list from misconfig.ai: the malware OSV.dev has listed since the release, for MCP and agent packages and editor extensions, updated every hour. It's a few kilobytes, kept in memory for that run and never saved. If it doesn't arrive within 5 seconds, or you add `--offline`, the check uses the release's list, and the report says which list it used. The check compares what's installed against it on your computer. It reads versions from each agent's `package.json`, its install folders, your editors' extension lists and the project's lockfile, and looks for the files attacks leave by name only. Programs inside skill folders are listed by name and never opened.
81
82
 
82
83
  Add `--lookup` to also check OSV.dev, the open source vulnerability database, for malware and known vulnerabilities in what's installed, including anything reported since the release:
83
84
 
@@ -90,22 +91,21 @@ It isn't an antivirus. It doesn't scan programs or watch what runs.
90
91
 
91
92
  ## Read it in your browser
92
93
 
93
- `npx @misconfig/cli --open` puts the full report, everything `--explain` shows included, on a private page at misconfig.ai, laid out for reading and printing:
94
+ `npx @misconfig/cli --open` saves the full report, everything `--explain` shows included, as one page in your computer's temp folder and opens it in your browser, laid out for reading and printing:
94
95
 
95
- - The report is encrypted on your computer (AES-256-GCM) before it's sent. misconfig.ai keeps only the encrypted copy and deletes it after 7 days.
96
- - The key is the part of the link after `#`, which browsers never send to a server, so misconfig.ai can't read the report. Your browser decrypts it.
97
- - Anyone you give the link to can read the report. The command also prints a delete link, so you can remove it sooner.
98
- - It asks before uploading. Add `--yes` to skip the question.
96
+ - Nothing is uploaded. The command prints where the file is, in a new folder only you can read.
97
+ - The page has no scripts, and its content security policy allows none and blocks every request, so nothing in it can run or load, whatever a checked file says. Its styles and fonts are inside the file.
98
+ - Anyone you send the file to can read everything in it, including the paths and settings on this computer.
99
+ - In CI or a script, it saves the file and doesn't open a browser.
99
100
 
100
101
  ## Privacy
101
102
 
102
- - Everything runs on your computer. Without `--share`, `--open` or `--lookup`, misconfig makes no network requests.
103
+ - Everything runs on your computer. The one request it makes on its own downloads today's list of known malware from misconfig.ai. It names the command's version and the kind of system (macOS, Windows or Linux), which is how misconfig.ai counts runs, and carries nothing about your setup. `--offline` skips it, and `DO_NOT_TRACK=1` downloads the list without being counted. Nothing else is sent unless you use `--lookup`.
103
104
  - Credential files such as `.env` and `id_rsa`, and programs inside skills, are listed by name only and never opened. Secrets inside agent files are masked as they're read.
104
105
  - From `~/.claude.json` it keeps only the MCP servers, the folders Claude Code has been started in and the tools approved in each, never your account details.
105
106
  - It reads git's ignore lists (`.gitignore`, `.git/info/exclude` and `~/.config/git/ignore`) to tell whether secret files are kept out of commits.
106
- - What it works out about your files, including everything `--explain` shows, stays on your computer unless you use `--open`, which uploads it encrypted so only people with the link can read it.
107
+ - What it works out about your files, including everything `--explain` and `--open` show, stays on your computer.
107
108
  - `--lookup` sends package names and versions to OSV.dev, after it shows you the list and you say yes.
108
- - `--share` shows exactly what it will send and asks before sending anything. It sends this project's findings only: rule names, the paths of agent files in the project, line numbers, fixed words a check produces (such as a setting name) and the number of agent files and MCP servers checked. Names inside your files, such as MCP servers, commands and packages, are left out, along with file contents, quoted lines, the project folder's name and anything from the settings on your computer. Before it sends them, it asks misconfig.ai which set of checks the site runs, a request that carries nothing from your files.
109
109
 
110
110
  The checks are plain JavaScript in `engine/`, so you can read what runs before you run it.
111
111
 
@@ -118,11 +118,11 @@ npx @misconfig/cli [folder] [options]
118
118
  what's installed
119
119
  --lookup Also look up what's installed on OSV.dev. Sends only
120
120
  package names and versions, and asks first
121
- --open Open the full report in your browser at a private,
122
- encrypted link that lasts 7 days
123
- --share Publish this project's findings and print a link
124
- --yes Look up, share or open without asking, for scripts
125
- and CI
121
+ --open Save the full report as a page on this computer and
122
+ open it in your browser. Nothing is uploaded
123
+ --offline Don't download today's list of known malware; use the
124
+ one in this release (or set MISCONFIG_OFFLINE=1)
125
+ --yes Look up without asking, for scripts and CI
126
126
  --json Print the full result as JSON
127
127
  --project-only Skip the agent settings on this computer
128
128
  --fail-on <level> Exit with code 1 if anything at this level or worse is
@@ -138,12 +138,12 @@ Exit codes: `0` when the check ran and nothing reached `--fail-on`, `1` when `--
138
138
  In any CI system, run it before installing dependencies. It exits with code 1 when it finds anything at that level or worse, including a lockfile that pins a package that was malware:
139
139
 
140
140
  ```sh
141
- npx @misconfig/cli@1.3.0 --project-only --fail-on high
141
+ npx @misconfig/cli@1.3.1 --project-only --fail-on high
142
142
  ```
143
143
 
144
- ## Share links and badges
144
+ ## Upgrading from 1.3.0
145
145
 
146
- `npx @misconfig/cli --share` publishes a signed report at misconfig.ai that expires after 30 days, and prints a README badge and a private delete link. misconfig.ai rebuilds every sentence of the report from its own rule catalog, so a share link can only say what a real check would say. A share never drops a finding: if the site doesn't know one of this version's checks yet, a finding is in a file a share link can't name, such as one a setting names as instructions, or there are more than 400 findings, nothing is published and the command says why. You can use `--open` for a private report instead.
146
+ Share links, badges and private report links were retired in 1.3.1, so that nothing about anyone's setup is sent to misconfig.ai or kept there. `--share` now stops with a message that says so, and `--open` saves the report on your computer instead of uploading it.
147
147
 
148
148
  ## License
149
149
 
package/bin/misconfig.js CHANGED
@@ -3,7 +3,8 @@ import { main } from "../lib/main.js";
3
3
  import { oneLine } from "../lib/print.js";
4
4
 
5
5
  // Older versions of Node print a warning that fetch is experimental the first
6
- // time --share, --open or --lookup uses it. Other warnings still print.
6
+ // time the command downloads today's malware list or --lookup asks OSV.dev.
7
+ // Other warnings still print.
7
8
  const warn = process.emitWarning;
8
9
  process.emitWarning = function (warning, ...rest) {
9
10
  const type = typeof rest[0] === "string" ? rest[0] : rest[0]?.type;
package/engine/catalog.js CHANGED
@@ -790,6 +790,12 @@ export const RULES = {
790
790
  why: "OSV.dev lists {name} as malicious ({ref}). {where}.",
791
791
  fix: "Remove it, then change any keys and tokens it could reach.",
792
792
  },
793
+ "LOOKUP-MALICIOUS-VERSION": {
794
+ severity: "high", category: "installs",
795
+ title: "{name} has had versions listed as malware",
796
+ why: "OSV.dev lists versions of {name} as malicious ({ref}). {where}, and no version is pinned, so it may have run one of them.",
797
+ fix: "Pin {name} to a version you've checked, or remove it, then change any keys and tokens it could reach.",
798
+ },
793
799
  "LOOKUP-VULN": {
794
800
  severity: "high", category: "installs",
795
801
  title: "{name} {version} has {vulns}",
package/engine/explain.js CHANGED
@@ -1,7 +1,6 @@
1
1
  // What each file that controls an agent actually tells it to do, in plain
2
- // words. This runs on the user's computer. Share links carry rule names,
3
- // never these details; only an --open report, encrypted on the computer,
4
- // carries them.
2
+ // words. This runs on the user's computer, and what it works out is shown
3
+ // only there: in --explain and the page --open saves.
5
4
 
6
5
  import { describeMasks, maskSecrets } from "./mask.js";
7
6
  import { findDangerFlag, trimWord, programName } from "./flags.js";
package/engine/flags.js CHANGED
@@ -47,9 +47,6 @@ const QUICK_FLAGS = /--(?:dangerously|allow-dangerously|permission-mode|sandbox|
47
47
  // is powershell.
48
48
  export const programName = (word) => String(word).split(/[\\/]/).pop().replace(/\.(?:exe|cmd|bat|com|ps1)$/i, "");
49
49
 
50
- export const FLAG_NAMES = new Set(DANGER_FLAGS.map((f) => f.flag));
51
- export const AGENT_NAMES = new Set(AGENT_COMMANDS.map(([name]) => name));
52
-
53
50
  // A command line ends at && || ; | or a new line, and in Markdown at a
54
51
  // backtick, so an option is only credited to the command it belongs to.
55
52
  export const COMMAND_BREAK = /&&|\|\||[;|`\n]|\$\(/g;