@misconfig/cli 1.3.1 → 1.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0
4
+
5
+ - An optional `--attribute` scan matches existing Claude Code and Codex file-edit records to observed settings. `--i-edited` records a personal claim. The timeline shows the editor evidence alongside the approving account.
6
+ - Interactive computer scans announce newer stable npm releases. `--check-update` checks on demand, and `--no-update-check` disables automatic checks.
7
+ - `--demo` runs a guided review on a disposable sample profile and shows its history. On Windows, double-click `demo.cmd` to try it.
8
+ - `--history` shows when each config change was detected and which OS account approved a change or accepted a warning. It works offline and can print JSON. HTML scan reports include the timeline.
9
+ - Computer scans show what changed since the previous scan and which settings still await approval. Use `--review` for a guided review or `--approve ID` for one decision.
10
+ - Accepting a risk dates and labels its warning in text, JSON and local HTML. The finding keeps its severity, remediation and score.
11
+ - Review history stays under the current user's home. `--no-history` runs the scanner once without accessing history. Project-only scans retain their 1.3.2 behavior.
12
+
13
+ ## 1.3.2 (2026-11-03)
14
+
15
+ - misconfig is open source under the Apache License 2.0. The code, its tests and the issue tracker are at https://github.com/gkdataio/misconfig. The name and logo stay trademarks of GK Data LLC.
16
+ - The package names its repository and issue tracker, so npm links to both.
17
+ - The README on npm is the one on GitHub.
18
+ - No changes to the checks, the report or what the command sends.
19
+
3
20
  ## 1.3.1 (2026-11-03)
4
21
 
5
22
  Nothing about your setup goes to misconfig.ai:
package/LICENSE CHANGED
@@ -1 +1,202 @@
1
- Copyright (c) 2026 GK Data LLC. All rights reserved.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,8 @@
1
+ misconfig
2
+ Copyright 2026 GK Data LLC
3
+
4
+ This product includes the Recursive typeface, in report/fonts/, licensed
5
+ under the SIL Open Font License, Version 1.1. See report/fonts/OFL.txt.
6
+
7
+ "misconfig" and the misconfig.ai logo are trademarks of GK Data LLC. The
8
+ Apache License does not grant permission to use them.
package/README.md CHANGED
@@ -1,150 +1,166 @@
1
+ <p align="center">
2
+ <a href="https://misconfig.ai"><img src="https://raw.githubusercontent.com/gkdataio/misconfig/main/assets/banner.png" alt="misconfig.ai: Is your AI setup misconfigured?" width="100%"></a>
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/@misconfig/cli"><img src="https://img.shields.io/npm/v/@misconfig/cli?style=flat-square&label=npm&labelColor=0a0b0d&color=eaff57" alt="npm version"></a>
7
+ <a href="https://github.com/gkdataio/misconfig/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-eaff57?style=flat-square&labelColor=0a0b0d" alt="License: Apache-2.0"></a>
8
+ <a href="https://github.com/gkdataio/misconfig/blob/main/package.json"><img src="https://img.shields.io/badge/dependencies-none-eaff57?style=flat-square&labelColor=0a0b0d" alt="No dependencies"></a>
9
+ <a href="https://misconfig.ai/rules"><img src="https://img.shields.io/badge/rules-misconfig.ai%2Frules-eaff57?style=flat-square&labelColor=0a0b0d" alt="Every rule explained"></a>
10
+ </p>
11
+
1
12
  # misconfig
