Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 64a61bd

Browse files
committed
Remove redundant taint-tracking from MarshalingFunction and UnmarshalingFunction classes in EncodingXml module.
1 parent 947bbab commit 64a61bd

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

ql/src/semmle/go/frameworks/stdlib/EncodingXml.qll

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,22 @@ import go
77
/** Provides models of commonly used functions in the `encoding/xml` package. */
88
module 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) }

0 commit comments

Comments
 (0)