Merge pull request #448 from sauyon/autoformat

Autoformatter update
This commit is contained in:
Sauyon Lee
2021-01-12 14:29:45 +00:00
committed by GitHub
6 changed files with 26 additions and 33 deletions

View File

@@ -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

View File

@@ -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())
)

View File

@@ -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)

View File

@@ -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) {

View File

@@ -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",

View File

@@ -61,8 +61,7 @@ module CleartextLogging {
)
or
// avoid i18n strings
this
.(DataFlow::FieldReadNode)
this.(DataFlow::FieldReadNode)
.getBase()
.asExpr()
.(Ident)