2
13
 
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.
14
+ misconfig checks the settings that control Claude Code, Codex and other coding agents. It shows which file sets a permission, starts an MCP server or runs a hook, explains the risk, and gives you a fix. Version 1.4 adds a local history of what changed on your computer and who approved it.
15
+
16
+ To hear when a release ships, choose **Watch → Custom → Releases** on the [GitHub repository](https://github.com/gkdataio/misconfig), or subscribe to the [release feed](https://github.com/gkdataio/misconfig/releases.atom). These channels also work for people who keep using 1.3.2.
17
+
18
+ ## New in 1.4
19
+
20
+ The demo requires CLI 1.4 or newer and Node.js 18 or later. Try it on a sample profile. On Windows, use `npx.cmd` if PowerShell blocks `npx`.
4
21
 
5
22
  ```sh
6
- npx @misconfig/cli@1.3.1
23
+ npx @misconfig/cli@latest --demo
7
24
  ```
8
25
 
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`.
26
+ The demo changes a sample calendar server from 1.2.3 to 1.2.4. A sample Codex record identifies the editor. You can approve that update, then accept a separate warning about an unpinned mail server and see it stay in the report. All decisions use the fictional account **Demo reviewer**. The demo runs offline and deletes the sample profile when you finish. Add `--open` to keep an HTML report. From a 1.4 source checkout or the extracted demo bundle, run `node bin/misconfig.js --demo` or double-click `demo.cmd` on Windows.
10
27
 
11
- ## Example
28
+ ### Review your computer
12
29
 
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
30
+ ```sh
31
+ npx @misconfig/cli@1.4.0
32
+ npx @misconfig/cli@1.4.0 --review
33
+ npx @misconfig/cli@1.4.0 --history
56
34
  ```
57
35
 
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.
36
+ Your first scan lists the settings available for review. **Since your last scan** shows later additions, edits and removals. **Awaiting your approval** also includes changes you skipped. The same local history follows you across project folders.
59
37
 
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.
38
+ Press **Y** to approve the displayed item, **Enter** to skip it, or **Q** to finish. Each decision is saved immediately. To decide one item by ID, run `--approve ID` with the ID shown in your scan. The command checks the current value again before saving your decision.
61
39
 
62
- ## What it covers
40
+ Approving a setting records the value you expect. Accepting a risk separately adds **Risk accepted**, the date and the approving account to that warning. Its severity, fix and effect on the score stay visible in text, JSON and HTML. **Earlier risk decisions** lists accepted findings that have disappeared or whose file could not be verified. A skipped change stays pending until you approve it or the setting returns to its approved value.
63
41
 
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.
42
+ misconfig compares the computer and administrator settings it discovers, including MCP servers, hooks, permissions, instructions, shell settings, installed agent versions and AI editor extensions. The report names any source it could only partly read and preserves its earlier decision. For full setting values, open the named file.
65
43
 
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`.
44
+ `--history` reads the saved timeline without rescanning. It shows the observation time, any evidence about the editor, and the OS account that approved the change. People sharing a login share that reviewer name. Use `--history --json` for chronological events or expand **Computer history** in an HTML report.
67
45
 
68
- **What it flags:**
46
+ ### Who changed a setting?
69
47
 
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.
48
+ Run `npx @misconfig/cli@1.4.0 --offline --attribute` to match observed edits against local Claude Code or Codex records. This works after approval, too. To read particular sessions, pass `--session "path/to/session.jsonl"` for each one.
76
49
 
77
- ## Malware and missing fixes
50
+ An agent attribution requires a completed file tool, the same file, the exact change to the setting, and a tool timestamp between the two scans. Supported records include Claude Code’s Edit and Write results and Codex’s completed file changes with numbered diffs. Reconstructed patches must also match the saved file fingerprints. A shell command, file owner, or nearby agent session alone leaves the author unknown. A matching record identifies a recorded edit. Other unlogged writes can produce the same setting, and local records are editable.
78
51
 
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.
52
+ If you made an edit yourself, use its `e-` ID from `--history`. For example, `npx @misconfig/cli@1.4.0 --i-edited e-4` records your OS account as **self-reported**. Conflicting sources appear as uncertain. An edit with no matching evidence stays **Edit author unknown**.
80
53
 
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.
54
+ Session records can contain private conversations and tool inputs. Only `--attribute` or `--session` reads them on your computer. Automatic discovery searches the last seven days in Claude’s projects and Codex’s sessions and archived sessions, honoring their config directory overrides. The search reads up to 48 local files, 4 MiB from the end of each, up to 32 MiB total. It reports partial coverage when a limit or read error is encountered. Only matching source labels and timestamps enter the history.
82
55
 
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:
56
+ ### npm release notices
84
57
 
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.
58
+ Starting in 1.4, interactive computer scans check the public npm `latest` tag. A successful check is cached for 24 hours. The terminal announces the current release once, or shows both versions and the upgrade command if a newer stable version is available. Run `--check-update` at any time, including with `--json`.
89
59
 
90
- It isn't an antivirus. It doesn't scan programs or watch what runs.
60
+ `--no-update-check` or `MISCONFIG_NO_UPDATE_CHECK=1` disables automatic release checks. Offline, demo, history, JSON, CI and project-only scans skip them. The registry request contains only the public package name. Installing an update remains your choice.
91
61
 
92
- ## Read it in your browser
62
+ <p align="center">
63
+ <img src="https://raw.githubusercontent.com/gkdataio/misconfig/main/assets/terminal.png" alt="misconfig checking a sample project: the files that control its agents, two critical findings with their fixes, and a grade of F" width="820">
64
+ </p>
93
65
 
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:
66
+ ## What it checks
95
67
 
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.
68
+ | Area | What it looks for |
69
+ | --- | --- |
70
+ | Permissions | Bypass and YOLO modes, allow-everything rules, auto-approve settings, shell aliases that start agents with approvals off, settings that send an agent's requests to another address |
71
+ | MCP servers | Tokens pasted into config, unpinned packages, plain-HTTP remotes, servers that run code from the project, servers that can run shell commands or read your whole disk |
72
+ | Instructions and skills | Invisible Unicode, orders hidden in HTML comments, download-and-run commands, links to data-collection endpoints |
73
+ | Hooks | Hooks and editor tasks that run on their own, download and run code, send data over the network, or run commands that can't be undone |
74
+ | Where agents run | Agents started in Downloads or your home folder, folders an agent trusts that it shouldn't, secret files git doesn't ignore |
75
+ | Installed code | MCP packages, editor extensions and skills that are known malware or copy an official name, agent versions missing security fixes, files that attacks leave behind |
100
76
 
101
- ## Privacy
77
+ It reads the settings of Claude Code, Claude Desktop, Codex, GitHub Copilot, Cursor, Gemini CLI, OpenCode, Cline, Windsurf, Zed, Grok, Amp, Goose, Continue, Roo Code, Kiro, Amazon Q, Junie and Aider.
102
78
 
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.
79
+ Every rule, with why it matters and how to fix it, is at [misconfig.ai/rules](https://misconfig.ai/rules).
109
80
 
110
- The checks are plain JavaScript in `engine/`, so you can read what runs before you run it.
81
+ ## Usage
111
82
 
112
- ## Options
83
+ Run it in the folder you open your agents in, usually the project root. It works on macOS, Windows and Linux with Node.js 18 or later. On Windows, if PowerShell blocks `npx`, type `npx.cmd` instead.
113
84
 
85
+ ```sh
86
+ npx @misconfig/cli # this project and the agent settings on this computer
87
+ npx @misconfig/cli --explain # everything each file tells your agents
88
+ npx @misconfig/cli --open # the full report as a page on your computer
89
+ npx @misconfig/cli --lookup # also ask OSV.dev about what's installed
114
90
  ```
115
- npx @misconfig/cli [folder] [options]
116
-
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
126
- --json Print the full result as JSON
127
- --project-only Skip the agent settings on this computer
128
- --fail-on <level> Exit with code 1 if anything at this level or worse is
129
- found: critical, high, medium or low
130
- -v, --version Print the version
131
- -h, --help Show this help
91
+
92
+ | Option | What it does |
93
+ | --- | --- |
94
+ | `--demo` | Try a version change, a risk decision and their history on a disposable sample computer |
95
+ | `--review` | Walk through pending computer changes and risk decisions in a terminal |
96
+ | `--approve ID` | Approve one current change (`c-…`) or accept one current finding (`r-…`) |
97
+ | `--history` | Read the local timeline of observed changes, approvals and risk acceptances. Add `--json` for machine-readable events |
98
+ | `--no-history` | Scan once without reading or writing computer review history |
99
+ | `--attribute` / `--session FILE` | Match observed edits with recent or explicitly chosen local agent records |
100
+ | `--i-edited ID` | Record a self-reported manual edit against its observed event ID |
101
+ | `--check-update` / `--no-update-check` | Check npm now or skip the automatic release check |
102
+ | `--explain` | Shows everything each file sets: permission modes, allowed and blocked actions, MCP servers and what they run, hooks, trusted folders, hidden text, and the agents and extensions installed |
103
+ | `--open` | Saves the full report as one page in your temp folder and opens it in your browser. The page has no scripts and loads nothing from the internet |
104
+ | `--lookup` | Also looks up the MCP packages, extensions and agent versions it found on [OSV.dev](https://osv.dev). It lists the names and versions it would send and asks first |
105
+ | `--offline` | Use bundled malware data and skip the npm version check. An explicit `--lookup` still asks to contact OSV.dev. Same as `MISCONFIG_OFFLINE=1` |
106
+ | `--project-only` | Skips the agent settings on this computer |
107
+ | `--fail-on <level>` | Exits with code 1 if it finds anything at that level or worse: `critical`, `high`, `medium` or `low` |
108
+ | `--json` | Prints the full result as JSON |
109
+ | `--yes` | Runs `--lookup` without asking, for scripts |
110
+ | `--help` / `--version` | Print the supported options or installed version |
111
+
112
+ ### In CI
113
+
114
+ After checkout, run a project-only scan before installing the project's dependencies. Pin the CLI version in your workflow. This mode checks repository findings and skips personal approvals and history.
115
+
116
+ ```sh
117
+ npx --yes @misconfig/cli@1.4.0 --project-only --fail-on high
132
118
  ```
133
119
 
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.
120
+ On GitHub, copy the [example workflow](https://github.com/gkdataio/misconfig/blob/main/examples/github-actions/misconfig.yml) into `.github/workflows/misconfig.yml`. It checks out the repository, sets up Node.js and runs the CLI as a shell step. The `--yes` before the package name lets npx fetch the pinned CLI.
135
121
 
136
- ## Use in CI
122
+ With `--fail-on high`, exit `0` means the scan finished below the threshold, `1` means a high or critical finding, and `2` means an error or an incomplete scan with no finding at the threshold. An interrupted prompt returns `130`.
137
123
 
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:
124
+ ## Privacy
139
125
 
140
- ```sh
141
- npx @misconfig/cli@1.3.1 --project-only --fail-on high
142
- ```
126
+ - Computer scans save review history under `~/.misconfig/computer-v1/`. It contains paths, labels, short summaries, keyed fingerprints, observation times and review decisions. The OS account that owns the files can edit them. `--no-history` skips this storage. HTML and JSON reports can include paths and reviewer names, so check the contents before sharing them.
127
+ - The malware-list request to misconfig.ai carries the CLI version and operating system family. Interactive computer scans also check the public package version on npm. `--offline` skips both requests, and `DO_NOT_TRACK=1` keeps the malware-list request from being counted.
128
+ - `--lookup` sends package names and versions to OSV.dev after the prompt, or with the CLI's `--yes`. The `npx` launcher may contact npm to fetch the CLI before its own offline mode starts. An installed copy or the extracted demo works without that download.
129
+ - 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.
130
+
131
+ The [privacy policy](https://misconfig.ai/privacy) lists everything misconfig.ai receives and how long it's kept.
132
+
133
+ ## Known malware
134
+
135
+ Each release bundles known malicious MCP packages and editor extensions, advisories for Claude Code, Codex and Claude Desktop, and traces left by attacks such as s1ngularity and Shai-Hulud. Each entry names its source. An online scan also downloads the malware list that misconfig.ai rebuilds from OSV.dev every hour.
136
+
137
+ misconfig isn't an antivirus. It doesn't scan programs or watch what your agents do while they run, so keep approvals on for anything you can't undo.
143
138
 
144
- ## Upgrading from 1.3.0
139
+ ## Read the code
145
140
 
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.
141
+ misconfig is plain JavaScript with no dependencies, so what you install is what's in this repository.
142
+
143
+ | Path | What's in it |
144
+ | --- | --- |
145
+ | [`engine/catalog.js`](https://github.com/gkdataio/misconfig/blob/main/engine/catalog.js) | The wording, level and fix of every rule |
146
+ | [`engine/index.js`](https://github.com/gkdataio/misconfig/blob/main/engine/index.js) | The checks that apply the rules, and the scoring |
147
+ | [`engine/known.js`](https://github.com/gkdataio/misconfig/blob/main/engine/known.js) | Known malware, agent advisories and attack traces, each with its source |
148
+ | [`engine/locations.js`](https://github.com/gkdataio/misconfig/blob/main/engine/locations.js) | Where each agent keeps its files on macOS, Windows and Linux |
149
+ | [`lib/discover.js`](https://github.com/gkdataio/misconfig/blob/main/lib/discover.js) | Which files the command reads, and the limits on what it reads |
150
+ | [`lib/html.js`](https://github.com/gkdataio/misconfig/blob/main/lib/html.js) | The page `--open` saves |
151
+ | [`lib/computer-review.js`](https://github.com/gkdataio/misconfig/blob/main/lib/computer-review.js) | Changes, approvals and accepted risks |
152
+ | [`lib/edit-attribution.js`](https://github.com/gkdataio/misconfig/blob/main/lib/edit-attribution.js) | How optional local edit records are matched |
153
+
154
+ ## Contributing
155
+
156
+ Bug reports are the most useful help right now: a finding that's wrong for your setup, a risky setting it missed, or an agent it doesn't know yet. Please [open an issue](https://github.com/gkdataio/misconfig/issues). We aren't accepting code contributions yet. [CONTRIBUTING.md](https://github.com/gkdataio/misconfig/blob/main/CONTRIBUTING.md) explains why.
157
+
158
+ ## Security
159
+
160
+ Please don't report vulnerabilities in public issues. Email [security@misconfig.ai](mailto:security@misconfig.ai) or use GitHub's private vulnerability reporting. [SECURITY.md](https://github.com/gkdataio/misconfig/blob/main/SECURITY.md) has the details.
147
161
 
148
162
  ## License
149
163
 
150
- Copyright (c) 2026 GK Data LLC. All rights reserved. https://misconfig.ai
164
+ [Apache-2.0](https://github.com/gkdataio/misconfig/blob/main/LICENSE). The misconfig name and logo are trademarks of GK Data LLC and aren't covered by the license.
165
+
166
+ <sub>Made by <a href="https://gkdata.io">GK Data LLC</a>. <a href="https://misconfig.ai">misconfig.ai</a></sub>
package/bin/misconfig.js CHANGED
@@ -25,10 +25,9 @@ main(process.argv.slice(2)).then(
25
25
  process.exitCode = code;
26
26
  },
27
27
  (err) => {
28
- // Ctrl+C at a question: nothing was sent, and the shell hears it was
29
- // interrupted.
28
+ // Earlier review decisions may already have been saved.
30
29
  if (err?.code === "ABORT_ERR") {
31
- console.error("\nmisconfig: Stopped. Nothing was sent.");
30
+ console.error("\nmisconfig: Stopped at the prompt.");
32
31
  process.exitCode = 130;
33
32
  return;
34
33
  }
package/demo.cmd ADDED
@@ -0,0 +1,13 @@
1
+ @echo off
2
+ setlocal
3
+ node.exe -e "process.exit(Number(process.versions.node.split('.')[0]) >= 18 ? 0 : 1)" >nul 2>&1
4
+ if errorlevel 1 (
5
+ echo This demo needs Node.js 18 or newer.
6
+ pause
7
+ exit /b 2
8
+ )
9
+ node.exe "%~dp0bin\misconfig.js" --demo
10
+ set "demoExit=%errorlevel%"
11
+ echo(
12
+ pause
13
+ exit /b %demoExit%
package/engine/index.js CHANGED
@@ -1719,7 +1719,7 @@ function collectMcpServers(ctx, f) {
1719
1719
  }
1720
1720
  }
1721
1721
 
1722
- function normalizeServer(name, def, file) {
1722
+ export function normalizeServer(name, def, file) {
1723
1723
  const d = isObj(def) ? def : {};
1724
1724
  let command = d.command ?? d.cmd;
1725
1725
  let args = scalars(d.args);