@misconfig/cli 1.3.2 → 1.5.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 +26 -0
- package/README.md +168 -12
- package/bin/misconfig.js +2 -3
- package/demo.cmd +13 -0
- package/engine/catalog.js +94 -1
- package/engine/index.js +50 -59
- package/engine/templates.js +236 -0
- package/lib/computer-review.js +173 -0
- package/lib/computer-snapshot.js +232 -0
- package/lib/demo.js +32 -0
- package/lib/discover.js +36 -28
- package/lib/edit-attribution.js +122 -0
- package/lib/edit-records.js +125 -0
- package/lib/findings.js +16 -5
- package/lib/formats.js +158 -0
- package/lib/html.js +45 -4
- package/lib/main.js +237 -23
- package/lib/package-update.js +95 -0
- package/lib/print.js +49 -12
- package/lib/review-history.js +99 -0
- package/lib/review-store.js +142 -0
- package/lib/rule-files.js +63 -0
- package/package.json +3 -2
- package/report/styles.css +41 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
- `--jsonl` prints the findings as JSON Lines: one finding on each line, worst first, with the same keys every time, for jq, grep and log collectors. The README lists the keys, and a 1.x release won't rename or remove one. Marks that reorder text, and characters that some programs treat as line breaks, are written as `\u` escapes, so a checked file can't add a line or change how one reads on screen.
|
|
6
|
+
- `--sarif FILE` also saves the findings as SARIF 2.1.0, for GitHub code scanning and other SARIF viewers. The report prints as before. Critical and high findings are errors, medium ones are warnings, and low and info ones are notes, and each rule's security severity sits in GitHub's band for its level. Files are named from the checked folder, and files in your home folder from `HOME`, not by their full paths. A check that stopped early is marked unfinished.
|
|
7
|
+
- The SARIF file is written under another name and moved into place. In a project from someone else, a link left at that path is replaced, not followed into another file.
|
|
8
|
+
- A GitHub Action, `gkdataio/misconfig`, runs the check from this repository at the commit or tag a workflow names. Nothing is fetched from npm. It checks only the repository, saves the SARIF file and names it as an output for `github/codeql-action/upload-sarif`, unless the check failed or stopped early: uploading a partial file would mark the findings it didn't reach as fixed.
|
|
9
|
+
- A name in a checked file can't give a CI system a command through the log. GitHub Actions reads `##[name]` anywhere in a line and `::name::` at the start of one, Azure Pipelines reads `##vso[name]`, and TeamCity reads `##teamcity[name]`. Where a name spells one, the report shows � inside it, and `--json`, `--jsonl` and SARIF write it with a `\u` escape that parsers read back unchanged. Earlier versions printed such a name as written, so a project could add an annotation to a CI run or mask text in its log, and on Azure Pipelines set a variable.
|
|
10
|
+
- While the action's report prints, GitHub is also told to read no workflow commands, as a second guard.
|
|
11
|
+
- Every rule has a name that needs no finding to fill it in, such as "An MCP server runs an unpinned package". SARIF lists rules by it.
|
|
12
|
+
- `--rules FILE` adds a team's own rules to a check, from a JSON file. A rule names the settings files it reads and what in them makes a finding, and brings its own wording. Its findings are in every kind of output, take points off the score and count for `--fail-on`. `docs/rules.md` explains the format, which may still change, and `examples/rules/company.json` is a file to start from.
|
|
13
|
+
- A rule of your own can only add a finding. It can't run anything, read a file misconfig doesn't already read, or hide what a built-in rule finds, and rules are never taken from a checked project. It holds no regular expression: its files are paths and its tests compare text, so a rules file can't be written to stall a check.
|
|
14
|
+
- Six built-in rules are now written in the same form, as data in `engine/templates.js`: `CU-NO-SANDBOX`, `ZED-ALWAYS-ALLOW`, `ZED-TRUST-ALL`, `CL-YOLO`, `CL-AUTO-COMMANDS` and `AMP-ALLOW-ALL`. They find what they found before.
|
|
15
|
+
- A project that defines MCP servers by the ten thousand no longer holds a check up for minutes. The time spent listing each agent's servers grew with the square of their number.
|
|
16
|
+
- `examples/github-actions/code-scanning.yml` is a workflow that runs the action and sends its findings to code scanning. Both example workflows stop a job after ten minutes.
|
|
17
|
+
- The repository runs its tests on every push and pull request, on Linux, macOS and Windows with Node.js 18, 20, 22 and 24, and checks itself with its own action. Issues have a form for each kind of report in CONTRIBUTING.md.
|
|
18
|
+
|
|
19
|
+
## 1.4.0
|
|
20
|
+
|
|
21
|
+
- 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.
|
|
22
|
+
- Interactive computer scans announce newer stable npm releases. `--check-update` checks on demand, and `--no-update-check` disables automatic checks.
|
|
23
|
+
- `--demo` runs a guided review on a disposable sample profile and shows its history. On Windows, double-click `demo.cmd` to try it.
|
|
24
|
+
- `--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.
|
|
25
|
+
- 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.
|
|
26
|
+
- Accepting a risk dates and labels its warning in text, JSON and local HTML. The finding keeps its severity, remediation and score.
|
|
27
|
+
- 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.
|
|
28
|
+
|
|
3
29
|
## 1.3.2 (2026-11-03)
|
|
4
30
|
|
|
5
31
|
- 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.
|
package/README.md
CHANGED
|
@@ -11,15 +11,70 @@
|
|
|
11
11
|
|
|
12
12
|
# misconfig
|
|
13
13
|
|
|
14
|
-
|
|
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.5 adds JSON Lines and SARIF output and a GitHub Action, so findings can go to scripts, log collectors and GitHub code scanning.
|
|
15
15
|
|
|
16
|
-
|
|
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.5
|
|
19
|
+
|
|
20
|
+
Findings can now go to other programs. The report you read is the same.
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npx @misconfig/cli@1.5.0 --jsonl
|
|
24
|
+
npx @misconfig/cli@1.5.0 --sarif misconfig.sarif
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`--jsonl` prints the findings as JSON Lines: one finding on each line, worst first, for `jq`, `grep` and log collectors. [Findings as JSON Lines](https://github.com/gkdataio/misconfig#findings-as-json-lines) lists what each line holds.
|
|
28
|
+
|
|
29
|
+
`--sarif FILE` also saves the findings as SARIF 2.1.0, the format GitHub code scanning and other viewers read. The report still prints.
|
|
30
|
+
|
|
31
|
+
On GitHub, the new action runs the check from this repository at the commit or tag your workflow names, without fetching anything from npm, and saves the SARIF file for code scanning. [In CI](https://github.com/gkdataio/misconfig#in-ci) has the workflow.
|
|
32
|
+
|
|
33
|
+
`--rules FILE` adds rules of your own to the check, for what your team's policy says about agent settings. [Your own rules](https://github.com/gkdataio/misconfig#your-own-rules) shows one.
|
|
34
|
+
|
|
35
|
+
## Computer review
|
|
36
|
+
|
|
37
|
+
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`.
|
|
17
38
|
|
|
18
39
|
```sh
|
|
19
|
-
npx @misconfig/cli
|
|
40
|
+
npx @misconfig/cli@latest --demo
|
|
20
41
|
```
|
|
21
42
|
|
|
22
|
-
|
|
43
|
+
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.
|
|
44
|
+
|
|
45
|
+
### Review your computer
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npx @misconfig/cli@1.5.0
|
|
49
|
+
npx @misconfig/cli@1.5.0 --review
|
|
50
|
+
npx @misconfig/cli@1.5.0 --history
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
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.
|
|
54
|
+
|
|
55
|
+
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.
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
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.
|
|
60
|
+
|
|
61
|
+
`--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.
|
|
62
|
+
|
|
63
|
+
### Who changed a setting?
|
|
64
|
+
|
|
65
|
+
Run `npx @misconfig/cli@1.5.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.
|
|
66
|
+
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
If you made an edit yourself, use its `e-` ID from `--history`. For example, `npx @misconfig/cli@1.5.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**.
|
|
70
|
+
|
|
71
|
+
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.
|
|
72
|
+
|
|
73
|
+
### npm release notices
|
|
74
|
+
|
|
75
|
+
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`.
|
|
76
|
+
|
|
77
|
+
`--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.
|
|
23
78
|
|
|
24
79
|
<p align="center">
|
|
25
80
|
<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">
|
|
@@ -53,37 +108,132 @@ npx @misconfig/cli --lookup # also ask OSV.dev about what's installed
|
|
|
53
108
|
|
|
54
109
|
| Option | What it does |
|
|
55
110
|
| --- | --- |
|
|
111
|
+
| `--demo` | Try a version change, a risk decision and their history on a disposable sample computer |
|
|
112
|
+
| `--review` | Walk through pending computer changes and risk decisions in a terminal |
|
|
113
|
+
| `--approve ID` | Approve one current change (`c-…`) or accept one current finding (`r-…`) |
|
|
114
|
+
| `--history` | Read the local timeline of observed changes, approvals and risk acceptances. Add `--json` for machine-readable events |
|
|
115
|
+
| `--no-history` | Scan once without reading or writing computer review history |
|
|
116
|
+
| `--attribute` / `--session FILE` | Match observed edits with recent or explicitly chosen local agent records |
|
|
117
|
+
| `--i-edited ID` | Record a self-reported manual edit against its observed event ID |
|
|
118
|
+
| `--check-update` / `--no-update-check` | Check npm now or skip the automatic release check |
|
|
56
119
|
| `--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 |
|
|
57
120
|
| `--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 |
|
|
58
121
|
| `--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 |
|
|
59
|
-
| `--offline` |
|
|
122
|
+
| `--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` |
|
|
60
123
|
| `--project-only` | Skips the agent settings on this computer |
|
|
61
124
|
| `--fail-on <level>` | Exits with code 1 if it finds anything at that level or worse: `critical`, `high`, `medium` or `low` |
|
|
62
125
|
| `--json` | Prints the full result as JSON |
|
|
126
|
+
| `--jsonl` | Prints the findings as JSON Lines, one finding on each line |
|
|
127
|
+
| `--sarif FILE` | Also saves the findings in `FILE` as SARIF 2.1.0, for GitHub code scanning and other SARIF viewers |
|
|
128
|
+
| `--rules FILE` | Also checks with your own rules from `FILE`. Repeat it for more files |
|
|
63
129
|
| `--yes` | Runs `--lookup` without asking, for scripts |
|
|
130
|
+
| `--help` / `--version` | Print the supported options or installed version |
|
|
131
|
+
|
|
132
|
+
### Findings as JSON Lines
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
npx @misconfig/cli --jsonl | jq -r 'select(.severity == "high") | "\(.rule) \(.file):\(.line)"'
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Each line is one finding:
|
|
139
|
+
|
|
140
|
+
| Key | What it holds |
|
|
141
|
+
| --- | --- |
|
|
142
|
+
| `type` | `finding`. A later release may print other kinds of lines, so select on it |
|
|
143
|
+
| `rule` | The rule's ID, such as `MCP-UNPINNED` |
|
|
144
|
+
| `severity` | `critical`, `high`, `medium`, `low` or `info` |
|
|
145
|
+
| `category` | `permissions`, `mcp`, `instructions`, `hooks`, `workspace` or `installs` |
|
|
146
|
+
| `agent` | The agent it affects, such as `Claude Code`, or `null` |
|
|
147
|
+
| `title`, `why`, `fix` | The finding, in the report's words |
|
|
148
|
+
| `file`, `line` | Where it is. A file in the checked folder is named from that folder, one in your home folder starts with `~/`, and any other has its full path. `null` when a finding isn't about one file or one line |
|
|
149
|
+
| `evidence` | The line the finding points at, with secrets masked, or `null` |
|
|
150
|
+
| `ruleUrl` | The rule at [misconfig.ai/rules](https://misconfig.ai/rules). For one of your own rules, its `reference`, or `null` without one |
|
|
151
|
+
| `checkedAt` | When the check ran, in UTC |
|
|
152
|
+
| `ruleset`, `cli` | The versions of the rules and of the CLI that made the line |
|
|
153
|
+
|
|
154
|
+
A 1.x release can add a key and won't rename or remove one. Every key is always there. Marks that reorder text, and characters that some programs treat as line breaks, are written as `\u` escapes, so a checked file can't add a line or change how one reads on screen. A check that finds nothing prints nothing, and the exit code is the same as without `--jsonl`.
|
|
155
|
+
|
|
156
|
+
### Your own rules
|
|
157
|
+
|
|
158
|
+
A team can add rules for its own policy. `--rules FILE` reads them from a JSON file and checks with them as well as the built-in ones.
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
npx @misconfig/cli --rules company-rules.json
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"rules": [
|
|
167
|
+
{
|
|
168
|
+
"id": "ACME-GATEWAY",
|
|
169
|
+
"name": "Claude Code doesn't use the company gateway",
|
|
170
|
+
"severity": "high",
|
|
171
|
+
"category": "permissions",
|
|
172
|
+
"why": "env.ANTHROPIC_BASE_URL in {file} isn't the company gateway, so prompts and code leave without its logging and data controls.",
|
|
173
|
+
"fix": "Set env.ANTHROPIC_BASE_URL to https://llm-gateway.acme.example in {file}.",
|
|
174
|
+
"files": ["~/.claude/settings.json"],
|
|
175
|
+
"match": [{ "not": { "path": "env.ANTHROPIC_BASE_URL", "equals": "https://llm-gateway.acme.example" } }]
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
A rule names the settings files it reads and what in them makes a finding. Its findings are in the report, `--json`, `--jsonl` and SARIF like any other. They take points off the score, and `--fail-on` counts them. [The rules format](https://github.com/gkdataio/misconfig/blob/main/docs/rules.md) explains every key, and [`examples/rules/company.json`](https://github.com/gkdataio/misconfig/blob/main/examples/rules/company.json) is a file to start from.
|
|
182
|
+
|
|
183
|
+
A rule can only add a finding. It can't run anything, read a file misconfig doesn't already read, or hide what a built-in rule finds. Rules are read only from the files you name, never from the checked project. In CI, keep the rules file where a pull request can't change it. The format is new in 1.5 and may change before it settles.
|
|
64
184
|
|
|
65
185
|
### In CI
|
|
66
186
|
|
|
67
|
-
|
|
187
|
+
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.
|
|
68
188
|
|
|
69
189
|
```sh
|
|
70
|
-
npx @misconfig/cli --project-only --fail-on high
|
|
190
|
+
npx --yes @misconfig/cli@1.5.0 --project-only --fail-on high
|
|
71
191
|
```
|
|
72
192
|
|
|
73
|
-
|
|
193
|
+
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.
|
|
194
|
+
|
|
195
|
+
To see the findings in the repository's Security tab and on pull requests, use the action with code scanning. Copy the [code scanning workflow](https://github.com/gkdataio/misconfig/blob/main/examples/github-actions/code-scanning.yml) instead:
|
|
196
|
+
|
|
197
|
+
```yaml
|
|
198
|
+
- uses: gkdataio/misconfig@v1.5.0
|
|
199
|
+
id: misconfig
|
|
200
|
+
with:
|
|
201
|
+
fail-on: high
|
|
202
|
+
- uses: github/codeql-action/upload-sarif@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
|
|
203
|
+
if: ${{ !cancelled() && steps.misconfig.outputs.sarif != '' }}
|
|
204
|
+
with:
|
|
205
|
+
sarif_file: ${{ steps.misconfig.outputs.sarif }}
|
|
206
|
+
category: misconfig
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The action runs the CLI from this repository at the commit or tag you name, so nothing is fetched from npm and the checked project can't change what runs. It checks only the repository, never the runner's own settings. Code scanning is available for public repositories, and for organization-owned ones with GitHub Code Security.
|
|
210
|
+
|
|
211
|
+
| Input | What it does |
|
|
212
|
+
| --- | --- |
|
|
213
|
+
| `fail-on` | Fails the step at this level or worse: `critical`, `high` (the default), `medium` or `low`. `none` reports without failing |
|
|
214
|
+
| `path` | The folder the repository is checked out in. Defaults to the workspace |
|
|
215
|
+
| `sarif` | Where to save the SARIF file. Defaults to `misconfig.sarif` in the runner's temp folder |
|
|
216
|
+
|
|
217
|
+
The `sarif` output is the file's path. It's empty when the check failed or stopped early, so a partial file is never uploaded: code scanning would mark the findings it didn't reach as fixed.
|
|
218
|
+
|
|
219
|
+
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`.
|
|
220
|
+
|
|
221
|
+
A name in a checked file can't give the CI system a command through the log. Where one spells a command that GitHub Actions, Azure Pipelines or TeamCity reads from a log, such as `##[error]`, the report shows � inside it and JSON output writes it with a `\u` escape. The action also tells GitHub to read no workflow commands while the report prints.
|
|
74
222
|
|
|
75
223
|
## Privacy
|
|
76
224
|
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
- `--lookup` sends package names and versions to OSV.dev,
|
|
225
|
+
- 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.
|
|
226
|
+
- 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.
|
|
227
|
+
- `--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.
|
|
228
|
+
- `--jsonl` and `--sarif` upload nothing. Both hold what the report shows for each finding: the file, the finding's own words and, in JSON Lines, the masked line it points at. SARIF names a file in your home folder from `HOME`, not by its full path. Read either before you share it.
|
|
229
|
+
- `--rules` reads your rules on this computer. Nothing in them is sent anywhere, and neither is what they find.
|
|
80
230
|
- 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.
|
|
81
231
|
|
|
82
232
|
The [privacy policy](https://misconfig.ai/privacy) lists everything misconfig.ai receives and how long it's kept.
|
|
83
233
|
|
|
84
234
|
## Known malware
|
|
85
235
|
|
|
86
|
-
Each release bundles
|
|
236
|
+
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.
|
|
87
237
|
|
|
88
238
|
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.
|
|
89
239
|
|
|
@@ -95,10 +245,16 @@ misconfig is plain JavaScript with no dependencies, so what you install is what'
|
|
|
95
245
|
| --- | --- |
|
|
96
246
|
| [`engine/catalog.js`](https://github.com/gkdataio/misconfig/blob/main/engine/catalog.js) | The wording, level and fix of every rule |
|
|
97
247
|
| [`engine/index.js`](https://github.com/gkdataio/misconfig/blob/main/engine/index.js) | The checks that apply the rules, and the scoring |
|
|
248
|
+
| [`engine/templates.js`](https://github.com/gkdataio/misconfig/blob/main/engine/templates.js) | Rules written as data, and what a rule of your own can say |
|
|
98
249
|
| [`engine/known.js`](https://github.com/gkdataio/misconfig/blob/main/engine/known.js) | Known malware, agent advisories and attack traces, each with its source |
|
|
99
250
|
| [`engine/locations.js`](https://github.com/gkdataio/misconfig/blob/main/engine/locations.js) | Where each agent keeps its files on macOS, Windows and Linux |
|
|
100
251
|
| [`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 |
|
|
101
252
|
| [`lib/html.js`](https://github.com/gkdataio/misconfig/blob/main/lib/html.js) | The page `--open` saves |
|
|
253
|
+
| [`lib/formats.js`](https://github.com/gkdataio/misconfig/blob/main/lib/formats.js) | Findings as JSON Lines and as SARIF |
|
|
254
|
+
| [`lib/rule-files.js`](https://github.com/gkdataio/misconfig/blob/main/lib/rule-files.js) | How `--rules` reads your rules |
|
|
255
|
+
| [`lib/computer-review.js`](https://github.com/gkdataio/misconfig/blob/main/lib/computer-review.js) | Changes, approvals and accepted risks |
|
|
256
|
+
| [`lib/edit-attribution.js`](https://github.com/gkdataio/misconfig/blob/main/lib/edit-attribution.js) | How optional local edit records are matched |
|
|
257
|
+
| [`action/main.js`](https://github.com/gkdataio/misconfig/blob/main/action/main.js) | The GitHub Action |
|
|
102
258
|
|
|
103
259
|
## Contributing
|
|
104
260
|
|
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
|
-
//
|
|
29
|
-
// interrupted.
|
|
28
|
+
// Earlier review decisions may already have been saved.
|
|
30
29
|
if (err?.code === "ABORT_ERR") {
|
|
31
|
-
console.error("\nmisconfig: Stopped
|
|
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%
|