@misconfig/cli 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -2
- package/bin/misconfig.js +12 -0
- package/engine/catalog.js +412 -0
- package/engine/index.js +1049 -0
- package/engine/locations.js +134 -0
- package/engine/mask.js +119 -0
- package/engine/parse.js +222 -0
- package/engine/paths.js +86 -0
- package/lib/discover.js +237 -0
- package/lib/main.js +112 -0
- package/lib/print.js +138 -0
- package/package.json +37 -5
package/README.md
CHANGED
|
@@ -1,3 +1,66 @@
|
|
|
1
|
-
#
|
|
1
|
+
# misconfig
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Finds every file that controls your AI coding agents, on your computer and in your project, and checks them for risky settings.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npx @misconfig/cli@1.0.0
|
|
7
|
+
```
|
|
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.
|
|
10
|
+
|
|
11
|
+
On Windows, if PowerShell says running scripts is disabled, run `npx.cmd @misconfig/cli@1.0.0` instead. There's no need to change your execution policy.
|
|
12
|
+
|
|
13
|
+
## What it checks
|
|
14
|
+
|
|
15
|
+
Claude Code, Claude Desktop, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Grok CLI, Windsurf, Cline, Roo Code, Kiro, Zed, Aider and Amazon Q, plus shell aliases that start an agent with approvals off.
|
|
16
|
+
|
|
17
|
+
Most of the files that control an agent sit outside your project, in hidden folders and app settings. misconfig reads them for you: `~/.claude/settings.json`, `~/.claude.json`, `~/.codex/config.toml`, Claude Desktop's MCP config, VS Code and Cursor settings, your shell profile and more. The full list, per operating system, is at https://misconfig.ai/#locations.
|
|
18
|
+
|
|
19
|
+
It looks for:
|
|
20
|
+
|
|
21
|
+
- **Permissions**: bypass modes, allow-everything shell rules, auto-approve settings and aliases that skip approvals.
|
|
22
|
+
- **MCP servers**: tokens pasted into config, unpinned packages, plain-HTTP remotes, servers that can run shell commands or read your whole disk.
|
|
23
|
+
- **Instruction files**: invisible Unicode, orders hidden in HTML comments, download-and-run commands, links to data-collection endpoints.
|
|
24
|
+
- **Where agents run**: agents started in Downloads or your home folder, folders Codex trusts that it shouldn't, keys within an agent's reach.
|
|
25
|
+
|
|
26
|
+
## Privacy
|
|
27
|
+
|
|
28
|
+
- Everything runs on your computer. Without `--share`, misconfig makes no network requests.
|
|
29
|
+
- Credential files such as `.env` and `id_rsa` are listed by name only and never opened. Secrets inside agent files are masked as they're read.
|
|
30
|
+
- From `~/.claude.json` it reads only the MCP servers and the list of folders Claude Code has been started in.
|
|
31
|
+
- `--share` shows exactly what it will send and asks before sending. It sends this project's findings only: rule names, file names and line numbers. No file contents, no quoted lines, no folder names and nothing from the settings on your computer.
|
|
32
|
+
|
|
33
|
+
The checks are plain JavaScript in `engine/`, so you can read what runs before you run it.
|
|
34
|
+
|
|
35
|
+
## Options
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
npx @misconfig/cli [folder] [options]
|
|
39
|
+
|
|
40
|
+
--share Publish this project's findings and print a link
|
|
41
|
+
--yes Share without asking, for scripts and CI
|
|
42
|
+
--json Print the full result as JSON
|
|
43
|
+
--project-only Skip the agent settings on this computer
|
|
44
|
+
--fail-on <level> Exit with code 1 if anything at this level or worse is
|
|
45
|
+
found: critical, high, medium or low
|
|
46
|
+
-v, --version Print the version
|
|
47
|
+
-h, --help Show this help
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Exit codes: `0` when the check ran (and nothing reached `--fail-on`), `1` when `--fail-on` found something, `2` for errors.
|
|
51
|
+
|
|
52
|
+
## In CI
|
|
53
|
+
|
|
54
|
+
Check the repository's agent files on every pull request:
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
- run: npx @misconfig/cli@1.0.0 --project-only --fail-on high
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Share links and badges
|
|
61
|
+
|
|
62
|
+
`npx @misconfig/cli --share` publishes a signed report at misconfig.ai that expires after 30 days, and prints a README badge and a private delete link. misconfig.ai rebuilds every sentence of the report from its own rule catalog, so a share link can only say what a real check would say.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
Made by GK Data LLC. https://misconfig.ai
|
package/bin/misconfig.js
ADDED
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
// Every check misconfig.ai runs, with the wording shown to users.
|
|
2
|
+
// {placeholders} are filled in from the finding.
|
|
3
|
+
|
|
4
|
+
export const CATEGORIES = {
|
|
5
|
+
permissions: "Permissions",
|
|
6
|
+
mcp: "MCP servers",
|
|
7
|
+
instructions: "Instruction files",
|
|
8
|
+
hooks: "Hooks & scripts",
|
|
9
|
+
workspace: "Workspace & secrets",
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const RULES = {
|
|
13
|
+
// --- Permissions -------------------------------------------------------
|
|
14
|
+
"CC-BYPASS": {
|
|
15
|
+
severity: "critical", category: "permissions", tool: "Claude Code",
|
|
16
|
+
title: "Claude Code runs with every permission prompt turned off",
|
|
17
|
+
why: "defaultMode is bypassPermissions, so Claude edits files and runs any command without asking. One poisoned file or bad suggestion goes straight to your shell.",
|
|
18
|
+
fix: 'Remove defaultMode or set it to "default". For speed, allow specific commands under permissions.allow instead.',
|
|
19
|
+
},
|
|
20
|
+
"CC-ACCEPT-EDITS": {
|
|
21
|
+
severity: "low", category: "permissions", tool: "Claude Code",
|
|
22
|
+
title: "Claude Code accepts file edits without asking",
|
|
23
|
+
why: "defaultMode is acceptEdits, so edits land without review, including edits to config and scripts that run later.",
|
|
24
|
+
fix: "Use the default mode in repos with build scripts, hooks or CI config.",
|
|
25
|
+
},
|
|
26
|
+
"CC-ALLOW-ALL-BASH": {
|
|
27
|
+
severity: "high", category: "permissions", tool: "Claude Code",
|
|
28
|
+
title: "Claude Code may run any shell command without asking",
|
|
29
|
+
why: "permissions.allow contains “{rule}”, which pre-approves every command.",
|
|
30
|
+
fix: "Replace it with the specific commands you trust, such as Bash(npm test:*).",
|
|
31
|
+
},
|
|
32
|
+
"CC-ALLOW-RISKY-BASH": {
|
|
33
|
+
severity: "high", category: "permissions", tool: "Claude Code",
|
|
34
|
+
title: "Pre-approved command can run arbitrary code: {rule}",
|
|
35
|
+
why: "Interpreters, sudo, rm and similar commands can do anything once approved, and the approval covers every argument.",
|
|
36
|
+
fix: "Remove it from permissions.allow, or narrow it to one exact script, such as Bash(npm run lint).",
|
|
37
|
+
},
|
|
38
|
+
"CC-ALLOW-NET-BASH": {
|
|
39
|
+
severity: "medium", category: "permissions", tool: "Claude Code",
|
|
40
|
+
title: "Pre-approved network command: {rule}",
|
|
41
|
+
why: "curl, wget, ssh and similar commands can send your files anywhere without a prompt.",
|
|
42
|
+
fix: "Let Claude ask before network commands, or limit the rule to one URL.",
|
|
43
|
+
},
|
|
44
|
+
"CC-ALLOW-WRITE-ANYWHERE": {
|
|
45
|
+
severity: "high", category: "permissions", tool: "Claude Code",
|
|
46
|
+
title: "Claude Code may edit files outside this project: {rule}",
|
|
47
|
+
why: "The rule covers your home folder or the whole disk, including shell profiles and other repos.",
|
|
48
|
+
fix: "Scope edit rules to paths inside the project.",
|
|
49
|
+
},
|
|
50
|
+
"CC-ALLOW-READ-ANYWHERE": {
|
|
51
|
+
severity: "medium", category: "permissions", tool: "Claude Code",
|
|
52
|
+
title: "Claude Code may read files outside this project: {rule}",
|
|
53
|
+
why: "That includes SSH keys, cloud credentials and other projects.",
|
|
54
|
+
fix: "Scope read rules to the project, or deny ~/.ssh, ~/.aws and similar folders.",
|
|
55
|
+
},
|
|
56
|
+
"CC-ALLOW-WEBFETCH": {
|
|
57
|
+
severity: "medium", category: "permissions", tool: "Claude Code",
|
|
58
|
+
title: "Claude Code may fetch any URL without asking",
|
|
59
|
+
why: "Unscoped WebFetch lets pages feed instructions to the agent and lets the agent send data out in the URL.",
|
|
60
|
+
fix: "Allow specific domains instead, such as WebFetch(domain:docs.example.com).",
|
|
61
|
+
},
|
|
62
|
+
"CC-ALLOW-MCP-ALL": {
|
|
63
|
+
severity: "low", category: "permissions", tool: "Claude Code",
|
|
64
|
+
title: "Every tool of an MCP server is pre-approved: {rule}",
|
|
65
|
+
why: "Approving a whole server also approves tools it adds in later versions.",
|
|
66
|
+
fix: "List the individual tools you use, such as mcp__github__get_issue.",
|
|
67
|
+
},
|
|
68
|
+
"CC-NO-SECRET-DENY": {
|
|
69
|
+
severity: "medium", category: "permissions", tool: "Claude Code",
|
|
70
|
+
title: "Nothing stops Claude Code from reading your secret files",
|
|
71
|
+
why: "This folder has {files}, and permissions.deny has no rule covering them.",
|
|
72
|
+
fix: 'Add deny rules such as "Read(./.env)", "Read(./.env.*)" and "Read(./secrets/**)".',
|
|
73
|
+
},
|
|
74
|
+
"CC-EXTRA-DIRS": {
|
|
75
|
+
severity: "high", category: "permissions", tool: "Claude Code",
|
|
76
|
+
title: "Claude Code can reach a folder outside the project: {dir}",
|
|
77
|
+
why: "additionalDirectories gives the agent the same access there as inside the project.",
|
|
78
|
+
fix: "Remove it, or point it at one specific folder rather than your home folder or a drive.",
|
|
79
|
+
},
|
|
80
|
+
"CC-MCP-AUTO-APPROVE": {
|
|
81
|
+
severity: "medium", category: "permissions", tool: "Claude Code",
|
|
82
|
+
title: "Claude Code trusts every MCP server in .mcp.json automatically",
|
|
83
|
+
why: "enableAllProjectMcpServers is true, so a server added to .mcp.json in a pull request starts without a prompt.",
|
|
84
|
+
fix: "Set it to false and approve servers one by one with enabledMcpjsonServers.",
|
|
85
|
+
},
|
|
86
|
+
"CC-ENV-SECRET": {
|
|
87
|
+
severity: "high", category: "permissions", tool: "Claude Code",
|
|
88
|
+
title: "Secret stored in Claude Code settings: {key}",
|
|
89
|
+
why: "Values under env in {file} are plain text, and settings files are often committed or synced.",
|
|
90
|
+
fix: "Move it to your shell environment or a secrets manager, then rotate it.",
|
|
91
|
+
},
|
|
92
|
+
"CC-USER-SECRET": {
|
|
93
|
+
severity: "high", category: "permissions", tool: "Claude Code",
|
|
94
|
+
title: ".claude.json contains a credential",
|
|
95
|
+
why: "This file holds Claude Code's user settings and account data, and here it sits where other tools and agents can read it.",
|
|
96
|
+
fix: "Keep it out of project folders, and rotate the key if the file was shared or committed.",
|
|
97
|
+
},
|
|
98
|
+
"CX-YOLO": {
|
|
99
|
+
severity: "critical", category: "permissions", tool: "Codex",
|
|
100
|
+
title: "Codex runs commands with no sandbox and no approvals",
|
|
101
|
+
why: 'approval_policy is "never" and sandbox_mode is "danger-full-access"{where}, so commands run on your machine without limits or prompts.',
|
|
102
|
+
fix: 'Use sandbox_mode = "workspace-write" with approval_policy = "on-request".',
|
|
103
|
+
},
|
|
104
|
+
"CX-FULL-ACCESS": {
|
|
105
|
+
severity: "high", category: "permissions", tool: "Codex",
|
|
106
|
+
title: "Codex runs commands without a sandbox",
|
|
107
|
+
why: 'sandbox_mode is "danger-full-access"{where}, so commands can touch any file and reach the network.',
|
|
108
|
+
fix: 'Use "workspace-write" and grant extra access for a single task when you need it.',
|
|
109
|
+
},
|
|
110
|
+
"CX-NEVER-ASK": {
|
|
111
|
+
severity: "medium", category: "permissions", tool: "Codex",
|
|
112
|
+
title: "Codex never asks before running commands",
|
|
113
|
+
why: 'approval_policy is "never"{where}, so anything the sandbox allows runs without a prompt.',
|
|
114
|
+
fix: 'Use "on-request" or "untrusted".',
|
|
115
|
+
},
|
|
116
|
+
"CX-NETWORK": {
|
|
117
|
+
severity: "medium", category: "permissions", tool: "Codex",
|
|
118
|
+
title: "Codex sandbox allows network access",
|
|
119
|
+
why: "network_access is true under [sandbox_workspace_write], so sandboxed commands can upload files.",
|
|
120
|
+
fix: "Turn it off and allow the network for a single task when you need it.",
|
|
121
|
+
},
|
|
122
|
+
"GM-YOLO": {
|
|
123
|
+
severity: "high", category: "permissions", tool: "Gemini CLI",
|
|
124
|
+
title: "Gemini CLI approves every tool call",
|
|
125
|
+
why: "YOLO mode is on in {file}, so shell commands and edits run without asking.",
|
|
126
|
+
fix: "Turn YOLO mode off and approve tools as they come up.",
|
|
127
|
+
},
|
|
128
|
+
"GM-AUTO-ACCEPT": {
|
|
129
|
+
severity: "medium", category: "permissions", tool: "Gemini CLI",
|
|
130
|
+
title: "Gemini CLI auto-accepts tool calls",
|
|
131
|
+
why: "autoAccept is true, so tool calls it considers safe run without asking.",
|
|
132
|
+
fix: "Set autoAccept to false in repos you don't fully trust.",
|
|
133
|
+
},
|
|
134
|
+
"VS-AUTO-APPROVE": {
|
|
135
|
+
severity: "high", category: "permissions", tool: "GitHub Copilot",
|
|
136
|
+
title: "VS Code approves agent tools automatically",
|
|
137
|
+
why: "{key} is true, so Copilot agent mode runs tools and terminal commands without asking.",
|
|
138
|
+
fix: "Remove the setting and approve tools per session.",
|
|
139
|
+
},
|
|
140
|
+
"VS-TERMINAL-AUTO": {
|
|
141
|
+
severity: "medium", category: "permissions", tool: "GitHub Copilot",
|
|
142
|
+
title: "Terminal command auto-approved for Copilot: {rule}",
|
|
143
|
+
why: "chat.tools.terminal.autoApprove lets agent mode run this without asking, and it can change or send data.",
|
|
144
|
+
fix: "Limit auto-approval to read-only commands such as git status.",
|
|
145
|
+
},
|
|
146
|
+
"OC-AUTO-SHARE": {
|
|
147
|
+
severity: "high", category: "permissions", tool: "OpenCode",
|
|
148
|
+
title: "OpenCode publishes every session automatically",
|
|
149
|
+
why: 'share is "auto", so each conversation, including code and command output, gets a public link.',
|
|
150
|
+
fix: 'Set share to "manual" or "disabled".',
|
|
151
|
+
},
|
|
152
|
+
"OC-BASH-ALLOW": {
|
|
153
|
+
severity: "high", category: "permissions", tool: "OpenCode",
|
|
154
|
+
title: "OpenCode runs any shell command without asking",
|
|
155
|
+
why: "permission.bash allows every command{where}.",
|
|
156
|
+
fix: 'Set bash to "ask" and allow specific commands, such as "git status": "allow".',
|
|
157
|
+
},
|
|
158
|
+
"ZED-ALWAYS-ALLOW": {
|
|
159
|
+
severity: "high", category: "permissions", tool: "Zed",
|
|
160
|
+
title: "Zed's agent approves every tool action",
|
|
161
|
+
why: "always_allow_tool_actions is true, so edits and terminal commands run without asking.",
|
|
162
|
+
fix: "Set it to false.",
|
|
163
|
+
},
|
|
164
|
+
"AIDER-YES": {
|
|
165
|
+
severity: "medium", category: "permissions", tool: "Aider",
|
|
166
|
+
title: "Aider answers yes to every prompt",
|
|
167
|
+
why: "yes-always is true, so Aider runs suggested commands and edits without confirmation.",
|
|
168
|
+
fix: "Remove yes-always.",
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
// --- MCP servers -------------------------------------------------------
|
|
172
|
+
"MCP-SECRET": {
|
|
173
|
+
severity: "high", category: "mcp",
|
|
174
|
+
title: "Secret in plain text in MCP config: {server} → {key}",
|
|
175
|
+
why: "{file} stores the value directly. Config files get committed, synced and read by other tools.",
|
|
176
|
+
fix: "Load it from an environment variable or an input prompt instead, such as ${env:NAME}, then rotate the key.",
|
|
177
|
+
},
|
|
178
|
+
"MCP-UNPINNED": {
|
|
179
|
+
severity: "medium", category: "mcp",
|
|
180
|
+
title: "MCP server “{server}” runs an unpinned package",
|
|
181
|
+
why: "“{command}” fetches the newest release every time it starts. A hijacked release would run with your agent's access.",
|
|
182
|
+
fix: "Pin an exact version, such as {pkg}@1.2.3.",
|
|
183
|
+
},
|
|
184
|
+
"MCP-HTTP": {
|
|
185
|
+
severity: "high", category: "mcp",
|
|
186
|
+
title: "MCP server “{server}” connects over plain HTTP",
|
|
187
|
+
why: "Traffic to {host} is unencrypted, so tokens and tool results can be read or changed in transit.",
|
|
188
|
+
fix: "Use https://.",
|
|
189
|
+
},
|
|
190
|
+
"MCP-URL-TOKEN": {
|
|
191
|
+
severity: "high", category: "mcp",
|
|
192
|
+
title: "Credential in the URL of MCP server “{server}”",
|
|
193
|
+
why: "URLs end up in logs, shell history and screenshots.",
|
|
194
|
+
fix: "Send the credential in a header loaded from an environment variable.",
|
|
195
|
+
},
|
|
196
|
+
"MCP-DOCKER": {
|
|
197
|
+
severity: "high", category: "mcp",
|
|
198
|
+
title: "MCP server “{server}” runs Docker with host access",
|
|
199
|
+
why: "{flag} gives the container control over your machine.",
|
|
200
|
+
fix: "Drop the flag and mount only the folder the server needs.",
|
|
201
|
+
},
|
|
202
|
+
"MCP-FS-BROAD": {
|
|
203
|
+
severity: "high", category: "mcp",
|
|
204
|
+
title: "MCP server “{server}” can read and write {path}",
|
|
205
|
+
why: "The server gets your whole home folder or drive, not just this project.",
|
|
206
|
+
fix: "Pass the project folder instead.",
|
|
207
|
+
},
|
|
208
|
+
"MCP-SHELL": {
|
|
209
|
+
severity: "medium", category: "mcp",
|
|
210
|
+
title: "MCP server “{server}” can run shell commands",
|
|
211
|
+
why: "Any prompt injection that reaches the agent can turn into commands on your machine.",
|
|
212
|
+
fix: "Keep it off unless you need it, and require approval for its tools.",
|
|
213
|
+
},
|
|
214
|
+
"MCP-ALWAYS-ALLOW": {
|
|
215
|
+
severity: "medium", category: "mcp",
|
|
216
|
+
title: "MCP tools pre-approved for “{server}”",
|
|
217
|
+
why: "{key} lets {count} run without asking.",
|
|
218
|
+
fix: "Remove tools that write, send or execute.",
|
|
219
|
+
},
|
|
220
|
+
"MCP-MANY": {
|
|
221
|
+
severity: "low", category: "mcp",
|
|
222
|
+
title: "{count} MCP servers configured",
|
|
223
|
+
why: "Each server adds tools the agent can be talked into using.",
|
|
224
|
+
fix: "Remove the servers you don't use.",
|
|
225
|
+
},
|
|
226
|
+
|
|
227
|
+
// --- Instruction files ---------------------------------------------------
|
|
228
|
+
"TXT-TAGS": {
|
|
229
|
+
severity: "critical", category: "instructions",
|
|
230
|
+
title: "Invisible text in {file}",
|
|
231
|
+
why: "It contains {count} Unicode tag characters. Agents read them; you can't see them. The hidden text reads: “{decoded}”.",
|
|
232
|
+
fix: "Delete the hidden characters and check where the file came from.",
|
|
233
|
+
},
|
|
234
|
+
"TXT-BIDI": {
|
|
235
|
+
severity: "high", category: "instructions",
|
|
236
|
+
title: "Text-direction tricks in {file}",
|
|
237
|
+
why: "Bidirectional control characters make text display differently from what the agent reads.",
|
|
238
|
+
fix: "Remove the control characters.",
|
|
239
|
+
},
|
|
240
|
+
"TXT-ZERO-WIDTH": {
|
|
241
|
+
severity: "high", category: "instructions",
|
|
242
|
+
title: "Hidden zero-width characters in {file}",
|
|
243
|
+
why: "{count} invisible characters can hide or split instructions.",
|
|
244
|
+
fix: "Remove them.",
|
|
245
|
+
},
|
|
246
|
+
"TXT-HIDDEN-COMMENT": {
|
|
247
|
+
severity: "high", category: "instructions",
|
|
248
|
+
title: "Instructions hidden in an HTML comment in {file}",
|
|
249
|
+
why: "Comments don't show when Markdown is rendered, but agents read them.",
|
|
250
|
+
fix: "Delete the comment, or move real guidance into visible text.",
|
|
251
|
+
},
|
|
252
|
+
"TXT-REMOTE-EXEC": {
|
|
253
|
+
severity: "high", category: "instructions",
|
|
254
|
+
title: "{file} tells the agent to download and run code",
|
|
255
|
+
why: "Piping a download into a shell runs whatever the server returns that day.",
|
|
256
|
+
fix: "Pin the installer and run it yourself, or keep the script in the repo.",
|
|
257
|
+
},
|
|
258
|
+
"TXT-EXFIL": {
|
|
259
|
+
severity: "high", category: "instructions",
|
|
260
|
+
title: "{file} points at a data-collection endpoint",
|
|
261
|
+
why: "{host} is commonly used to capture data sent by tools and scripts.",
|
|
262
|
+
fix: "Remove the URL unless you put it there.",
|
|
263
|
+
},
|
|
264
|
+
"TXT-OVERRIDE": {
|
|
265
|
+
severity: "medium", category: "instructions",
|
|
266
|
+
title: "{file} tries to override the agent's safeguards",
|
|
267
|
+
why: "“{phrase}” is typical of prompt injection.",
|
|
268
|
+
fix: "Remove the line, and check who last changed the file.",
|
|
269
|
+
},
|
|
270
|
+
"TXT-SECRET-ACCESS": {
|
|
271
|
+
severity: "high", category: "instructions",
|
|
272
|
+
title: "{file} asks the agent to handle secret files",
|
|
273
|
+
why: "“{phrase}” would expose credentials to the agent and anything it talks to.",
|
|
274
|
+
fix: "Remove it, and add deny rules for those paths.",
|
|
275
|
+
},
|
|
276
|
+
"TXT-BLOB": {
|
|
277
|
+
severity: "medium", category: "instructions",
|
|
278
|
+
title: "Long encoded blob in {file}",
|
|
279
|
+
why: "{length} characters of base64 can hide instructions or a payload.",
|
|
280
|
+
fix: "Remove it, or replace it with a link to a reviewed file.",
|
|
281
|
+
},
|
|
282
|
+
"TXT-IMPORT-OUTSIDE": {
|
|
283
|
+
severity: "low", category: "instructions",
|
|
284
|
+
title: "{file} pulls in a file from outside the project",
|
|
285
|
+
why: "“{ref}” imports content that isn't reviewed with this repo.",
|
|
286
|
+
fix: "Copy the content into the repo or drop the import.",
|
|
287
|
+
},
|
|
288
|
+
"TXT-HUGE": {
|
|
289
|
+
severity: "low", category: "instructions",
|
|
290
|
+
title: "{file} is very long ({size})",
|
|
291
|
+
why: "Long instruction files are hard to review, so added lines are easy to miss.",
|
|
292
|
+
fix: "Keep instructions short and move reference material elsewhere.",
|
|
293
|
+
},
|
|
294
|
+
"SPRAWL": {
|
|
295
|
+
severity: "low", category: "instructions",
|
|
296
|
+
title: "{count} files steer your agents",
|
|
297
|
+
why: "{list} each tell an agent what to do. When they disagree, agents behave differently depending on which file they read.",
|
|
298
|
+
fix: "Keep one source, such as AGENTS.md, and point the others to it.",
|
|
299
|
+
},
|
|
300
|
+
"FLAG-SCRIPT": {
|
|
301
|
+
severity: "high", category: "hooks",
|
|
302
|
+
title: "Script launches an agent with approvals off",
|
|
303
|
+
why: "{where} runs “{flag}”, which turns off the agent's permission checks.",
|
|
304
|
+
fix: "Remove the flag, or run that script only inside a throwaway container.",
|
|
305
|
+
},
|
|
306
|
+
"FLAG-ALIAS": {
|
|
307
|
+
severity: "high", category: "hooks",
|
|
308
|
+
title: "Your shell starts {agent} with approvals off",
|
|
309
|
+
why: "{file} adds “{flag}” every time you run the command, so the agent's permission checks never run.",
|
|
310
|
+
fix: "Remove the flag from your shell profile. For fewer prompts, allow specific commands in the agent's settings instead.",
|
|
311
|
+
},
|
|
312
|
+
"FLAG-DOCS": {
|
|
313
|
+
severity: "medium", category: "instructions",
|
|
314
|
+
title: "{file} recommends turning approvals off",
|
|
315
|
+
why: "It tells people or agents to use “{flag}”.",
|
|
316
|
+
fix: "Recommend an allowlist setup instead.",
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
// --- Hooks -------------------------------------------------------------
|
|
320
|
+
"HOOK-REMOTE-EXEC": {
|
|
321
|
+
severity: "critical", category: "hooks",
|
|
322
|
+
title: "Hook downloads and runs code",
|
|
323
|
+
why: "{where} runs “{cmd}” automatically, outside the agent's approval prompts.",
|
|
324
|
+
fix: "Remove the hook, or replace it with a pinned script kept in the repo.",
|
|
325
|
+
},
|
|
326
|
+
"HOOK-NETWORK": {
|
|
327
|
+
severity: "high", category: "hooks",
|
|
328
|
+
title: "Hook sends data over the network",
|
|
329
|
+
why: "{where} runs “{cmd}” automatically and can send prompts, files or output elsewhere.",
|
|
330
|
+
fix: "Remove it unless you own the destination.",
|
|
331
|
+
},
|
|
332
|
+
"HOOK-DESTRUCTIVE": {
|
|
333
|
+
severity: "medium", category: "hooks",
|
|
334
|
+
title: "Hook runs a destructive command",
|
|
335
|
+
why: "{where} runs “{cmd}” automatically.",
|
|
336
|
+
fix: "Make the hook read-only, or have it ask first.",
|
|
337
|
+
},
|
|
338
|
+
"HOOK-OUTSIDE": {
|
|
339
|
+
severity: "medium", category: "hooks",
|
|
340
|
+
title: "Hook runs a script from outside the project",
|
|
341
|
+
why: "{where} runs “{cmd}”, which isn't reviewed with this repo.",
|
|
342
|
+
fix: "Keep hook scripts in the repo.",
|
|
343
|
+
},
|
|
344
|
+
|
|
345
|
+
// --- Workspace -----------------------------------------------------------
|
|
346
|
+
"WS-HOME": {
|
|
347
|
+
severity: "high", category: "workspace",
|
|
348
|
+
title: "This looks like your home folder",
|
|
349
|
+
why: "An agent opened here can read everything in it, including {markers}.",
|
|
350
|
+
fix: "Open the agent in a project folder instead.",
|
|
351
|
+
},
|
|
352
|
+
"WS-DOWNLOADS": {
|
|
353
|
+
severity: "high", category: "workspace",
|
|
354
|
+
title: "Agent workspace is your {root} folder",
|
|
355
|
+
why: "Files you download from websites land here, and agents treat them as context.",
|
|
356
|
+
fix: "Move the project into its own folder before running an agent.",
|
|
357
|
+
},
|
|
358
|
+
"WS-POISON-RISK": {
|
|
359
|
+
severity: "critical", category: "workspace",
|
|
360
|
+
title: "Instruction files sit among downloaded files",
|
|
361
|
+
why: "{files} in {root} can steer any agent opened here, and anything you download can add more.",
|
|
362
|
+
fix: "Open agents only in project folders, and delete instruction files you didn't write.",
|
|
363
|
+
},
|
|
364
|
+
"WS-OPENED-IN": {
|
|
365
|
+
severity: "high", category: "workspace",
|
|
366
|
+
title: "{tool} has been started in {place}",
|
|
367
|
+
why: "{risk} The folder is listed in {file}.",
|
|
368
|
+
fix: "Start agents from a project folder. To make Claude Code forget this folder, remove its entry under projects in {file}.",
|
|
369
|
+
},
|
|
370
|
+
"CX-TRUSTED-DIR": {
|
|
371
|
+
severity: "high", category: "workspace", tool: "Codex",
|
|
372
|
+
title: "Codex trusts {place}",
|
|
373
|
+
why: "{file} marks it as a trusted project, so Codex asks fewer questions there. {risk}",
|
|
374
|
+
fix: "Remove that [projects] entry from {file} and trust only project folders.",
|
|
375
|
+
},
|
|
376
|
+
"WS-MULTI-REPO": {
|
|
377
|
+
severity: "medium", category: "workspace",
|
|
378
|
+
title: "Workspace spans {count} repositories",
|
|
379
|
+
why: "An agent opened here can read and change all of them.",
|
|
380
|
+
fix: "Open the agent inside one repository.",
|
|
381
|
+
},
|
|
382
|
+
"WS-KEYS": {
|
|
383
|
+
severity: "high", category: "workspace",
|
|
384
|
+
title: "Private keys or credentials inside the workspace",
|
|
385
|
+
why: "{files} can be read by any agent opened here.",
|
|
386
|
+
fix: "Move them out of the project, and rotate any that were ever committed.",
|
|
387
|
+
},
|
|
388
|
+
"WS-SECRETS": {
|
|
389
|
+
severity: "medium", category: "workspace",
|
|
390
|
+
title: "Secret files within the agent's reach",
|
|
391
|
+
why: "{files} can be read by agents unless each agent's settings deny them.",
|
|
392
|
+
fix: "Add deny rules for these files in your agents' settings.",
|
|
393
|
+
},
|
|
394
|
+
"WS-ENV-COMMITTED": {
|
|
395
|
+
severity: "medium", category: "workspace",
|
|
396
|
+
title: "Secret files aren't ignored by git",
|
|
397
|
+
why: "This is a git repo and .gitignore doesn't cover {files}.",
|
|
398
|
+
fix: "Add .env* to .gitignore, and rotate anything already committed.",
|
|
399
|
+
},
|
|
400
|
+
"WS-LOCAL-SETTINGS": {
|
|
401
|
+
severity: "low", category: "workspace",
|
|
402
|
+
title: "Personal agent settings may get committed",
|
|
403
|
+
why: "{files} aren't listed in .gitignore.",
|
|
404
|
+
fix: "Add them to .gitignore.",
|
|
405
|
+
},
|
|
406
|
+
"WS-TOO-LARGE": {
|
|
407
|
+
severity: "info", category: "workspace",
|
|
408
|
+
title: "{count} agent files were too large to check",
|
|
409
|
+
why: "Files over 400 KB are skipped.",
|
|
410
|
+
fix: "Review them by hand.",
|
|
411
|
+
},
|
|
412
|
+
};
|