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
{{ message }}
Repository navigation
Commit f275f9f
Browse filesBrowse the repository at this point in the historyBrowse files
Disallow the use of inline `<script>` tags and inline JavaScript event handler attributes (e.g. `onclick`, `onload`) in HTML templates.
8
+
9
+
## Rationale
10
+
11
+
Inline JavaScript poses a significant security risk and is incompatible with strict Content Security Policy (CSP) configurations (`script-src 'self'`).
12
+
13
+
All JavaScript should be included via external assets to support strong CSP policies that prevent cross-site scripting (XSS) attacks.
14
+
15
+
This rule enforces:
16
+
17
+
- No `<script>` tags embedded directly in templates.
18
+
- No event handler attributes (`onclick`, `onmouseover`, etc.).
0 commit comments