Skip to content

Commit f53df25

Browse files
authored
Merge pull request #8459 from erik-krogh/addSeverities
JS: add missing @security-severity to JS queries
2 parents 82ef2a1 + d47b0a6 commit f53df25

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

javascript/ql/src/Security/CWE-094/UnsafeCodeConstruction.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* user to execute arbitrary code.
55
* @kind path-problem
66
* @problem.severity warning
7+
* @security-severity 6.1
78
* @precision medium
89
* @id js/unsafe-code-construction
910
* @tags security

javascript/ql/src/Security/CWE-347/MissingJWTKeyVerification.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* @description The application does not verify the JWT payload with a cryptographic secret or public key.
44
* @kind problem
55
* @problem.severity warning
6+
* @security-severity 7.0
67
* @precision high
78
* @id js/jwt-missing-verification
89
* @tags security

ql/ql/src/queries/style/MissingSecurityMetadata.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ predicate missingSecurityTag(QLDoc doc) {
4141
from TopLevel t, string msg
4242
where
4343
t.getLocation().getFile().getBaseName().matches("%.ql") and
44-
not t.getLocation().getFile().getRelativePath().matches(["%/experimental/%", "%/examples/%"]) and
44+
not t.getLocation()
45+
.getFile()
46+
.getRelativePath()
47+
.matches("%/" + ["experimental", "examples", "test"] + "/%") and
4548
(
4649
missingSecuritySeverity(t.getQLDoc()) and
4750
msg = "This query file is missing a `@security-severity` tag."

0 commit comments

Comments
 (0)