Skip to content

Commit 1115227

Browse files
committed
Merge remote-tracking branch 'origin/main' into nickrolfe/misspelling
2 parents 320b6a1 + 39551fd commit 1115227

File tree

124 files changed

+21301
-5230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+21301
-5230
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"rust-lang.rust",
44
"bungcip.better-toml",
55
"github.vscode-codeql",
6+
"hbenl.vscode-test-explorer",
7+
"ms-vscode.test-adapter-converter",
68
"slevesque.vscode-zipexplorer"
79
],
810
"settings": {

config/identical-files.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,20 +475,23 @@
475475
"python/ql/lib/semmle/python/security/internal/SensitiveDataHeuristics.qll",
476476
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll"
477477
],
478-
"ReDoS Util Python/JS/Ruby": [
478+
"ReDoS Util Python/JS/Ruby/Java": [
479479
"javascript/ql/lib/semmle/javascript/security/performance/ReDoSUtil.qll",
480480
"python/ql/lib/semmle/python/security/performance/ReDoSUtil.qll",
481-
"ruby/ql/lib/codeql/ruby/security/performance/ReDoSUtil.qll"
481+
"ruby/ql/lib/codeql/ruby/security/performance/ReDoSUtil.qll",
482+
"java/ql/lib/semmle/code/java/security/performance/ReDoSUtil.qll"
482483
],
483-
"ReDoS Exponential Python/JS/Ruby": [
484+
"ReDoS Exponential Python/JS/Ruby/Java": [
484485
"javascript/ql/lib/semmle/javascript/security/performance/ExponentialBackTracking.qll",
485486
"python/ql/lib/semmle/python/security/performance/ExponentialBackTracking.qll",
486-
"ruby/ql/lib/codeql/ruby/security/performance/ExponentialBackTracking.qll"
487+
"ruby/ql/lib/codeql/ruby/security/performance/ExponentialBackTracking.qll",
488+
"java/ql/lib/semmle/code/java/security/performance/ExponentialBackTracking.qll"
487489
],
488-
"ReDoS Polynomial Python/JS/Ruby": [
490+
"ReDoS Polynomial Python/JS/Ruby/Java": [
489491
"javascript/ql/lib/semmle/javascript/security/performance/SuperlinearBackTracking.qll",
490492
"python/ql/lib/semmle/python/security/performance/SuperlinearBackTracking.qll",
491-
"ruby/ql/lib/codeql/ruby/security/performance/SuperlinearBackTracking.qll"
493+
"ruby/ql/lib/codeql/ruby/security/performance/SuperlinearBackTracking.qll",
494+
"java/ql/lib/semmle/code/java/security/performance/SuperlinearBackTracking.qll"
492495
],
493496
"BadTagFilterQuery Python/JS/Ruby": [
494497
"javascript/ql/lib/semmle/javascript/security/BadTagFilterQuery.qll",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
class Element extends @element {
2+
string toString() { none() }
3+
}
4+
5+
class Expr extends @expr {
6+
string toString() { none() }
7+
}
8+
9+
class Stmt extends @stmt {
10+
string toString() { none() }
11+
}
12+
13+
predicate isStmtWithInitializer(Stmt stmt) {
14+
exists(int kind | stmts(stmt, kind, _) | kind = 2 or kind = 11 or kind = 35)
15+
}
16+
17+
from Expr child, int index, int index_new, Element parent
18+
where
19+
exprparents(child, index, parent) and
20+
if isStmtWithInitializer(parent) then index_new = index - 1 else index_new = index
21+
select child, index_new, parent

0 commit comments

Comments
 (0)