mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Exclude logging sinks
Those sinks are too coarse grained to be exposed as sinks on any model.
This commit is contained in:
@@ -48,6 +48,7 @@ string captureSink(TargetAPI api) {
|
||||
config.hasFlow(src, sink) and
|
||||
sinkNode(sink, kind) and
|
||||
api = src.getEnclosingCallable() and
|
||||
not kind = "logging" and
|
||||
result = asSinkModel(api, asInputArgument(src), kind)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.nio.file.CopyOption;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class Sinks {
|
||||
|
||||
@@ -25,4 +26,9 @@ public class Sinks {
|
||||
String foo = new Sinks().readUrl(new URL(args[0]), Charset.defaultCharset());
|
||||
}
|
||||
|
||||
public void propagate(String s) {
|
||||
Logger logger = Logger.getLogger(Sinks.class.getSimpleName());
|
||||
logger.warning(s);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user