mirror of
https://github.com/github/codeql.git
synced 2026-01-29 22:32:58 +01:00
6
.github/workflows/codeqltest.yml
vendored
6
.github/workflows/codeqltest.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
echo "Done"
|
||||
cd $HOME
|
||||
echo "Downloading CodeQL CLI..."
|
||||
curl https://github.com/github/codeql-cli-binaries/releases/download/v2.4.0/codeql.zip -L -o codeql.zip
|
||||
curl https://github.com/github/codeql-cli-binaries/releases/download/v2.4.1/codeql.zip -L -o codeql.zip
|
||||
echo "Done"
|
||||
echo "Unpacking CodeQL CLI..."
|
||||
unzip -q codeql.zip
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
echo "Done"
|
||||
cd $HOME
|
||||
echo "Downloading CodeQL CLI..."
|
||||
curl https://github.com/github/codeql-cli-binaries/releases/download/v2.4.0/codeql.zip -L -o codeql.zip
|
||||
curl https://github.com/github/codeql-cli-binaries/releases/download/v2.4.1/codeql.zip -L -o codeql.zip
|
||||
echo "Done"
|
||||
echo "Unpacking CodeQL CLI..."
|
||||
unzip -q codeql.zip
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
echo "Done"
|
||||
cd "$HOME"
|
||||
echo "Downloading CodeQL CLI..."
|
||||
Invoke-WebRequest -Uri https://github.com/github/codeql-cli-binaries/releases/download/v2.4.0/codeql.zip -OutFile codeql.zip
|
||||
Invoke-WebRequest -Uri https://github.com/github/codeql-cli-binaries/releases/download/v2.4.1/codeql.zip -OutFile codeql.zip
|
||||
echo "Done"
|
||||
echo "Unpacking CodeQL CLI..."
|
||||
Expand-Archive codeql.zip -DestinationPath $HOME
|
||||
|
||||
@@ -73,9 +73,8 @@ module BeegoOrm {
|
||||
private class StringFieldSource extends StoredXss::Source {
|
||||
StringFieldSource() {
|
||||
exists(Method m |
|
||||
m
|
||||
.hasQualifiedName(packagePath(), ["JSONField", "JsonbField", "TextField"],
|
||||
["RawValue", "String", "Value"])
|
||||
m.hasQualifiedName(packagePath(), ["JSONField", "JsonbField", "TextField"],
|
||||
["RawValue", "String", "Value"])
|
||||
|
|
||||
this = m.getACall().getResult()
|
||||
)
|
||||
@@ -86,12 +85,11 @@ module BeegoOrm {
|
||||
SeterSource() {
|
||||
exists(Method impl |
|
||||
// All and One are exclusive to QuerySeter, QueryRow[s] are exclusive to RawSeter, the rest are common.
|
||||
impl
|
||||
.implements(packagePath(), ["QuerySeter", "RawSeter"],
|
||||
[
|
||||
"All", "One", "Values", "ValuesList", "ValuesFlat", "RowsToMap", "RowsToStruct",
|
||||
"QueryRow", "QueryRows"
|
||||
])
|
||||
impl.implements(packagePath(), ["QuerySeter", "RawSeter"],
|
||||
[
|
||||
"All", "One", "Values", "ValuesList", "ValuesFlat", "RowsToMap", "RowsToStruct",
|
||||
"QueryRow", "QueryRows"
|
||||
])
|
||||
|
|
||||
this = FunctionOutput::parameter(0).getExitNode(impl.getACall())
|
||||
)
|
||||
|
||||
@@ -9,12 +9,11 @@ private module GoRestfulHttp {
|
||||
*/
|
||||
private class GoRestfulSourceMethod extends Method {
|
||||
GoRestfulSourceMethod() {
|
||||
this
|
||||
.hasQualifiedName(package("github.com/emicklei/go-restful", ""), "Request",
|
||||
[
|
||||
"QueryParameters", "QueryParameter", "BodyParameter", "HeaderParameter",
|
||||
"PathParameter", "PathParameters"
|
||||
])
|
||||
this.hasQualifiedName(package("github.com/emicklei/go-restful", ""), "Request",
|
||||
[
|
||||
"QueryParameters", "QueryParameter", "BodyParameter", "HeaderParameter", "PathParameter",
|
||||
"PathParameters"
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +30,7 @@ private module GoRestfulHttp {
|
||||
private class GoRestfulReadEntitySource extends UntrustedFlowSource::Range {
|
||||
GoRestfulReadEntitySource() {
|
||||
exists(DataFlow::MethodCallNode call |
|
||||
call
|
||||
.getTarget()
|
||||
call.getTarget()
|
||||
.hasQualifiedName(package("github.com/emicklei/go-restful", ""), "Request", "ReadEntity")
|
||||
|
|
||||
this = FunctionOutput::parameter(0).getExitNode(call)
|
||||
|
||||
@@ -12,15 +12,14 @@ module K8sIoApimachineryPkgRuntime {
|
||||
|
||||
private class ConvertTypeToType extends TaintTracking::FunctionModel {
|
||||
ConvertTypeToType() {
|
||||
this
|
||||
.hasQualifiedName(packagePath(),
|
||||
[
|
||||
"Convert_Slice_string_To_Pointer_int64", "Convert_Slice_string_To_int",
|
||||
"Convert_Slice_string_To_int64", "Convert_Slice_string_To_string",
|
||||
"Convert_runtime_Object_To_runtime_RawExtension",
|
||||
"Convert_runtime_RawExtension_To_runtime_Object", "Convert_string_To_Pointer_int64",
|
||||
"Convert_string_To_int64"
|
||||
])
|
||||
this.hasQualifiedName(packagePath(),
|
||||
[
|
||||
"Convert_Slice_string_To_Pointer_int64", "Convert_Slice_string_To_int",
|
||||
"Convert_Slice_string_To_int64", "Convert_Slice_string_To_string",
|
||||
"Convert_runtime_Object_To_runtime_RawExtension",
|
||||
"Convert_runtime_RawExtension_To_runtime_Object", "Convert_string_To_Pointer_int64",
|
||||
"Convert_string_To_int64"
|
||||
])
|
||||
}
|
||||
|
||||
override predicate hasTaintFlow(DataFlow::FunctionInput inp, DataFlow::FunctionOutput outp) {
|
||||
|
||||
@@ -64,8 +64,7 @@ module Revel {
|
||||
private class UserControlledRequestMethod extends UntrustedFlowSource::Range,
|
||||
DataFlow::MethodCallNode {
|
||||
UserControlledRequestMethod() {
|
||||
this
|
||||
.getTarget()
|
||||
this.getTarget()
|
||||
.hasQualifiedName(packagePath(), "Request",
|
||||
[
|
||||
"FormValue", "PostFormValue", "GetQuery", "GetForm", "GetMultipartForm", "GetBody",
|
||||
|
||||
@@ -61,8 +61,7 @@ module CleartextLogging {
|
||||
)
|
||||
or
|
||||
// avoid i18n strings
|
||||
this
|
||||
.(DataFlow::FieldReadNode)
|
||||
this.(DataFlow::FieldReadNode)
|
||||
.getBase()
|
||||
.asExpr()
|
||||
.(Ident)
|
||||
|
||||
Reference in New Issue
Block a user