Update supported sink and source kinds

This commit is contained in:
Koen Vlaswinkel
2024-03-26 12:09:51 +01:00
parent bd57005832
commit b3c83d175a
3 changed files with 39 additions and 1 deletions

View File

@@ -10,6 +10,12 @@ export const csharp: ModelsAsDataLanguage = {
}, },
source: { source: {
...staticLanguage.predicates.source, ...staticLanguage.predicates.source,
supportedKinds: [
...staticLanguage.predicates.source.supportedKinds,
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L122-L123
"file-write",
"windows-registry",
],
}, },
}, },
}; };

View File

@@ -7,9 +7,36 @@ export const java: ModelsAsDataLanguage = {
...staticLanguage.predicates, ...staticLanguage.predicates,
sink: { sink: {
...staticLanguage.predicates.sink, ...staticLanguage.predicates.sink,
supportedKinds: [
...staticLanguage.predicates.sink.supportedKinds,
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L32-L37
"bean-validation",
"fragment-injection",
"groovy-injection",
"hostname-verification",
"information-leak",
"intent-redirection",
"jexl-injection",
"jndi-injection",
"mvel-injection",
"notification",
"ognl-injection",
"pending-intents",
"response-splitting",
"trust-boundary-violation",
"template-injection",
"xpath-injection",
"xslt-injection",
],
}, },
source: { source: {
...staticLanguage.predicates.source, ...staticLanguage.predicates.source,
supportedKinds: [
...staticLanguage.predicates.source.supportedKinds,
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L120-L121
"android-external-storage-dir",
"contentprovider",
],
}, },
}, },
}; };

View File

@@ -6,10 +6,13 @@ export const sharedExtensiblePredicates = {
}; };
export const sharedKinds = { export const sharedKinds = {
source: ["local", "remote"], // https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L118-L119
source: ["local", "remote", "file", "commandargs", "database", "environment"],
// Bhttps://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L28-L31
sink: [ sink: [
"code-injection", "code-injection",
"command-injection", "command-injection",
"environment-injection",
"file-content-store", "file-content-store",
"html-injection", "html-injection",
"js-injection", "js-injection",
@@ -20,6 +23,8 @@ export const sharedKinds = {
"sql-injection", "sql-injection",
"url-redirection", "url-redirection",
], ],
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L142-L143
summary: ["taint", "value"], summary: ["taint", "value"],
// https://github.com/github/codeql/blob/0c5ea975a4c4dc5c439b908c006e440cb9bdf926/shared/mad/codeql/mad/ModelValidation.qll#L155-L156
neutral: ["summary", "source", "sink"], neutral: ["summary", "source", "sink"],
}; };