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 @@ -7,30 +7,22 @@ import go
77/** Provides models of commonly used functions in the `encoding/xml` package. */
88module EncodingXml {
99 /** The `Marshal` or `MarshalIndent` function in the `encoding/xml` package. */
10- class MarshalFunction extends TaintTracking :: FunctionModel , MarshalingFunction:: Range {
10+ private class MarshalFunction extends MarshalingFunction:: Range {
1111 MarshalFunction ( ) {
1212 this .hasQualifiedName ( "encoding/xml" , "Marshal" ) or
1313 this .hasQualifiedName ( "encoding/xml" , "MarshalIndent" )
1414 }
1515
16- override predicate hasTaintFlow ( FunctionInput inp , FunctionOutput outp ) {
17- inp = getAnInput ( ) and outp = getOutput ( )
18- }
19-
2016 override FunctionInput getAnInput ( ) { result .isParameter ( 0 ) }
2117
2218 override FunctionOutput getOutput ( ) { result .isResult ( 0 ) }
2319
2420 override string getFormat ( ) { result = "XML" }
2521 }
2622
27- private class UnmarshalFunction extends TaintTracking :: FunctionModel , UnmarshalingFunction:: Range {
23+ private class UnmarshalFunction extends UnmarshalingFunction:: Range {
2824 UnmarshalFunction ( ) { this .hasQualifiedName ( "encoding/xml" , "Unmarshal" ) }
2925
30- override predicate hasTaintFlow ( FunctionInput inp , FunctionOutput outp ) {
31- inp = getAnInput ( ) and outp = getOutput ( )
32- }
33-
3426 override FunctionInput getAnInput ( ) { result .isParameter ( 0 ) }
3527
3628 override FunctionOutput getOutput ( ) { result .isParameter ( 1 ) }
You can’t perform that action at this time.
0 commit comments