Skip to content

Commit b3c83d1

Browse files
committed
Update supported sink and source kinds
1 parent bd57005 commit b3c83d1

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

extensions/ql-vscode/src/model-editor/languages/csharp/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ export const csharp: ModelsAsDataLanguage = {
1010
},
1111
source: {
1212
...staticLanguage.predicates.source,
13+
supportedKinds: [
14+
...staticLanguage.predicates.source.supportedKinds,
15+
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L122-L123
16+
"file-write",
17+
"windows-registry",
18+
],
1319
},
1420
},
1521
};

extensions/ql-vscode/src/model-editor/languages/java/index.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,36 @@ export const java: ModelsAsDataLanguage = {
77
...staticLanguage.predicates,
88
sink: {
99
...staticLanguage.predicates.sink,
10+
supportedKinds: [
11+
...staticLanguage.predicates.sink.supportedKinds,
12+
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L32-L37
13+
"bean-validation",
14+
"fragment-injection",
15+
"groovy-injection",
16+
"hostname-verification",
17+
"information-leak",
18+
"intent-redirection",
19+
"jexl-injection",
20+
"jndi-injection",
21+
"mvel-injection",
22+
"notification",
23+
"ognl-injection",
24+
"pending-intents",
25+
"response-splitting",
26+
"trust-boundary-violation",
27+
"template-injection",
28+
"xpath-injection",
29+
"xslt-injection",
30+
],
1031
},
1132
source: {
1233
...staticLanguage.predicates.source,
34+
supportedKinds: [
35+
...staticLanguage.predicates.source.supportedKinds,
36+
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L120-L121
37+
"android-external-storage-dir",
38+
"contentprovider",
39+
],
1340
},
1441
},
1542
};

extensions/ql-vscode/src/model-editor/languages/shared.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ export const sharedExtensiblePredicates = {
66
};
77

88
export const sharedKinds = {
9-
source: ["local", "remote"],
9+
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L118-L119
10+
source: ["local", "remote", "file", "commandargs", "database", "environment"],
11+
// Bhttps://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L28-L31
1012
sink: [
1113
"code-injection",
1214
"command-injection",
15+
"environment-injection",
1316
"file-content-store",
1417
"html-injection",
1518
"js-injection",
@@ -20,6 +23,8 @@ export const sharedKinds = {
2023
"sql-injection",
2124
"url-redirection",
2225
],
26+
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L142-L143
2327
summary: ["taint", "value"],
28+
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L155-L156
2429
neutral: ["summary", "source", "sink"],
2530
};

0 commit comments

Comments
 (0)