You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,8 @@ type WarningName = "parsing-error"
134
134
|"shady-link"
135
135
|"synchronous-io"
136
136
|"log-usage"
137
-
|"serialize-environment";
137
+
|"serialize-environment"
138
+
|"monkey-patch";
138
139
139
140
declareconst warnings:Record<WarningName, {
140
141
i18n:string;
@@ -175,7 +176,7 @@ This section describes all the possible warnings returned by JSXRay. Click on th
175
176
|[data-exfiltration](./docs/data-exfiltration.md)| ❌ | the code potentially attemps to transfer sensitive data wihtout authorization from a computer or network to an external location. |
176
177
|[log-usage](./docs/log-usage.md)| ❌ | The code contains a log call. |
177
178
|[sql-injection](./docs/sql-injection.md)| ❌ | The code contains a SQL injection vulnerability |
Monkey-patching involves modifying native language objects (prototypes, global functions) at runtime to alter their behavior. While it can serve legitimate purposes like polyfills or extending APIs, it introduces significant security risks: breaking invariants, global side effects, flow hijacking (hooking), stealthy persistence, and concealing malicious activities.
10
+
11
+
JS-X-Ray raises a `monkey-patch` warning when it detects writes to native prototypes. The signal is intentionally broad to facilitate review: while some legitimate uses exist, any invasive modification deserves inspection.
0 commit comments