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
@@ -107,7 +107,8 @@ type WarningName = "parsing-error"
107
107
|"shady-link"
108
108
|"synchronous-io"
109
109
|"log-usage"
110
-
|"serialize-environment";
110
+
|"serialize-environment"
111
+
|"monkey-patch";
111
112
112
113
declareconst warnings:Record<WarningName, {
113
114
i18n:string;
@@ -148,7 +149,7 @@ This section describes all the possible warnings returned by JSXRay. Click on th
148
149
|[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. |
149
150
|[log-usage](./docs/log-usage.md)| ❌ | The code contains a log call. |
150
151
|[sql-injection](./docs/sql-injection.md)| ❌ | The code contains a SQL injection vulnerability |
151
-
152
+
|[monkey-patch](./docs/monkey-patch.md)| ❌ | The code override a native JavaScript prototype |
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