Skip to content

Commit 7136763

Browse files
committed
Formatting
1 parent 465d64a commit 7136763

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

javascript/ql/src/Security/CWE-693/InsecureHelmet.ql

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,27 @@ class HelmetProperty extends Property {
2626

2727
predicate isImportantSecuritySetting() {
2828
this.getName() in ["frameguard", "contentSecurityPolicy"]
29+
or
2930
// read from data extensions to allow enforcing other settings
30-
or requiredHelmetSecuritySetting(this.getName())
31+
requiredHelmetSecuritySetting(this.getName())
3132
}
3233
}
3334

3435
/*
3536
* Extend the required Helmet security settings using data extensions.
3637
* Docs: https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-javascript/
3738
* For example:
38-
39-
extensions:
40-
- addsTo:
41-
pack: codeql/javascript-all
42-
extensible: requiredHelmetSecuritySetting
43-
data:
44-
- name: "frameguard"
45-
46-
* Note: `frameguard` is an example: the query already enforces this setting, so it is not necessary to add it to the data extension.
47-
39+
*
40+
* extensions:
41+
* - addsTo:
42+
* pack: codeql/javascript-all
43+
* extensible: requiredHelmetSecuritySetting
44+
* data:
45+
* - name: "frameguard"
46+
*
47+
* Note: `frameguard` is an example: the query already enforces this setting, so it is not necessary to add it to the data extension.
4848
*/
49+
4950
extensible predicate requiredHelmetSecuritySetting(string name);
5051

5152
from HelmetProperty helmetSetting, ExpressLibraries::HelmetRouteHandler helmet

0 commit comments

Comments
 (0)