mirror of
https://github.com/github/codeql.git
synced 2026-01-29 22:32:58 +01:00
Remove redundant taint-tracking from MarshalingFunction and UnmarshalingFunction classes in EncodingXml module.
This commit is contained in:
@@ -7,16 +7,12 @@ import go
|
||||
/** Provides models of commonly used functions in the `encoding/xml` package. */
|
||||
module EncodingXml {
|
||||
/** The `Marshal` or `MarshalIndent` function in the `encoding/xml` package. */
|
||||
class MarshalFunction extends TaintTracking::FunctionModel, MarshalingFunction::Range {
|
||||
private class MarshalFunction extends MarshalingFunction::Range {
|
||||
MarshalFunction() {
|
||||
this.hasQualifiedName("encoding/xml", "Marshal") or
|
||||
this.hasQualifiedName("encoding/xml", "MarshalIndent")
|
||||
}
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
|
||||
inp = getAnInput() and outp = getOutput()
|
||||
}
|
||||
|
||||
override FunctionInput getAnInput() { result.isParameter(0) }
|
||||
|
||||
override FunctionOutput getOutput() { result.isResult(0) }
|
||||
@@ -24,13 +20,9 @@ module EncodingXml {
|
||||
override string getFormat() { result = "XML" }
|
||||
}
|
||||
|
||||
private class UnmarshalFunction extends TaintTracking::FunctionModel, UnmarshalingFunction::Range {
|
||||
private class UnmarshalFunction extends UnmarshalingFunction::Range {
|
||||
UnmarshalFunction() { this.hasQualifiedName("encoding/xml", "Unmarshal") }
|
||||
|
||||
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
|
||||
inp = getAnInput() and outp = getOutput()
|
||||
}
|
||||
|
||||
override FunctionInput getAnInput() { result.isParameter(0) }
|
||||
|
||||
override FunctionOutput getOutput() { result.isParameter(1) }
|
||||
|
||||
Reference in New Issue
Block a user