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: javascript/ql/src/Security/CWE-693/InsecureHelmet.qhelp
+20-2Lines changed: 20 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
<qhelp>
3
3
<overview>
4
4
<p>
5
-
<ahref="https://helmetjs.github.io/">Helmet</a> is a collection of middleware functions for securing Express apps. It sets various HTTP headers to guard against common web vulnerabilities.
5
+
<ahref="https://helmetjs.github.io/">Helmet</a> is a collection of middleware functions for securing Express apps. It sets various HTTP headers to guard against common web vulnerabilities.<br>
6
6
7
7
This query detects Helmet misconfigurations that can lead to security vulnerabilities, specifically:
8
8
</p>
@@ -13,10 +13,28 @@
13
13
</ul>
14
14
15
15
<p>
16
-
Content Security Policy (CSP) helps spot and prevent injection attacks such as Cross-Site Scripting (XSS).
16
+
Content Security Policy (CSP) helps spot and prevent injection attacks such as Cross-Site Scripting (XSS).<br>
17
17
18
18
Removing frame protections exposes an application to attacks such as clickjacking, where an attacker can trick a user into clicking on a button or link on a targeted page when they intended to click on the page carrying out the attack.
19
19
</p>
20
+
21
+
<p>
22
+
Users of the query can extend the set of required Helmet features by adding additional checks for them, using CodeQL <ahref="https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-javascript/">data extensions</a>.
23
+
</p>
24
+
25
+
<pre>
26
+
extensions:
27
+
- addsTo:
28
+
pack: codeql/javascript-all
29
+
extensible: requiredHelmetSecuritySetting
30
+
data:
31
+
- name: "frameguard"
32
+
</pre>
33
+
34
+
<p>
35
+
Note: <code>frameguard</code> is an example: the query already enforces this setting, so it is not necessary to add it to the data extension.
0 commit comments