Skip to content

Commit da00120

Browse files
committed
Promote sources in mime/multipart package
These were contributed by @am0o0 in #13553 .
1 parent 982765c commit da00120

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

go/ql/lib/ext/mime.multipart.model.yml

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
extensions:
2+
- addsTo:
3+
pack: codeql/go-all
4+
extensible: sourceModel
5+
data:
6+
- ["mime/multipart", "FileHeader", True, "Open", "", "", "ReturnValue[0]", "remote", "manual"]
7+
- ["mime/multipart", "FileHeader", True, "FileName", "", "", "", "remote", "manual"]
8+
- ["mime/multipart", "FileHeader", True, "Header", "", "", "", "remote", "manual"]
9+
- ["mime/multipart", "Form", True, "Value", "", "", "", "remote", "manual"]
110
extensions:
211
- addsTo:
312
pack: codeql/go-all

go/ql/src/experimental/frameworks/DecompressionBombs.qll

-17
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,6 @@
44

55
import go
66

7-
class MimeMultipartFileHeader extends UntrustedFlowSource::Range {
8-
MimeMultipartFileHeader() {
9-
exists(DataFlow::FieldReadNode frn | this = frn |
10-
frn.getField().hasQualifiedName("mime/multipart", "FileHeader", ["Filename", "Header"])
11-
)
12-
or
13-
exists(DataFlow::Method m |
14-
m.hasQualifiedName("mime/multipart", "FileHeader", "Open") and
15-
this = m.getACall().getResult(0)
16-
)
17-
or
18-
exists(DataFlow::FieldReadNode frn |
19-
frn.getField().hasQualifiedName("mime/multipart", "Form", "Value")
20-
)
21-
}
22-
}
23-
247
/** Provides a taint tracking configuration for reasoning about decompression bomb vulnerabilities. */
258
module DecompressionBomb {
269
import experimental.frameworks.DecompressionBombsCustomizations

0 commit comments

Comments
 (0)