This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
ql/src/semmle/go/frameworks/stdlib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,30 +13,22 @@ module EncodingJson {
1313 }
1414
1515 /** The `Marshal` or `MarshalIndent` function in the `encoding/json` package. */
16- class MarshalFunction extends TaintTracking :: FunctionModel , MarshalingFunction:: Range {
16+ class MarshalFunction extends MarshalingFunction:: Range {
1717 MarshalFunction ( ) {
1818 this .hasQualifiedName ( "encoding/json" , "Marshal" ) or
1919 this .hasQualifiedName ( "encoding/json" , "MarshalIndent" )
2020 }
2121
22- override predicate hasTaintFlow ( FunctionInput inp , FunctionOutput outp ) {
23- inp = getAnInput ( ) and outp = getOutput ( )
24- }
25-
2622 override FunctionInput getAnInput ( ) { result .isParameter ( 0 ) }
2723
2824 override FunctionOutput getOutput ( ) { result .isResult ( 0 ) }
2925
3026 override string getFormat ( ) { result = "JSON" }
3127 }
3228
33- private class UnmarshalFunction extends TaintTracking :: FunctionModel , UnmarshalingFunction:: Range {
29+ private class UnmarshalFunction extends UnmarshalingFunction:: Range {
3430 UnmarshalFunction ( ) { this .hasQualifiedName ( "encoding/json" , "Unmarshal" ) }
3531
36- override predicate hasTaintFlow ( FunctionInput inp , FunctionOutput outp ) {
37- inp = getAnInput ( ) and outp = getOutput ( )
38- }
39-
4032 override FunctionInput getAnInput ( ) { result .isParameter ( 0 ) }
4133
4234 override FunctionOutput getOutput ( ) { result .isParameter ( 1 ) }
You can’t perform that action at this time.
0 commit comments