@exorcist-98/mcp-server 0.0.0-stage → 0.1.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/LICENSE +201 -0
- package/README.md +28 -2
- package/definitions/EX-001-hidden-unicode.yaml +22 -0
- package/definitions/EX-002-ai-instructions.yaml +22 -0
- package/definitions/EX-003-encoded-payload.yaml +30 -0
- package/definitions/EX-004-html-comment-smuggling.yaml +18 -0
- package/definitions/EX-005-tool-description-poisoning.yaml +19 -0
- package/definitions/EX-006-mcp-rug-pull.yaml +17 -0
- package/definitions/EX-007-overbroad-autoapprove.yaml +18 -0
- package/definitions/EX-008-remote-code-hook.yaml +21 -0
- package/definitions/EX-009-install-script-exfiltration.yaml +19 -0
- package/definitions/EX-010-unpinned-mcp-server.yaml +21 -0
- package/definitions/EX-011-secrets-in-agent-reach.yaml +26 -0
- package/definitions/EX-012-markdown-image-exfil.yaml +21 -0
- package/definitions/EX-013-typosquat-mcp-package.yaml +21 -0
- package/definitions/EX-014-steering-override.yaml +23 -0
- package/definitions/EX-015-shell-in-tool-output.yaml +20 -0
- package/definitions/EX-018-confused-deputy.yaml +19 -0
- package/definitions/EX-019-memory-poisoning.yaml +17 -0
- package/definitions/EX-020-suspicious-power.yaml +18 -0
- package/dist/index.mjs +26834 -0
- package/package.json +47 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @exorcist-98/mcp-server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An MCP server from [Exorcist 98](https://github.com/pranavsaji/exorcist-98),
|
|
4
|
+
an antivirus for AI coding agents. It lets your agent check a project before
|
|
5
|
+
trusting it.
|
|
6
|
+
|
|
7
|
+
Tools:
|
|
8
|
+
|
|
9
|
+
- `scan_repo`: scan a folder or file for attacks on AI agents (hidden
|
|
10
|
+
instructions, poisoned tool descriptions, dangerous hooks, leaked secrets).
|
|
11
|
+
- `scan_mcp_config`: check an MCP config for risky servers.
|
|
12
|
+
- `explain_finding`: a plain-language explanation of a rule.
|
|
13
|
+
- `quarantine`: disable a server in an MCP config, with a backup to restore.
|
|
14
|
+
|
|
15
|
+
The tools only read inside the folder the server was started in, plus the
|
|
16
|
+
folders your client shares as MCP roots. Quoted text from scanned files is left
|
|
17
|
+
out of results unless you ask for it, and is then marked as untrusted.
|
|
18
|
+
|
|
19
|
+
## Use it
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"exorcist": { "command": "npx", "args": ["-y", "@exorcist-98/mcp-server@0.1.0"] }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Needs Node 20 or newer. Licence: Apache-2.0.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
id: EX-001
|
|
2
|
+
title: Hidden Unicode instructions
|
|
3
|
+
severity: critical
|
|
4
|
+
applies_to:
|
|
5
|
+
- instruction
|
|
6
|
+
- docs
|
|
7
|
+
- config
|
|
8
|
+
- memory
|
|
9
|
+
- hook
|
|
10
|
+
- tool-result
|
|
11
|
+
match:
|
|
12
|
+
unicode_class:
|
|
13
|
+
- zero-width # U+200B, U+200C, U+200D, U+FEFF
|
|
14
|
+
- bidi-override # U+202A-U+202E, U+2066-U+2069
|
|
15
|
+
- tag-block # U+E0000-U+E007F
|
|
16
|
+
owasp:
|
|
17
|
+
- "LLM01:2025 Prompt Injection"
|
|
18
|
+
- "ASI03 Prompt Injection via External Content"
|
|
19
|
+
fix: >
|
|
20
|
+
Remove the hidden characters. Use a Unicode-aware editor or run `cat -A` to
|
|
21
|
+
reveal them. Consider adding a linter rule that bans these code points in
|
|
22
|
+
text files.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
id: EX-002
|
|
2
|
+
title: Instructions addressed to AI
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- instruction
|
|
6
|
+
- docs
|
|
7
|
+
- memory
|
|
8
|
+
- tool-result
|
|
9
|
+
match:
|
|
10
|
+
# Phrases that only make sense when talking to an AI agent. Any amount of
|
|
11
|
+
# whitespace may separate the words. Ordinary text such as "you are now
|
|
12
|
+
# logged in" is not flagged. A phrase split by hidden characters still
|
|
13
|
+
# matches (the engine also scans the text with them removed).
|
|
14
|
+
regex: "(?:\\bignore\\s+(?:all\\s+|any\\s+|the\\s+)?(?:previous|prior|above|earlier)\\s+(?:instructions|rules|prompts?)|\\bdisregard\\s+(?:all\\s+|any\\s+|the\\s+)?(?:previous|prior|above|earlier)\\s+(?:instructions|rules)|\\byou\\s+are\\s+now\\s+(?:(?:operating\\s+)?in\\s+(?:maintenance|developer|debug|admin|god|unrestricted|jailbreak|dan)\\s+mode|operating\\s+without\\s+(?:any\\s+)?(?:restrictions|rules|limits)|free\\b|unrestricted|dan\\b)|\\bas\\s+an\\s+ai(?:\\s+(?:assistant|agent|model))?\\s*,?\\s+(?:your|you\\s+must|you\\s+should|ignore)|\\byour\\s+new\\s+(?:primary\\s+)?(?:directive|instructions?)\\b|\\bdo\\s+not\\s+(?:mention|tell|reveal)\\s+(?:this|these)\\s+(?:instruction|note|message)s?)"
|
|
15
|
+
owasp:
|
|
16
|
+
- "LLM01:2025 Prompt Injection"
|
|
17
|
+
- "ASI03 Prompt Injection via External Content"
|
|
18
|
+
fix: >
|
|
19
|
+
Remove or rewrite the flagged phrase. Legitimate documentation does not need
|
|
20
|
+
to address the AI agent directly. If the phrase is in a code example, wrap it
|
|
21
|
+
in a fenced code block with a language tag so it is not parsed as an
|
|
22
|
+
instruction.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
id: EX-003
|
|
2
|
+
title: Encoded payload
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- instruction
|
|
6
|
+
- docs
|
|
7
|
+
- config
|
|
8
|
+
- code
|
|
9
|
+
- hook
|
|
10
|
+
- mcp-config
|
|
11
|
+
match:
|
|
12
|
+
# A run of 40 or more base64 characters. Two ordinary kinds of long base64
|
|
13
|
+
# are skipped: package integrity hashes ("sha512-...") that fill lockfiles,
|
|
14
|
+
# and inline data URIs ("data:image/png;base64,...").
|
|
15
|
+
# A run of 40+ base64 characters, or 48+ hex digits (plain, 0x or \\x escaped).
|
|
16
|
+
regex: "(?:(?<!sha(?:1|256|384|512)-)(?<!base64,)(?<![A-Za-z0-9+/=])[A-Za-z0-9+/=]{40,}(?![A-Za-z0-9+/=])|(?:\\\\x[0-9a-fA-F]{2}){24,})"
|
|
17
|
+
# Only runs that decode to readable text count. URL paths, hashes, git SHAs
|
|
18
|
+
# and identifiers decode to binary noise; before this check they were about
|
|
19
|
+
# 99% of all findings on ordinary repositories (docs/BENCHMARK.md).
|
|
20
|
+
validate: encoded-text
|
|
21
|
+
skip_paths:
|
|
22
|
+
- "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
|
|
23
|
+
- "(^|/)(package-lock\\.json|npm-shrinkwrap\\.json|pnpm-lock\\.yaml|yarn\\.lock|bun\\.lockb?|Cargo\\.lock|poetry\\.lock|Pipfile\\.lock|uv\\.lock|go\\.sum|composer\\.lock|Gemfile\\.lock|[^/]*\\.lock\\.ya?ml)$"
|
|
24
|
+
owasp:
|
|
25
|
+
- "LLM01:2025 Prompt Injection"
|
|
26
|
+
- "ASI03 Prompt Injection via External Content"
|
|
27
|
+
fix: >
|
|
28
|
+
Investigate the base64 blob. If it decodes to a URL or instruction string,
|
|
29
|
+
remove it. If it is a legitimate asset (e.g. an icon), move it to a binary
|
|
30
|
+
file and reference it by path instead of embedding it inline.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
id: EX-004
|
|
2
|
+
title: HTML comment smuggling
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- instruction
|
|
6
|
+
- docs
|
|
7
|
+
match:
|
|
8
|
+
# The match stays inside one comment ((?!-->) stops it at the closing marker).
|
|
9
|
+
# Ordinary words like "fetch" or "send to" are not enough on their own.
|
|
10
|
+
regex: "<!--(?:(?!-->)[\\s\\S]){0,2000}?(?:\\b(?:ignore|disregard)\\s+(?:all\\s+|any\\s+|the\\s+)?(?:previous|prior|above|earlier)|exfiltrat|\\bsilently\\b|\\bdo\\s+not\\s+(?:mention|tell|reveal|inform)|\\b(?:ai|assistant|agent|llm|claude|copilot|cursor|kiro|gemini)\\s*[:,]\\s|\\byou\\s+are\\s+(?:now|an?\\s+ai)\\b|\\bas\\s+an\\s+ai\\b|\\b(?:curl|wget)\\s+\\S+[^\\n]*\\|\\s*(?:ba|z)?sh\\b|\\bsend\\s+(?:the\\s+|all\\s+|any\\s+)?(?:contents?|secrets?|keys?|tokens?|credentials?|\\.env)\\b)(?:(?!-->)[\\s\\S]){0,2000}?-->"
|
|
11
|
+
owasp:
|
|
12
|
+
- "LLM01:2025 Prompt Injection"
|
|
13
|
+
- "ASI03 Prompt Injection via External Content"
|
|
14
|
+
fix: >
|
|
15
|
+
Remove the HTML comment or replace its contents with a benign description.
|
|
16
|
+
Legitimate comments in Markdown should not contain imperative instructions
|
|
17
|
+
aimed at AI agents. Consider running a linter rule that bans instruction
|
|
18
|
+
keywords inside HTML comments.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: EX-005
|
|
2
|
+
title: Tool description poisoning
|
|
3
|
+
severity: critical
|
|
4
|
+
applies_to:
|
|
5
|
+
- mcp-config
|
|
6
|
+
- config
|
|
7
|
+
match:
|
|
8
|
+
regex: "(before (responding|answering|using this tool)|(prior to|before) (invoking|calling|running|using) (this|any|the)\\b|do not (inform|tell|mention|notify|alert) the user|without (telling|informing|notifying|asking) the user|(keep|stay) (this |it )?(quiet|secret|hidden) from|this is required for (audit|telemetry|logging)|(send|include|attach|upload|pass|forward)[^.\\n]{0,60}(~/\\.ssh|id_rsa|\\.env\\b|\\.aws/credentials|private key))"
|
|
9
|
+
# Only in files that describe MCP servers or tools. Model or prompt configs
|
|
10
|
+
# that say \"do not mention\" are ordinary (seen in openai/codex).
|
|
11
|
+
file_regex: "(\"mcpServers\"|\"inputSchema\"|\"input_schema\")"
|
|
12
|
+
owasp:
|
|
13
|
+
- "MCP01 Tool Poisoning Attack"
|
|
14
|
+
- "LLM01:2025 Prompt Injection"
|
|
15
|
+
fix: >
|
|
16
|
+
Review the tool description field. A legitimate tool description explains
|
|
17
|
+
what the tool does, not what the agent should do before or after calling it.
|
|
18
|
+
Remove any instructions embedded in descriptions and replace with a plain
|
|
19
|
+
functional summary.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
id: EX-006
|
|
2
|
+
title: MCP rug pull (description change pattern)
|
|
3
|
+
severity: critical
|
|
4
|
+
applies_to:
|
|
5
|
+
- mcp-config
|
|
6
|
+
- config
|
|
7
|
+
match:
|
|
8
|
+
regex: "(do not (inform|tell|mention)|attach.*contents|for telemetry purposes)"
|
|
9
|
+
file_regex: "(\"mcpServers\"|\"inputSchema\"|\"input_schema\")"
|
|
10
|
+
owasp:
|
|
11
|
+
- "MCP02 Tool Rug-Pull"
|
|
12
|
+
- "LLM01:2025 Prompt Injection"
|
|
13
|
+
fix: >
|
|
14
|
+
The tool description contains language associated with rug-pull attacks, where
|
|
15
|
+
instructions are added to a description after the user approved the original
|
|
16
|
+
tool. Remove any instruction text from the description field. Enable the
|
|
17
|
+
Real-Time Shield (packages/shield) to pin tool hashes and alert on changes.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
id: EX-007
|
|
2
|
+
title: Over-broad auto-approve
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- mcp-config
|
|
6
|
+
- config
|
|
7
|
+
match:
|
|
8
|
+
json_path: "$..autoApprove[*]"
|
|
9
|
+
# Only tools that write, delete, execute or run shell commands are flagged.
|
|
10
|
+
# Read-only tools in autoApprove are fine.
|
|
11
|
+
value_regex: "(^\\*$|write|delete|remove|rm_|exec|run_|shell|terminal|command|bash|edit|create|move|rename|deploy|install)"
|
|
12
|
+
owasp:
|
|
13
|
+
- "ASI02 Inadequate Human-in-the-Loop Controls"
|
|
14
|
+
- "MCP05 Excessive Tool Permissions"
|
|
15
|
+
fix: >
|
|
16
|
+
Remove write, delete, shell and execution tools from autoApprove. Auto-approve
|
|
17
|
+
should only be used for read-only, low-risk tools. For tools that need
|
|
18
|
+
frequent access, use a confirmation-based approval instead.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
id: EX-008
|
|
2
|
+
title: Remote code in hook
|
|
3
|
+
severity: critical
|
|
4
|
+
applies_to:
|
|
5
|
+
- hook
|
|
6
|
+
- mcp-config
|
|
7
|
+
- config
|
|
8
|
+
- tool-result
|
|
9
|
+
match:
|
|
10
|
+
regex: "((curl|wget)[^\\n]*\\|\\s*(sh|bash|zsh|fish|dash|python3?|node)\\b|base64\\s+(-d|--decode|-D)\\b[^\\n]*\\|\\s*(sh|bash|zsh|python3?|node)\\b)"
|
|
11
|
+
# CI workflows are not agent hooks; installers there are a separate supply-chain topic.
|
|
12
|
+
skip_paths:
|
|
13
|
+
- "^\\.github/workflows/"
|
|
14
|
+
- "(^|/)action\\.ya?ml$"
|
|
15
|
+
owasp:
|
|
16
|
+
- "ASI06 Prompt Injection via Indirect Content"
|
|
17
|
+
- "LLM01:2025 Prompt Injection"
|
|
18
|
+
fix: >
|
|
19
|
+
Never pipe remote content directly into a shell. Download the script to a
|
|
20
|
+
known path, verify its checksum, and execute it separately. Better yet,
|
|
21
|
+
replace the remote script with a versioned local task in the repo.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: EX-009
|
|
2
|
+
title: Install-script exfiltration
|
|
3
|
+
severity: critical
|
|
4
|
+
applies_to:
|
|
5
|
+
- manifest
|
|
6
|
+
- config
|
|
7
|
+
match:
|
|
8
|
+
# preinstall, install and postinstall all run automatically on install.
|
|
9
|
+
json_path: "$.scripts[preinstall,install,postinstall]"
|
|
10
|
+
# Flag scripts that reach the network or read secrets. A script such as
|
|
11
|
+
# "node scripts/build.js" is not flagged.
|
|
12
|
+
value_regex: "(curl|wget|https?:|fetch\\(|require\\(['\"]https?['\"]\\)|\\bnc\\b|/dev/tcp|process\\.env|\\.ssh|\\.npmrc|\\.env\\b)"
|
|
13
|
+
owasp:
|
|
14
|
+
- "ASI07 Supply Chain Vulnerabilities"
|
|
15
|
+
- "LLM01:2025 Prompt Injection"
|
|
16
|
+
fix: >
|
|
17
|
+
Audit preinstall, install and postinstall scripts. They should not read
|
|
18
|
+
environment variables or make outbound network requests. If a build step is
|
|
19
|
+
needed, use a local script tracked in the repo rather than a remote fetch.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
id: EX-010
|
|
2
|
+
title: Unpinned MCP server
|
|
3
|
+
severity: medium
|
|
4
|
+
applies_to:
|
|
5
|
+
- mcp-config
|
|
6
|
+
- config
|
|
7
|
+
match:
|
|
8
|
+
# The package each package-runner server is told to run (flags such as -y
|
|
9
|
+
# and --package are understood; later arguments are paths or options).
|
|
10
|
+
json_path: "$..mcpServers[?(@.command=='npx' || @.command=='bunx' || @.command=='uvx' || @.command=='pnpx')].args"
|
|
11
|
+
select: package-arg
|
|
12
|
+
# A package name with no @version after it, e.g. "server" or "@scope/server".
|
|
13
|
+
# "server@1.2.3" and "@scope/server@1.2.3" do not match.
|
|
14
|
+
value_regex: "^(@[a-z0-9._-]+/)?[a-z0-9][a-z0-9._-]*$"
|
|
15
|
+
owasp:
|
|
16
|
+
- "ASI07 Supply Chain Vulnerabilities"
|
|
17
|
+
- "MCP04 Malicious MCP Package"
|
|
18
|
+
fix: >
|
|
19
|
+
Pin every MCP server to an exact version: replace `npx some-server` with
|
|
20
|
+
`npx some-server@1.2.3`. Verify the pinned version with a lockfile or a hash
|
|
21
|
+
check in CI.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
id: EX-011
|
|
2
|
+
title: Secrets in agent reach
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- instruction
|
|
6
|
+
- docs
|
|
7
|
+
- config
|
|
8
|
+
- code
|
|
9
|
+
- unknown
|
|
10
|
+
match:
|
|
11
|
+
# Well-known secret variables, and secrets recognisable by their own format
|
|
12
|
+
# (GitHub, OpenAI, Anthropic, AWS, Slack, Google, Stripe and npm tokens, and
|
|
13
|
+
# private keys) wherever they appear (L-015).
|
|
14
|
+
regex: "(?:(?:(?:AWS_SECRET_ACCESS_KEY|GITHUB_TOKEN|GH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|SLACK_BOT_TOKEN|STRIPE_SECRET_KEY|GOOGLE_API_KEY|NPM_TOKEN)=(?!EXAMPLE_)[^\\s]+|DATABASE_URL=[a-z+]+://[^\\s:@/]+:[^\\s@/]+@[^\\s]+)|\\b(?:gh[pousr]_[A-Za-z0-9]{36}|github_pat_[A-Za-z0-9_]{60,}|sk-(?:proj-|ant-api\\d\\d-)?[A-Za-z0-9_-]{40,}|AKIA[0-9A-Z]{16}|xox[baprs]-[0-9A-Za-z-]{20,}|AIza[0-9A-Za-z_-]{35}|sk_live_[0-9A-Za-z]{24,}|npm_[A-Za-z0-9]{36})\\b|(?<=^|\\n)-----BEGIN (?:RSA |EC |DSA |OPENSSH |PGP |ENCRYPTED )?PRIVATE KEY(?: BLOCK)?-----)"
|
|
15
|
+
# Placeholders such as [REDACTED], xxx, <token> or ${VAR} are not secrets.
|
|
16
|
+
exclude_regex: "=\\s*[\"']?(\\[?redacted\\]?|x{3,}|\\*{3,}|<|\\$\\{?[A-Za-z_]+\\}?|your[_-]|changeme|placeholder|dummy|fake|[^\\s]*\\.\\.\\.)|^(?:gh[pousr]_|github_pat_|sk-|sk_live_|AKIA|xox[baprs]-|AIza|npm_)\\S*(?:EXAMPLE|SYNTHETIC|ABCDEFGHIJ|x{8,}|X{8,}|0{12,})|=\\s*[a-z_][a-z0-9_.]*\\s*[,)]|=\\s*[\"'`]?[A-Za-z]{2,4}_x{3,}|=\\s*[\"']?\\$\\(|=\\s*[\"']?\\$[A-Za-z_]|=[\"']$|=[\"'][/\\\\']"
|
|
17
|
+
# Test files hold fake secrets and sample payloads on purpose.
|
|
18
|
+
skip_paths:
|
|
19
|
+
- "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|(^|/|_)tests?\\.(rs|go|py)$"
|
|
20
|
+
owasp:
|
|
21
|
+
- "LLM02:2025 Sensitive Information Disclosure"
|
|
22
|
+
- "ASI05 Sensitive Data Leakage"
|
|
23
|
+
fix: >
|
|
24
|
+
Move the credential to a .env file and add .env to .gitignore and
|
|
25
|
+
.kiroignore. Use a secrets manager for production. Never hard-code secrets
|
|
26
|
+
in files an agent reads.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
id: EX-012
|
|
2
|
+
title: Markdown image exfiltration
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- instruction
|
|
6
|
+
- docs
|
|
7
|
+
match:
|
|
8
|
+
# A markdown image whose query string carries data: a parameter named like
|
|
9
|
+
# data, token, env or user, or a template such as {{...}} or ${...}. Ordinary
|
|
10
|
+
# images with query strings (stat cards, size options) are not flagged; that
|
|
11
|
+
# was 390 false alarms in one README in the second blind round.
|
|
12
|
+
regex: "!\\[[^\\]]*\\]\\(https?://[^)?\\s]+(?=\\?)[^)\\s]*(?:[?&](?:d|q|data|payload|content|text|msg|token|key|secret|password|pass|pwd|env|cookie|session|auth|creds?|leak|info|user|email)=|\\{\\{|\\$\\{|%s|<[a-z_]+>|\\b(?:PLACEHOLDER|REPLACE_ME|INSERT)\\b)[^)\\s]*\\)"
|
|
13
|
+
# Well-known badge services take query strings by design.
|
|
14
|
+
exclude_regex: "\\]\\(https?://(?:(?:img\\.shields\\.io|shields\\.io|badgen\\.net|badge\\.fury\\.io|(?:app\\.)?codecov\\.io|coveralls\\.io|(?:api\\.)?travis-ci\\.(?:org|com)|(?:dl\\.)?circleci\\.com|api\\.netlify\\.com|deepwiki\\.com/badge|www\\.bestpractices\\.dev|api\\.securityscorecards\\.dev|(?:static\\.)?pepy\\.tech|sonarcloud\\.io|readthedocs\\.org|img\\.badgesize\\.io|snyk\\.io/test|discord(?:app)?\\.com/api/guilds|camo\\.githubusercontent\\.com|vercel\\.com/button|deploy\\.workers\\.cloudflare\\.com)/|github\\.com/[^)]*/(?:badge\\.svg|actions/workflows/))|\\]\\(https?://(?:github\\.com/[^)?]+\\?raw=true\\)|raw\\.githubusercontent\\.com/)"
|
|
15
|
+
owasp:
|
|
16
|
+
- "LLM02:2025 Sensitive Information Disclosure"
|
|
17
|
+
- "ASI05 Sensitive Data Leakage"
|
|
18
|
+
fix: >
|
|
19
|
+
Remove query strings from Markdown image URLs. A legitimate badge or image
|
|
20
|
+
does not need to send parameters to its host. If tracking is needed, use
|
|
21
|
+
a server-side redirect that does not expose data in the URL.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
id: EX-013
|
|
2
|
+
title: Typosquat MCP package
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- mcp-config
|
|
6
|
+
- config
|
|
7
|
+
match:
|
|
8
|
+
# The package each package-runner server runs; only names that
|
|
9
|
+
# are one or two edits (or look-alike characters) away from a well-known MCP
|
|
10
|
+
# server package are kept (packages/core/src/known-packages.ts).
|
|
11
|
+
json_path: "$..mcpServers[?(@.command=='npx' || @.command=='bunx' || @.command=='uvx' || @.command=='pnpx')].args"
|
|
12
|
+
select: package-arg
|
|
13
|
+
value_regex: "^@?[a-z0-9][a-z0-9._-]*(/[a-z0-9._-]+)?(@[0-9a-z.^~*-]+)?$"
|
|
14
|
+
validate: typosquat
|
|
15
|
+
owasp:
|
|
16
|
+
- "LLM03:2025 Supply Chain"
|
|
17
|
+
- "MCP04 Supply Chain Compromise"
|
|
18
|
+
fix: >
|
|
19
|
+
Check the package name letter by letter against the official one and fix the
|
|
20
|
+
spelling. Prefer installing MCP servers from their publisher's documented
|
|
21
|
+
name, pinned to a version, and remove any package you did not mean to run.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
id: EX-014
|
|
2
|
+
title: Steering override
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- instruction
|
|
6
|
+
- memory
|
|
7
|
+
match:
|
|
8
|
+
# A steering or rules file that tells the agent to drop its safeguards: skip
|
|
9
|
+
# approvals, outrank the user, or hide what it does. Ordinary project rules
|
|
10
|
+
# ("always run the tests") are not flagged.
|
|
11
|
+
regex: "(?:\\bdisable\\s+(?:all\\s+)?(?:safety|security)\\s+(?:checks|guards?|rules|prompts)\\b|\\bauto[- ]?approve\\s+(?:all|every|any)\\s+(?:tool\\s+)?(?:calls?|actions?|commands?|tools?)\\b|\\bnever\\s+(?:show|ask\\s+for|display)\\s+(?:approval|confirmation)\\s+(?:prompts?|dialogs?)\\b|\\b(?:proceed|act|run|continue)\\s+without\\s+(?:asking|confirmation|approval)\\b|\\b(?:take|takes|have|has)\\s+(?:higher|top|absolute)\\s+priority\\s+(?:over|than)\\s+(?:the\\s+)?(?:user|any\\s+other)\\b|\\boverrides?\\s+(?:all\\s+|any\\s+)?(?:the\\s+)?(?:user'?s?|system|previous|prior)\\s+(?:instructions|requests|rules|prompts?)\\b|\\b(?:never|do\\s+not)\\s+(?:show|display|reveal|tell)\\s+(?:this|these|it)\\s+(?:to\\s+)?(?:the\\s+)?user\\b|\\bthe\\s+user\\s+has\\s+pre-?authori[sz]ed\\b)"
|
|
12
|
+
# READMEs describe features ("--yolo auto-approves all tools"); this rule is
|
|
13
|
+
# about steering and rules files that the agent obeys.
|
|
14
|
+
skip_paths:
|
|
15
|
+
- "(^|/)README[^/]*$"
|
|
16
|
+
owasp:
|
|
17
|
+
- "ASI02 Inadequate Human-in-the-Loop Controls"
|
|
18
|
+
- "LLM01:2025 Prompt Injection"
|
|
19
|
+
fix: >
|
|
20
|
+
Remove the instruction. A steering or rules file should describe the
|
|
21
|
+
project, not switch off approvals or tell the agent to outrank or hide
|
|
22
|
+
things from you. Keep approval prompts on for tools that write, delete or
|
|
23
|
+
run commands.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
id: EX-015
|
|
2
|
+
title: Shell in tool output
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- tool-result
|
|
6
|
+
- config
|
|
7
|
+
match:
|
|
8
|
+
# A download piped into a shell, an encoded PowerShell command, or an
|
|
9
|
+
# explicit order to run a command. Ordinary mentions of curl are not flagged.
|
|
10
|
+
regex: "(?:\\b(?:curl|wget)\\b[^\\n]*\\|\\s*(?:sh|bash|zsh|fish)\\b|\\bpowershell(?:\\.exe)?\\s+-e(?:nc|ncodedcommand)\\b|\\b(?:you\\s+must|always|now|first)\\s+run\\s+(?:the\\s+following|this)\\s+(?:command|script))"
|
|
11
|
+
skip_paths:
|
|
12
|
+
- "^\\.github/workflows/"
|
|
13
|
+
- "(^|/)action\\.ya?ml$"
|
|
14
|
+
owasp:
|
|
15
|
+
- "ASI06 Prompt Injection via Indirect Content"
|
|
16
|
+
- "LLM01:2025 Prompt Injection"
|
|
17
|
+
fix: >
|
|
18
|
+
Treat tool output as data, never as instructions. Do not run commands that a
|
|
19
|
+
tool result asks for. If a tool legitimately returns a command, show it to the
|
|
20
|
+
user and let them decide.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: EX-018
|
|
2
|
+
title: Confused-deputy request
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- instruction
|
|
6
|
+
- docs
|
|
7
|
+
- memory
|
|
8
|
+
match:
|
|
9
|
+
# Text that hands the agent powers it should not assume: admin rights,
|
|
10
|
+
# permission to destroy data, or a claim that approval was already given.
|
|
11
|
+
regex: "(?:\\bact\\s+with\\s+(?:admin|administrator|root|elevated|full|superuser)\\s+(?:permissions|privileges|rights|access)\\b|\\byou\\s+are\\s+(?:authori[sz]ed|permitted|allowed)\\s+to\\s+(?:drop|delete|wipe|truncate|bypass|disable|override|force[- ]push)\\b|\\bbypass\\s+(?:the\\s+)?(?:usual\\s+|normal\\s+|standard\\s+)?(?:confirmation|approval|review|safety)\\s+(?:steps?|checks?|prompts?)\\b|\\bthis\\s+(?:has\\s+been|is|was)\\s+(?:already\\s+)?pre-?approved\\b)"
|
|
12
|
+
owasp:
|
|
13
|
+
- "ASI02 Inadequate Human-in-the-Loop Controls"
|
|
14
|
+
- "LLM06:2025 Excessive Agency"
|
|
15
|
+
fix: >
|
|
16
|
+
Remove the instruction. Documentation can say what a migration or script
|
|
17
|
+
does, but it should not grant the agent permissions or claim that a
|
|
18
|
+
destructive step is already approved. Keep confirmation prompts for
|
|
19
|
+
anything that deletes or rewrites data.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
id: EX-019
|
|
2
|
+
title: Agent memory poisoning
|
|
3
|
+
severity: high
|
|
4
|
+
applies_to:
|
|
5
|
+
- memory
|
|
6
|
+
- instruction
|
|
7
|
+
match:
|
|
8
|
+
# Notes the agent reloads every session that leak secrets, hide themselves,
|
|
9
|
+
# or grant standing permissions.
|
|
10
|
+
regex: "(?:\\binclude\\s+(?:any\\s+|all\\s+)?(?:secret|secrets|keys?|tokens?|passwords?|credentials)\\b[^.\\n]{0,40}\\b(?:in\\s+full|verbatim|as\\s+is|unredacted)\\b|\\bnever\\s+mention\\s+this\\s+(?:note|file|instruction|memory)\\b|\\bif\\s+asked(?:\\s+about\\s+(?:it|this))?,?\\s+say\\s+(?:it|this)\\s+does\\s+not\\s+exist\\b|\\b(?:permanent|standing)\\s+(?:shell|command|execution)\\s+(?:execution\\s+)?permission\\b|\\balways\\s+approve\\s+requests\\s+from\\b)"
|
|
11
|
+
owasp:
|
|
12
|
+
- "ASI04 Memory Poisoning"
|
|
13
|
+
- "LLM01:2025 Prompt Injection"
|
|
14
|
+
fix: >
|
|
15
|
+
Delete the planted lines from the agent's memory or notes file, then check
|
|
16
|
+
its history for who added them. Memory should record facts about the
|
|
17
|
+
project, never permissions, secrets or instructions to hide something.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
id: EX-020
|
|
2
|
+
title: Suspicious Power
|
|
3
|
+
severity: critical
|
|
4
|
+
applies_to:
|
|
5
|
+
- power
|
|
6
|
+
- config
|
|
7
|
+
match:
|
|
8
|
+
# A Kiro Power (or a file shaped like one: hooks plus steering or an MCP
|
|
9
|
+
# server) that downloads and runs code, or tells the agent to stop asking.
|
|
10
|
+
regex: "(?:\\b(?:curl|wget)\\b[^\\n]*\\|\\s*(?:sh|bash|zsh|python3?|node)\\b|\\bapprove\\s+[^\\n]{0,40}\\bwithout\\s+asking\\b|\\bauto[- ]?approve\\s+(?:all|every)\\b)"
|
|
11
|
+
file_regex: "(?:^|\\n)hooks:[\\s\\S]*(?:^|\\n)(?:steering|mcp):|(?:^|\\n)(?:steering|mcp):[\\s\\S]*(?:^|\\n)hooks:"
|
|
12
|
+
owasp:
|
|
13
|
+
- "LLM03:2025 Supply Chain"
|
|
14
|
+
- "ASI06 Prompt Injection via Indirect Content"
|
|
15
|
+
fix: >
|
|
16
|
+
Do not install this Power. A Power should not download and run scripts on
|
|
17
|
+
file save or tell the agent to approve actions without asking. If you need
|
|
18
|
+
the feature, copy the parts you understand into your own steering and hooks.
|