We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6e8e3d commit 703cea2Copy full SHA for 703cea2
1 file changed
go/ql/lib/semmle/go/frameworks/stdlib/Log.qll
@@ -47,6 +47,19 @@ module Log {
47
override predicate mayReturnNormally() { none() }
48
}
49
50
+ /** A log function which must panic. */
51
+ private class PanicLogFunction extends Function {
52
+ PanicLogFunction() {
53
+ exists(string fn | fn = ["Panic", "Panicf", "Panicln"] |
54
+ this.hasQualifiedName("log", fn)
55
+ or
56
+ this.(Method).hasQualifiedName("log", "Logger", fn)
57
+ )
58
+ }
59
+
60
+ override predicate mustPanic() { any() }
61
62
63
// These models are not implemented using Models-as-Data because they represent reverse flow.
64
private class FunctionModels extends TaintTracking::FunctionModel {
65
FunctionInput inp;
0 commit comments