@misconfig/cli 1.1.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 +187 -0
- package/LICENSE +1 -0
- package/README.md +110 -30
- package/bin/misconfig.js +29 -1
- package/engine/catalog.js +504 -99
- package/engine/decode.js +41 -0
- package/engine/explain.js +792 -79
- package/engine/flags.js +121 -0
- package/engine/glob.js +178 -0
- package/engine/index.js +2108 -376
- package/engine/known.js +587 -0
- package/engine/locations.js +96 -49
- package/engine/mask.js +74 -21
- package/engine/named.js +91 -0
- package/engine/parse.js +442 -42
- package/engine/paths.js +83 -20
- package/lib/discover.js +675 -97
- package/lib/findings.js +109 -0
- package/lib/html.js +201 -0
- package/lib/lookup.js +209 -0
- package/lib/main.js +135 -39
- package/lib/print.js +223 -93
- package/package.json +22 -20
- package/report/fonts/OFL.txt +93 -0
- package/report/fonts/recursive-mono.woff2 +0 -0
- package/report/fonts/recursive-sans.woff2 +0 -0
- package/report/mark-black.svg +1 -0
- package/report/mark.svg +1 -0
- package/report/styles.css +2656 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Changelog
|
|
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
|
+
|
|
37
|
+
## 1.3.0 (2026-11-02)
|
|
38
|
+
|
|
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.
|
|
40
|
+
|
|
41
|
+
A new look:
|
|
42
|
+
|
|
43
|
+
- The report follows misconfig.ai: the grade on a yellow square, findings marked in each level's color, and quieter text around them. The grade comes after the findings, so it's on screen when the check finishes.
|
|
44
|
+
- Colors use what the terminal supports, from 16 colors to full color. Output piped to a file or a CI log is plain text, and `NO_COLOR` and `FORCE_COLOR` work as in Node.
|
|
45
|
+
- `--explain` lists each file's details under it, and long paths are shortened in the middle so the file name stays visible.
|
|
46
|
+
- Clearer summaries: long text is shortened at a word boundary, paths show your home folder as `~` and keep the folder or file name visible, servers with many environment variables show a count, and every permission mode is named.
|
|
47
|
+
|
|
48
|
+
Reading the findings:
|
|
49
|
+
|
|
50
|
+
- Every finding names its rule, such as `CC-ALLOW-ALL-BASH`, after its location. misconfig.ai/rules lists every rule with what it looks for, why it matters and how to fix it, in the words reports use.
|
|
51
|
+
- On report pages, critical and high findings open with why they matter and the fix showing, and the rest open on a click. A key above the findings says what each level means and how the score is worked out.
|
|
52
|
+
- The command explains medium findings too, not only critical and high ones.
|
|
53
|
+
- Each level has one definition, on misconfig.ai/rules, and every rule follows it. Critical is kept for malware, signs of an attack, instructions hidden from you and code downloaded and run automatically. A setting that turns off all of an agent's prompts is high in every agent, so Claude Code's `bypassPermissions` and Codex's YOLO mode are high, not critical. Direction marks and zero-width characters are medium, while Unicode tag characters, which can hold a whole hidden instruction, stay critical. Notes such as many MCP servers or a very large instruction file no longer change the score.
|
|
54
|
+
- Findings say which setting does what and what follows from it, and each fix names the setting to change. Findings about a known malicious package or extension name who reported it, and so do findings that cite an attack as an example, such as postmark-mcp (Koi Security, September 2025) and ClawHavoc (Koi Security, February 2026).
|
|
55
|
+
- Gemini CLI turns YOLO mode on only from the command line, so a settings file that asks for it is noted, not reported as high, and it no longer hides `autoAccept` or `auto_edit` in the same file.
|
|
56
|
+
- Aider's `yes-always` is low: Aider adds and edits files without asking, but shell commands still need an explicit yes.
|
|
57
|
+
- "Checked" counts the agent files that were read and checked, the same in the command and on every report.
|
|
58
|
+
- Joiners inside emoji sequences, the joiners and breaks that Persian, Hindi, Thai and other scripts use between letters, and the flags of England, Scotland and Wales are no longer reported as hidden characters.
|
|
59
|
+
|
|
60
|
+
Malware and missing fixes:
|
|
61
|
+
|
|
62
|
+
- MCP servers that run a known malicious package, a package that has shipped malware without a pinned version, or a lookalike of an official package, such as `@modelcontextprotocol/server-filesytem`. Servers that run code straight from a git repository, a web address, a temp folder or Downloads are reported too.
|
|
63
|
+
- Editor extensions in VS Code, Cursor, Windsurf, Kiro and VSCodium that are known malware, including the tampered Claude Code extension Cursor's marketplace served in October 2026 and the GlassWorm extensions, copies of agent extensions such as Claude Code and Cline from other publishers, and extensions installed from files.
|
|
64
|
+
- Claude Code, Codex and Claude Desktop versions missing security fixes, from npm, Claude Code's own installer, Homebrew, Volta, pnpm and bun installs, with the command that updates each one.
|
|
65
|
+
- Packages that were malware, such as the Nx releases from the s1ngularity attack: installed globally, in a project's `node_modules` (pnpm's store included), or pinned in its lockfile (npm, pnpm, Yarn or Bun), so a check in CI catches them before anything is installed.
|
|
66
|
+
- Files and workflows attacks leave behind: s1ngularity's secret lists and shell line, Shai-Hulud's workflows and runner, and the tampered Cursor extension's tunnel. They're found by name; their contents are never read.
|
|
67
|
+
- Skills that come with a program or an archive, which is listed by name and never opened, and Claude Code plugin marketplaces that Anthropic doesn't run.
|
|
68
|
+
- Agent files that send the agent to a paste site, give the password to an archive, turn off macOS's check on downloaded apps, or name a server used in a reported attack.
|
|
69
|
+
- `--lookup` also asks OSV.dev about the MCP packages, extensions and agent versions found, for malware and known vulnerabilities, including anything reported since the release. It lists the package names and versions it will send and asks first. Nothing else is sent, a name that isn't in its registry's format (a path or a repository, say) isn't either, and nothing goes to misconfig.ai. Answers are checked before they're used, and what the bundled list already reported isn't repeated.
|
|
70
|
+
- `--explain` and the private report list the AI agents installed and the AI agent extensions in each editor, with their versions.
|
|
71
|
+
|
|
72
|
+
New coverage:
|
|
73
|
+
|
|
74
|
+
- GitHub Copilot on the command line (`~/.copilot`), and Copilot hooks in `.github/hooks`.
|
|
75
|
+
- Cursor hooks, sandbox and command permissions; Cline's YOLO and auto-approve settings; Grok's `config.toml`; Amp; Goose; Continue's data destinations; Junie's MCP servers.
|
|
76
|
+
- Gemini CLI trusted folders, extensions, system settings and `defaultApprovalMode`.
|
|
77
|
+
- Claude Code plugins (only the installed ones, including hooks and MCP servers named in `plugin.json`), rules, memory files, managed settings folders, HTTP hooks, and commands run by settings such as `apiKeyHelper` and `statusLine`.
|
|
78
|
+
- Codex profile files, `-c` overrides that turn off the sandbox or approvals, and skills in `.agents/skills`.
|
|
79
|
+
- VS Code settings that let the Claude agent skip permissions, turn off the built-in terminal rules or approve edits to VS Code's own settings.
|
|
80
|
+
- Settings files that can't be parsed are reported, rather than passed over.
|
|
81
|
+
|
|
82
|
+
Settings and files that run code:
|
|
83
|
+
|
|
84
|
+
- MCP servers are seen through the launchers that start them, such as `cmd /c`, `sh -c`, `bash -lc`, PowerShell's `-Command`, `env`, `npm exec`, `bun x` and `deno run npm:`, so a known malicious package can't hide behind a shell.
|
|
85
|
+
- Settings that make every command the agent runs load other code: `NODE_OPTIONS` with `--require` or `--import`, `LD_PRELOAD`, `DYLD_INSERT_LIBRARIES`, `BASH_ENV`, Java and .NET startup hooks, git's `GIT_SSH_COMMAND` and config variables, and a `PATH` that puts a project's own folders first. They're found in Claude Code's `env`, Codex's `shell_environment_policy`, Aider's `set-env` and an MCP server's environment. A value that only tunes a program, such as `--max-old-space-size`, isn't reported.
|
|
86
|
+
- Hooks and commands in more agents: Gemini CLI hooks and the commands that find and call its tools; Codex hooks, model provider key commands and MCP header helpers; Windsurf and Devin hooks; Kiro hooks and agents; Amazon Q agents; Grok hooks and its status line command; the commands Cursor runs for background agents; and Aider's lint, test and notification commands.
|
|
87
|
+
- Codex command rules in `.codex/rules` that let a shell, a downloader or every git command run outside the sandbox without asking, as one finding for each rules file, however many commands you approved. Rules are read the way Codex reads them: a rule with no decision allows, the strictest matching rule wins, and comments, text in strings and names set at the top of the file can't hide a rule.
|
|
88
|
+
- Kiro and Amazon Q agents that pre-approve the shell, through `allowedTools`, `toolsSettings` or Kiro's `permissions` rules. Kiro agents written in Markdown are read as instructions.
|
|
89
|
+
- Plugin code a project gives OpenCode, Amp or Cline, which they load as they start, without asking. It's listed by name, never opened, and shown in the list of files that control your agents.
|
|
90
|
+
- MCP servers in Continue's and Goose's YAML settings.
|
|
91
|
+
- The list of files that control your agents says what each of these does, such as which commands a rules file lets through and which hooks run when.
|
|
92
|
+
|
|
93
|
+
More accurate:
|
|
94
|
+
|
|
95
|
+
- Options that turn approvals off are credited to the command they belong to, so `npx -y` and `gemini mcp add ... npx -y` no longer count. Options for Codex, Copilot, Cursor, Aider, Amp, Grok and Kiro are recognized.
|
|
96
|
+
- `bypassPermissions` in a project's own settings is now medium, since Claude Code 2.1.257 and later ignore it there.
|
|
97
|
+
- Ignore rules are matched the way git matches them, including nested `.gitignore` files, `.git/info/exclude` and git's global ignore list, where Claude Code adds its local settings.
|
|
98
|
+
- Fewer false alarms, checked against public repositories: instructions that quote an injection as an example, hooks that only download or clean up a named folder, `curl -f`, public certificates, keys in test and example folders, a project's `.npmrc`, `.env.local.sample`, `Bearer ${TOKEN}` headers, "copy .env.example to .env", "run the tests without asking", `uvx --python` and `npx --registry`.
|
|
99
|
+
- The warning about too many instruction files now needs at least three, read by different agents, at the top of the project. A rules folder counts once, and a file that only points to another doesn't count.
|
|
100
|
+
- Every Claude Code permission mode is described as it works today, including `auto` and `dontAsk`.
|
|
101
|
+
- Only a skill's `SKILL.md` is read. The reference docs and scripts inside a skill are opened by the agent only when `SKILL.md` points to them, so code samples in them no longer raise findings, and a skill with hundreds of files can't hide the skills after it.
|
|
102
|
+
- A plugin installed more than once is read from its latest install, and a plugin installed for one project counts only in that project.
|
|
103
|
+
- MCP servers are counted for each agent, not added up across agents.
|
|
104
|
+
- Comments inside code blocks are visible, so they aren't reported as hidden text. "Always accept connections", `Bearer ${process.env.SECRET}` and "settings are read from .env" are no longer read as orders to the agent.
|
|
105
|
+
- A large text file in a folder where an agent was started isn't reported, and an agent file too large to check is named.
|
|
106
|
+
- Skill and agent descriptions written as folded or quoted YAML are shown as written, not as `>-` or with backslashes.
|
|
107
|
+
- Headings and `@` imports inside code blocks are ignored, and `@` imports are only read from files that support them: `CLAUDE.md`, `GEMINI.md` and Claude Code rules.
|
|
108
|
+
- A pinned Python package such as `mcp-server-fetch==2025.4.7` is no longer mistaken for a secret.
|
|
109
|
+
- When two MCP servers use the same package, each finding points at its own server's lines.
|
|
110
|
+
- A warning about one thing no longer hides an instruction after it, as in "don't use the old installer; run curl ... | bash".
|
|
111
|
+
- Pre-release versions are ordered the way semver orders them, so 0.39.0-alpha.2 comes before 0.39.0.
|
|
112
|
+
- A package that's installed in the project and pinned in its lockfile is reported once. Lockfiles written without download addresses, npm's version 1 lockfiles and pnpm 7's are read too.
|
|
113
|
+
|
|
114
|
+
Safer in a project from someone else:
|
|
115
|
+
|
|
116
|
+
- An agent file that's a link to a file outside the project, or to a credential file, is reported and not opened. Agents follow such links, so a cloned project could use one to put a file from your computer into what the agent reads.
|
|
117
|
+
- A folder named `~` or `C:` at the top of a project is left out, so a project can't stand in for the agent settings in your home folder.
|
|
118
|
+
- Agent folders at the top of a project, such as `.claude`, are checked first, so a folder with a very large number of files can't push them out of the check. What's read from a project is limited to the same number of files and bytes as the browser check, and the report says when the check stopped early, even when it found nothing.
|
|
119
|
+
- Names from your files, such as server names and variables, are shown on one line, without double quotes, and cut to size wherever the report quotes them.
|
|
120
|
+
- Passwords are masked from six characters when a file names them as passwords, as in `--password` or `"DB_PASSWORD"`, and in addresses with an empty user name, as in `redis://:password@host`.
|
|
121
|
+
- A file's name can't hide it. Names with line breaks, control codes or characters that reorder text are checked like any other and shown with visible symbols in their place.
|
|
122
|
+
- An instruction file too large to read whole is checked from its start, where agents read first, and the report says only part of it was checked. A file with a stray NUL byte is still read when the rest is text.
|
|
123
|
+
- A link to a folder inside the project is followed once, and never out of the project.
|
|
124
|
+
- Commands a project's own settings run on their own, such as a hook, a status line or an API key helper running a script from the project, are reported once per file. In a project from someone else, that's their code running on your computer as soon as you trust the folder. Commands that only print or play a sound aren't.
|
|
125
|
+
- Settings that send the agent's requests to another address are reported: `ANTHROPIC_BASE_URL`, proxies and telemetry collectors in Claude Code's `env`, Codex's `base_url`, Aider's `openai-api-base`, OpenCode's `baseURL` and Continue's `apiBase`. Set by a project, they can hand that address your prompts, your code and your API key. In your own settings they're only noted, since that's how company gateways work.
|
|
126
|
+
- `NODE_TLS_REJECT_UNAUTHORIZED=0` anywhere, and a certificate authority a project adds, are reported.
|
|
127
|
+
- A project whose shared Claude Code settings approve its own MCP servers with `enabledMcpjsonServers` is reported.
|
|
128
|
+
- VS Code tasks with `runOn: folderOpen`, which Cursor runs as soon as a folder opens because it ships with Workspace Trust off. The finding points at the `runOn` line.
|
|
129
|
+
- MCP servers that run a script from the project, or a shell given a download to run.
|
|
130
|
+
- Windsurf workflows, Gemini CLI custom commands, and files a setting names as instructions: Gemini CLI's `context.fileName`, Codex's `project_doc_fallback_filenames`, OpenCode's `instructions` and Aider's `read`. One that points out of the project, or at a web page, is reported.
|
|
131
|
+
- Instructions that send the agent to a web page for its steps, and more ways of downloading and running code: saving a script and then running it, `python -c "$(curl ...)"`, and `deno run` or `npx` with a web address.
|
|
132
|
+
- A link from an agent folder, such as `.claude` or `.cursor/rules`, to a folder outside the project.
|
|
133
|
+
- Codex rules made in a function or a loop, or from an expression, which the check can't read, are reported instead of passed over.
|
|
134
|
+
- Settings are read the way the agents read them in more spellings: YAML with quoted keys, `yes`, tags, anchors, block text and flow mappings, and TOML escapes in keys and strings.
|
|
135
|
+
|
|
136
|
+
Private reports:
|
|
137
|
+
|
|
138
|
+
- `--open` puts the full report, everything `--explain` shows included, on a private page at misconfig.ai, laid out for reading and printing. The report is encrypted on your computer before it's sent, and the key stays in the part of the link browsers never send, so misconfig.ai can't read it. It's deleted after 7 days, or sooner with the delete link.
|
|
139
|
+
- The private page trusts nothing in a link, since anyone can make one. Every finding is rebuilt from the rule catalog, the grade is worked out again, and names and file text are shown only as text. Commands, advice, sources and what known malware does must be misconfig's own words, so a link can't tell its reader to run something misconfig never suggested.
|
|
140
|
+
- Links printed after `--share` and `--open` are built from the report's ID, and replies from the server are shown on one line with control codes replaced.
|
|
141
|
+
- `MISCONFIG_URL` must be an https address, or http on this computer for testing.
|
|
142
|
+
|
|
143
|
+
Share links and privacy:
|
|
144
|
+
|
|
145
|
+
- A share link never drops a finding. Before it sends anything, `--share` asks misconfig.ai which set of checks it runs, and if the site doesn't know every check yet, nothing is sent; the site refuses such a report too. A finding in a file a share link can't name, such as one a setting names as instructions, also stops the share, and so do more than 400 findings. The command suggests `--open` for a private report instead.
|
|
146
|
+
- A finding in a file with a space or another unusual character in its name is shared under a plain name, such as `my_rule.mdc`, instead of being left out.
|
|
147
|
+
- Shared reports name agent files only, describe options and Docker mounts in fixed words, and leave out any value a check wouldn't produce. Claude Code memory files, whose folders are named after local paths, are never shared.
|
|
148
|
+
- `--project-only` and `--share` also use git's global ignore list, so a shared report agrees with what you see locally.
|
|
149
|
+
- From `~/.claude.json`, only the MCP servers, the folders Claude Code has been started in and the tools approved in each are kept. The API key field is no longer kept, even masked.
|
|
150
|
+
- Shared reports name the setting that approves tools automatically, such as `chat.tools.autoApprove`.
|
|
151
|
+
|
|
152
|
+
More reliable:
|
|
153
|
+
|
|
154
|
+
- Linked agent files, such as a `CLAUDE.md` that links to `AGENTS.md`, are read.
|
|
155
|
+
- Settings on a network share, such as a redirected AppData folder, and PowerShell profiles in a OneDrive Documents folder are found.
|
|
156
|
+
- A file that a check can't handle is reported as unchecked instead of stopping the report.
|
|
157
|
+
- Files saved as UTF-16 are read, and binary files are skipped.
|
|
158
|
+
- Large folders are walked from the top down, and the report says when a folder was too big to check completely. With `--fail-on`, that exits with code 2.
|
|
159
|
+
- A folder that doesn't exist is an error, not an empty report.
|
|
160
|
+
- Control codes and line breaks in files can't change what the terminal shows.
|
|
161
|
+
- Hostile files can't slow the check down.
|
|
162
|
+
- When the network fails, the message says why, such as an address that can't be found, a refused connection, a certificate your network replaces, or no answer within 30 seconds, and whether anything was sent. It suggests the proxy or certificate setting to try.
|
|
163
|
+
- Output piped into a command that stops reading, such as `head`, ends quietly.
|
|
164
|
+
- Ctrl+C at a question stops the command with exit code 130, and nothing is sent.
|
|
165
|
+
- `--open` says plainly when a site can't take private reports yet.
|
|
166
|
+
- A large `~/.claude.json` is read quickly whatever its formatting.
|
|
167
|
+
|
|
168
|
+
Package:
|
|
169
|
+
|
|
170
|
+
- The package includes this changelog and a license notice.
|
|
171
|
+
|
|
172
|
+
## 1.1.0 (2026-11-01)
|
|
173
|
+
|
|
174
|
+
- The report now lists every file that controls your agents, grouped by where it applies, with a plain-language summary of what each one tells them.
|
|
175
|
+
- New `--explain` option: shows everything each file sets, including permission modes, allowed and blocked actions, MCP servers and what they run, hooks, trusted folders, and what instruction files say, including text that's hidden when you read them.
|
|
176
|
+
- Shared reports leave out names taken from your files, such as MCP servers, packages, commands and environment variable names.
|
|
177
|
+
- The advice for an unpinned MCP server now includes the command that shows its newest version.
|
|
178
|
+
|
|
179
|
+
## 1.0.1 (2026-11-01)
|
|
180
|
+
|
|
181
|
+
- File paths in environment variables are no longer reported as secrets.
|
|
182
|
+
- Text files in the home folder are reported only when they contain instructions for an agent.
|
|
183
|
+
- `~/.codex/AGENTS.md` is attributed to Codex only.
|
|
184
|
+
|
|
185
|
+
## 1.0.0 (2026-11-01)
|
|
186
|
+
|
|
187
|
+
- First release.
|
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Copyright (c) 2026 GK Data LLC. All rights reserved.
|
package/README.md
CHANGED
|
@@ -1,37 +1,111 @@
|
|
|
1
1
|
# misconfig
|
|
2
2
|
|
|
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.1
|
|
6
|
+
npx @misconfig/cli@1.3.1
|
|
7
7
|
```
|
|
8
8
|
|
|
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.
|
|
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`.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Example
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
```
|
|
14
|
+
$ npx @misconfig/cli@1.3.1
|
|
15
|
+
misconfig 1.3.1
|
|
16
|
+
Checked ~/code/shop and the agent settings on this computer. Everything
|
|
17
|
+
ran here; nothing was uploaded.
|
|
18
|
+
|
|
19
|
+
What controls your agents 5 files
|
|
20
|
+
|
|
21
|
+
On this computer, for every project
|
|
22
|
+
~/.claude.json Claude Code
|
|
23
|
+
Started in 3 folders, including your home folder and Downloads. 1
|
|
24
|
+
MCP server: fetch.
|
|
25
|
+
~/.codex/config.toml Codex
|
|
26
|
+
Sandboxed to the project. Asks when it decides to.
|
|
27
|
+
~/.zshrc Your shell
|
|
28
|
+
Starts claude with --dangerously-skip-permissions.
|
|
29
|
+
|
|
30
|
+
In this project
|
|
31
|
+
CLAUDE.md Claude Code
|
|
32
|
+
3 lines of instructions, such as “Run npm test before you commit.”
|
|
33
|
+
.claude/settings.json Claude Code
|
|
34
|
+
Allows 2 actions without asking.
|
|
35
|
+
|
|
36
|
+
Findings 4
|
|
37
|
+
|
|
38
|
+
High 3
|
|
39
|
+
■ Your shell starts Claude Code with approvals off
|
|
40
|
+
~/.zshrc:2 FLAG-ALIAS
|
|
41
|
+
~/.zshrc adds “--dangerously-skip-permissions” every time you run
|
|
42
|
+
the command, so the agent's permission checks never run.
|
|
43
|
+
Fix Remove the flag from your shell profile. For fewer prompts,
|
|
44
|
+
allow specific commands in the agent's settings instead.
|
|
45
|
+
...
|
|
46
|
+
|
|
47
|
+
Grade D, 60 out of 100
|
|
48
|
+
3 high, 1 medium
|
|
49
|
+
Checked 5 agent files and 1 MCP server.
|
|
50
|
+
|
|
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
|
|
56
|
+
```
|
|
57
|
+
|
|
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.
|
|
59
|
+
|
|
60
|
+
Add `--explain` to see everything each file sets: permission modes, allowed and blocked actions, MCP servers and what they run, hooks, trusted folders, and what instruction files say, including text that's hidden when you read them. It also lists the AI agents installed and the AI agent extensions in each editor, with their versions.
|
|
61
|
+
|
|
62
|
+
## What it covers
|
|
63
|
+
|
|
64
|
+
**Agents:** Claude Code, Claude Desktop, Codex, GitHub Copilot (in VS Code and on the command line), Cursor, Gemini CLI, OpenCode, Cline, Windsurf, Zed, Grok, Amp, Goose, Continue, Roo Code, Kiro, Amazon Q, Junie and Aider, plus shell aliases that start an agent.
|
|
65
|
+
|
|
66
|
+
**Where it looks:** the project folder, and the settings on your computer that most people never open, such as `~/.claude/settings.json`, `~/.claude.json`, Claude Code plugins and memory files, `~/.codex/config.toml`, `~/.copilot`, `~/.gemini`, Claude Desktop's MCP config, VS Code and Cursor settings, admin-managed settings and your shell profile. The full list for each operating system is at https://misconfig.ai/#locations. In the project it looks up to 12 folders deep and skips dependencies and build output, such as `node_modules` and `dist`.
|
|
14
67
|
|
|
15
|
-
|
|
68
|
+
**What it flags:**
|
|
16
69
|
|
|
17
|
-
|
|
70
|
+
- **Permissions:** bypass and YOLO modes, allow-everything rules, Codex command rules, Kiro and Amazon Q agents that pre-approve the shell, auto-approve settings and aliases that skip approvals, and settings that send the agent's requests to another address or turn off certificate checks.
|
|
71
|
+
- **Hooks and commands:** hooks in every agent that has them, and settings that run a command for a status line, a key or tool discovery, when they download and run code, send data over the network or post session details to a web address. Commands a project's own settings run on their own, VS Code tasks that run when a folder opens, settings that make every command load other code, such as `NODE_OPTIONS=--require` or `LD_PRELOAD`, and plugin code a project gives OpenCode, Amp or Cline.
|
|
72
|
+
- **MCP servers:** tokens pasted into config, unpinned packages, plain-HTTP remotes, servers that run code from the project, and servers that can run shell commands or read your whole disk, including when a launcher such as `cmd /c` or `sh -c` starts them.
|
|
73
|
+
- **Instruction files:** invisible Unicode, orders hidden in HTML comments, download-and-run commands, instructions taken from a web page and links to data-collection endpoints, including in files a setting names as instructions, such as Gemini CLI's `context.fileName`.
|
|
74
|
+
- **Where agents run:** agents started in Downloads or your home folder, folders agents trust that they shouldn't, secret files git doesn't ignore, and keys within an agent's reach.
|
|
75
|
+
- **Installed code:** MCP packages and editor extensions that are known malware or copy an official name, packages that were malware in `node_modules` or pinned in the lockfile, Claude Code, Codex and Claude Desktop versions missing security fixes, skills that come with programs, plugin marketplaces Anthropic doesn't run, and the files and workflows attacks such as s1ngularity and Shai-Hulud leave behind.
|
|
18
76
|
|
|
19
|
-
|
|
77
|
+
## Malware and missing fixes
|
|
20
78
|
|
|
21
|
-
|
|
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.
|
|
22
80
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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.
|
|
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:
|
|
84
|
+
|
|
85
|
+
- It lists every package name and version it will send, and asks first. Add `--yes` to skip the question.
|
|
86
|
+
- Only package names, ecosystems and versions are sent: no paths, file contents, server names or settings. Package names come from your setup, so if one is private to your company, answer no.
|
|
87
|
+
- Nothing goes to misconfig.ai.
|
|
88
|
+
- What comes back is checked before it's used, and what the bundled list already reported isn't repeated.
|
|
89
|
+
|
|
90
|
+
It isn't an antivirus. It doesn't scan programs or watch what runs.
|
|
91
|
+
|
|
92
|
+
## Read it in your browser
|
|
93
|
+
|
|
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:
|
|
95
|
+
|
|
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.
|
|
27
100
|
|
|
28
101
|
## Privacy
|
|
29
102
|
|
|
30
|
-
- Everything runs on your computer.
|
|
31
|
-
- Credential files such as `.env` and `id_rsa
|
|
32
|
-
- From `~/.claude.json` it
|
|
33
|
-
-
|
|
34
|
-
-
|
|
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`.
|
|
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.
|
|
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.
|
|
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.
|
|
107
|
+
- What it works out about your files, including everything `--explain` and `--open` show, stays on your computer.
|
|
108
|
+
- `--lookup` sends package names and versions to OSV.dev, after it shows you the list and you say yes.
|
|
35
109
|
|
|
36
110
|
The checks are plain JavaScript in `engine/`, so you can read what runs before you run it.
|
|
37
111
|
|
|
@@ -40,9 +114,15 @@ The checks are plain JavaScript in `engine/`, so you can read what runs before y
|
|
|
40
114
|
```
|
|
41
115
|
npx @misconfig/cli [folder] [options]
|
|
42
116
|
|
|
43
|
-
--explain Show everything each file tells your agents
|
|
44
|
-
|
|
45
|
-
--
|
|
117
|
+
--explain Show everything each file tells your agents, and
|
|
118
|
+
what's installed
|
|
119
|
+
--lookup Also look up what's installed on OSV.dev. Sends only
|
|
120
|
+
package names and versions, and asks first
|
|
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
|
|
46
126
|
--json Print the full result as JSON
|
|
47
127
|
--project-only Skip the agent settings on this computer
|
|
48
128
|
--fail-on <level> Exit with code 1 if anything at this level or worse is
|
|
@@ -51,20 +131,20 @@ npx @misconfig/cli [folder] [options]
|
|
|
51
131
|
-h, --help Show this help
|
|
52
132
|
```
|
|
53
133
|
|
|
54
|
-
Exit codes: `0` when the check ran
|
|
134
|
+
Exit codes: `0` when the check ran and nothing reached `--fail-on`, `1` when `--fail-on` found something, `2` for errors, or with `--fail-on` when the folder was too big to check completely, and `130` when you press Ctrl+C at a question.
|
|
55
135
|
|
|
56
|
-
##
|
|
136
|
+
## Use in CI
|
|
57
137
|
|
|
58
|
-
|
|
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:
|
|
59
139
|
|
|
60
|
-
```
|
|
61
|
-
|
|
140
|
+
```sh
|
|
141
|
+
npx @misconfig/cli@1.3.1 --project-only --fail-on high
|
|
62
142
|
```
|
|
63
143
|
|
|
64
|
-
##
|
|
144
|
+
## Upgrading from 1.3.0
|
|
65
145
|
|
|
66
|
-
|
|
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.
|
|
67
147
|
|
|
68
|
-
|
|
148
|
+
## License
|
|
69
149
|
|
|
70
|
-
|
|
150
|
+
Copyright (c) 2026 GK Data LLC. All rights reserved. https://misconfig.ai
|
package/bin/misconfig.js
CHANGED
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { main } from "../lib/main.js";
|
|
3
|
+
import { oneLine } from "../lib/print.js";
|
|
4
|
+
|
|
5
|
+
// Older versions of Node print a warning that fetch is experimental the first
|
|
6
|
+
// time the command downloads today's malware list or --lookup asks OSV.dev.
|
|
7
|
+
// Other warnings still print.
|
|
8
|
+
const warn = process.emitWarning;
|
|
9
|
+
process.emitWarning = function (warning, ...rest) {
|
|
10
|
+
const type = typeof rest[0] === "string" ? rest[0] : rest[0]?.type;
|
|
11
|
+
if (type === "ExperimentalWarning" && /\bfetch\b/i.test(String(warning?.message ?? warning))) return;
|
|
12
|
+
return warn.call(this, warning, ...rest);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// Output piped into something that stops reading, such as head, isn't an error.
|
|
16
|
+
for (const stream of [process.stdout, process.stderr]) {
|
|
17
|
+
stream.on("error", (err) => {
|
|
18
|
+
if (err?.code !== "EPIPE") throw err;
|
|
19
|
+
process.exit(process.exitCode ?? 0);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
3
22
|
|
|
4
23
|
main(process.argv.slice(2)).then(
|
|
5
24
|
(code) => {
|
|
6
25
|
process.exitCode = code;
|
|
7
26
|
},
|
|
8
27
|
(err) => {
|
|
9
|
-
|
|
28
|
+
// Ctrl+C at a question: nothing was sent, and the shell hears it was
|
|
29
|
+
// interrupted.
|
|
30
|
+
if (err?.code === "ABORT_ERR") {
|
|
31
|
+
console.error("\nmisconfig: Stopped. Nothing was sent.");
|
|
32
|
+
process.exitCode = 130;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
// Messages can quote a path or a reply from the server, so control
|
|
36
|
+
// codes in them are shown, not run.
|
|
37
|
+
console.error(`misconfig: ${oneLine(err?.message ?? err)}`);
|
|
10
38
|
process.exitCode = 2;
|
|
11
39
|
},
|
|
12
40
|
);
|