Skip to content

Commit d93d3c8

Browse files
committed
C++: Use the getSourceType predicate on RemoteFlowSources for better alert messages.
1 parent d1272d3 commit d93d3c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/Security/CWE/CWE-020/IRUntrustedDataToExternalAPI.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
import cpp
1212
import semmle.code.cpp.ir.dataflow.TaintTracking
1313
import semmle.code.cpp.security.ir.ExternalAPIs
14+
import semmle.code.cpp.security.FlowSources
1415
import DataFlow::PathGraph
1516

1617
from UntrustedDataToExternalAPIConfig config, DataFlow::PathNode source, DataFlow::PathNode sink
1718
where config.hasFlowPath(source, sink)
1819
select sink, source, sink,
1920
"Call to " + sink.getNode().(ExternalAPIDataNode).getExternalFunction().toString() +
20-
" with untrusted data from $@.", source, source.toString()
21+
" with untrusted data from $@.", source, source.getNode().(RemoteFlowSource).getSourceType()

0 commit comments

Comments
 (0)