This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
ql/src/semmle/go/frameworks/stdlib Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -7,30 +7,22 @@ import go
7
7
/** Provides models of commonly used functions in the `encoding/xml` package. */
8
8
module EncodingXml {
9
9
/** 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 {
11
11
MarshalFunction ( ) {
12
12
this .hasQualifiedName ( "encoding/xml" , "Marshal" ) or
13
13
this .hasQualifiedName ( "encoding/xml" , "MarshalIndent" )
14
14
}
15
15
16
- override predicate hasTaintFlow ( FunctionInput inp , FunctionOutput outp ) {
17
- inp = getAnInput ( ) and outp = getOutput ( )
18
- }
19
-
20
16
override FunctionInput getAnInput ( ) { result .isParameter ( 0 ) }
21
17
22
18
override FunctionOutput getOutput ( ) { result .isResult ( 0 ) }
23
19
24
20
override string getFormat ( ) { result = "XML" }
25
21
}
26
22
27
- private class UnmarshalFunction extends TaintTracking :: FunctionModel , UnmarshalingFunction:: Range {
23
+ private class UnmarshalFunction extends UnmarshalingFunction:: Range {
28
24
UnmarshalFunction ( ) { this .hasQualifiedName ( "encoding/xml" , "Unmarshal" ) }
29
25
30
- override predicate hasTaintFlow ( FunctionInput inp , FunctionOutput outp ) {
31
- inp = getAnInput ( ) and outp = getOutput ( )
32
- }
33
-
34
26
override FunctionInput getAnInput ( ) { result .isParameter ( 0 ) }
35
27
36
28
override FunctionOutput getOutput ( ) { result .isParameter ( 1 ) }
You can’t perform that action at this time.
0 commit comments