@misconfig/cli 1.4.0 → 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/engine/catalog.js CHANGED
@@ -1,5 +1,7 @@
1
1
  // Every check misconfig.ai runs, with the wording shown to users.
2
- // {placeholders} are filled in from the finding.
2
+ // {placeholders} are filled in from the finding. A rule whose title has one
3
+ // also has a name, which says the same without a finding's values, for
4
+ // lists of rules such as the one in a SARIF file.
3
5
 
4
6
  // What each severity means. Reports and the rules page show these words, and
5
7
  // every rule's severity is set by them.
@@ -49,24 +51,28 @@ export const RULES = {
49
51
  "CC-ALLOW-RISKY-BASH": {
50
52
  severity: "high", category: "permissions", tool: "Claude Code",
51
53
  title: "A pre-approved command can run any code or delete any file: {rule}",
54
+ name: "A pre-approved command can run any code or delete any file",
52
55
  why: "Claude Code runs it with any arguments and without asking. Interpreters such as python and node, shells and sudo run whatever code they're given, and rm can delete any file you can.",
53
56
  fix: "Remove it from permissions.allow, or narrow it to one exact script, such as Bash(npm run lint).",
54
57
  },
55
58
  "CC-ALLOW-NET-BASH": {
56
59
  severity: "high", category: "permissions", tool: "Claude Code",
57
60
  title: "A pre-approved command can send data off your computer: {rule}",
61
+ name: "A pre-approved command can send data off your computer",
58
62
  why: "Claude Code runs it with any arguments and without asking. curl and wget can post any file Claude Code can read to any server, and ssh can run commands on any server your keys reach.",
59
63
  fix: "Remove {rule} from permissions.allow so Claude Code asks first. For web pages, allow WebFetch for specific domains instead, such as WebFetch(domain:docs.example.com).",
60
64
  },
61
65
  "CC-ALLOW-WRITE-ANYWHERE": {
62
66
  severity: "high", category: "permissions", tool: "Claude Code",
63
67
  title: "Claude Code can edit files outside this project without asking: {rule}",
68
+ name: "Claude Code can edit files outside this project without asking",
64
69
  why: "The rule covers your home folder or the whole disk, so Claude Code can change shell profiles and other repos without asking.",
65
70
  fix: "Limit edit rules to paths inside the project, such as Edit(src/**).",
66
71
  },
67
72
  "CC-ALLOW-READ-ANYWHERE": {
68
73
  severity: "medium", category: "permissions", tool: "Claude Code",
69
74
  title: "Claude Code can read files outside this project without asking: {rule}",
75
+ name: "Claude Code can read files outside this project without asking",
70
76
  why: "That includes SSH keys, cloud credentials and other projects, and what Claude Code reads is sent to the model.",
71
77
  fix: "Scope read rules to the project, or deny ~/.ssh, ~/.aws and similar folders.",
72
78
  },
@@ -79,6 +85,7 @@ export const RULES = {
79
85
  "CC-ALLOW-MCP-ALL": {
80
86
  severity: "medium", category: "permissions", tool: "Claude Code",
81
87
  title: "Every tool of an MCP server is pre-approved: {rule}",
88
+ name: "Every tool of an MCP server is pre-approved",
82
89
  why: "Claude Code runs any of the server's tools without asking, including ones that write, send or delete, and tools the server adds in later versions.",
83
90
  fix: "List the individual tools you use, such as mcp__github__get_issue.",
84
91
  },
@@ -91,6 +98,7 @@ export const RULES = {
91
98
  "CC-EXTRA-DIRS": {
92
99
  severity: "high", category: "permissions", tool: "Claude Code",
93
100
  title: "Claude Code can reach a folder outside the project: {dir}",
101
+ name: "Claude Code can reach a folder outside the project",
94
102
  why: "additionalDirectories gives the agent the same access there as inside the project.",
95
103
  fix: "Remove it, or point it at one specific folder rather than your home folder or a drive.",
96
104
  },
@@ -109,30 +117,35 @@ export const RULES = {
109
117
  "AGENT-ENDPOINT": {
110
118
  severity: "high", category: "permissions",
111
119
  title: "This project points the agent at {host}",
120
+ name: "This project sends the agent's requests to another address",
112
121
  why: "{variable} in {where} sends the agent's requests to {host} instead of the vendor's service once you trust the folder. Those requests carry your prompts, the code the agent reads and your API key.",
113
122
  fix: "Remove it from the project. If your company routes AI traffic through a gateway, set that in your own settings.",
114
123
  },
115
124
  "AGENT-ENDPOINT-USER": {
116
125
  severity: "info", category: "permissions",
117
126
  title: "{where} sends the agent's requests to {host}",
127
+ name: "Your own settings send the agent's requests to another address",
118
128
  why: "{variable} in your own settings sends the agent's requests to {host} instead of the vendor's service. That's expected if your company routes AI traffic through a gateway. If you didn't set it, another program changed your settings, and {host} receives your prompts, code and API key.",
119
129
  fix: "Remove it unless you know who runs {host}.",
120
130
  },
121
131
  "ENV-TLS-OFF": {
122
132
  severity: "high", category: "permissions",
123
133
  title: "{where} turns off certificate checks",
134
+ name: "A setting turns off certificate checks",
124
135
  why: "{variable} is 0, so the agent or the programs it starts accept any certificate. Anyone on the network between you and a service can read and change the traffic, API keys included.",
125
136
  fix: "Remove it. If your network inspects HTTPS, add its certificate with NODE_EXTRA_CA_CERTS in your own settings instead.",
126
137
  },
127
138
  "ENV-CA-PROJECT": {
128
139
  severity: "medium", category: "permissions",
129
140
  title: "{where} makes the agent trust a certificate this project chose",
141
+ name: "This project makes the agent trust a certificate it chose",
130
142
  why: "{variable} set by this project adds a certificate authority, and whoever holds its key can read and change the agent's encrypted traffic.",
131
143
  fix: "Remove it from the project. Add a certificate your network needs in your own settings.",
132
144
  },
133
145
  "CC-ENV-SECRET": {
134
146
  severity: "high", category: "permissions", tool: "Claude Code",
135
147
  title: "Secret stored in Claude Code settings: {key}",
148
+ name: "Secret stored in Claude Code settings",
136
149
  why: "Values under env in {file} are plain text, and settings files are often committed or synced.",
137
150
  fix: "Move it to your shell environment or a secrets manager, then rotate it.",
138
151
  },
@@ -163,12 +176,14 @@ export const RULES = {
163
176
  "CX-RULE-ALLOW": {
164
177
  severity: "high", category: "permissions", tool: "Codex",
165
178
  title: "{file} lets {commands} run outside the sandbox without asking",
179
+ name: "Codex rules let commands run outside the sandbox without asking",
166
180
  why: "A prefix_rule with decision = \"allow\", or no decision, lets any command that starts with its pattern run outside the sandbox without asking. The patterns in this file start with {list}.",
167
181
  fix: "Set decision = \"prompt\" on these rules, or narrow each pattern to the exact command you need. Delete the rules for commands you approved only once.",
168
182
  },
169
183
  "CX-RULES-UNREAD": {
170
184
  severity: "medium", category: "permissions", tool: "Codex",
171
185
  title: "A Codex rule in {file} can't be checked",
186
+ name: "A Codex rule can't be checked",
172
187
  why: "It's built by a function, a loop or an expression, so misconfig can't tell which commands it lets run without asking. Codex runs the file as code, so the rule still applies.",
173
188
  fix: "Write each rule out as prefix_rule(pattern = [...], decision = ...), so you and misconfig can read what it allows.",
174
189
  },
@@ -205,6 +220,7 @@ export const RULES = {
205
220
  "VS-TERMINAL-AUTO": {
206
221
  severity: "medium", category: "permissions", tool: "GitHub Copilot",
207
222
  title: "Terminal command auto-approved for Copilot: {rule}",
223
+ name: "Terminal command auto-approved for Copilot",
208
224
  why: "chat.tools.terminal.autoApprove lets agent mode run this without asking, and it can change or send data.",
209
225
  fix: "Limit auto-approval to read-only commands such as git status.",
210
226
  },
@@ -259,6 +275,7 @@ export const RULES = {
259
275
  "AGENT-ALLOW-SHELL": {
260
276
  severity: "high", category: "permissions",
261
277
  title: "A custom agent in {file} runs shell commands without asking",
278
+ name: "A custom agent runs shell commands without asking",
262
279
  why: "{setting} in this file pre-approves “{rule}”, so this agent runs matching commands without asking. A project's agent replaces any of yours with the same name, so in a project from someone else, picking that name runs their version.",
263
280
  fix: "Remove the entry, or allow only the exact commands you need and deny the rest.",
264
281
  },
@@ -309,60 +326,70 @@ export const RULES = {
309
326
  "MCP-SECRET": {
310
327
  severity: "high", category: "mcp",
311
328
  title: "Secret in plain text in MCP config: {server} → {key}",
329
+ name: "Secret in plain text in MCP config",
312
330
  why: "{file} stores the value directly. Config files get committed, synced and read by other tools.",
313
331
  fix: "Load it from an environment variable or an input prompt instead, such as ${env:NAME}, then rotate the key.",
314
332
  },
315
333
  "MCP-UNPINNED": {
316
334
  severity: "medium", category: "mcp",
317
335
  title: "MCP server “{server}” runs an unpinned package",
336
+ name: "An MCP server runs an unpinned package",
318
337
  why: "“{command}” fetches the newest release each time the server starts. If a later release is malicious, it runs on your computer with your permissions. That happened with postmark-mcp (Koi Security, September 2025), whose version 1.0.16 secretly copied every email it sent to the attacker.",
319
338
  fix: "Pin {pkg} to an exact version. To see the newest, run {lookup}.",
320
339
  },
321
340
  "MCP-HTTP": {
322
341
  severity: "high", category: "mcp",
323
342
  title: "MCP server “{server}” connects over plain HTTP",
343
+ name: "An MCP server connects over plain HTTP",
324
344
  why: "Traffic to {host} is unencrypted, so tokens and tool results can be read or changed in transit.",
325
345
  fix: "Switch the server's URL to https://.",
326
346
  },
327
347
  "MCP-URL-TOKEN": {
328
348
  severity: "high", category: "mcp",
329
349
  title: "Credential in the URL of MCP server “{server}”",
350
+ name: "Credential in the URL of an MCP server",
330
351
  why: "URLs end up in logs, shell history and screenshots.",
331
352
  fix: "Send the credential in a header loaded from an environment variable.",
332
353
  },
333
354
  "MCP-DOCKER": {
334
355
  severity: "high", category: "mcp",
335
356
  title: "MCP server “{server}” runs Docker with host access",
357
+ name: "An MCP server runs Docker with host access",
336
358
  why: "{flag} gives the container control over your machine.",
337
359
  fix: "Drop the flag and mount only the folder the server needs.",
338
360
  },
339
361
  "MCP-FS-BROAD": {
340
362
  severity: "high", category: "mcp",
341
363
  title: "MCP server “{server}” can read and write {path}",
364
+ name: "An MCP server can read and write your home folder or a whole drive",
342
365
  why: "The server gets your whole home folder or drive, not just this project.",
343
366
  fix: "Pass the project folder instead.",
344
367
  },
345
368
  "MCP-LOCAL-CODE": {
346
369
  severity: "medium", category: "mcp",
347
370
  title: "MCP server “{server}” runs code from this project",
371
+ name: "An MCP server runs code from this project",
348
372
  why: "It starts “{path}”, which comes with the project, whenever the agent starts the server, with your permissions. In a project from someone else, that's their code.",
349
373
  fix: "Read what it runs before you approve the server, or remove the server.",
350
374
  },
351
375
  "MCP-SHELL": {
352
376
  severity: "medium", category: "mcp",
353
377
  title: "MCP server “{server}” can run shell commands",
378
+ name: "An MCP server can run shell commands",
354
379
  why: "Any prompt injection that reaches the agent can turn into commands on your machine.",
355
380
  fix: "Keep it off unless you need it, and require approval for its tools.",
356
381
  },
357
382
  "MCP-ALWAYS-ALLOW": {
358
383
  severity: "medium", category: "mcp",
359
384
  title: "MCP server “{server}” has tools approved in advance",
385
+ name: "An MCP server has tools approved in advance",
360
386
  why: "The {setting} setting lets {count} run without asking, including any that write files, send data or run commands.",
361
387
  fix: "Remove {setting} so the agent asks before each tool call. If you want fewer prompts, pre-approve only tools that read.",
362
388
  },
363
389
  "MCP-MANY": {
364
390
  severity: "info", category: "mcp",
365
391
  title: "{tool} has {count} MCP servers",
392
+ name: "An agent has many MCP servers",
366
393
  why: "Each server adds tools the agent can use, and a prompt injection can ask it to use any of them.",
367
394
  fix: "Remove the servers you don't use.",
368
395
  },
@@ -371,72 +398,84 @@ export const RULES = {
371
398
  "TXT-TAGS": {
372
399
  severity: "critical", category: "instructions",
373
400
  title: "Invisible text in {file}",
401
+ name: "Invisible text in an instruction file",
374
402
  why: "It contains {count} Unicode tag characters. Most editors and web pages don't display them, but the model receives them as text. Decoded, they read: “{decoded}”",
375
403
  fix: "Delete the hidden characters and check where the file came from.",
376
404
  },
377
405
  "TXT-BIDI": {
378
406
  severity: "medium", category: "instructions",
379
407
  title: "Text-direction tricks in {file}",
408
+ name: "Text-direction tricks in an instruction file",
380
409
  why: "It contains characters that change the direction text is displayed in, so what you see on screen can differ from what the agent reads.",
381
410
  fix: "Delete the direction characters, then read the file again.",
382
411
  },
383
412
  "TXT-ZERO-WIDTH": {
384
413
  severity: "medium", category: "instructions",
385
414
  title: "Zero-width characters in {file}",
415
+ name: "Zero-width characters in an instruction file",
386
416
  why: "{count} characters that take up no space are in its text. They can hide encoded text, or split words so a search or filter misses them, while the agent still reads them.",
387
417
  fix: "Delete them. If you didn't add them, check where the file came from.",
388
418
  },
389
419
  "TXT-HIDDEN-COMMENT": {
390
420
  severity: "high", category: "instructions",
391
421
  title: "Instructions hidden in an HTML comment in {file}",
422
+ name: "Instructions hidden in an HTML comment",
392
423
  why: "Comments don't show when Markdown is rendered, but agents read them.",
393
424
  fix: "Delete the comment, or move real guidance into visible text.",
394
425
  },
395
426
  "TXT-REMOTE-EXEC": {
396
427
  severity: "high", category: "instructions",
397
428
  title: "{file} tells the agent to download and run code",
429
+ name: "An instruction file tells the agent to download and run code",
398
430
  why: "The agent would run whatever that address serves without review, and whoever controls the address can change it at any time.",
399
431
  fix: "Download the installer at a fixed version, check its checksum and run it yourself, or keep the script in the repo, where changes are reviewed.",
400
432
  },
401
433
  "TXT-EXFIL": {
402
434
  severity: "high", category: "instructions",
403
435
  title: "{file} points at a service that collects what's sent to it",
436
+ name: "An instruction file points at a service that collects what's sent to it",
404
437
  why: "Whoever set up the address on {host}, or has the link, can read what's sent there. Security testers use these services, and so do attackers moving stolen data out.",
405
438
  fix: "Remove the address unless you set it up yourself.",
406
439
  },
407
440
  "TXT-OVERRIDE": {
408
441
  severity: "medium", category: "instructions",
409
442
  title: "{file} tries to override the agent's safeguards",
443
+ name: "An instruction file tries to override the agent's safeguards",
410
444
  why: "“{phrase}” tells the agent to set aside its rules. Real project instructions don't need to say that, and prompt injections usually do.",
411
445
  fix: "Remove the line, and check who last changed the file.",
412
446
  },
413
447
  "TXT-SECRET-ACCESS": {
414
448
  severity: "high", category: "instructions",
415
449
  title: "{file} asks the agent to handle secret files",
450
+ name: "An instruction file asks the agent to handle secret files",
416
451
  why: "“{phrase}” would expose credentials to the agent and anything it talks to.",
417
452
  fix: "Remove it, and add deny rules for those paths.",
418
453
  },
419
454
  "TXT-BLOB": {
420
455
  severity: "medium", category: "instructions",
421
456
  title: "Long encoded blob in {file}",
457
+ name: "Long encoded blob in an instruction file",
422
458
  why: "{length} characters of base64 can hide instructions or a payload.",
423
459
  fix: "Remove it, or replace it with a link to a reviewed file.",
424
460
  },
425
461
  "TXT-IMPORT-OUTSIDE": {
426
462
  severity: "low", category: "instructions",
427
463
  title: "{file} pulls in a file from outside the project",
464
+ name: "An instruction file pulls in a file from outside the project",
428
465
  why: "“{ref}” imports content that isn't reviewed with this repo.",
429
466
  fix: "Copy the content into the repo or drop the import.",
430
467
  },
431
468
  "TXT-HUGE": {
432
469
  severity: "info", category: "instructions",
433
470
  title: "{file} is very long ({size})",
471
+ name: "An instruction file is very long",
434
472
  why: "Long instruction files are hard to review, so added lines are easy to miss.",
435
473
  fix: "Keep instructions short and move reference material elsewhere.",
436
474
  },
437
475
  "SPRAWL": {
438
476
  severity: "info", category: "instructions",
439
477
  title: "{count} files steer your agents",
478
+ name: "Many files steer your agents",
440
479
  why: "{list} each tell an agent what to do. When they disagree, agents behave differently depending on which file they read.",
441
480
  fix: "Keep one source, such as AGENTS.md, and point the others to it.",
442
481
  },
@@ -449,12 +488,14 @@ export const RULES = {
449
488
  "FLAG-ALIAS": {
450
489
  severity: "high", category: "hooks",
451
490
  title: "Your shell starts {agent} with approvals off",
491
+ name: "Your shell starts an agent with approvals off",
452
492
  why: "{file} adds “{flag}” every time you run the command, so the agent's permission checks never run.",
453
493
  fix: "Remove the flag from your shell profile. For fewer prompts, allow specific commands in the agent's settings instead.",
454
494
  },
455
495
  "FLAG-DOCS": {
456
496
  severity: "medium", category: "instructions",
457
497
  title: "{file} recommends turning approvals off",
498
+ name: "An instruction file recommends turning approvals off",
458
499
  why: "It tells people or agents to start an agent with “{flag}”, which turns off its approval prompts.",
459
500
  fix: "Recommend allowing specific commands in the agent's settings instead.",
460
501
  },
@@ -463,54 +504,63 @@ export const RULES = {
463
504
  "ENV-CODE-LOAD": {
464
505
  severity: "high", category: "hooks",
465
506
  title: "{variable} in {where} runs extra code inside the agent's commands",
507
+ name: "A setting runs extra code inside the agent's commands",
466
508
  why: "{variable} changes what programs load, or which programs run, when the agent starts a command. Set here, it can run the project's own code inside every command, and nothing in the commands shows it.",
467
509
  fix: "Remove {variable}, unless you set it yourself and know what it loads.",
468
510
  },
469
511
  "MCP-ENV-CODE-LOAD": {
470
512
  severity: "high", category: "mcp",
471
513
  title: "MCP server “{server}” sets {variable}, which runs extra code",
514
+ name: "An MCP server sets a variable that runs extra code",
472
515
  why: "{variable} makes the server's program load a module, library or script as it starts, so the server runs code that isn't part of its package.",
473
516
  fix: "Remove {variable} from the server's env, unless you set it yourself and know what it loads.",
474
517
  },
475
518
  "PROJECT-AUTORUN": {
476
519
  severity: "medium", category: "hooks",
477
520
  title: "{file} runs commands automatically",
521
+ name: "A project's settings run commands automatically",
478
522
  why: "{where} runs “{cmd}” automatically, without asking. In a project from someone else, that's their code running on your computer once you trust the folder.",
479
523
  fix: "Keep it only if you know what it runs. In a project from someone else, read the command and any script it starts before you trust the folder.",
480
524
  },
481
525
  "TASK-FOLDER-OPEN": {
482
526
  severity: "high", category: "hooks",
483
527
  title: "A task in {file} runs as soon as the folder opens",
528
+ name: "A task runs as soon as the folder opens",
484
529
  why: "Its runOptions.runOn is \"folderOpen\", so VS Code and editors built on it run “{cmd}” when the folder opens. Cursor ships with Workspace Trust off and runs it without asking. VS Code asks you to trust the folder first, unless Workspace Trust is off.",
485
530
  fix: "Remove runOptions.runOn from the task. In Cursor, set security.workspace.trust.enabled to true, so it asks before it runs a folder's tasks.",
486
531
  },
487
532
  "HOOK-REMOTE-EXEC": {
488
533
  severity: "critical", category: "hooks",
489
534
  title: "{where} downloads and runs code",
535
+ name: "A hook or script downloads and runs code",
490
536
  why: "It runs “{cmd}” automatically, without asking. Whatever that address serves runs on your computer with your permissions, and its owner can change it at any time.",
491
537
  fix: "Remove it, or replace the download with a script kept in the repo.",
492
538
  },
493
539
  "HOOK-NETWORK": {
494
540
  severity: "high", category: "hooks",
495
541
  title: "{where} sends data over the network",
542
+ name: "A hook or script sends data over the network",
496
543
  why: "It runs “{cmd}” automatically, without asking, and can send prompts, files or command output to another computer.",
497
544
  fix: "Remove it unless you run the server it sends to.",
498
545
  },
499
546
  "HOOK-HTTP": {
500
547
  severity: "high", category: "hooks", tool: "Claude Code",
501
548
  title: "{where} posts session details to {host}",
549
+ name: "A hook posts session details to a web address",
502
550
  why: "On each event, it sends details such as prompts, commands and file paths to {host}.",
503
551
  fix: "Remove the hook unless you run that server and trust everyone who can read its data.",
504
552
  },
505
553
  "HOOK-DESTRUCTIVE": {
506
554
  severity: "medium", category: "hooks",
507
555
  title: "{where} runs a destructive command",
556
+ name: "A hook or script runs a destructive command",
508
557
  why: "It runs “{cmd}” automatically, without asking, so it can delete or overwrite files each time it runs.",
509
558
  fix: "Remove the command, or limit it to files inside the project.",
510
559
  },
511
560
  "HOOK-OUTSIDE": {
512
561
  severity: "medium", category: "hooks",
513
562
  title: "{where} runs a script from outside the project",
563
+ name: "A hook runs a script from outside the project",
514
564
  why: "It runs “{cmd}”. That script isn't part of this repo, so it can change without anyone reviewing it.",
515
565
  fix: "Keep the script in the repo.",
516
566
  },
@@ -531,36 +581,42 @@ export const RULES = {
531
581
  "WS-DOWNLOADS": {
532
582
  severity: "high", category: "workspace",
533
583
  title: "Agent workspace is your {root} folder",
584
+ name: "Agent workspace is a downloads, desktop or temp folder",
534
585
  why: "Files you download from websites land here, and agents treat them as context.",
535
586
  fix: "Move the project into its own folder before running an agent.",
536
587
  },
537
588
  "WS-POISON-RISK": {
538
589
  severity: "high", category: "workspace",
539
590
  title: "Files in {place} can give orders to agents started there",
591
+ name: "Files outside a project folder can give orders to agents started there",
540
592
  why: "Instructions for an agent were found in {files}. An agent started in {place} treats the files there as context, and anything saved there later can add more.",
541
593
  fix: "Start agents in project folders only, and delete instruction files you didn't write.",
542
594
  },
543
595
  "WS-OPENED-IN": {
544
596
  severity: "high", category: "workspace",
545
597
  title: "{tool} was started in {place}",
598
+ name: "An agent was started outside a project folder",
546
599
  why: "{risk} The folder is listed in {file}.",
547
600
  fix: "Start agents from a project folder. To make {tool} forget this folder, remove its entry under projects in {file}.",
548
601
  },
549
602
  "WS-TRUSTED-DIR": {
550
603
  severity: "high", category: "workspace",
551
604
  title: "{tool} trusts {place}",
605
+ name: "An agent trusts a folder that isn't a project folder",
552
606
  why: "{file} marks it as a trusted folder, so {tool} asks fewer questions there. {risk}",
553
607
  fix: "Remove that entry from {file}, and trust only project folders.",
554
608
  },
555
609
  "CX-TRUSTED-DIR": {
556
610
  severity: "high", category: "workspace", tool: "Codex",
557
611
  title: "Codex trusts {place}",
612
+ name: "Codex trusts a folder that isn't a project folder",
558
613
  why: "{file} marks it as a trusted project, so Codex asks fewer questions there. {risk}",
559
614
  fix: "Remove that [projects] entry from {file} and trust only project folders.",
560
615
  },
561
616
  "WS-MULTI-REPO": {
562
617
  severity: "medium", category: "workspace",
563
618
  title: "Workspace spans {count} repositories",
619
+ name: "Workspace spans several repositories",
564
620
  why: "An agent opened here can read and change all of them.",
565
621
  fix: "Open the agent inside one repository.",
566
622
  },
@@ -591,42 +647,49 @@ export const RULES = {
591
647
  "WS-UNPARSED": {
592
648
  severity: "low", category: "workspace",
593
649
  title: "{file} couldn't be checked",
650
+ name: "A settings file couldn't be checked",
594
651
  why: "Its settings couldn't be read, usually because it isn't valid JSON or TOML, so none of them were checked. The agent may still apply some of them.",
595
652
  fix: "Fix the syntax error, then run the check again.",
596
653
  },
597
654
  "PLUGIN-CODE": {
598
655
  severity: "medium", category: "hooks",
599
656
  title: "{tool} runs {file} when it starts here, without asking",
657
+ name: "An agent runs this project's plugin code when it starts, without asking",
600
658
  why: "{tool} loads the plugins and tools in this project each time it starts, and they can do anything you can. In a project from someone else, that's their code running on your computer. misconfig lists plugin code by name and doesn't read it.",
601
659
  fix: "Read the code before you start {tool} in this project, and delete it if you didn't add it.",
602
660
  },
603
661
  "WS-LINK-SECRET": {
604
662
  severity: "high", category: "workspace",
605
663
  title: "{file} is a link to a credential file",
664
+ name: "An agent file is a link to a credential file",
606
665
  why: "Agents follow the link and read the file as instructions, so what's in it goes to the agent and the model behind it. misconfig didn't open it.",
607
666
  fix: "Replace the link with an ordinary file. If an agent has read it, change the keys in the file it points to.",
608
667
  },
609
668
  "WS-LINK-FOLDER": {
610
669
  severity: "medium", category: "workspace",
611
670
  title: "{file} is a link to a folder outside the project",
671
+ name: "An agent folder is a link to a folder outside the project",
612
672
  why: "Agents read the settings, rules and skills in it as this project's own. misconfig didn't open it, since it isn't part of the project.",
613
673
  fix: "Replace the link with a real folder in the project. If you made the link on purpose, check what's in the folder by hand.",
614
674
  },
615
675
  "WS-LINK-OUTSIDE": {
616
676
  severity: "medium", category: "workspace",
617
677
  title: "{file} is a link to a file outside the project",
678
+ name: "An agent file is a link to a file outside the project",
618
679
  why: "Agents follow the link and read the file it points to as instructions. misconfig didn't open it. In a project from someone else, a link like this can put a file from your computer into what the agent reads.",
619
680
  fix: "Replace the link with an ordinary file in the project. If you made the link on purpose, check the file it points to by hand.",
620
681
  },
621
682
  "WS-PARTLY-CHECKED": {
622
683
  severity: "low", category: "workspace",
623
684
  title: "Only the start of {file} was checked",
685
+ name: "Only the start of an agent file was checked",
624
686
  why: "misconfig reads agent files up to 400 KB, and this one is larger, so only its start was checked. The agent still reads the whole file.",
625
687
  fix: "Review the rest by hand, or split it into smaller files.",
626
688
  },
627
689
  "WS-TOO-LARGE": {
628
690
  severity: "low", category: "workspace",
629
691
  title: "{file} is too large to check",
692
+ name: "An agent file is too large to check",
630
693
  why: "misconfig reads agent files up to 400 KB each and 4 MB in all. This one is over a limit, so nothing in it was checked, but the agent still reads it.",
631
694
  fix: "Review it by hand, or split it into smaller files.",
632
695
  },
@@ -637,180 +700,210 @@ export const RULES = {
637
700
  "PKG-MALICIOUS": {
638
701
  severity: "critical", category: "installs",
639
702
  title: "MCP server “{server}” runs a known malicious package",
703
+ name: "An MCP server runs a known malicious package",
640
704
  why: "{known} is {what}. Source: {source}.",
641
705
  fix: "Remove the server, then change any keys and tokens your agent could reach.",
642
706
  },
643
707
  "PKG-MALICIOUS-VERSION": {
644
708
  severity: "high", category: "installs",
645
709
  title: "MCP server “{server}” runs a package that has shipped malware",
710
+ name: "An MCP server runs a package that has shipped malware",
646
711
  why: "{versions} of {known} {were} malware. The server doesn't pin a version, so it may have run {one}. Source: {source}.",
647
712
  fix: "Remove the server, or pin {known} to a version you've checked, and change any keys your agent could reach.",
648
713
  },
649
714
  "PKG-LOOKALIKE": {
650
715
  severity: "high", category: "installs",
651
716
  title: "MCP server “{server}” runs {pkg}, a lookalike of {official}",
717
+ name: "An MCP server runs a lookalike of an official package",
652
718
  why: "The name is close to {official}, but it's a different package. Lookalike names are how malicious packages get installed by mistake, including by AI agents that guess a package's name.",
653
719
  fix: "Check who publishes {pkg}. If you meant {official}, switch to it.",
654
720
  },
655
721
  "PKG-REMOTE-SOURCE": {
656
722
  severity: "medium", category: "installs",
657
723
  title: "MCP server “{server}” runs code straight from {origin}",
724
+ name: "An MCP server runs code straight from a repository or web address",
658
725
  why: "Whatever is there when the server starts is what runs, with your permissions. A change there needs no release and no review.",
659
726
  fix: "Use a published release with a pinned version, or pin the repository to a commit.",
660
727
  },
661
728
  "PKG-RISKY-PLACE": {
662
729
  severity: "high", category: "installs",
663
730
  title: "MCP server “{server}” runs a program from {place}",
731
+ name: "An MCP server runs a program from a downloads, desktop or temp folder",
664
732
  why: "Files there come from downloads and other programs, not from a release you chose, and anything that can write there can change what the server runs.",
665
733
  fix: "Install the server from its official release, or move the program somewhere only you control.",
666
734
  },
667
735
  "EXT-MALICIOUS": {
668
736
  severity: "critical", category: "installs",
669
737
  title: "{editor} has a known malicious extension: {ext}",
738
+ name: "An editor has a known malicious extension",
670
739
  why: "{ext} {version} is {what}. Source: {source}.",
671
740
  fix: "{advice}.",
672
741
  },
673
742
  "EXT-IMPERSONATION": {
674
743
  severity: "high", category: "installs",
675
744
  title: "{editor} extension {ext} imitates {official}",
745
+ name: "An editor extension imitates an official one",
676
746
  why: "Its name copies the official {official} extension, {officialId}, but someone else publishes it. Extensions run with your permissions as soon as the editor loads them, so a copy can do anything you can.",
677
747
  fix: "If you meant to install {official}, uninstall {ext} and install {officialId} instead.",
678
748
  },
679
749
  "EXT-VSIX": {
680
750
  severity: "low", category: "installs",
681
751
  title: "{editor} has {fromFiles}: {list}",
752
+ name: "An editor has an extension installed from a file",
682
753
  why: "An extension installed from a VSIX file skips the marketplace's checks and doesn't update itself, so security fixes don't reach it.",
683
754
  fix: "Reinstall from the marketplace where you can.",
684
755
  },
685
756
  "AGENT-VULN": {
686
757
  severity: "high", category: "installs",
687
758
  title: "{tool} {version} is missing {fixes}",
759
+ name: "An installed agent is missing security fixes",
688
760
  why: "{lead}: {worst} ({ref}). Version {fixed} has {every}.",
689
761
  fix: "Update {tool}: {update}.",
690
762
  },
691
763
  "AGENT-VULN-MINOR": {
692
764
  severity: "medium", category: "installs",
693
765
  title: "{tool} {version} is missing {fixes}",
766
+ name: "An installed agent is missing security fixes",
694
767
  why: "{lead}: {worst} ({ref}). Version {fixed} has {every}.",
695
768
  fix: "Update {tool}: {update}.",
696
769
  },
697
770
  "AGENT-VULN-LOW": {
698
771
  severity: "low", category: "installs",
699
772
  title: "{tool} {version} is missing {fixes}",
773
+ name: "An installed agent is missing security fixes",
700
774
  why: "{lead}: {worst} ({ref}). Version {fixed} has {every}.",
701
775
  fix: "Update {tool}: {update}.",
702
776
  },
703
777
  "DEP-MALICIOUS": {
704
778
  severity: "critical", category: "installs",
705
779
  title: "{known} {version} is installed, {status}",
780
+ name: "A known malicious package is installed",
706
781
  why: "It's {what}. Source: {source}.",
707
782
  fix: "Remove it, delete node_modules and reinstall from a clean lockfile, then change your GitHub, npm and cloud keys.",
708
783
  },
709
784
  "DEP-LOCKFILE": {
710
785
  severity: "critical", category: "installs",
711
786
  title: "{file} pins {known} {version}, {status}",
787
+ name: "A lockfile pins a known malicious package",
712
788
  why: "It's {what}. Source: {source}. The next clean install, in CI or on another computer, installs it.",
713
789
  fix: "{remedy}. If it was ever installed, change your GitHub, npm and cloud keys.",
714
790
  },
715
791
  "ATTACK-TRACE": {
716
792
  severity: "critical", category: "installs",
717
793
  title: "Signs of {campaign} on this computer",
794
+ name: "Signs of a known attack on this computer",
718
795
  why: "{what}. Found: {files}.",
719
796
  fix: "{advice}.",
720
797
  },
721
798
  "ATTACK-TRACE-WEAK": {
722
799
  severity: "medium", category: "installs",
723
800
  title: "A file named like one {campaign} leaves is on this computer",
801
+ name: "A file named like one a known attack leaves is on this computer",
724
802
  why: "{what}. Found: {files}.",
725
803
  fix: "{advice}.",
726
804
  },
727
805
  "ATTACK-SHELL-LINE": {
728
806
  severity: "critical", category: "installs",
729
807
  title: "{file} has a line {campaign} adds",
808
+ name: "A shell profile has a line a known attack adds",
730
809
  why: "{what}.",
731
810
  fix: "{advice}.",
732
811
  },
733
812
  "ATTACK-WORKFLOW": {
734
813
  severity: "critical", category: "installs",
735
814
  title: "{file} is a workflow {campaign} adds",
815
+ name: "A workflow a known attack adds is in this project",
736
816
  why: "{what}.",
737
817
  fix: "{advice}.",
738
818
  },
739
819
  "ATTACK-WORKFLOW-WEAK": {
740
820
  severity: "medium", category: "installs",
741
821
  title: "{file} is named like a workflow {campaign} adds",
822
+ name: "A workflow is named like one a known attack adds",
742
823
  why: "{what}.",
743
824
  fix: "{advice}.",
744
825
  },
745
826
  "SKILL-BINARY": {
746
827
  severity: "medium", category: "installs",
747
828
  title: "Skill “{skill}” comes with {programs}",
829
+ name: "A skill comes with a program or an archive",
748
830
  why: "{files} can't be read like the rest of a skill, and the skill can tell the agent to run {them}. Skills from public registries have been used to deliver malware.",
749
831
  fix: "Remove the skill unless you trust where it came from, and get any tool it needs from the tool's own release.",
750
832
  },
751
833
  "PLUGIN-MARKETPLACE": {
752
834
  severity: "low", category: "installs", tool: "Claude Code",
753
835
  title: "Claude Code can install plugins from {marketplaces} that Anthropic doesn't run",
836
+ name: "Claude Code can install plugins from marketplaces that Anthropic doesn't run",
754
837
  why: "{list}. A plugin runs with Claude Code's access. misconfig checks plugins' hooks and MCP servers, not the rest of their code.",
755
838
  fix: "Remove marketplaces you don't use with /plugin marketplace remove, and read a plugin before you install it.",
756
839
  },
757
840
  "TXT-REMOTE-INSTRUCTIONS": {
758
841
  severity: "medium", category: "instructions",
759
842
  title: "{file} tells the agent to take instructions from a web page",
843
+ name: "An instruction file tells the agent to take instructions from a web page",
760
844
  why: "Whoever runs {host} decides what the agent does next, and the page can change after this file was reviewed.",
761
845
  fix: "Copy the steps the agent needs into the repository, where changes are reviewed.",
762
846
  },
763
847
  "TXT-PASTE-SITE": {
764
848
  severity: "medium", category: "instructions",
765
849
  title: "{file} sends the agent to a paste site",
850
+ name: "An instruction file sends the agent to a paste site",
766
851
  why: "Whoever posted the text on {host} can change it at any time, so what the agent reads later can differ from what you checked. In the ClawHavoc campaign (Koi Security, February 2026), malicious ClawHub skills sent people to a script on a paste site.",
767
852
  fix: "Keep the steps in the repository, where changes are reviewed.",
768
853
  },
769
854
  "TXT-ARCHIVE-PASSWORD": {
770
855
  severity: "high", category: "instructions",
771
856
  title: "{file} asks for a password-protected download",
857
+ name: "An instruction file asks for a password-protected download",
772
858
  why: "A password keeps antivirus and email scanners from looking inside an archive, which is why malware is often shipped that way. The ClawHavoc campaign (Koi Security, February 2026) used one to deliver a trojan.",
773
859
  fix: "Don't run it. Install tools from their official source instead.",
774
860
  },
775
861
  "TXT-QUARANTINE": {
776
862
  severity: "high", category: "instructions",
777
863
  title: "{file} turns off macOS's check on downloaded apps",
864
+ name: "An instruction file turns off macOS's check on downloaded apps",
778
865
  why: "Removing the quarantine flag with xattr, or turning Gatekeeper off with spctl, skips the check macOS runs before a downloaded app opens, so the download runs with no warning. Mac info-stealers often tell people to run these commands.",
779
866
  fix: "Don't run it on files you downloaded. Install the tool from a signed release.",
780
867
  },
781
868
  "TXT-KNOWN-C2": {
782
869
  severity: "critical", category: "instructions",
783
870
  title: "{file} points at a known malware server",
871
+ name: "An agent file points at a known malware server",
784
872
  why: "{host} was used by {campaign}.",
785
873
  fix: "Remove whatever uses it, check what has already run, and change any keys the agent could reach.",
786
874
  },
787
875
  "LOOKUP-MALICIOUS": {
788
876
  severity: "critical", category: "installs",
789
877
  title: "{name} is listed as malware",
878
+ name: "A package or extension is listed as malware",
790
879
  why: "OSV.dev lists {name} as malicious ({ref}). {where}.",
791
880
  fix: "Remove it, then change any keys and tokens it could reach.",
792
881
  },
793
882
  "LOOKUP-MALICIOUS-VERSION": {
794
883
  severity: "high", category: "installs",
795
884
  title: "{name} has had versions listed as malware",
885
+ name: "A package has had versions listed as malware",
796
886
  why: "OSV.dev lists versions of {name} as malicious ({ref}). {where}, and no version is pinned, so it may have run one of them.",
797
887
  fix: "Pin {name} to a version you've checked, or remove it, then change any keys and tokens it could reach.",
798
888
  },
799
889
  "LOOKUP-VULN": {
800
890
  severity: "high", category: "installs",
801
891
  title: "{name} {version} has {vulns}",
892
+ name: "A package or extension has known vulnerabilities",
802
893
  why: "{lead}: {summary} ({ref}). Found on OSV.dev. {where}.",
803
894
  fix: "{advice}.",
804
895
  },
805
896
  "LOOKUP-VULN-MINOR": {
806
897
  severity: "medium", category: "installs",
807
898
  title: "{name} {version} has {vulns}",
899
+ name: "A package or extension has known vulnerabilities",
808
900
  why: "{lead}: {summary} ({ref}). Found on OSV.dev. {where}.",
809
901
  fix: "{advice}.",
810
902
  },
811
903
  "LOOKUP-VULN-LOW": {
812
904
  severity: "low", category: "installs",
813
905
  title: "{name} {version} has {vulns}",
906
+ name: "A package or extension has known vulnerabilities",
814
907
  why: "{lead}: {summary} ({ref}). Found on OSV.dev. {where}.",
815
908
  fix: "{advice}.",
816
909
  },